Section 1
//baron_fgplatformer01 (assets.baron_fgplatformer01)
package assets {
import flash.display.*;
public dynamic class baron_fgplatformer01 extends BitmapData {
public function baron_fgplatformer01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 2
//baron_fgworldidle01 (assets.baron_fgworldidle01)
package assets {
import flash.display.*;
public dynamic class baron_fgworldidle01 extends BitmapData {
public function baron_fgworldidle01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 3
//baron_worldidle01 (assets.baron_worldidle01)
package assets {
import flash.display.*;
public dynamic class baron_worldidle01 extends BitmapData {
public function baron_worldidle01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 4
//bes_master_fgplatformer01 (assets.bes_master_fgplatformer01)
package assets {
import flash.display.*;
public dynamic class bes_master_fgplatformer01 extends BitmapData {
public function bes_master_fgplatformer01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 5
//bes_master_fgworldidle01 (assets.bes_master_fgworldidle01)
package assets {
import flash.display.*;
public dynamic class bes_master_fgworldidle01 extends BitmapData {
public function bes_master_fgworldidle01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 6
//bes_master_walk01 (assets.bes_master_walk01)
package assets {
import flash.display.*;
public dynamic class bes_master_walk01 extends BitmapData {
public function bes_master_walk01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 7
//guy_fgplatformer01 (assets.guy_fgplatformer01)
package assets {
import flash.display.*;
public dynamic class guy_fgplatformer01 extends BitmapData {
public function guy_fgplatformer01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 8
//guy_fgworldidle01 (assets.guy_fgworldidle01)
package assets {
import flash.display.*;
public dynamic class guy_fgworldidle01 extends BitmapData {
public function guy_fgworldidle01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 9
//guy_walk01 (assets.guy_walk01)
package assets {
import flash.display.*;
public dynamic class guy_walk01 extends BitmapData {
public function guy_walk01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 10
//guy_worldidle01 (assets.guy_worldidle01)
package assets {
import flash.display.*;
public dynamic class guy_worldidle01 extends BitmapData {
public function guy_worldidle01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 11
//guy_yayworld01 (assets.guy_yayworld01)
package assets {
import flash.display.*;
public dynamic class guy_yayworld01 extends BitmapData {
public function guy_yayworld01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 12
//malecivilian_fgplatformer01 (assets.malecivilian_fgplatformer01)
package assets {
import flash.display.*;
public dynamic class malecivilian_fgplatformer01 extends BitmapData {
public function malecivilian_fgplatformer01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 13
//xoxolexi568_fgplatformer01 (assets.xoxolexi568_fgplatformer01)
package assets {
import flash.display.*;
public dynamic class xoxolexi568_fgplatformer01 extends BitmapData {
public function xoxolexi568_fgplatformer01(_arg1:Number, _arg2:Number){
super(_arg1, _arg2);
}
}
}//package assets
Section 14
//Anim_MCA_MirageFadeLeftMC_19 (Blink_fla.Anim_MCA_MirageFadeLeftMC_19)
package Blink_fla {
import flash.display.*;
public dynamic class Anim_MCA_MirageFadeLeftMC_19 extends MovieClip {
public var chargeLeftSprite:Sprite;
public function Anim_MCA_MirageFadeLeftMC_19(){
addFrameScript(0, frame1, 1, frame2);
}
public function addChargeLeftSprite():void{
this.chargeLeftSprite = BlinkDoc(root).playerChargeLeftSprite;
addChild(this.chargeLeftSprite);
}
function frame1(){
addChargeLeftSprite();
this.chargeLeftSprite.visible = true;
}
function frame2(){
stop();
}
}
}//package Blink_fla
Section 15
//BallOfLightMC_66 (Blink_fla.BallOfLightMC_66)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class BallOfLightMC_66 extends MovieClip {
public var WALK_SPD:Number;
public var nextFrameLblStr:String;
public var currEnterFrameFunc:Function;
public var prePauseEnterFrameFunc:Function;
public var numTouches:Number;
public var parentMC:BlinkLevel_Tutorial;
public function BallOfLightMC_66(){
addFrameScript(0, frame1, 1, frame2, 20, frame21);
}
public function pauseMC():void{
if (this.currEnterFrameFunc != null){
this.prePauseEnterFrameFunc = this.currEnterFrameFunc;
this.currEnterFrameFunc = function (){
};
};
}
public function onEF_movement6_sub2():void{
if ((this.x - (WALK_SPD * 4)) > 50){
this.x = (this.x - (WALK_SPD * 4));
this.y = (this.y + 5);
} else {
this.x = 275;
this.y = 150;
MovieClip(root).getSndManager().playSFX_Zoom();
this.currEnterFrameFunc = onEF_hitTestFunc;
};
}
public function onEF_hitTestFunc():void{
if (((this.hitTestObject(this.parentMC.mainCharaMC.hitBoxMC)) && (!(this.parentMC.mainCharaMC.frozen)))){
this.currEnterFrameFunc = function (){
};
onTouch();
};
}
public function initBallOfLight():void{
this.numTouches = 0;
this.prePauseEnterFrameFunc = function (){
};
}
public function unpauseMC():void{
if (this.currEnterFrameFunc != null){
this.currEnterFrameFunc = this.prePauseEnterFrameFunc;
};
}
function frame21(){
gotoAndPlay(this.nextFrameLblStr);
}
public function onEF_movement6_sub1():void{
if ((this.x + (WALK_SPD * 4)) < 550){
this.x = (this.x + (WALK_SPD * 4));
} else {
MovieClip(root).getSndManager().playSFX_Zoom();
this.currEnterFrameFunc = onEF_movement6_sub2;
};
}
public function onTouch1():void{
trace("Touch 1");
MovieClip(root).getSndManager().playSFX_TutorialTaskSuccess();
this.currEnterFrameFunc = this.onEF_movement2;
this.parentMC.displayNextDialogueLine();
this.parentMC.tutorialControlsDisplayMC.showControls_RunLeft();
}
public function onTouch2():void{
trace("Touch 2");
MovieClip(root).getSndManager().playSFX_TutorialTaskSuccess();
this.currEnterFrameFunc = onEF_movement3;
this.parentMC.displayNextDialogueLine();
this.parentMC.tutorialControlsDisplayMC.showControls_Jump();
}
public function onTouch3():void{
trace("Touch 3");
MovieClip(root).getSndManager().playSFX_TutorialTaskSuccess();
this.currEnterFrameFunc = onEF_movement4;
this.parentMC.displayNextDialogueLine();
}
public function onTouch6():void{
trace("Touch 6");
MovieClip(root).getSndManager().playSFX_TutorialTaskSuccess();
this.currEnterFrameFunc = function (){
};
this.visible = false;
this.x = 700;
this.parentMC.when2ndBlinkComplete();
}
public function onEnterFrameFunc(_arg1:Event):void{
currEnterFrameFunc();
}
public function onEF_movement4():void{
if ((this.x - WALK_SPD) > 50){
this.x = (this.x - WALK_SPD);
} else {
this.currEnterFrameFunc = onEF_hitTestFunc;
};
}
public function onTouch():void{
this.numTouches++;
switch (this.numTouches){
case 1:
onTouch1();
break;
case 2:
onTouch2();
break;
case 3:
onTouch3();
break;
case 4:
onTouch4();
break;
case 5:
onTouch5();
break;
case 6:
onTouch6();
break;
default:
this.currEnterFrameFunc = function (){
};
trace(("--in BallOfLightMC.onTouch(), invalid numTouches: " + this.numTouches));
break;
};
}
public function onEF_movement6():void{
if ((this.x - (WALK_SPD * 2)) > 50){
this.x = (this.x - (WALK_SPD * 2));
} else {
MovieClip(root).getSndManager().playSFX_Zoom();
this.currEnterFrameFunc = onEF_movement6_sub1;
};
}
public function onTouch4():void{
trace("Touch 4");
MovieClip(root).getSndManager().playSFX_TutorialTaskSuccess();
MovieClip(root).getSndManager().playSFX_Zoom();
this.currEnterFrameFunc = onEF_movement5;
this.parentMC.enableTeleportAndDisplayNextDL();
this.parentMC.tutorialControlsDisplayMC.showControls_Blink();
}
public function onTouch5():void{
trace("Touch 5");
MovieClip(root).getSndManager().playSFX_TutorialTaskSuccess();
MovieClip(root).getSndManager().playSFX_Zoom();
this.currEnterFrameFunc = onEF_movement6;
this.parentMC.displayNextDialogueLine();
}
public function onEF_movement2():void{
if ((this.x - WALK_SPD) > 50){
this.x = (this.x - WALK_SPD);
} else {
this.currEnterFrameFunc = onEF_hitTestFunc;
};
}
function frame2(){
this.nextFrameLblStr = "idle";
this.currEnterFrameFunc = function (){
};
this.addEventListener(Event.ENTER_FRAME, onEnterFrameFunc, false, 0, true);
}
public function onEF_movement1():void{
if ((this.x + WALK_SPD) < 500){
this.x = (this.x + WALK_SPD);
} else {
this.currEnterFrameFunc = onEF_hitTestFunc;
};
}
public function onEF_movement3():void{
if ((this.y - 5) > 220){
this.x = (this.x + WALK_SPD);
this.y = (this.y - 5);
} else {
this.currEnterFrameFunc = onEF_hitTestFunc;
};
}
public function onEF_movement5():void{
if ((this.y - 10) > 100){
this.x = (this.x + (WALK_SPD * 2));
this.y = (this.y - 10);
} else {
this.x = 500;
this.y = 100;
this.currEnterFrameFunc = onEF_hitTestFunc;
};
}
function frame1(){
WALK_SPD = 10;
parentMC = BlinkLevel_Tutorial(this.parent);
}
}
}//package Blink_fla
Section 16
//BlackFadeoutMC_69 (Blink_fla.BlackFadeoutMC_69)
package Blink_fla {
import flash.display.*;
public dynamic class BlackFadeoutMC_69 extends MovieClip {
public function BlackFadeoutMC_69(){
addFrameScript(1, frame2, 26, frame27);
}
function frame2(){
stop();
}
function frame27(){
stop();
}
}
}//package Blink_fla
Section 17
//BreakableWallMC_11 (Blink_fla.BreakableWallMC_11)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class BreakableWallMC_11 extends MovieClip {
public var prePauseHitTestFunc:Function;
public var currHitTestFunc:Function;
public var mainCharaMC:MovieClip;
public var currOnBreak:Function;
public function BreakableWallMC_11(){
addFrameScript(0, frame1, 1, frame2, 14, frame15);
}
public function defHitTestFunc():void{
if (((this.hitTestObject(this.mainCharaMC.swooshAnimMC)) && (this.mainCharaMC.swooshAnimMC.lethal))){
this.currHitTestFunc = function (){
};
doBreakAnim();
};
}
public function spawnAt(_arg1:Number, _arg2:Number, _arg3:Function):void{
this.x = _arg1;
this.y = _arg2;
this.visible = true;
this.currHitTestFunc = _arg3;
gotoAndStop("idle");
}
public function initBreakableWall(_arg1:Function):void{
var oBreak = _arg1;
this.currOnBreak = oBreak;
this.currHitTestFunc = function (){
};
this.addEventListener(Event.ENTER_FRAME, hitTestFunc, false, 0, true);
}
public function pauseMC():void{
if (this.currHitTestFunc != null){
this.prePauseHitTestFunc = this.currHitTestFunc;
this.currHitTestFunc = function (){
};
};
}
public function hitTestFunc(_arg1:Event):void{
this.currHitTestFunc();
}
function frame15(){
stop();
onBreak();
}
public function unpauseMC():void{
if (this.currHitTestFunc != null){
this.currHitTestFunc = this.prePauseHitTestFunc;
};
}
function frame1(){
mainCharaMC = MovieClip(this.parent).mainCharaMC;
}
public function doBreakAnim():void{
BlinkDoc(root).getSndManager().playSFX_BrickBreak();
gotoAndPlay("break");
}
public function onBreak():void{
this.currOnBreak();
}
public function stopExisting():void{
this.x = 700;
this.visible = false;
this.removeEventListener(Event.ENTER_FRAME, hitTestFunc);
}
function frame2(){
stop();
}
}
}//package Blink_fla
Section 18
//BuldingCrumbleAnimMC_120 (Blink_fla.BuldingCrumbleAnimMC_120)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class BuldingCrumbleAnimMC_120 extends MovieClip {
public var dustAnimMC:MovieClip;
public function BuldingCrumbleAnimMC_120(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 38, frame39, 59, frame60);
}
public function doCrumbleAnimAt(_arg1:Number, _arg2:Number):void{
this.visible = true;
BlinkDoc(root).getSndManager().playSFX_BuildingCrumble();
dustAnimMC.doDustAnim();
}
public function whenBuildingShockwave():void{
MovieClip(this.parent).whenBuildingShockwave();
}
function frame3(){
this.visible = true;
}
function frame1(){
}
function frame2(){
stop();
this.visible = false;
}
function frame39(){
MovieClip(this.parent).whenBuildingShockwave();
}
function frame60(){
stop();
}
}
}//package Blink_fla
Section 19
//CarryMotionMC_22 (Blink_fla.CarryMotionMC_22)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class CarryMotionMC_22 extends MovieClip {
public var carryChecking:Boolean;
public function CarryMotionMC_22(){
addFrameScript(0, frame1, 1, frame2, 20, frame21);
}
public function doCarryMotion(_arg1:Boolean):void{
this.carryChecking = _arg1;
gotoAndPlay("carrymotion");
}
function frame1(){
}
function frame21(){
MovieClip(this.parent).animateCarryMotionComplete();
gotoAndStop("idle");
}
function frame2(){
stop();
this.visible = false;
this.carryChecking = false;
}
}
}//package Blink_fla
Section 20
//ChancesDisplayMC_30 (Blink_fla.ChancesDisplayMC_30)
package Blink_fla {
import flash.display.*;
import flash.text.*;
public dynamic class ChancesDisplayMC_30 extends MovieClip {
public var numChancesTxt:TextField;
public var numChanceIcons:uint;
public function ChancesDisplayMC_30(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 10, frame11, 20, frame21, 29, frame30, 39, frame40);
}
function frame3(){
stop();
}
function frame1(){
}
function frame21(){
stop();
}
function frame2(){
stop();
numChancesTxt.visible = false;
}
function frame30(){
stop();
}
public function updateNumChancesDisplay(_arg1:int):void{
this.numChanceIcons = _arg1;
if (_arg1 <= 0){
numChancesTxt.visible = false;
gotoAndStop("zero");
} else {
if (_arg1 == 1){
numChancesTxt.visible = false;
gotoAndStop("one");
} else {
if (_arg1 == 2){
numChancesTxt.visible = false;
gotoAndStop("two");
} else {
if (_arg1 == 3){
numChancesTxt.visible = false;
gotoAndStop("three");
} else {
numChancesTxt.visible = true;
numChancesTxt.text = ("x" + this.numChanceIcons);
gotoAndStop("threeplus");
};
};
};
};
}
function frame11(){
stop();
}
function frame40(){
stop();
}
}
}//package Blink_fla
Section 21
//ChargeLeftRightSpriteMC_15 (Blink_fla.ChargeLeftRightSpriteMC_15)
package Blink_fla {
import flash.display.*;
import flash.geom.*;
public dynamic class ChargeLeftRightSpriteMC_15 extends MovieClip {
public var chargeLeftSprite:Sprite;
public var chargeRightSprite:Sprite;
public function ChargeLeftRightSpriteMC_15(){
addFrameScript(0, frame1, 1, frame2);
}
public function addChargeRightSprite():void{
trace("ADDING CHARGE RIGHT SPRITE");
this.chargeRightSprite = BlinkDoc(root).playerChargeRightSprite;
this.chargeRightSprite.transform.colorTransform = new ColorTransform(0, 0, 0, 1);
addChild(this.chargeRightSprite);
}
public function addChargeLeftSprite():void{
trace("ADDING CHARGE LEFT SPRITE");
this.chargeLeftSprite = BlinkDoc(root).playerChargeLeftSprite;
this.chargeLeftSprite.transform.colorTransform = new ColorTransform(0, 0, 0, 1);
addChild(this.chargeLeftSprite);
}
function frame1(){
}
public function showChargeRight():void{
if (this.chargeLeftSprite != null){
this.chargeLeftSprite.visible = false;
};
if (this.chargeRightSprite == null){
trace("CHARGE RIGHT WAS NULL, so addChargeRight()");
addChargeRightSprite();
};
this.chargeRightSprite.visible = true;
}
function frame2(){
stop();
addChargeLeftSprite();
addChargeRightSprite();
}
public function showChargeLeft():void{
if (this.chargeLeftSprite == null){
trace("CHARGE LEFT WAS NULL, so addChargeLeft()");
addChargeLeftSprite();
};
if (this.chargeRightSprite != null){
this.chargeRightSprite.visible = false;
};
this.chargeLeftSprite.visible = true;
}
}
}//package Blink_fla
Section 22
//CrumbleBuildingBGMC_133 (Blink_fla.CrumbleBuildingBGMC_133)
package Blink_fla {
import flash.display.*;
public dynamic class CrumbleBuildingBGMC_133 extends MovieClip {
public function CrumbleBuildingBGMC_133(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 10, frame11);
}
function frame3(){
stop();
}
function frame1(){
}
function frame2(){
stop();
}
function frame11(){
stop();
}
public function showDestroyedLeft():void{
gotoAndStop("destroyedleft");
}
public function showDestroyedRight():void{
gotoAndStop("destroyedright");
}
}
}//package Blink_fla
Section 23
//DialogueBoxMC_32 (Blink_fla.DialogueBoxMC_32)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class DialogueBoxMC_32 extends MovieClip {
public var onAdvanceDialogueFunc:Function;
public var timerNeedsRestarting_enableAdvanceDialogue:Boolean;
public var timerNeedsRestarting_advanceDialogue:Boolean;
public var currDLine:DialogueLine;
public var dialogueTxt:TextField;
public var advanceDialogueBtn:SimpleButton;
public var speakerIconMC:MovieClip;
public var displayTimer_enableAdvanceDialogue:Timer;
public var displayTimer_advanceDialogue:Timer;
public var currOnAdvanceDialogueFunc:Function;
public function DialogueBoxMC_32(){
addFrameScript(0, frame1, 1, frame2);
}
public function pauseMC():void{
if (this.timerNeedsRestarting_advanceDialogue){
displayTimer_advanceDialogue.reset();
};
if (this.timerNeedsRestarting_enableAdvanceDialogue){
displayTimer_enableAdvanceDialogue.reset();
};
}
public function unpauseMC():void{
if (this.timerNeedsRestarting_advanceDialogue){
displayTimer_advanceDialogue.start();
};
if (this.timerNeedsRestarting_enableAdvanceDialogue){
displayTimer_enableAdvanceDialogue.start();
};
}
public function testFunc(_arg1:MouseEvent):void{
trace("in testFunc");
}
function frame1(){
displayTimer_advanceDialogue = new Timer(100, 1);
displayTimer_enableAdvanceDialogue = new Timer(100, 1);
onAdvanceDialogueFunc = function (_arg1:MouseEvent){
currOnAdvanceDialogueFunc();
};
advanceDialogueBtn.addEventListener(MouseEvent.CLICK, onAdvanceDialogueFunc, false, 0, true);
}
public function testFunc3():void{
trace("in testFunc3");
}
function frame2(){
stop();
this.displayTimer_advanceDialogue.addEventListener("timer", timerHandler_AdvanceDialogue, false, 0, true);
this.displayTimer_enableAdvanceDialogue.addEventListener("timer", timerHandler_EnableAdvanceDialogue, false, 0, true);
}
public function timerHandler_AdvanceDialogue(_arg1:TimerEvent):void{
this.timerNeedsRestarting_advanceDialogue = false;
this.currOnAdvanceDialogueFunc();
}
public function displayDialogueLine(_arg1:DialogueLine):void{
this.currDLine = _arg1;
speakerIconMC.showSpeakerAs(_arg1.SpeakerNum);
dialogueTxt.text = _arg1.TheText;
this.currOnAdvanceDialogueFunc = _arg1.PostAdvanceFunc;
advanceDialogueBtn.enabled = false;
advanceDialogueBtn.visible = false;
if (this.displayTimer_advanceDialogue == null){
this.displayTimer_advanceDialogue = new Timer(100, 1);
};
if (this.displayTimer_enableAdvanceDialogue == null){
this.displayTimer_enableAdvanceDialogue = new Timer(100, 1);
};
if (_arg1.ManualAdvancing){
this.displayTimer_advanceDialogue.reset();
this.timerNeedsRestarting_advanceDialogue = false;
if (_arg1.DisplayDuratn > 0){
this.displayTimer_enableAdvanceDialogue.reset();
this.displayTimer_enableAdvanceDialogue.delay = _arg1.DisplayDuratn;
this.displayTimer_enableAdvanceDialogue.start();
timerNeedsRestarting_enableAdvanceDialogue = true;
} else {
if (this.displayTimer_enableAdvanceDialogue != null){
this.displayTimer_enableAdvanceDialogue.reset();
};
timerNeedsRestarting_enableAdvanceDialogue = false;
advanceDialogueBtn.enabled = true;
advanceDialogueBtn.visible = true;
};
} else {
this.timerNeedsRestarting_enableAdvanceDialogue = false;
this.displayTimer_enableAdvanceDialogue.reset();
if (_arg1.DisplayDuratn > 0){
this.timerNeedsRestarting_advanceDialogue = true;
this.displayTimer_advanceDialogue.reset();
this.displayTimer_advanceDialogue.delay = _arg1.DisplayDuratn;
this.displayTimer_advanceDialogue.start();
} else {
this.displayTimer_advanceDialogue.reset();
this.timerNeedsRestarting_advanceDialogue = false;
};
};
BlinkDoc(root).getSndManager().playSFX_DialogueAdvance();
}
public function timerHandler_EnableAdvanceDialogue(_arg1:TimerEvent):void{
this.timerNeedsRestarting_enableAdvanceDialogue = false;
advanceDialogueBtn.enabled = true;
advanceDialogueBtn.visible = true;
}
}
}//package Blink_fla
Section 24
//DustAnimMC_121 (Blink_fla.DustAnimMC_121)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class DustAnimMC_121 extends MovieClip {
public function DustAnimMC_121(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 26, frame27, 50, frame51);
}
function frame3(){
this.visible = true;
}
function frame1(){
}
function frame2(){
stop();
this.visible = false;
}
function frame27(){
MovieClip(this.parent).whenBuildingShockwave();
}
public function doDustAnim():void{
gotoAndPlay("dust");
}
function frame51(){
stop();
}
}
}//package Blink_fla
Section 25
//ExplosiveBarrelMC_126 (Blink_fla.ExplosiveBarrelMC_126)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class ExplosiveBarrelMC_126 extends MovieClip {
public const FALL_RATE_HARD:Number = 0.5;
public const FALL_RATE_EASY:Number = 0.1;
public const FALL_RATE_NORMAL:Number = 0.2;
public const FALL_SPD:Number = 2;
public var currCiv:Civilian;
public var yVel:Number;
public var i:uint;
public var civArr:Array;
public var falling:Boolean;
public var lethal:Boolean;
public var currFallRate:Number;
public var mainCharaMC:MovieClip;
public var postExplosionFunc:Function;
public var currEnterFrameFunc:Function;
public var postBreakFunc:Function;
public var prePauseEnterFrameFunc:Function;
public var parentMC:MovieClip;
public function ExplosiveBarrelMC_126(){
addFrameScript(0, frame1, 1, frame2, 23, frame24, 29, frame30, 40, frame41);
}
public function pauseMC():void{
if (this.currEnterFrameFunc != null){
this.prePauseEnterFrameFunc = this.currEnterFrameFunc;
this.currEnterFrameFunc = function (){
};
};
}
public function doBreakAnim():void{
BlinkDoc(root).getSndManager().playSFX_BarrelCut();
gotoAndPlay("shatter");
}
public function spawnAt(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0):void{
this.x = _arg1;
this.y = _arg2;
this.falling = true;
this.visible = true;
this.yVel = _arg3;
this.addEventListener(Event.ENTER_FRAME, enterFrame_FallFunc, false, 0, true);
}
public function unpauseMC():void{
if (this.currEnterFrameFunc != null){
this.currEnterFrameFunc = this.prePauseEnterFrameFunc;
};
if (this.lethal){
this.gotoAndPlay("explode");
};
}
function frame24(){
postBreakFunc();
stopExisting();
gotoAndStop("idle");
}
public function defEnterFrame():void{
if (((this.hitTestObject(this.mainCharaMC.swooshAnimMC)) && (this.mainCharaMC.swooshAnimMC.lethal))){
this.currEnterFrameFunc = function (){
};
doBreakAnim();
} else {
if (this.y >= (this.parentMC.LevelGroundY + 50)){
doExplosion();
} else {
this.yVel = (this.yVel + this.currFallRate);
this.y = (this.y + this.yVel);
};
};
}
public function enterFrame_FallFunc(_arg1:Event){
this.currEnterFrameFunc();
}
function frame1(){
civArr = new Array();
parentMC = MovieClip(this.parent);
mainCharaMC = MovieClip(this.parent).mainCharaMC;
}
function frame30(){
i = 0;
while (i < this.civArr.length) {
currCiv = this.civArr[i];
if (((((this.hitTestObject(currCiv)) && ((currCiv.x > -90)))) && ((currCiv.x <= 550)))){
if ((this.x + (this.width / 2)) >= (currCiv.x + (currCiv.width / 2))){
currCiv.x = Math.max(0, (this.x - 100));
} else {
currCiv.x = Math.min(500, (this.x + 100));
};
currCiv.y = (currCiv.y - 100);
this.parentMC.whenCivBurned(currCiv);
};
i++;
};
if (this.hitTestObject(mainCharaMC.hitBoxMC)){
if ((this.x + (this.width / 2)) >= (mainCharaMC.x + 45)){
mainCharaMC.x = Math.max(0, (this.x - 100));
} else {
mainCharaMC.x = Math.min(450, (this.x + 100));
};
mainCharaMC.y = (mainCharaMC.y - 100);
mainCharaMC.aerial = true;
mainCharaMC.playerAvSprite.playAnimation("falling");
this.parentMC.whenMainCharaHit();
};
}
function frame2(){
stop();
}
function frame41(){
if (BlinkDoc(root).GamePaused){
gotoAndStop("explode");
} else {
this.lethal = false;
stopExisting();
postExplosionFunc();
};
}
public function stopExisting():void{
this.falling = false;
BlinkDoc(root).hideMC(this);
this.removeEventListener(Event.ENTER_FRAME, enterFrame_FallFunc);
}
public function doExplosion():void{
this.lethal = true;
this.currEnterFrameFunc = function (){
};
BlinkDoc(root).getSndManager().playSFX_BarrelExplode();
gotoAndPlay("explode");
}
public function initBarrel(_arg1:Function, _arg2:Function, _arg3:Function=null):void{
this.lethal = false;
this.civArr = MovieClip(this.parent).CivArr;
this.postExplosionFunc = _arg1;
this.postBreakFunc = _arg2;
if (_arg3 == null){
this.prePauseEnterFrameFunc = defEnterFrame;
this.currEnterFrameFunc = defEnterFrame;
} else {
this.prePauseEnterFrameFunc = _arg3;
this.currEnterFrameFunc = _arg3;
};
}
}
}//package Blink_fla
Section 26
//FireMC_113 (Blink_fla.FireMC_113)
package Blink_fla {
import flash.display.*;
public dynamic class FireMC_113 extends MovieClip {
public const DEF_CREEP_DX:Number = 0.08;
public var creepDX:Number;
public var currCreepDX:Number;
public var hitBoxMC:MovieClip;
public function FireMC_113(){
addFrameScript(0, frame1, 1, frame2);
}
public function pauseMC():void{
this.currCreepDX = this.creepDX;
this.creepDX = 0;
}
public function unpauseMC():void{
this.creepDX = this.currCreepDX;
}
function frame1(){
creepDX = DEF_CREEP_DX;
}
function frame2(){
stop();
}
}
}//package Blink_fla
Section 27
//HUD_MC_26 (Blink_fla.HUD_MC_26)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class HUD_MC_26 extends MovieClip {
public var timerDisplayMC:MovieClip;
public var chancesDisplayMC:MovieClip;
public function HUD_MC_26(){
addFrameScript(0, frame1, 1, frame2);
}
public function startTimer():void{
timerDisplayMC.startTimer();
}
public function pauseMC():void{
timerDisplayMC.stopTimer();
}
public function initTimer(_arg1:int, _arg2:Function):void{
timerDisplayMC.initTimer(_arg1, _arg2);
}
public function stopTimer():void{
timerDisplayMC.stopTimer();
}
public function unpauseMC():void{
timerDisplayMC.startTimer();
}
public function setVisibleTimer(_arg1:Boolean):void{
timerDisplayMC.visible = _arg1;
}
function frame1(){
}
public function killTimer():void{
timerDisplayMC.killTimer();
}
public function updateNumChancesDisplay(_arg1:int):void{
chancesDisplayMC.updateNumChancesDisplay(_arg1);
}
public function removeAllEventListeners():void{
timerDisplayMC.removeAllEventListeners();
}
function frame2(){
stop();
chancesDisplayMC.updateNumChancesDisplay(MovieClip(root).NumChances);
}
}
}//package Blink_fla
Section 28
//importWindow_77 (Blink_fla.importWindow_77)
package Blink_fla {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
public dynamic class importWindow_77 extends MovieClip {
public var nameField:TextInput;
public var invalidUserMessage:MovieClip;
public var closeButton:SimpleButton;
public var goButton:SimpleButton;
public var getYourOwnButton:SimpleButton;
public var modalBlocker:MovieClip;
public function importWindow_77(){
addFrameScript(0, frame1);
}
function frame1(){
modalBlocker.addEventListener(MouseEvent.CLICK, function (){
});
modalBlocker.useHandCursor = false;
}
}
}//package Blink_fla
Section 29
//invalidUserMessage_82 (Blink_fla.invalidUserMessage_82)
package Blink_fla {
import flash.display.*;
public dynamic class invalidUserMessage_82 extends MovieClip {
public function invalidUserMessage_82(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Blink_fla
Section 30
//LastHitAnimMC_60 (Blink_fla.LastHitAnimMC_60)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class LastHitAnimMC_60 extends MovieClip {
public var swooshMC:MovieClip;
public function LastHitAnimMC_60(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 25, frame26);
}
public function doLastHitAnim(_arg1:Boolean, _arg2:Number, _arg3:Number):void{
swooshMC.x = _arg2;
swooshMC.y = _arg3;
if (_arg1){
swooshMC.attackLeft();
} else {
swooshMC.attackRight();
};
gotoAndPlay("slash");
}
function frame3(){
this.visible = true;
}
function frame1(){
}
function frame26(){
stop();
BlinkLevel(this.parent).onLevelCleared();
}
function frame2(){
stop();
this.visible = false;
}
}
}//package Blink_fla
Section 31
//MainCharaAttackSwooshAnimBlankMC_61 (Blink_fla.MainCharaAttackSwooshAnimBlankMC_61)
package Blink_fla {
import flash.display.*;
public dynamic class MainCharaAttackSwooshAnimBlankMC_61 extends MovieClip {
public function MainCharaAttackSwooshAnimBlankMC_61(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 20, frame21, 21, frame22, 39, frame40);
}
function frame3(){
this.visible = true;
}
function frame1(){
}
function frame22(){
this.visible = true;
}
public function attackLeft():void{
BlinkDoc(root).getSndManager().playSFX_Attack();
gotoAndPlay("attackleft");
}
function frame21(){
stop();
}
function frame2(){
stop();
this.visible = false;
}
function frame40(){
stop();
}
public function attackRight():void{
BlinkDoc(root).getSndManager().playSFX_Attack();
gotoAndPlay("attackright");
}
}
}//package Blink_fla
Section 32
//MainCharaAttackSwooshAnimMC_25 (Blink_fla.MainCharaAttackSwooshAnimMC_25)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class MainCharaAttackSwooshAnimMC_25 extends MovieClip {
public var lethal:Boolean;
public function MainCharaAttackSwooshAnimMC_25(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 20, frame21, 21, frame22, 39, frame40);
}
function frame3(){
this.visible = true;
}
function frame1(){
}
function frame22(){
this.visible = true;
}
public function attackLeft():void{
this.lethal = true;
BlinkDoc(root).getSndManager().playSFX_Attack();
gotoAndPlay("attackleft");
}
function frame21(){
MovieClip(this.parent).whenAttackLeftSwooshComplete();
gotoAndStop("idle");
}
function frame2(){
stop();
this.visible = false;
this.lethal = false;
}
function frame40(){
MovieClip(this.parent).whenAttackRightSwooshComplete();
gotoAndStop("idle");
}
public function attackRight():void{
this.lethal = true;
BlinkDoc(root).getSndManager().playSFX_Attack();
gotoAndPlay("attackright");
}
}
}//package Blink_fla
Section 33
//MainCharaMC_24 (Blink_fla.MainCharaMC_24)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import example.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class MainCharaMC_24 extends MovieClip {
public var xVel:Number;
public var carryMotionMC:MovieClip;
public var CHAR_STATE_CARRY_MOTION:uint;
public var CHAR_STATE_ATTACK_LEFT:uint;
public var CHAR_STATE_JUMP_LEFT:uint;
public var CHAR_STATE_WALK_RIGHT:uint;
public var yVel:Number;
public var DEF_ATTACKING_GRAV_DEC:Number;
public var glowFilter_carrying:GlowFilter;
public var DEF_GRAV_DEC:Number;
public var prePauseEnterFrame_xyUpdate:Function;
public var colorTransform_normal:ColorTransform;
public var frozen:Boolean;
public var DEF_GROUND_Y:Number;
public var aerial:Boolean;
public var hitBoxMC:MovieClip;
public var DEF_ATTACKING_WALK_SPD:Number;
public var carrying:Boolean;
public var jumping:Boolean;
public var facingLeft:Boolean;
public var CHAR_STATE_JUMP_RIGHT:uint;
public var currKR:Blink_KeyboardReceiver;
public var currEnterFrame_xyUpdate:Function;
public var DEF_WALK_SPD:Number;
public var playerAvSprite:AvatarSprite;
public var DEF_HIGHGROUND_Y:Number;
public var CHAR_STATE_IDLE:uint;
public var swooshAnimMC:MovieClip;
public var damagedTimer:Timer;
public var currState:Number;
public var CHAR_STATE_BLINK_LEFT:uint;
public var CHAR_STATE_WALK_LEFT:uint;
public var groundY:Number;
public var CHAR_STATE_BLINK_RIGHT:uint;
public var luggageCivilian:MovieClip;
public var CHAR_STATE_ATTACK_RIGHT:uint;
public var colorTransform_damaged:ColorTransform;
public var DEF_JUMP_Y_VEL:Number;
public function MainCharaMC_24(){
addFrameScript(0, frame1, 1, frame2);
}
public function pauseMC():void{
this.prePauseEnterFrame_xyUpdate = this.currEnterFrame_xyUpdate;
this.currEnterFrame_xyUpdate = function (){
};
}
public function animateIdleMovement():void{
if ((((this.currState == CHAR_STATE_WALK_LEFT)) || ((this.currState == CHAR_STATE_WALK_RIGHT)))){
switchToCharState(CHAR_STATE_IDLE);
};
}
public function animateJumpLeftMovement():void{
if (this.y < this.groundY){
return;
};
if ((((((this.currState == CHAR_STATE_IDLE)) || ((this.currState == CHAR_STATE_WALK_LEFT)))) || ((this.currState == CHAR_STATE_WALK_RIGHT)))){
this.jumping = true;
this.yVel = DEF_JUMP_Y_VEL;
switchToCharState(CHAR_STATE_JUMP_LEFT);
};
}
public function tryAnimateCarryMotion():void{
if (((((((!(frozen)) && (!((this.currState == CHAR_STATE_CARRY_MOTION))))) && (!((this.currState == CHAR_STATE_ATTACK_RIGHT))))) && (!((this.currState == CHAR_STATE_ATTACK_LEFT))))){
animateCarryMotion();
};
}
public function whenPickingUpCivilian(_arg1:MovieClip):void{
this.filters = [glowFilter_carrying];
this.carrying = true;
this.luggageCivilian = _arg1;
}
public function animateRightBlinkArrival():void{
this.facingLeft = false;
if (this.y < this.groundY){
this.playerAvSprite.playAnimation("blinkarrival-right", "blinkdescend-right");
} else {
if (((this.currKR.KeyPressed_RIGHT) && (!(this.currKR.KeyPressed_LEFT)))){
switchToCharState(CHAR_STATE_WALK_RIGHT);
} else {
if (((!(this.currKR.KeyPressed_RIGHT)) && (this.currKR.KeyPressed_LEFT))){
switchToCharState(CHAR_STATE_WALK_LEFT);
} else {
this.playerAvSprite.playAnimation("blinkarrival-right", "hiidle-right");
switchToCharState(CHAR_STATE_IDLE);
};
};
};
}
public function animateCarryMotionComplete():void{
if (this.y >= this.groundY){
if (this.currKR.KeyPressed_LEFT){
if (this.currKR.KeyPressed_RIGHT){
switchToCharState(CHAR_STATE_IDLE);
} else {
switchToCharState(CHAR_STATE_WALK_LEFT);
};
} else {
if (this.currKR.KeyPressed_RIGHT){
switchToCharState(CHAR_STATE_WALK_RIGHT);
} else {
switchToCharState(CHAR_STATE_IDLE);
};
};
} else {
this.currState = CHAR_STATE_JUMP_LEFT;
this.playerAvSprite.playAnimation("chargecrouch-left");
};
}
function frame1(){
CHAR_STATE_IDLE = 0;
CHAR_STATE_WALK_RIGHT = 1;
CHAR_STATE_WALK_LEFT = 2;
CHAR_STATE_JUMP_RIGHT = 3;
CHAR_STATE_JUMP_LEFT = 4;
CHAR_STATE_BLINK_RIGHT = 5;
CHAR_STATE_BLINK_LEFT = 6;
CHAR_STATE_ATTACK_RIGHT = 7;
CHAR_STATE_ATTACK_LEFT = 8;
CHAR_STATE_CARRY_MOTION = 9;
DEF_WALK_SPD = 8;
DEF_ATTACKING_WALK_SPD = 2;
DEF_GRAV_DEC = 1;
DEF_ATTACKING_GRAV_DEC = 0.5;
DEF_JUMP_Y_VEL = -12;
DEF_GROUND_Y = 245;
DEF_HIGHGROUND_Y = 95;
currKR = BlinkLevel(this.parent).CurrKR;
playerAvSprite = MovieClip(root).player;
currState = CHAR_STATE_IDLE;
groundY = BlinkLevel(this.parent).LevelGroundY;
xVel = 0;
yVel = 0;
facingLeft = false;
aerial = false;
jumping = false;
frozen = false;
carrying = false;
colorTransform_damaged = new ColorTransform(1, 1, 1, 1, 128, 0, 0, 0xFF);
colorTransform_normal = new ColorTransform();
damagedTimer = new Timer(500);
damagedTimer.addEventListener("timer", damagedDisplayComplete, false, 0, true);
glowFilter_carrying = new GlowFilter(0xFFFF00, 1, 8, 8, 128);
this.playerAvSprite.visible = true;
this.playerAvSprite.x = (this.playerAvSprite.y = 0);
this.playerAvSprite.playAnimation("hiidle-right");
addChild(this.playerAvSprite);
}
function frame2(){
stop();
}
public function defEnterFrame_xyUpdate():void{
if (this.frozen){
return;
};
if (this.currKR.KeyPressed_RIGHT){
if (this.currKR.KeyPressed_LEFT){
this.xVel = 0;
} else {
if ((((((this.currState == CHAR_STATE_ATTACK_LEFT)) || ((this.currState == CHAR_STATE_ATTACK_RIGHT)))) || ((this.currState == CHAR_STATE_CARRY_MOTION)))){
this.xVel = DEF_ATTACKING_WALK_SPD;
} else {
this.xVel = DEF_WALK_SPD;
};
};
} else {
if (this.currKR.KeyPressed_LEFT){
if ((((((this.currState == CHAR_STATE_ATTACK_LEFT)) || ((this.currState == CHAR_STATE_ATTACK_RIGHT)))) || ((this.currState == CHAR_STATE_CARRY_MOTION)))){
this.xVel = -(DEF_ATTACKING_WALK_SPD);
} else {
this.xVel = -(DEF_WALK_SPD);
};
} else {
this.xVel = 0;
};
};
if ((this.x + this.xVel) > 450){
this.x = 450;
} else {
if ((this.x + this.xVel) < -20){
this.x = -20;
} else {
this.x = (this.x + this.xVel);
};
};
if (((this.jumping) || (this.aerial))){
if ((((((this.currState == CHAR_STATE_ATTACK_LEFT)) || ((this.currState == CHAR_STATE_ATTACK_RIGHT)))) || ((this.currState == CHAR_STATE_CARRY_MOTION)))){
this.yVel = (this.yVel + DEF_ATTACKING_GRAV_DEC);
} else {
this.yVel = (this.yVel + DEF_GRAV_DEC);
};
if (this.y > this.groundY){
this.jumping = false;
this.aerial = false;
this.yVel = 0;
this.y = this.groundY;
animateLandingMovement();
};
};
this.y = (this.y + this.yVel);
}
public function animateJumpRightMovement():void{
if (this.y < this.groundY){
return;
};
if ((((((this.currState == CHAR_STATE_IDLE)) || ((this.currState == CHAR_STATE_WALK_LEFT)))) || ((this.currState == CHAR_STATE_WALK_RIGHT)))){
this.jumping = true;
this.yVel = DEF_JUMP_Y_VEL;
switchToCharState(CHAR_STATE_JUMP_RIGHT);
};
}
public function removeEventListener_xyUpdate():void{
removeEventListener(Event.ENTER_FRAME, enterFrame_xyUpdate);
}
public function animateJumpUpMovement():void{
if (this.y < this.groundY){
return;
};
if ((((((this.currState == CHAR_STATE_IDLE)) || ((this.currState == CHAR_STATE_WALK_LEFT)))) || ((this.currState == CHAR_STATE_WALK_RIGHT)))){
this.jumping = true;
this.yVel = DEF_JUMP_Y_VEL;
if (this.facingLeft){
switchToCharState(CHAR_STATE_JUMP_LEFT);
} else {
switchToCharState(CHAR_STATE_JUMP_RIGHT);
};
};
}
public function damagedDisplayComplete(_arg1:TimerEvent):void{
showAsNormal();
}
public function tryAttackLeft():void{
if (((((((!(this.frozen)) && (!((this.currState == CHAR_STATE_ATTACK_LEFT))))) && (!((this.currState == CHAR_STATE_ATTACK_RIGHT))))) && (!((this.currState == CHAR_STATE_CARRY_MOTION))))){
this.facingLeft = true;
animateLeftAttack();
};
}
public function whenAttackLeftSwooshComplete():void{
if (this.y >= this.groundY){
if (this.currKR.KeyPressed_LEFT){
if (this.currKR.KeyPressed_RIGHT){
switchToCharState(CHAR_STATE_IDLE);
} else {
switchToCharState(CHAR_STATE_WALK_LEFT);
};
} else {
if (this.currKR.KeyPressed_RIGHT){
switchToCharState(CHAR_STATE_WALK_RIGHT);
} else {
switchToCharState(CHAR_STATE_IDLE);
};
};
} else {
this.currState = CHAR_STATE_JUMP_LEFT;
this.playerAvSprite.playAnimation("chargecrouch-left");
};
}
public function startShowAsDamaged():void{
if (this.damagedTimer.running){
this.damagedTimer.reset();
};
this.damagedTimer.start();
showAsDamaged();
}
public function removeAllEventListeners():void{
removeEventListener(Event.ENTER_FRAME, enterFrame_xyUpdate);
this.damagedTimer.removeEventListener("timer", damagedDisplayComplete);
}
public function whenAttackRightSwooshComplete():void{
if (this.y >= this.groundY){
if (this.currKR.KeyPressed_LEFT){
if (this.currKR.KeyPressed_RIGHT){
switchToCharState(CHAR_STATE_IDLE);
} else {
switchToCharState(CHAR_STATE_WALK_LEFT);
};
} else {
if (this.currKR.KeyPressed_RIGHT){
switchToCharState(CHAR_STATE_WALK_RIGHT);
} else {
switchToCharState(CHAR_STATE_IDLE);
};
};
} else {
this.currState = CHAR_STATE_JUMP_RIGHT;
this.playerAvSprite.playAnimation("chargecrouch-right");
};
}
public function gotoCharState(_arg1:uint):void{
switch (_arg1){
case CHAR_STATE_IDLE:
this.playerAvSprite.playAnimation((this.facingLeft) ? "hiidle-left" : "hiidle-right");
break;
case CHAR_STATE_WALK_RIGHT:
this.playerAvSprite.playAnimation("run-right");
break;
case CHAR_STATE_WALK_LEFT:
this.playerAvSprite.playAnimation("run-left");
break;
case CHAR_STATE_JUMP_RIGHT:
this.playerAvSprite.playAnimation("jump-right", "chargecrouch-right");
break;
case CHAR_STATE_JUMP_LEFT:
this.playerAvSprite.playAnimation("jump-left", "chargecrouch-left");
break;
case CHAR_STATE_BLINK_RIGHT:
case CHAR_STATE_BLINK_LEFT:
break;
case CHAR_STATE_ATTACK_RIGHT:
this.playerAvSprite.playAnimation("attack-right", "attackend-right");
break;
case CHAR_STATE_ATTACK_LEFT:
this.playerAvSprite.playAnimation("attack-left", "attackend-left");
break;
case CHAR_STATE_CARRY_MOTION:
if (this.facingLeft){
this.playerAvSprite.playAnimation("carrymotion-left", "carrymotionend-left");
} else {
this.playerAvSprite.playAnimation("carrymotion-right", "carrymotionend-right");
};
break;
default:
trace(("--in gotoAndPlayCharState(), invalid charStateNum: " + _arg1));
break;
};
}
public function enterFrame_xyUpdate(_arg1:Event):void{
this.currEnterFrame_xyUpdate();
}
public function animateLandingMovement():void{
if ((((this.currState == CHAR_STATE_ATTACK_LEFT)) || ((this.currState == CHAR_STATE_ATTACK_RIGHT)))){
return;
};
if (((this.currKR.KeyPressed_RIGHT) && (!(this.currKR.KeyPressed_LEFT)))){
switchToCharState(CHAR_STATE_WALK_RIGHT);
} else {
if (((!(this.currKR.KeyPressed_RIGHT)) && (this.currKR.KeyPressed_LEFT))){
switchToCharState(CHAR_STATE_WALK_LEFT);
} else {
switchToCharState(CHAR_STATE_IDLE);
};
};
}
public function switchToCharState(_arg1:uint):void{
this.currState = _arg1;
gotoCharState(_arg1);
}
public function animateLeftAttack():void{
swooshAnimMC.attackLeft();
switchToCharState(CHAR_STATE_ATTACK_LEFT);
}
public function animateCarryMotion():void{
if (this.carrying){
whenPuttingDownCivilian();
carryMotionMC.doCarryMotion(false);
} else {
carryMotionMC.doCarryMotion(true);
};
switchToCharState(CHAR_STATE_CARRY_MOTION);
}
public function enterFrame_walkLeft(_arg1:Event):void{
this.facingLeft = true;
if (this.x > 0){
this.x = (this.x - DEF_WALK_SPD);
};
}
public function unpauseMC():void{
this.currEnterFrame_xyUpdate = this.prePauseEnterFrame_xyUpdate;
}
public function animateLeftMovement():void{
if ((((this.currState == CHAR_STATE_IDLE)) || ((this.currState == CHAR_STATE_WALK_RIGHT)))){
this.facingLeft = true;
switchToCharState(CHAR_STATE_WALK_LEFT);
};
}
public function enterFrame_walkRight(_arg1:Event):void{
this.facingLeft = false;
if (this.x < (550 - DEF_WALK_SPD)){
this.x = (this.x + DEF_WALK_SPD);
};
}
public function animateRightMovement():void{
if ((((this.currState == CHAR_STATE_IDLE)) || ((this.currState == CHAR_STATE_WALK_LEFT)))){
this.facingLeft = false;
switchToCharState(CHAR_STATE_WALK_RIGHT);
};
}
public function setFrozen(_arg1:Boolean):void{
this.frozen = _arg1;
}
public function animateLeftBlinkArrival():void{
this.facingLeft = true;
if (this.y < this.groundY){
this.playerAvSprite.playAnimation("blinkarrival-left", "blinkdescend-left");
} else {
if (((this.currKR.KeyPressed_RIGHT) && (!(this.currKR.KeyPressed_LEFT)))){
switchToCharState(CHAR_STATE_WALK_RIGHT);
} else {
if (((!(this.currKR.KeyPressed_RIGHT)) && (this.currKR.KeyPressed_LEFT))){
switchToCharState(CHAR_STATE_WALK_LEFT);
} else {
this.playerAvSprite.playAnimation("blinkarrival-left", "hiidle-left");
switchToCharState(CHAR_STATE_IDLE);
};
};
};
}
public function whenPuttingDownCivilian():void{
this.filters = [];
this.luggageCivilian.whenDropped(this.x, this.y);
this.carrying = false;
}
public function showAsDamaged():void{
this.playerAvSprite.transform.colorTransform = this.colorTransform_damaged;
}
public function showAsNormal():void{
this.playerAvSprite.transform.colorTransform = this.colorTransform_normal;
}
public function animateRightAttack():void{
swooshAnimMC.attackRight();
switchToCharState(CHAR_STATE_ATTACK_RIGHT);
}
public function tryAttackRight():void{
if (((((((!(this.frozen)) && (!((this.currState == CHAR_STATE_ATTACK_LEFT))))) && (!((this.currState == CHAR_STATE_ATTACK_RIGHT))))) && (!((this.currState == CHAR_STATE_CARRY_MOTION))))){
this.facingLeft = false;
animateRightAttack();
};
}
}
}//package Blink_fla
Section 34
//MainCharaPlaceHolderMC_140 (Blink_fla.MainCharaPlaceHolderMC_140)
package Blink_fla {
import flash.display.*;
import flash.filters.*;
public dynamic class MainCharaPlaceHolderMC_140 extends MovieClip {
public var playerSprite:Sprite;
public var blur:BlurFilter;
public function MainCharaPlaceHolderMC_140(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
trace("ABOUT TO GENERATE BODYSPRITE");
blur = new BlurFilter();
blur.blurX = 4;
blur.blurY = 4;
blur.quality = BitmapFilterQuality.HIGH;
playerSprite = BlinkDoc(root).generateBodySprite(Bitmap(BlinkDoc(root).player.getChildByName("worldidle01")).bitmapData);
playerSprite.filters = [blur];
addChild(playerSprite);
}
}
}//package Blink_fla
Section 35
//MainCharaSpriteMC_142 (Blink_fla.MainCharaSpriteMC_142)
package Blink_fla {
import flash.display.*;
public dynamic class MainCharaSpriteMC_142 extends MovieClip {
public var playerSprite:Sprite;
public function MainCharaSpriteMC_142(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
playerSprite = BlinkDoc(root).generateIdleStillSprite(Bitmap(BlinkDoc(root).player.getChildByName("worldidle01")).bitmapData);
addChild(this.playerSprite);
}
}
}//package Blink_fla
Section 36
//MainCharaUniformMC_143 (Blink_fla.MainCharaUniformMC_143)
package Blink_fla {
import flash.display.*;
public dynamic class MainCharaUniformMC_143 extends MovieClip {
public function MainCharaUniformMC_143(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 9, frame10);
}
public function showAsFemale():void{
gotoAndStop("female");
}
function frame10(){
stop();
}
function frame3(){
stop();
}
function frame1(){
}
function frame2(){
stop();
}
public function showAsMale():void{
gotoAndStop("male");
}
}
}//package Blink_fla
Section 37
//MasterCharaAttackSwooshAnimMC_23 (Blink_fla.MasterCharaAttackSwooshAnimMC_23)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class MasterCharaAttackSwooshAnimMC_23 extends MovieClip {
public var lethal:Boolean;
public function MasterCharaAttackSwooshAnimMC_23(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 20, frame21, 21, frame22, 39, frame40);
}
function frame3(){
this.visible = true;
}
function frame1(){
}
function frame22(){
this.visible = true;
}
public function attackLeft():void{
this.lethal = true;
BlinkDoc(root).getSndManager().playSFX_Attack();
gotoAndPlay("attackleft");
}
function frame21(){
MovieClip(this.parent).whenAttackLeftSwooshComplete();
gotoAndStop("idle");
}
function frame2(){
stop();
this.visible = false;
this.lethal = false;
}
function frame40(){
MovieClip(this.parent).whenAttackRightSwooshComplete();
gotoAndStop("idle");
}
public function attackRight():void{
this.lethal = true;
BlinkDoc(root).getSndManager().playSFX_Attack();
gotoAndPlay("attackright");
}
}
}//package Blink_fla
Section 38
//MasterCharaMC_21 (Blink_fla.MasterCharaMC_21)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import example.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class MasterCharaMC_21 extends MovieClip {
public var xVel:Number;
public var carryMotionMC:MovieClip;
public var aggressive:Boolean;
public var AI_PHASE_SOFT_CHASE:uint;
public var AI_PHASE_HARD_CHASE:uint;
public var currEnterFrame_AI:Function;
public var CHAR_STATE_ATTACK_LEFT:uint;
public var CHAR_STATE_JUMP_LEFT:uint;
public var CHAR_STATE_WALK_RIGHT:uint;
public var AI_PHASE_ATTACK:uint;
public var yVel:Number;
public var DEF_ATTACKING_GRAV_DEC:Number;
public var DEF_GRAV_DEC:Number;
public var prePauseEnterFrame_xyUpdate:Function;
public var frozen:Boolean;
public var currTargetDist:Number;
public var AI_PHASE_IDLE:uint;
public var MAX_ATTACK_DIST:Number;
public var aerial:Boolean;
public var hitBoxMC:MovieClip;
public var DEF_ATTACKING_WALK_SPD:Number;
public var prePauseEnterFrame_AI:Function;
public var targetMC:MovieClip;
public var facingLeft:Boolean;
public var CHAR_STATE_JUMP_RIGHT:uint;
public var currKR:Blink_KeyboardReceiver;
public var currEnterFrame_xyUpdate:Function;
public var DEF_WALK_SPD:Number;
public var jumping:Boolean;
public var aIKeyPressedIntent_RIGHT:Boolean;
public var CHAR_STATE_IDLE:uint;
public var swooshAnimMC:MovieClip;
public var damagedTimer:Timer;
public var DEF_RUN_SPD:Number;
public var CHAR_STATE_RUN_LEFT:uint;
public var currState:Number;
public var CHAR_STATE_BLINK_LEFT:uint;
public var CHAR_STATE_WALK_LEFT:uint;
public var colorTransform_distinction:ColorTransform;
public var currAIPhase:uint;
public var CHAR_STATE_BLINK_RIGHT:uint;
public var CHAR_STATE_ATTACK_RIGHT:uint;
public var colorTransform_damaged:ColorTransform;
public var DEF_JUMP_Y_VEL:Number;
public var masterAvSprite:AvatarSprite;
public var aIKeyPressedIntent_LEFT:Boolean;
public var CHAR_STATE_RUN_RIGHT:uint;
public function MasterCharaMC_21(){
addFrameScript(0, frame1, 1, frame2);
}
public function pauseMC():void{
(this.prePauseEnterFrame_xyUpdate = this.currEnterFrame_xyUpdate);
(this.currEnterFrame_xyUpdate = function (){
});
(this.prePauseEnterFrame_AI = this.currEnterFrame_AI);
(this.currEnterFrame_AI = function (){
});
}
public function animateIdleMovement():void{
if ((((this.currState == CHAR_STATE_WALK_LEFT)) || ((this.currState == CHAR_STATE_WALK_RIGHT)))){
switchToCharState(CHAR_STATE_IDLE);
};
}
public function animateJumpLeftMovement():void{
if (this.y < 245){
return;
};
if ((((((((((this.currState == CHAR_STATE_IDLE)) || ((this.currState == CHAR_STATE_WALK_LEFT)))) || ((this.currState == CHAR_STATE_WALK_RIGHT)))) || ((this.currState == CHAR_STATE_RUN_LEFT)))) || ((this.currState == CHAR_STATE_RUN_RIGHT)))){
(this.jumping = true);
(this.yVel = DEF_JUMP_Y_VEL);
switchToCharState(CHAR_STATE_JUMP_LEFT);
};
}
public function enterFrame_AI_Attack():void{
var _local1:Boolean;
var _local2:Boolean;
_local1 = checkTargetIsLethallyHitting();
_local2 = checkTargetIsLethallyHit();
if (((((((targetMC.swooshAnimMC.lethal) && (targetMC.swooshAnimMC.hitTestObject(this)))) && (((swooshAnimMC.lethal) && (swooshAnimMC.hitTestObject(targetMC)))))) || (((_local2) && (_local1))))){
trace("BOTH HITTING");
(swooshAnimMC.lethal = false);
(targetMC.swooshAnimMC.lethal = false);
if (targetIsToTheLeft()){
bothThrustAway(400, targetMC, false, this, false);
} else {
bothThrustAway(400, this, false, targetMC, false);
};
} else {
if (_local2){
targetMC.startShowAsDamaged();
(swooshAnimMC.lethal = false);
(targetMC.swooshAnimMC.lethal = false);
if (targetIsToTheLeft()){
bothThrustAway(100, targetMC, false, this, true);
} else {
bothThrustAway(100, this, true, targetMC, false);
};
BlinkLevel(this.parent).whenMainCharaHit();
} else {
if (_local1){
trace("HIT BY TARGET");
startShowAsDamaged();
(swooshAnimMC.lethal = false);
(targetMC.swooshAnimMC.lethal = false);
if (targetIsToTheLeft()){
bothThrustAway(100, targetMC, true, this, false);
} else {
bothThrustAway(100, this, false, targetMC, true);
};
BlinkLevel(this.parent).whenMasterCharaHit();
} else {
if (targetIsToTheLeft()){
tryAttackLeft();
} else {
tryAttackRight();
};
};
};
};
}
public function animateRightBlinkArrival():void{
(this.facingLeft = false);
if (this.y < 245){
this.masterAvSprite.playAnimation("blinkarrival-right", "blinkdescend-right");
} else {
if (((this.aIKeyPressedIntent_RIGHT) && (!(this.aIKeyPressedIntent_LEFT)))){
switchToCharState(CHAR_STATE_WALK_RIGHT);
} else {
if (((!(this.aIKeyPressedIntent_RIGHT)) && (this.aIKeyPressedIntent_LEFT))){
switchToCharState(CHAR_STATE_WALK_LEFT);
} else {
this.masterAvSprite.playAnimation("blinkarrival-right", "hiidle-right");
switchToCharState(CHAR_STATE_IDLE);
};
};
};
}
function frame1(){
(CHAR_STATE_IDLE = 0);
(CHAR_STATE_WALK_RIGHT = 1);
(CHAR_STATE_WALK_LEFT = 2);
(CHAR_STATE_RUN_RIGHT = 3);
(CHAR_STATE_RUN_LEFT = 4);
(CHAR_STATE_JUMP_RIGHT = 5);
(CHAR_STATE_JUMP_LEFT = 6);
(CHAR_STATE_BLINK_RIGHT = 7);
(CHAR_STATE_BLINK_LEFT = 8);
(CHAR_STATE_ATTACK_RIGHT = 9);
(CHAR_STATE_ATTACK_LEFT = 10);
(AI_PHASE_IDLE = 0);
(AI_PHASE_SOFT_CHASE = 1);
(AI_PHASE_HARD_CHASE = 2);
(AI_PHASE_ATTACK = 3);
(DEF_WALK_SPD = 4);
(DEF_RUN_SPD = 8);
(DEF_ATTACKING_WALK_SPD = 2);
(DEF_GRAV_DEC = 1);
(DEF_ATTACKING_GRAV_DEC = 0.5);
(DEF_JUMP_Y_VEL = -12);
(MAX_ATTACK_DIST = 90);
(colorTransform_distinction = new ColorTransform(1, 1, 1, 1, 0, 0, 128, 0xFF));
(colorTransform_damaged = new ColorTransform(1, 1, 1, 1, 128, 0, 0, 0xFF));
(damagedTimer = new Timer(500));
damagedTimer.addEventListener("timer", damagedDisplayComplete, false, 0, true);
(currKR = BlinkLevel(this.parent).CurrKR);
(aIKeyPressedIntent_LEFT = false);
(aIKeyPressedIntent_RIGHT = false);
(currTargetDist = 550);
(masterAvSprite = MovieClip(root).masterAvSprite);
(currState = CHAR_STATE_IDLE);
(xVel = 0);
(yVel = 0);
(facingLeft = true);
(aerial = false);
(jumping = false);
(frozen = false);
(this.masterAvSprite.visible = true);
(this.masterAvSprite.x = (this.masterAvSprite.y = 0));
this.masterAvSprite.playAnimation("hiidle-left");
(this.masterAvSprite.transform.colorTransform = colorTransform_distinction);
addChild(this.masterAvSprite);
(this.targetMC = MovieClip(this.parent).mainCharaMC);
}
function frame2(){
stop();
}
public function defEnterFrame_xyUpdate():void{
if (this.frozen){
return;
};
if (this.aIKeyPressedIntent_RIGHT){
if (this.aIKeyPressedIntent_LEFT){
(this.xVel = 0);
} else {
if ((((this.currState == CHAR_STATE_ATTACK_LEFT)) || ((this.currState == CHAR_STATE_ATTACK_RIGHT)))){
(this.xVel = DEF_ATTACKING_WALK_SPD);
} else {
(this.xVel = (this.aggressive) ? DEF_RUN_SPD : DEF_WALK_SPD);
};
};
} else {
if (this.aIKeyPressedIntent_LEFT){
if ((((this.currState == CHAR_STATE_ATTACK_LEFT)) || ((this.currState == CHAR_STATE_ATTACK_RIGHT)))){
(this.xVel = -(DEF_ATTACKING_WALK_SPD));
} else {
(this.xVel = (this.aggressive) ? -(DEF_RUN_SPD) : -(DEF_WALK_SPD));
};
} else {
(this.xVel = 0);
};
};
if ((this.x + this.xVel) > 450){
(this.x = 450);
} else {
if ((this.x + this.xVel) < -20){
(this.x = -20);
} else {
(this.x = (this.x + this.xVel));
};
};
if (((this.jumping) || (this.aerial))){
if ((((this.currState == CHAR_STATE_ATTACK_LEFT)) || ((this.currState == CHAR_STATE_ATTACK_RIGHT)))){
(this.yVel = (this.yVel + DEF_ATTACKING_GRAV_DEC));
} else {
(this.yVel = (this.yVel + DEF_GRAV_DEC));
};
if (this.y > 245){
(this.jumping = false);
(this.aerial = false);
(this.yVel = 0);
(this.y = 245);
animateLandingMovement();
};
};
(this.y = (this.y + this.yVel));
}
public function animateJumpRightMovement():void{
if (this.y < 245){
return;
};
if ((((((((((this.currState == CHAR_STATE_IDLE)) || ((this.currState == CHAR_STATE_WALK_LEFT)))) || ((this.currState == CHAR_STATE_WALK_RIGHT)))) || ((this.currState == CHAR_STATE_RUN_LEFT)))) || ((this.currState == CHAR_STATE_RUN_RIGHT)))){
(this.jumping = true);
(this.yVel = DEF_JUMP_Y_VEL);
switchToCharState(CHAR_STATE_JUMP_RIGHT);
};
}
public function removeEventListener_xyUpdate():void{
removeEventListener(Event.ENTER_FRAME, enterFrame_xyUpdate);
}
public function animateJumpUpMovement():void{
if (this.y < 245){
return;
};
if ((((((((((this.currState == CHAR_STATE_IDLE)) || ((this.currState == CHAR_STATE_WALK_LEFT)))) || ((this.currState == CHAR_STATE_WALK_RIGHT)))) || ((this.currState == CHAR_STATE_RUN_LEFT)))) || ((this.currState == CHAR_STATE_RUN_RIGHT)))){
(this.jumping = true);
(this.yVel = DEF_JUMP_Y_VEL);
if (this.facingLeft){
switchToCharState(CHAR_STATE_JUMP_LEFT);
} else {
switchToCharState(CHAR_STATE_JUMP_RIGHT);
};
};
}
public function damagedDisplayComplete(_arg1:TimerEvent):void{
showAsNormal();
}
public function tryAttackLeft():void{
if (((((!(this.frozen)) && (!((this.currState == CHAR_STATE_ATTACK_LEFT))))) && (!((this.currState == CHAR_STATE_ATTACK_RIGHT))))){
(this.facingLeft = true);
animateLeftAttack();
};
}
public function whenAttackLeftSwooshComplete():void{
if (this.y >= 245){
if (this.aIKeyPressedIntent_LEFT){
if (this.aIKeyPressedIntent_RIGHT){
switchToCharState(CHAR_STATE_IDLE);
} else {
switchToCharState(CHAR_STATE_WALK_LEFT);
};
} else {
if (this.aIKeyPressedIntent_RIGHT){
switchToCharState(CHAR_STATE_WALK_RIGHT);
} else {
switchToCharState(CHAR_STATE_IDLE);
};
};
} else {
(this.currState = CHAR_STATE_JUMP_LEFT);
this.masterAvSprite.playAnimation("chargecrouch-left");
};
if (this.aggressive){
if (MovieClip(root).GamePaused){
return;
};
switchToAIPhase(AI_PHASE_HARD_CHASE);
} else {
if (MovieClip(root).GamePaused){
return;
};
switchToAIPhase(AI_PHASE_SOFT_CHASE);
};
}
public function switchToAIPhase(_arg1:uint):void{
this.currAIPhase = _arg1;
gotoAIPhase(_arg1);
}
public function whenAttackRightSwooshComplete():void{
if (this.y >= 245){
if (this.aIKeyPressedIntent_LEFT){
if (this.aIKeyPressedIntent_RIGHT){
switchToCharState(CHAR_STATE_IDLE);
} else {
switchToCharState(CHAR_STATE_WALK_LEFT);
};
} else {
if (this.aIKeyPressedIntent_RIGHT){
switchToCharState(CHAR_STATE_WALK_RIGHT);
} else {
switchToCharState(CHAR_STATE_IDLE);
};
};
} else {
(this.currState = CHAR_STATE_JUMP_RIGHT);
this.masterAvSprite.playAnimation("chargecrouch-right");
};
if (this.aggressive){
if (MovieClip(root).GamePaused){
return;
};
switchToAIPhase(AI_PHASE_HARD_CHASE);
} else {
if (MovieClip(root).GamePaused){
return;
};
switchToAIPhase(AI_PHASE_SOFT_CHASE);
};
}
public function removeAllEventListeners():void{
removeEventListener(Event.ENTER_FRAME, enterFrame_xyUpdate);
removeEventListener(Event.ENTER_FRAME, enterFrame_AI);
this.damagedTimer.removeEventListener("timer", damagedDisplayComplete);
}
public function gotoCharState(_arg1:uint):void{
switch (_arg1){
case CHAR_STATE_IDLE:
this.masterAvSprite.playAnimation((this.facingLeft) ? "hiidle-left" : "hiidle-right");
break;
case CHAR_STATE_WALK_RIGHT:
this.masterAvSprite.playAnimation("lowwalk-right");
break;
case CHAR_STATE_WALK_LEFT:
this.masterAvSprite.playAnimation("lowwalk-left");
break;
case CHAR_STATE_RUN_RIGHT:
this.masterAvSprite.playAnimation("run-right");
break;
case CHAR_STATE_RUN_LEFT:
this.masterAvSprite.playAnimation("run-left");
break;
case CHAR_STATE_JUMP_RIGHT:
this.masterAvSprite.playAnimation("jump-right", "chargecrouch-right");
break;
case CHAR_STATE_JUMP_LEFT:
this.masterAvSprite.playAnimation("jump-left", "chargecrouch-left");
break;
case CHAR_STATE_BLINK_RIGHT:
case CHAR_STATE_BLINK_LEFT:
break;
case CHAR_STATE_ATTACK_RIGHT:
this.masterAvSprite.playAnimation("attack-right", "attackend-right");
break;
case CHAR_STATE_ATTACK_LEFT:
this.masterAvSprite.playAnimation("attack-left", "attackend-left");
break;
default:
trace(("--in gotoAndPlayCharState(), invalid charStateNum: " + _arg1));
break;
};
}
public function enterFrame_xyUpdate(_arg1:Event):void{
this.currEnterFrame_xyUpdate();
}
public function startShowAsDamaged():void{
if (this.damagedTimer.running){
this.damagedTimer.reset();
};
this.damagedTimer.start();
showAsDamaged();
}
public function animateLandingMovement():void{
if ((((((((this.currState == CHAR_STATE_ATTACK_LEFT)) || ((this.currState == CHAR_STATE_ATTACK_RIGHT)))) || ((this.currState == CHAR_STATE_RUN_LEFT)))) || ((this.currState == CHAR_STATE_RUN_RIGHT)))){
return;
};
if (((this.aIKeyPressedIntent_RIGHT) && (!(this.aIKeyPressedIntent_LEFT)))){
switchToCharState(CHAR_STATE_RUN_RIGHT);
} else {
if (((!(this.aIKeyPressedIntent_RIGHT)) && (this.aIKeyPressedIntent_LEFT))){
switchToCharState(CHAR_STATE_RUN_LEFT);
} else {
switchToCharState(CHAR_STATE_IDLE);
};
};
}
public function targetIsToTheLeft():Boolean{
return ((((targetMC.x + 25) - (this.x + 45)) <= 0));
}
public function switchToCharState(_arg1:uint):void{
this.currState = _arg1;
gotoCharState(_arg1);
}
public function checkTargetIsLethallyHitting():Boolean{
return (((targetMC.swooshAnimMC.lethal) && (targetMC.swooshAnimMC.hitTestObject(hitBoxMC))));
}
public function enterFrame_AI_HardChase():void{
(this.currTargetDist = calcDistanceToTarget());
if (this.currTargetDist <= MAX_ATTACK_DIST){
if (checkTargetIsLethallyHitting()){
if (Math.random() >= 0.5){
if (targetMC.x <= 250){
MovieClip(this.parent).master_tryTeleportTo(500, Math.round((Math.random() * 245)));
} else {
MovieClip(this.parent).master_tryTeleportTo(0, Math.round((Math.random() * 245)));
};
} else {
startShowAsDamaged();
(targetMC.swooshAnimMC.lethal = false);
if (targetIsToTheLeft()){
bothThrustAway(100, targetMC, true, this, false);
} else {
bothThrustAway(100, this, false, targetMC, true);
};
BlinkLevel(this.parent).whenMasterCharaHit();
};
} else {
(this.aIKeyPressedIntent_LEFT = false);
(this.aIKeyPressedIntent_RIGHT = false);
switchToAIPhase(AI_PHASE_ATTACK);
};
} else {
if (targetMC.currState == targetMC.CHAR_STATE_BLINK_LEFT){
if ((((this.currState == CHAR_STATE_BLINK_LEFT)) || ((this.currState == CHAR_STATE_BLINK_RIGHT)))){
return;
};
if (targetIsToTheLeft()){
MovieClip(this.parent).master_tryTeleportTo(500, (targetMC.y + 60));
} else {
if (targetMC.x > 45){
MovieClip(this.parent).master_tryTeleportTo((targetMC.x - 90), (targetMC.y + 60));
};
};
} else {
if (targetMC.currState == targetMC.CHAR_STATE_BLINK_RIGHT){
if ((((this.currState == CHAR_STATE_BLINK_LEFT)) || ((this.currState == CHAR_STATE_BLINK_RIGHT)))){
return;
};
if (targetIsToTheLeft()){
if (targetMC.x < 415){
MovieClip(this.parent).master_tryTeleportTo((targetMC.x + 90), (targetMC.y + 60));
};
} else {
MovieClip(this.parent).master_tryTeleportTo(-45, (targetMC.y + 60));
};
} else {
if ((((targetMC.currState == targetMC.CHAR_STATE_JUMP_LEFT)) || ((targetMC.currState == targetMC.CHAR_STATE_JUMP_RIGHT)))){
if (targetIsToTheLeft()){
(this.aIKeyPressedIntent_LEFT = true);
(this.aIKeyPressedIntent_RIGHT = false);
animateJumpLeftMovement();
} else {
(this.aIKeyPressedIntent_LEFT = false);
(this.aIKeyPressedIntent_RIGHT = true);
animateJumpRightMovement();
};
} else {
if (targetIsToTheLeft()){
if (this.y >= 245){
switchToCharState(CHAR_STATE_RUN_LEFT);
};
(this.aIKeyPressedIntent_LEFT = true);
(this.aIKeyPressedIntent_RIGHT = false);
} else {
if (this.y >= 245){
switchToCharState(CHAR_STATE_RUN_RIGHT);
};
(this.aIKeyPressedIntent_LEFT = false);
(this.aIKeyPressedIntent_RIGHT = true);
};
};
};
};
};
}
public function enterFrame_AI_Idle():void{
}
public function animateLeftAttack():void{
swooshAnimMC.attackLeft();
switchToCharState(CHAR_STATE_ATTACK_LEFT);
}
public function enterFrame_AI_SoftChase():void{
(this.currTargetDist = calcDistanceToTarget());
if (this.currTargetDist <= MAX_ATTACK_DIST){
(this.aIKeyPressedIntent_LEFT = false);
(this.aIKeyPressedIntent_RIGHT = false);
switchToAIPhase(AI_PHASE_ATTACK);
} else {
if ((((targetMC.y < 145)) && ((Math.abs((targetMC.x - this.x)) <= 90)))){
(this.aIKeyPressedIntent_LEFT = false);
(this.aIKeyPressedIntent_RIGHT = false);
switchToCharState(CHAR_STATE_IDLE);
} else {
if (targetIsToTheLeft()){
switchToCharState(CHAR_STATE_WALK_LEFT);
(this.aIKeyPressedIntent_LEFT = true);
(this.aIKeyPressedIntent_RIGHT = false);
} else {
switchToCharState(CHAR_STATE_WALK_RIGHT);
(this.aIKeyPressedIntent_LEFT = false);
(this.aIKeyPressedIntent_RIGHT = true);
};
};
};
}
public function enterFrame_AI(_arg1:Event):void{
this.currEnterFrame_AI();
}
public function removeEventListener_AI():void{
removeEventListener(Event.ENTER_FRAME, enterFrame_AI);
}
public function unpauseMC():void{
(this.currEnterFrame_xyUpdate = this.prePauseEnterFrame_xyUpdate);
(this.currEnterFrame_AI = this.prePauseEnterFrame_AI);
}
public function animateLeftMovement():void{
if ((((this.currState == CHAR_STATE_IDLE)) || ((this.currState == CHAR_STATE_WALK_RIGHT)))){
(this.facingLeft = true);
switchToCharState(CHAR_STATE_WALK_LEFT);
};
}
public function calcDistanceToTarget():Number{
return (Point.distance(new Point(this.x, this.y), new Point(targetMC.x, targetMC.y)));
}
public function gotoAIPhase(_arg1:uint):void{
switch (_arg1){
case AI_PHASE_IDLE:
break;
case AI_PHASE_SOFT_CHASE:
(this.currEnterFrame_AI = this.enterFrame_AI_SoftChase);
break;
case AI_PHASE_HARD_CHASE:
(this.currEnterFrame_AI = this.enterFrame_AI_HardChase);
break;
case AI_PHASE_ATTACK:
(this.currEnterFrame_AI = this.enterFrame_AI_Attack);
break;
default:
trace(("--in gotoAIPhase(), invalid charAIPhaseNum: " + _arg1));
break;
};
}
public function checkTargetIsLethallyHit():Boolean{
return (((swooshAnimMC.lethal) && (swooshAnimMC.hitTestObject(targetMC.hitBoxMC))));
}
public function animateRightMovement():void{
if ((((this.currState == CHAR_STATE_IDLE)) || ((this.currState == CHAR_STATE_WALK_LEFT)))){
(this.facingLeft = false);
switchToCharState(CHAR_STATE_WALK_RIGHT);
};
}
public function setFrozen(_arg1:Boolean):void{
(this.frozen = _arg1);
}
public function animateLeftBlinkArrival():void{
(this.facingLeft = true);
if (this.y < 245){
this.masterAvSprite.playAnimation("blinkarrival-left", "blinkdescend-left");
} else {
if (((this.aIKeyPressedIntent_RIGHT) && (!(this.aIKeyPressedIntent_LEFT)))){
switchToCharState(CHAR_STATE_WALK_RIGHT);
} else {
if (((!(this.aIKeyPressedIntent_RIGHT)) && (this.aIKeyPressedIntent_LEFT))){
switchToCharState(CHAR_STATE_WALK_LEFT);
} else {
this.masterAvSprite.playAnimation("blinkarrival-left", "hiidle-left");
switchToCharState(CHAR_STATE_IDLE);
};
};
};
}
public function showAsDamaged():void{
(this.masterAvSprite.transform.colorTransform = this.colorTransform_damaged);
}
public function showAsNormal():void{
(this.masterAvSprite.transform.colorTransform = colorTransform_distinction);
}
public function bothThrustAway(_arg1:uint, _arg2:MovieClip, _arg3:Boolean, _arg4:MovieClip, _arg5:Boolean):void{
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
_local6 = (_arg2.x + 45);
_local7 = (505 - _arg4.x);
if (_arg3){
if (_local7 >= _arg1){
(_arg4.x = (_arg4.x + _arg1));
} else {
(_arg4.x = (_arg4.x + (_arg1 - _local7)));
(_arg2.x = (_arg2.x - _local7));
};
} else {
if (_arg5){
if (_local6 >= _arg1){
(_arg2.x = (_arg2.x - _arg1));
} else {
(_arg2.x = (_arg2.x - (_arg1 - _local6)));
(_arg4.x = (_arg4.x + _local6));
};
} else {
if (_local6 >= _local7){
_local9 = Math.min(_local7, Math.ceil((_arg1 / 2)));
_local9;
_local8 = -((_arg1 - _local9));
_local8;
(_arg4.x = (_arg4.x + _local9));
(_arg2.x = (_arg2.x + _local8));
} else {
_local8 = -(Math.min(_local6, Math.ceil((_arg1 / 2))));
_local8;
_local9 = (_arg1 - _local8);
_local9;
(_arg4.x = (_arg4.x + _local9));
(_arg2.x = (_arg2.x + _local8));
};
};
};
}
public function animateRightAttack():void{
swooshAnimMC.attackRight();
switchToCharState(CHAR_STATE_ATTACK_RIGHT);
}
public function tryAttackRight():void{
if (((((!(this.frozen)) && (!((this.currState == CHAR_STATE_ATTACK_LEFT))))) && (!((this.currState == CHAR_STATE_ATTACK_RIGHT))))){
(this.facingLeft = false);
animateRightAttack();
};
}
}
}//package Blink_fla
Section 39
//MaterializeAnimMC_68 (Blink_fla.MaterializeAnimMC_68)
package Blink_fla {
import flash.display.*;
public dynamic class MaterializeAnimMC_68 extends MovieClip {
public var thePostMaterializeFunc:Function;
public var thePostDematerializeFunc:Function;
public function MaterializeAnimMC_68(){
addFrameScript(0, frame1, 1, frame2, 24, frame25, 46, frame47);
}
function frame1(){
}
function frame25(){
stop();
postMaterializeFunc();
}
public function postMaterializeFunc():void{
thePostMaterializeFunc();
}
public function initMaterializer(_arg1:Function, _arg2:Function):void{
this.thePostMaterializeFunc = _arg1;
this.thePostDematerializeFunc = _arg2;
}
function frame47(){
stop();
postDematerializeFunc();
}
function frame2(){
stop();
this.visible = false;
}
public function postDematerializeFunc():void{
thePostDematerializeFunc();
}
public function materializeAt(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
this.visible = true;
this.gotoAndPlay("materialize");
}
public function dematerializeAt(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
this.visible = true;
this.gotoAndPlay("dematerialize");
}
}
}//package Blink_fla
Section 40
//MC_Explosion_127 (Blink_fla.MC_Explosion_127)
package Blink_fla {
import flash.display.*;
public dynamic class MC_Explosion_127 extends MovieClip {
public function MC_Explosion_127(){
addFrameScript(17, frame18);
}
function frame18(){
stop();
}
}
}//package Blink_fla
Section 41
//Mirage_masterAnimMC_17 (Blink_fla.Mirage_masterAnimMC_17)
package Blink_fla {
import flash.display.*;
public dynamic class Mirage_masterAnimMC_17 extends MovieClip {
public function Mirage_masterAnimMC_17(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 20, frame21, 21, frame22, 39, frame40);
}
function frame3(){
this.visible = true;
}
public function doFade_Right():void{
gotoAndPlay("faderight");
}
function frame22(){
this.visible = true;
}
function frame21(){
gotoAndStop("idle");
}
function frame1(){
}
function frame2(){
stop();
this.visible = false;
}
function frame40(){
gotoAndStop("idle");
}
public function doFade_Left():void{
gotoAndPlay("fadeleft");
}
}
}//package Blink_fla
Section 42
//MirageAnimMC_14 (Blink_fla.MirageAnimMC_14)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class MirageAnimMC_14 extends MovieClip {
public var chargeLeftRightSpriteMC:MovieClip;
public function MirageAnimMC_14(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 20, frame21, 21, frame22, 39, frame40);
}
function frame3(){
this.visible = true;
}
public function doFade_Right():void{
chargeLeftRightSpriteMC.showChargeRight();
gotoAndPlay("faderight");
}
function frame22(){
this.visible = true;
}
function frame21(){
gotoAndStop("idle");
}
function frame1(){
}
function frame2(){
stop();
this.visible = false;
}
function frame40(){
gotoAndStop("idle");
}
public function doFade_Left():void{
chargeLeftRightSpriteMC.showChargeLeft();
gotoAndPlay("fadeleft");
}
}
}//package Blink_fla
Section 43
//play4allintro_3 (Blink_fla.play4allintro_3)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class play4allintro_3 extends MovieClip {
public var link_Play4AllBtn:SimpleButton;
public function play4allintro_3(){
addFrameScript(16, frame17, 202, frame203);
}
public function gotoLinkPlay4All(_arg1:MouseEvent):void{
MovieClip(root).linkToPlay4All();
link_Play4AllBtn.removeEventListener(MouseEvent.CLICK, gotoLinkPlay4All);
}
function frame17(){
link_Play4AllBtn.addEventListener(MouseEvent.CLICK, gotoLinkPlay4All, false, 0, true);
}
function frame203(){
stop();
BlinkDoc(root).gotoAppropriatePostLoadFrame();
}
}
}//package Blink_fla
Section 44
//ProgressBarMC_1 (Blink_fla.ProgressBarMC_1)
package Blink_fla {
import flash.display.*;
public dynamic class ProgressBarMC_1 extends MovieClip {
public const MAX_FILL_WIDTH:uint = 174;
public var fillBarMC:MovieClip;
public function ProgressBarMC_1(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
}
function frame2(){
stop();
}
public function setProgressTo(_arg1:Number):void{
fillBarMC.width = (_arg1 * MAX_FILL_WIDTH);
}
}
}//package Blink_fla
Section 45
//ScoreRackerMC_56 (Blink_fla.ScoreRackerMC_56)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class ScoreRackerMC_56 extends MovieClip {
public var levelScoreTxt:TextField;
public var civBonus:uint;
public var total:uint;
public var numMSecs:uint;
public var timeScoreTxt:TextField;
public var levelScore:uint;
public var numChancesBonusTxt:TextField;
public var numChancesBonus:uint;
public var timeStrTxt:TextField;
public var totalTxt:TextField;
public var timeScore:uint;
public var civBonusTxt:TextField;
public function ScoreRackerMC_56(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 24, frame25, 48, frame49, 71, frame72, 95, frame96, 119, frame120);
}
function frame72(){
if (this.civBonus > 0){
BlinkDoc(root).getSndManager().playSFX_ScoreRack();
};
civBonusTxt.text = String(this.civBonus);
civBonusTxt.textColor = 0xFFFFFF;
levelScoreTxt.textColor = 16351507;
}
public function doScoreRack(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:uint, _arg5:uint):void{
this.numMSecs = _arg1;
this.timeScore = _arg2;
this.numChancesBonus = _arg3;
this.civBonus = _arg4;
this.levelScore = ((this.timeScore + this.numChancesBonus) + this.civBonus);
this.total = _arg5;
gotoAndPlay("scorerack");
}
function frame25(){
BlinkDoc(root).getSndManager().playSFX_ScoreRack();
timeStrTxt.text = BlinkDoc(root).millisecsToStr(this.numMSecs);
timeScoreTxt.text = String(this.timeScore);
timeScoreTxt.textColor = 0xFFFFFF;
numChancesBonusTxt.textColor = 16351507;
}
public function initSR():void{
timeScoreTxt.text = String(0);
numChancesBonusTxt.text = String(0);
civBonusTxt.text = String(0);
levelScoreTxt.text = String(0);
totalTxt.text = String(0);
}
function frame1(){
}
function frame96(){
BlinkDoc(root).getSndManager().playSFX_ScoreRack();
levelScoreTxt.text = String(this.levelScore);
levelScoreTxt.textColor = 0xFFFFFF;
}
function frame2(){
stop();
}
function frame3(){
timeScoreTxt.textColor = 16351507;
}
function frame120(){
BlinkDoc(root).getSndManager().playSFX_ScoreRack();
stop();
totalTxt.text = String(this.total);
MovieClip(this.parent).whenScoreRackComplete();
}
function frame49(){
if (this.numChancesBonus > 0){
BlinkDoc(root).getSndManager().playSFX_ScoreRack();
};
numChancesBonusTxt.text = String(this.numChancesBonus);
numChancesBonusTxt.textColor = 0xFFFFFF;
civBonusTxt.textColor = 16351507;
}
}
}//package Blink_fla
Section 46
//Screen_DifficultySelectMC_148 (Blink_fla.Screen_DifficultySelectMC_148)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class Screen_DifficultySelectMC_148 extends MovieClip {
public var backBtn:BackBtn;
public var difficulty_EasyBtn:SimpleButton;
public var difficulty_NormalBtn:SimpleButton;
public var difficulty_HardBtn:SimpleButton;
public var rootDoc:BlinkDoc;
public function Screen_DifficultySelectMC_148(){
addFrameScript(0, frame1);
}
public function doDifficulty_Hard(_arg1:MouseEvent):void{
doDifficultyByNum(BlinkConsts.DIFFICULTY_NUM_HARD);
}
public function doDifficulty_Easy(_arg1:MouseEvent):void{
doDifficultyByNum(BlinkConsts.DIFFICULTY_NUM_EASY);
}
function frame1(){
stop();
rootDoc = BlinkDoc(root);
backBtn.addEventListener(MouseEvent.CLICK, goBack, false, 0, true);
difficulty_EasyBtn.addEventListener(MouseEvent.CLICK, doDifficulty_Easy, false, 0, true);
difficulty_NormalBtn.addEventListener(MouseEvent.CLICK, doDifficulty_Normal, false, 0, true);
difficulty_HardBtn.addEventListener(MouseEvent.CLICK, doDifficulty_Hard, false, 0, true);
}
public function doDifficultyByNum(_arg1:uint):void{
var dN = _arg1;
rootDoc.getSndManager().fadeOutMusic_Menu();
rootDoc.CurrDifficultyNum = dN;
rootDoc.AttemptedHighScoreSubmission = false;
if (rootDoc.PlayingThroughLevels){
rootDoc.StartedNewSingleLevelSession = false;
rootDoc.screenMCOverlayMC.fadeInLocationExposition(function (){
rootDoc.gotoAndStop("level_tutorial");
}, "Location: A.B.L.E.D. Dojo");
} else {
rootDoc.screenMCOverlayMC.fadeToAndFromBlack(function (){
rootDoc.gotoAndStop(rootDoc.CurrLevelFrameLblStr);
});
};
}
public function doDifficulty_Normal(_arg1:MouseEvent):void{
doDifficultyByNum(BlinkConsts.DIFFICULTY_NUM_NORMAL);
}
public function goBack(_arg1:MouseEvent):void{
var e = _arg1;
if (rootDoc.PlayingThroughLevels){
rootDoc.screenMCOverlayMC.fadeToAndFromBlack(function (){
rootDoc.gotoAndStop("mainmenu");
});
} else {
rootDoc.screenMCOverlayMC.fadeToAndFromBlack(function (){
rootDoc.gotoAndStop("levelselect");
});
};
}
}
}//package Blink_fla
Section 47
//Screen_Ending1MC_134 (Blink_fla.Screen_Ending1MC_134)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class Screen_Ending1MC_134 extends MovieClip {
public var skipBtn:SimpleButton;
public function Screen_Ending1MC_134(){
addFrameScript(0, frame1, 352, frame353, 364, frame365, 376, frame377, 424, frame425, 574, frame575, 586, frame587, 594, frame595, 598, frame599, 615, frame616, 674, frame675);
}
function frame675(){
stop();
endingCinematicComplete();
}
function frame616(){
BlinkDoc(root).getSndManager().playSFX_Attack();
}
function frame1(){
skipBtn.visible = !(BlinkDoc(root).Ending1FirstTime);
skipBtn.addEventListener(MouseEvent.MOUSE_UP, doSkip, false, 0, true);
}
function frame587(){
BlinkDoc(root).getSndManager().playSFX_Attack();
}
function frame575(){
BlinkDoc(root).getSndManager().playSFX_Attack();
}
function frame353(){
BlinkDoc(root).getSndManager().playSFX_Zoom();
}
function frame599(){
BlinkDoc(root).getSndManager().playSFX_Attack();
}
function frame595(){
BlinkDoc(root).getSndManager().playSFX_Attack();
}
function frame365(){
BlinkDoc(root).getSndManager().playSFX_Zoom();
}
public function doSkip(_arg1:MouseEvent):void{
var e = _arg1;
BlinkDoc(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("gamecleared");
});
}
function frame377(){
BlinkDoc(root).getSndManager().playSFX_Zoom();
}
public function endingCinematicComplete():void{
BlinkDoc(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("gamecleared");
});
}
function frame425(){
BlinkDoc(root).getSndManager().fadeOutMusic_Gameplay();
}
}
}//package Blink_fla
Section 48
//Screen_Ending2MC_139 (Blink_fla.Screen_Ending2MC_139)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class Screen_Ending2MC_139 extends MovieClip {
public var skipBtn:SimpleButton;
public function Screen_Ending2MC_139(){
addFrameScript(0, frame1, 0x0200, frame513);
}
function frame1(){
skipBtn.visible = !(BlinkDoc(root).Ending2FirstTime);
skipBtn.addEventListener(MouseEvent.MOUSE_UP, doSkip, false, 0, true);
}
function frame513(){
stop();
endingCinematicComplete();
}
public function doSkip(_arg1:MouseEvent):void{
var e = _arg1;
BlinkDoc(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("gamecleared");
});
}
public function endingCinematicComplete():void{
BlinkDoc(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("gamecleared");
});
}
}
}//package Blink_fla
Section 49
//Screen_FinalLevelLockedMsgMC_147 (Blink_fla.Screen_FinalLevelLockedMsgMC_147)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class Screen_FinalLevelLockedMsgMC_147 extends MovieClip {
public var finalScoreTxt:TextField;
public var mainMenuBtn:SimpleButton;
public var finalGradeTxt:TextField;
public function Screen_FinalLevelLockedMsgMC_147(){
addFrameScript(0, frame1, 1, frame2);
}
public function gotoMainMenu(_arg1:MouseEvent):void{
var e = _arg1;
BlinkDoc(root).getSndManager().fadeOutMusic_Gameplay();
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("mainmenu");
});
}
function frame1(){
mainMenuBtn.addEventListener(MouseEvent.CLICK, gotoMainMenu, false, 0, true);
}
function frame2(){
stop();
finalScoreTxt.text = String(BlinkDoc(root).Score);
finalGradeTxt.text = BlinkDoc(root).determineFinalGradeStr();
}
}
}//package Blink_fla
Section 50
//Screen_GameClearedMC_145 (Blink_fla.Screen_GameClearedMC_145)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class Screen_GameClearedMC_145 extends MovieClip {
public var backBtn:BackBtn;
public var finalScoreTxt:TextField;
public var statusTxt:TextField;
public var idStr:String;
public var submitHighScoreBtn:SimpleButton;
public var highScoresContainerMC:MovieClip;
public var mainMenuBtn:SimpleButton;
public var endingsAchievedMsgTxt:TextField;
public var finalGradeTxt:TextField;
public var rootDoc:BlinkDoc;
public function Screen_GameClearedMC_145(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function gotoSubmitHighScore(_arg1:MouseEvent):void{
rootDoc.AttemptedHighScoreSubmission = true;
gotoAndStop("submithighscore");
}
public function gotoMainMenu(_arg1:MouseEvent):void{
var e = _arg1;
BlinkDoc(root).getSndManager().fadeOutMusic_Gameplay();
BlinkDoc(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("mainmenu");
});
}
public function checkAllowedToSubmitHighScore():Boolean{
return (((((!(rootDoc.AttemptedHighScoreSubmission)) && (rootDoc.PlayingThroughLevels))) && ((rootDoc.Score > 0))));
}
function frame3(){
stop();
if (rootDoc.CurrDifficultyNum == BlinkConsts.DIFFICULTY_NUM_EASY){
idStr = "380eb47e8c718834";
} else {
if (rootDoc.CurrDifficultyNum == BlinkConsts.DIFFICULTY_NUM_NORMAL){
idStr = "093753a4137c5ab5";
} else {
idStr = "bced86de9f805378";
};
};
statusTxt.text = "";
highScoresContainerMC.tabEnabled = false;
highScoresContainerMC.tabChildren = false;
rootDoc.startHighScoreSubmit_GameCleared(idStr, rootDoc.Score, this);
}
function frame2(){
stop();
if (!mainMenuBtn.willTrigger(MouseEvent.CLICK)){
mainMenuBtn.addEventListener(MouseEvent.CLICK, gotoMainMenu, false, 0, true);
};
if (checkAllowedToSubmitHighScore()){
if (!submitHighScoreBtn.willTrigger(MouseEvent.CLICK)){
submitHighScoreBtn.addEventListener(MouseEvent.CLICK, gotoSubmitHighScore, false, 0, true);
};
submitHighScoreBtn.visible = (submitHighScoreBtn.enabled = true);
} else {
submitHighScoreBtn.visible = (submitHighScoreBtn.enabled = false);
};
finalScoreTxt.text = String(BlinkDoc(root).Score);
finalGradeTxt.text = BlinkDoc(root).determineFinalGradeStr();
if (((BlinkDoc(root).Ending1_achieved) && (BlinkDoc(root).Ending2_achieved))){
endingsAchievedMsgTxt.text = "Achieved Both Endings!\nExcellent!";
} else {
if (BlinkDoc(root).Ending1_achieved){
endingsAchievedMsgTxt.text = "Achieved Ending 1.\nCan you achieve Ending 2?";
} else {
endingsAchievedMsgTxt.text = "Achieved Ending 2.\nCan you achieve Ending 1?";
};
};
}
function frame1(){
rootDoc = BlinkDoc(root);
}
public function displayBackBtn():void{
this.backBtn = new BackBtn();
this.backBtn.x = 6;
this.backBtn.y = 353;
this.backBtn.tabEnabled = false;
this.backBtn.tabChildren = false;
addChild(this.backBtn);
this.backBtn.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{
if (backBtn != null){
removeChild(backBtn);
};
gotoAndStop("idle");
});
}
}
}//package Blink_fla
Section 51
//Screen_HighScoreMC_152 (Blink_fla.Screen_HighScoreMC_152)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class Screen_HighScoreMC_152 extends MovieClip {
public var backBtn:BackBtn;
public var statusTxt:TextField;
public var difficulty_EasyBtn:SimpleButton;
public var difficulty_NormalBtn:SimpleButton;
public var highScoresContainerMC:MovieClip;
public var difficulty_HardBtn:SimpleButton;
public var rootDoc:BlinkDoc;
public function Screen_HighScoreMC_152(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 10, frame11, 20, frame21);
}
public function gotoHardHighScores(_arg1:MouseEvent):void{
gotoAndStop("hard");
}
public function gotoNormalHighScores(_arg1:MouseEvent):void{
gotoAndStop("normal");
}
public function gotoMainMenu(_arg1:MouseEvent):void{
var e = _arg1;
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("mainmenu");
});
}
public function gotoEasyHighScores(_arg1:MouseEvent):void{
gotoAndStop("easy");
}
function frame3(){
stop();
if (!backBtn.willTrigger(MouseEvent.CLICK)){
backBtn.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{
gotoAndStop("idle");
}, false, 0, true);
};
statusTxt.text = "";
rootDoc.showMochiLeaderBoard("380eb47e8c718834", this);
}
function frame1(){
rootDoc = BlinkDoc(root);
}
function frame21(){
stop();
if (!backBtn.willTrigger(MouseEvent.CLICK)){
backBtn.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{
gotoAndStop("idle");
}, false, 0, true);
};
statusTxt.text = "";
rootDoc.showMochiLeaderBoard("bced86de9f805378", this);
}
function frame2(){
stop();
backBtn.addEventListener(MouseEvent.CLICK, gotoMainMenu, false, 0, true);
difficulty_EasyBtn.addEventListener(MouseEvent.CLICK, gotoEasyHighScores, false, 0, true);
difficulty_NormalBtn.addEventListener(MouseEvent.CLICK, gotoNormalHighScores, false, 0, true);
difficulty_HardBtn.addEventListener(MouseEvent.CLICK, gotoHardHighScores, false, 0, true);
}
function frame11(){
stop();
if (!backBtn.willTrigger(MouseEvent.CLICK)){
backBtn.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{
gotoAndStop("idle");
}, false, 0, true);
};
statusTxt.text = "";
rootDoc.showMochiLeaderBoard("093753a4137c5ab5", this);
}
}
}//package Blink_fla
Section 52
//Screen_LevelFailedMC_144 (Blink_fla.Screen_LevelFailedMC_144)
package Blink_fla {
import flash.display.*;
import flash.events.*;
public dynamic class Screen_LevelFailedMC_144 extends MovieClip {
public var test1Btn:SimpleButton;
public function Screen_LevelFailedMC_144(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
test1Btn.addEventListener(MouseEvent.MOUSE_UP, testFunc_MOUSE, false, 0, true);
}
public function testFunc_MOUSE(_arg1:MouseEvent):void{
trace("pressed level failed screen test button");
MovieClip(root).gotoAndStop("mainmenu");
}
function frame2(){
stop();
}
}
}//package Blink_fla
Section 53
//Screen_LevelSelectMC_102 (Blink_fla.Screen_LevelSelectMC_102)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class Screen_LevelSelectMC_102 extends MovieClip {
public var levelLock_L2MC:MovieClip;
public var backBtn:BackBtn;
public var levelSelect_L3Btn:SimpleButton;
public var levelLock_L1MC:MovieClip;
public var levelLock_L5MC:MovieClip;
public var levelSelect_L1Btn:SimpleButton;
public var levelSelect_L4Btn:SimpleButton;
public var levelSelect_L6Btn:SimpleButton;
public var levelLock_L4MC:MovieClip;
public var levelSelect_L7Btn:SimpleButton;
public var levelLock_L3MC:MovieClip;
public var levelLock_L7MC:MovieClip;
public var levelSelect_L2Btn:SimpleButton;
public var levelSelect_L5Btn:SimpleButton;
public var levelLock_L6MC:MovieClip;
public function Screen_LevelSelectMC_102(){
addFrameScript(0, frame1, 1, frame2);
}
public function play_TutorialMOUSE(_arg1:MouseEvent):void{
playGame_Tutorial();
}
public function playGame_FireLevel():void{
playGameLevel("level_fire");
}
public function play_NotBothLevelMOUSE(_arg1:MouseEvent):void{
playGame_NotBothLevel();
}
public function gotoMainMenu(_arg1:MouseEvent):void{
var e = _arg1;
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("mainmenu");
});
}
public function playGame_Tutorial():void{
playGameLevel("level_tutorial");
}
public function play_ExplosionsLevelMOUSE(_arg1:MouseEvent):void{
playGame_ExplosionsLevel();
}
public function playGame_PeopleFallingLevel():void{
playGameLevel("level_peoplefalling");
}
public function playGame_NotBothLevel():void{
playGameLevel("level_notboth");
}
public function playGame_FinalLevel():void{
playGameLevel("level_final");
}
public function play_FinalLevelMOUSE(_arg1:MouseEvent):void{
playGame_FinalLevel();
}
public function playGame_ExplosionsLevel():void{
playGameLevel("level_explosions");
}
function frame1(){
backBtn.addEventListener(MouseEvent.CLICK, gotoMainMenu, false, 0, true);
levelSelect_L1Btn.addEventListener(MouseEvent.CLICK, play_TutorialMOUSE, false, 0, true);
levelSelect_L2Btn.addEventListener(MouseEvent.CLICK, play_FireLevelMOUSE, false, 0, true);
levelSelect_L3Btn.addEventListener(MouseEvent.CLICK, play_ExplosionsLevelMOUSE, false, 0, true);
levelSelect_L4Btn.addEventListener(MouseEvent.CLICK, play_PeopleFallingLevelMOUSE, false, 0, true);
levelSelect_L5Btn.addEventListener(MouseEvent.CLICK, play_EveryoneFallingLevelMOUSE, false, 0, true);
levelSelect_L6Btn.addEventListener(MouseEvent.CLICK, play_NotBothLevelMOUSE, false, 0, true);
levelSelect_L7Btn.addEventListener(MouseEvent.CLICK, play_FinalLevelMOUSE, false, 0, true);
}
public function play_PeopleFallingLevelMOUSE(_arg1:MouseEvent):void{
playGame_PeopleFallingLevel();
}
function frame2(){
stop();
unlockLevelsByNum(BlinkDoc(root).LevelsUnlockedNum);
BlinkDoc(root).getSndManager().tryPlayMusic_MenuMus();
}
public function unlockLevelsByNum(_arg1:uint):void{
levelLock_L1MC.visible = (_arg1 < 1);
levelLock_L2MC.visible = (_arg1 < 2);
levelLock_L3MC.visible = (_arg1 < 3);
levelLock_L4MC.visible = (_arg1 < 4);
levelLock_L5MC.visible = (_arg1 < 5);
levelLock_L6MC.visible = (_arg1 < 6);
levelLock_L7MC.visible = (_arg1 < 7);
levelSelect_L1Btn.visible = (levelSelect_L1Btn.enabled = !(levelLock_L1MC.visible));
levelSelect_L2Btn.visible = (levelSelect_L2Btn.enabled = !(levelLock_L2MC.visible));
levelSelect_L3Btn.visible = (levelSelect_L3Btn.enabled = !(levelLock_L3MC.visible));
levelSelect_L4Btn.visible = (levelSelect_L4Btn.enabled = !(levelLock_L4MC.visible));
levelSelect_L5Btn.visible = (levelSelect_L5Btn.enabled = !(levelLock_L5MC.visible));
levelSelect_L6Btn.visible = (levelSelect_L6Btn.enabled = !(levelLock_L6MC.visible));
levelSelect_L7Btn.visible = (levelSelect_L7Btn.enabled = !(levelLock_L7MC.visible));
levelLock_L1MC.mouseEnabled = (levelLock_L2MC.mouseEnabled = (levelLock_L3MC.mouseEnabled = false));
levelLock_L4MC.mouseEnabled = (levelLock_L5MC.mouseEnabled = (levelLock_L6MC.mouseEnabled = false));
levelLock_L7MC.mouseEnabled = false;
}
public function playGame_EveryoneFallingLevel():void{
playGameLevel("level_everyonefalling");
}
public function play_EveryoneFallingLevelMOUSE(_arg1:MouseEvent):void{
playGame_EveryoneFallingLevel();
}
public function playGameLevel(_arg1:String):void{
var validLvl:Boolean;
var lvlName:String;
var levelFrameLabelStr = _arg1;
validLvl = false;
BlinkDoc(root).CurrLevelFrameLblStr = levelFrameLabelStr;
BlinkDoc(root).Score = 0;
BlinkDoc(root).NumMissionFailures = 0;
BlinkDoc(root).NumChances = 3;
BlinkDoc(root).PlayingThroughLevels = false;
switch (levelFrameLabelStr){
case "level_tutorial":
validLvl = true;
lvlName = BlinkConsts.LEVEL1_NAME;
break;
case "level_fire":
validLvl = true;
lvlName = BlinkConsts.LEVEL2_NAME;
break;
case "level_explosions":
validLvl = true;
lvlName = BlinkConsts.LEVEL3_NAME;
break;
case "level_peoplefalling":
validLvl = true;
lvlName = BlinkConsts.LEVEL4_NAME;
break;
case "level_everyonefalling":
validLvl = true;
lvlName = BlinkConsts.LEVEL5_NAME;
break;
case "level_notboth":
validLvl = true;
lvlName = BlinkConsts.LEVEL6_NAME;
break;
case "level_final":
validLvl = true;
lvlName = BlinkConsts.LEVEL7_NAME;
break;
default:
trace((("--in Screen_LevelSelectMC.playGameLevel(), invalid levelFrameLabelStr: \"" + levelFrameLabelStr) + "\""));
break;
};
if (validLvl){
if (!BlinkDoc(root).StartedNewSingleLevelSession){
BlinkDoc(root).StartedNewSingleLevelSession = true;
};
BlinkDoc(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
BlinkDoc(root).gotoAndStop("difficultyselect");
});
};
}
public function play_FireLevelMOUSE(_arg1:MouseEvent):void{
playGame_FireLevel();
}
}
}//package Blink_fla
Section 54
//Screen_MainMenuMC_95 (Blink_fla.Screen_MainMenuMC_95)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class Screen_MainMenuMC_95 extends MovieClip {
public var test6Btn:SimpleButton;
public var rootDoc:BlinkDoc;
public var test4Btn:SimpleButton;
public var link_Play4All_PlayMoreGamesBtn:SimpleButton;
public var msgTxt:TextField;
public var test7Btn:SimpleButton;
public var closeBtn:SimpleButton;
public var test2Btn:SimpleButton;
public var versTxt:TextField;
public var creditsBtn:SimpleButton;
public var test5Btn:SimpleButton;
public var test8Btn:SimpleButton;
public var playBtn:SimpleButton;
public var trueSplashScreenMC:MovieClip;
public var test3Btn:SimpleButton;
public var link_Play4AllBtn:SimpleButton;
public var levelSelectBtn:SimpleButton;
public var unauthorizedDomainMsgStr:String;
public var highScoresBtn:SimpleButton;
public var test1Btn:SimpleButton;
public function Screen_MainMenuMC_95(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function play_TutorialMOUSE(_arg1:MouseEvent):void{
playGame_Tutorial();
}
public function playGame_ExplosionsLevel():void{
if (MovieClip(root).isOnAcceptedDomain()){
MovieClip(root).NumChances = 3;
MovieClip(root).PlayingThroughLevels = false;
MovieClip(root).gotoAndStop("level_explosions");
} else {
msgTxt.text = this.unauthorizedDomainMsgStr;
};
}
public function playGame_FireLevel():void{
if (MovieClip(root).isOnAcceptedDomain()){
MovieClip(root).NumChances = 3;
MovieClip(root).PlayingThroughLevels = false;
MovieClip(root).gotoAndStop("level_fire");
} else {
msgTxt.text = this.unauthorizedDomainMsgStr;
};
}
public function playGame_PeopleFallingLevel():void{
if (MovieClip(root).isOnAcceptedDomain()){
MovieClip(root).NumChances = 3;
MovieClip(root).PlayingThroughLevels = false;
MovieClip(root).gotoAndStop("level_peoplefalling");
} else {
msgTxt.text = this.unauthorizedDomainMsgStr;
};
}
public function gotoHighScores(_arg1:MouseEvent):void{
var e = _arg1;
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("highscores");
});
}
public function play_NotBothLevelMOUSE(_arg1:MouseEvent):void{
playGame_NotBothLevel();
}
public function gotoCredits_MOUSE(_arg1:MouseEvent):void{
gotoCredits();
}
public function gotoLevelSelect(_arg1:MouseEvent):void{
var e = _arg1;
if (MovieClip(root).isOnAcceptedDomain()){
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("levelselect");
});
} else {
msgTxt.text = this.unauthorizedDomainMsgStr;
};
}
public function playGame_Tutorial():void{
if (MovieClip(root).isOnAcceptedDomain()){
MovieClip(root).PlayingThroughLevels = false;
MovieClip(root).gotoAndStop("level_tutorial");
} else {
msgTxt.text = this.unauthorizedDomainMsgStr;
};
}
public function gotoMainMenu(_arg1:MouseEvent):void{
var e = _arg1;
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
gotoAndStop("idle");
});
}
public function play_ExplosionsLevelMOUSE(_arg1:MouseEvent):void{
playGame_ExplosionsLevel();
}
function frame1(){
rootDoc = BlinkDoc(root);
playBtn.addEventListener(MouseEvent.MOUSE_UP, playThrough_MOUSE, false, 0, true);
levelSelectBtn.addEventListener(MouseEvent.MOUSE_UP, gotoLevelSelect, false, 0, true);
creditsBtn.addEventListener(MouseEvent.CLICK, gotoCredits_MOUSE, false, 0, true);
highScoresBtn.addEventListener(MouseEvent.CLICK, gotoHighScores, false, 0, true);
closeBtn.addEventListener(MouseEvent.CLICK, gotoMainMenu, false, 0, true);
unauthorizedDomainMsgStr = "Unauthorized domain; Blink is not available at this website yet.";
}
public function playGame_NotBothLevel():void{
if (MovieClip(root).isOnAcceptedDomain()){
MovieClip(root).NumChances = 3;
MovieClip(root).PlayingThroughLevels = false;
MovieClip(root).gotoAndStop("level_notboth");
} else {
msgTxt.text = this.unauthorizedDomainMsgStr;
};
}
public function playGame():void{
if (MovieClip(root).isOnAcceptedDomain()){
MovieClip(root).PlayingThroughLevels = false;
MovieClip(root).gotoAndStop("gameplay");
} else {
msgTxt.text = this.unauthorizedDomainMsgStr;
};
}
public function playThroughGame():void{
if (MovieClip(root).isOnAcceptedDomain()){
MovieClip(root).NumChances = 3;
MovieClip(root).PlayingThroughLevels = true;
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("difficultyselect");
});
} else {
msgTxt.text = this.unauthorizedDomainMsgStr;
};
}
public function play_FinalLevelMOUSE(_arg1:MouseEvent):void{
playGame_FinalLevel();
}
function frame2(){
trueSplashScreenMC.x = 0;
}
public function goto_linkToPlay4All(_arg1:MouseEvent):void{
rootDoc.linkToPlay4All();
}
function frame3(){
stop();
trueSplashScreenMC.visible = true;
setDisableAndHideCertainBtns(true, true, true, true, false, true, true, true, true, true, true, true, true);
MovieClip(root).Score = 0;
MovieClip(root).NumMissionFailures = 0;
MovieClip(root).getSndManager().tryPlayMusic_MenuMus();
if (!link_Play4All_PlayMoreGamesBtn.willTrigger(MouseEvent.CLICK)){
link_Play4All_PlayMoreGamesBtn.addEventListener(MouseEvent.CLICK, goto_linkToPlay4All, false, 0, true);
link_Play4AllBtn.addEventListener(MouseEvent.CLICK, goto_linkToPlay4All, false, 0, true);
};
}
public function setDisableAndHideCertainBtns(_arg1:Boolean, _arg2:Boolean, _arg3:Boolean, _arg4:Boolean, _arg5:Boolean, _arg6:Boolean, _arg7:Boolean, _arg8:Boolean, _arg9:Boolean, _arg10:Boolean, _arg11:Boolean, _arg12:Boolean, _arg13:Boolean):void{
playBtn.enabled = (playBtn.visible = _arg1);
levelSelectBtn.enabled = (levelSelectBtn.visible = _arg2);
creditsBtn.enabled = (creditsBtn.visible = _arg3);
highScoresBtn.enabled = (highScoresBtn.visible = _arg4);
closeBtn.enabled = (closeBtn.visible = _arg5);
test1Btn.enabled = (test1Btn.visible = _arg6);
test2Btn.enabled = (test2Btn.visible = _arg7);
test3Btn.enabled = (test3Btn.visible = _arg8);
test4Btn.enabled = (test4Btn.visible = _arg9);
test5Btn.enabled = (test5Btn.visible = _arg10);
test6Btn.enabled = (test6Btn.visible = _arg11);
test7Btn.enabled = (test7Btn.visible = _arg12);
test8Btn.enabled = (test8Btn.visible = _arg13);
}
public function play_PeopleFallingLevelMOUSE(_arg1:MouseEvent):void{
playGame_PeopleFallingLevel();
}
public function play_MOUSE(_arg1:MouseEvent):void{
playGame();
}
public function playGame_EveryoneFallingLevel():void{
if (MovieClip(root).isOnAcceptedDomain()){
MovieClip(root).NumChances = 3;
MovieClip(root).PlayingThroughLevels = false;
MovieClip(root).gotoAndStop("level_everyonefalling");
} else {
msgTxt.text = this.unauthorizedDomainMsgStr;
};
}
public function playGame_FinalLevel():void{
if (MovieClip(root).isOnAcceptedDomain()){
MovieClip(root).NumChances = 3;
MovieClip(root).PlayingThroughLevels = false;
MovieClip(root).gotoAndStop("level_final");
} else {
msgTxt.text = this.unauthorizedDomainMsgStr;
};
}
public function playThrough_MOUSE(_arg1:MouseEvent):void{
playThroughGame();
}
public function play_EveryoneFallingLevelMOUSE(_arg1:MouseEvent):void{
playGame_EveryoneFallingLevel();
}
public function gotoCredits():void{
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
gotoAndStop("credits");
});
}
function frame4(){
stop();
trueSplashScreenMC.visible = false;
setDisableAndHideCertainBtns(false, false, false, false, true, false, false, false, false, false, false, false, false);
versTxt.text = MovieClip(root).VersStr;
}
public function play_FireLevelMOUSE(_arg1:MouseEvent):void{
playGame_FireLevel();
}
}
}//package Blink_fla
Section 55
//Screen_PauseMC_38 (Blink_fla.Screen_PauseMC_38)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class Screen_PauseMC_38 extends MovieClip {
public var CLOSE_BTN_NUM_MISSION_OBJECTIVE:uint;
public var missionObjectiveBtn:SimpleButton;
public var currCloseBtnNum:uint;
public var difficultyStrTxt:TextField;
public var toggleMusicBtnMC:MovieClip;
public var nextLevelBtn:SimpleButton;
public var submitHighScoreBtn:SimpleButton;
public var instructionsBtn:SimpleButton;
public var scoreTxt:TextField;
public var quitConfirm_yesBtn:SimpleButton;
public var quitConfirm_noBtn:SimpleButton;
public var missionObjTxt:TextField;
public var toggleSFXBtnMC:MovieClip;
public var resumeBtn:SimpleButton;
public var rootDoc:BlinkDoc;
public var retryLevelBtn:SimpleButton;
public var scoreRackerMC:MovieClip;
public var statusTxt:TextField;
public var idStr:String;
public var failureMsgStr:String;
public var closeBtn:SimpleButton;
public var clickAnywhereToContinueBtn:SimpleButton;
public var restartLevelBtn:SimpleButton;
public var failureMsgTxt:TextField;
public var highScoresContainerMC:MovieClip;
public var CLOSE_BTN_NUM_INSTRUCTIONS:uint;
public var quitBtn:SimpleButton;
public var fSlashCharacterGrphcMC:MovieClip;
public var quitLevelBtn:SimpleButton;
public var link_Play4AllBtn:SimpleButton;
public var parentMC:BlinkLevel;
public var backBtn:BackBtn;
public function Screen_PauseMC_38(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 10, frame11, 20, frame21, 54, frame55, 79, frame80, 80, frame81);
}
public function resumeGame_MOUSE(_arg1:MouseEvent):void{
resumeGame();
}
public function doNextLevel():void{
if (!BlinkDoc(root).PlayingThroughLevels){
BlinkDoc(root).getSndManager().fadeOutMusic_Gameplay();
};
this.parentMC.whenNextLevel();
}
public function doLevelRestart():void{
this.parentMC.exitLevel();
rootDoc.Score = 0;
rootDoc.AttemptedHighScoreSubmission = false;
BlinkDoc(root).NumChances = BlinkConsts.DEF_NUM_CHANCES;
BlinkDoc(root).screenMCOverlayMC.fadeFromBlack();
BlinkDoc(root).gotoAndStop("levelrestart");
}
public function doQuitConfirm_yes_MOUSE(_arg1:MouseEvent):void{
doQuitConfirm_yes();
}
public function showMissionObjective_MOUSE(_arg1:MouseEvent):void{
showMissionObjective();
}
public function showMissionObjective():void{
setDisableAndHideCertainBtns(true, false, false, false, false, false, false, false, false, false, false, false);
if (!this.parentMC.LevelStarted){
clickAnywhereToContinueBtn.x = 0;
clickAnywhereToContinueBtn.visible = true;
clickAnywhereToContinueBtn.enabled = true;
closeBtn.visible = false;
};
gotoAndStop("missionobjective");
this.x = 0;
this.visible = true;
}
public function showQuitConfirm():void{
setDisableAndHideCertainBtns(false, false, false, false, false, true, true, false, false, false, false, false);
toggleMusicBtnMC.visible = false;
toggleSFXBtnMC.visible = false;
gotoAndStop("quitconfirm");
}
function frame2(){
stop();
difficultyStrTxt.text = BlinkDoc(root).difficultyNumToStr(BlinkDoc(root).CurrDifficultyNum);
}
function frame3(){
stop();
}
function frame11(){
stop();
missionObjTxt.text = this.parentMC.CurrMissionObjectiveStr;
this.currCloseBtnNum = CLOSE_BTN_NUM_MISSION_OBJECTIVE;
}
function frame1(){
CLOSE_BTN_NUM_INSTRUCTIONS = 0;
CLOSE_BTN_NUM_MISSION_OBJECTIVE = 1;
rootDoc = BlinkDoc(root);
parentMC = BlinkLevel(this.parent);
clickAnywhereToContinueBtn.addEventListener(MouseEvent.CLICK, doCloseFunc_MOUSE, false, 0, true);
closeBtn.addEventListener(MouseEvent.CLICK, doCloseFunc_MOUSE, false, 0, true);
instructionsBtn.addEventListener(MouseEvent.CLICK, showInstructions_MOUSE, false, 0, true);
missionObjectiveBtn.addEventListener(MouseEvent.CLICK, showMissionObjective_MOUSE, false, 0, true);
nextLevelBtn.addEventListener(MouseEvent.CLICK, doNextLevel_MOUSE, false, 0, true);
quitBtn.addEventListener(MouseEvent.CLICK, showQuitConfirm_MOUSE, false, 0, true);
quitConfirm_noBtn.addEventListener(MouseEvent.CLICK, doQuitConfirm_no_MOUSE, false, 0, true);
quitConfirm_yesBtn.addEventListener(MouseEvent.CLICK, doQuitConfirm_yes_MOUSE, false, 0, true);
quitLevelBtn.addEventListener(MouseEvent.CLICK, doQuitConfirm_yes_MOUSE, false, 0, true);
restartLevelBtn.addEventListener(MouseEvent.CLICK, doLevelRestart_MOUSE, false, 0, true);
retryLevelBtn.addEventListener(MouseEvent.CLICK, doLevelRestart_MOUSE, false, 0, true);
resumeBtn.addEventListener(MouseEvent.CLICK, resumeGame_MOUSE, false, 0, true);
submitHighScoreBtn.addEventListener(MouseEvent.CLICK, gotoSubmitHighScore, false, 0, true);
link_Play4AllBtn.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{
trace("Clicking");
rootDoc.linkToPlay4All();
});
}
function frame21(){
stop();
this.currCloseBtnNum = CLOSE_BTN_NUM_INSTRUCTIONS;
}
public function onMusicToggleOff():void{
this.parentMC.onMusicToggleOff();
}
public function doCloseFunc():void{
if (this.currCloseBtnNum == CLOSE_BTN_NUM_INSTRUCTIONS){
showPauseMenu();
} else {
doCloseMissionObjective();
};
}
public function setDisableAndHideCertainBtns(_arg1:Boolean, _arg2:Boolean, _arg3:Boolean, _arg4:Boolean, _arg5:Boolean, _arg6:Boolean, _arg7:Boolean, _arg8:Boolean, _arg9:Boolean, _arg10:Boolean, _arg11:Boolean, _arg12:Boolean):void{
closeBtn.enabled = (closeBtn.visible = _arg1);
instructionsBtn.enabled = (instructionsBtn.visible = _arg2);
missionObjectiveBtn.enabled = (missionObjectiveBtn.visible = _arg3);
nextLevelBtn.enabled = (nextLevelBtn.visible = _arg4);
quitBtn.enabled = (quitBtn.visible = _arg5);
quitConfirm_noBtn.enabled = (quitConfirm_noBtn.visible = _arg6);
quitConfirm_yesBtn.enabled = (quitConfirm_yesBtn.visible = _arg7);
quitLevelBtn.enabled = (quitLevelBtn.visible = _arg8);
restartLevelBtn.enabled = (restartLevelBtn.visible = _arg9);
retryLevelBtn.enabled = (retryLevelBtn.visible = _arg10);
resumeBtn.enabled = (resumeBtn.visible = _arg11);
submitHighScoreBtn.enabled = (submitHighScoreBtn.visible = _arg12);
}
public function setDisableAndHideBtn(_arg1:SimpleButton, _arg2:Boolean):void{
_arg1.visible = (_arg1.enabled = _arg2);
}
public function showQuitConfirm_MOUSE(_arg1:MouseEvent):void{
showQuitConfirm();
}
public function doQuitConfirm_no():void{
showPauseMenu();
}
public function doQuitConfirm_no_MOUSE(_arg1:MouseEvent):void{
doQuitConfirm_no();
}
function frame55(){
stop();
retryLevelBtn.x = 234;
retryLevelBtn.y = 275;
setDisableAndHideCertainBtns(false, false, false, false, false, false, false, true, false, true, false, checkAllowedToSubmitHighScore());
if (this.failureMsgStr != null){
failureMsgTxt.text = this.failureMsgStr;
};
scoreTxt.text = String(rootDoc.Score);
}
public function displayBackBtn():void{
this.backBtn = new BackBtn();
this.backBtn.x = 6;
this.backBtn.y = 353;
this.backBtn.tabEnabled = false;
this.backBtn.tabChildren = false;
addChild(this.backBtn);
this.backBtn.addEventListener(MouseEvent.CLICK, function (_arg1:MouseEvent):void{
if (backBtn != null){
removeChild(backBtn);
};
gotoAndStop("levelfailedchoices");
});
}
public function whenScoreRackComplete():void{
if (BlinkDoc(root).PlayingThroughLevels){
fSlashCharacterGrphcMC.visible = false;
setDisableAndHideCertainBtns(false, false, false, true, false, false, false, false, false, false, false, false);
} else {
fSlashCharacterGrphcMC.visible = true;
fSlashCharacterGrphcMC.x = 441;
fSlashCharacterGrphcMC.y = 285.2;
setDisableAndHideCertainBtns(false, false, false, true, false, false, false, false, false, true, false, false);
};
}
public function showMissionFailed(_arg1:String=null):void{
setDisableAndHideCertainBtns(false, false, false, false, false, false, false, false, false, false, false, false);
if (_arg1 != null){
this.failureMsgStr = _arg1;
};
gotoAndPlay("levelfailed");
this.x = 0;
this.visible = true;
}
public function gotoSubmitHighScore(_arg1:MouseEvent):void{
rootDoc.AttemptedHighScoreSubmission = true;
gotoAndStop("submithighscore");
}
public function quitGame():void{
BlinkDoc(root).getSndManager().fadeOutMusic_Gameplay();
MovieClip(root).screenMCOverlayMC.fadeFromBlack();
parentMC.exitLevel();
if (BlinkDoc(root).PlayingThroughLevels){
MovieClip(root).gotoAndStop("mainmenu");
} else {
MovieClip(root).gotoAndStop("levelselect");
};
}
public function doQuitConfirm_yes():void{
quitGame();
}
public function doNextLevel_MOUSE(_arg1:MouseEvent):void{
doNextLevel();
}
public function doLevelRestart_MOUSE(_arg1:MouseEvent):void{
doLevelRestart();
}
function frame81(){
stop();
setDisableAndHideCertainBtns(false, false, false, false, false, false, false, false, false, false, false, false);
if (rootDoc.CurrDifficultyNum == BlinkConsts.DIFFICULTY_NUM_EASY){
idStr = "380eb47e8c718834";
} else {
if (rootDoc.CurrDifficultyNum == BlinkConsts.DIFFICULTY_NUM_NORMAL){
idStr = "093753a4137c5ab5";
} else {
idStr = "bced86de9f805378";
};
};
statusTxt.text = "";
highScoresContainerMC.tabEnabled = false;
highScoresContainerMC.tabChildren = false;
rootDoc.startHighScoreSubmit(idStr, rootDoc.Score, this);
}
function frame80(){
stop();
if (BlinkDoc(root).PlayingThroughLevels){
retryLevelBtn.x = 457.9;
retryLevelBtn.y = 284.1;
};
scoreRackerMC.initSR();
scoreRackerMC.doScoreRack(this.parentMC.NumMSecsToCompleteLevel, this.parentMC.TimeScore, this.parentMC.NumChancesBonus, this.parentMC.CivBonus, MovieClip(root).Score);
}
public function checkAllowedToSubmitHighScore():Boolean{
return (((((!(rootDoc.AttemptedHighScoreSubmission)) && (rootDoc.PlayingThroughLevels))) && ((rootDoc.Score > 0))));
}
public function showInstructions():void{
setDisableAndHideCertainBtns(true, false, false, false, false, false, false, false, false, false, false, false);
gotoAndStop("instructions");
}
public function showInstructions_MOUSE(_arg1:MouseEvent):void{
showInstructions();
}
public function doCloseMissionObjective():void{
if (this.parentMC.LevelStarted){
showPauseMenu();
} else {
this.parentMC.LevelStarted = true;
clickAnywhereToContinueBtn.x = 0;
clickAnywhereToContinueBtn.visible = false;
clickAnywhereToContinueBtn.enabled = false;
this.parentMC.onLevelStartMissionObjClosed();
};
}
public function doCloseFunc_MOUSE(_arg1:MouseEvent):void{
doCloseFunc();
}
public function resumeGame():void{
BlinkDoc(root).hideMC(this);
this.parentMC.unpauseLevel();
}
public function showNextLevel():void{
setDisableAndHideCertainBtns(false, false, false, false, false, false, false, false, false, false, false, false);
gotoAndPlay("levelcleared");
this.x = 0;
this.visible = true;
}
public function showPauseMenu():void{
setDisableAndHideCertainBtns(false, true, true, false, true, false, false, false, (BlinkDoc(root).PlayingThroughLevels) ? false : true, false, true, false);
toggleMusicBtnMC.visible = true;
toggleSFXBtnMC.visible = true;
gotoAndStop("idle");
this.x = 0;
this.visible = true;
}
public function onMusicToggleOn():void{
this.parentMC.onMusicToggleOn();
}
}
}//package Blink_fla
Section 56
//ScreenMCOverlayMC_94 (Blink_fla.ScreenMCOverlayMC_94)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class ScreenMCOverlayMC_94 extends MovieClip {
public var locationExpositionStr:String;
public var midLocationExpoFunc:Function;
public var locationTxt:TextField;
public var midBlackFunc:Function;
public function ScreenMCOverlayMC_94(){
addFrameScript(0, frame1, 1, frame2, 23, frame24, 36, frame37, 47, frame48, 56, frame57, 97, frame98);
}
public function fadeInLocationExposition(_arg1:Function=null, _arg2:String=""):void{
this.midLocationExpoFunc = _arg1;
this.locationExpositionStr = _arg2;
this.x = 0;
this.visible = true;
gotoAndPlay("locationexposition");
}
public function fadeToAndFromBlack(_arg1:Function=null):void{
this.midBlackFunc = _arg1;
this.x = 0;
this.visible = true;
gotoAndPlay("fadetoandfromblack");
}
function frame98(){
MovieClip(root).hideMC(this);
gotoAndStop("idle");
}
function frame1(){
}
public function fadeFromBlack():void{
this.x = 0;
this.visible = true;
gotoAndPlay("fadefromblack");
}
function frame24(){
MovieClip(root).hideMC(this);
gotoAndStop("idle");
}
function frame2(){
stop();
this.visible = false;
}
function frame37(){
if (this.midBlackFunc != null){
this.midBlackFunc();
};
}
function frame48(){
MovieClip(root).hideMC(this);
gotoAndStop("idle");
}
function frame57(){
locationTxt.text = this.locationExpositionStr;
if (this.midLocationExpoFunc != null){
this.midLocationExpoFunc();
};
}
}
}//package Blink_fla
Section 57
//SpeakerIconMC_33 (Blink_fla.SpeakerIconMC_33)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class SpeakerIconMC_33 extends MovieClip {
public var playerFaceSprite:Sprite;
public var masterFaceGrphcMC:MovieClip;
public function SpeakerIconMC_33(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 10, frame11);
}
public function showSpeakerAs(_arg1:uint):void{
if (this.playerFaceSprite == null){
trace("ADDING FACE SPRITE");
addFaceSprites();
};
if (_arg1 == BlinkConsts.SPEAKER_NUM_S1){
this.playerFaceSprite.visible = true;
gotoAndStop("s1");
} else {
if (_arg1 == BlinkConsts.SPEAKER_NUM_MASTER){
this.playerFaceSprite.visible = false;
gotoAndStop("master");
} else {
trace(("--in SpeakerIconMC.showSpeakerAs(), invalid sNum: " + _arg1));
};
};
}
function frame3(){
stop();
}
function frame1(){
}
function frame2(){
stop();
}
function frame11(){
stop();
}
public function addFaceSprites():void{
this.playerFaceSprite = MovieClip(root).playerFaceSprite;
this.playerFaceSprite.visible = false;
addChild(playerFaceSprite);
}
}
}//package Blink_fla
Section 58
//SplashScreenAnimMC_72 (Blink_fla.SplashScreenAnimMC_72)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class SplashScreenAnimMC_72 extends MovieClip {
public function SplashScreenAnimMC_72(){
addFrameScript(0, frame1, 1, frame2, 33, frame34);
}
function frame1(){
}
public function playAnim():void{
gotoAndPlay("anim");
}
function frame34(){
stop();
}
function frame2(){
stop();
if (!MovieClip(root).SplashScreenShown){
addChild(MovieClip(root).playerBigFaceSprite);
};
}
}
}//package Blink_fla
Section 59
//SplashScreenFadeInAnimMC_71 (Blink_fla.SplashScreenFadeInAnimMC_71)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class SplashScreenFadeInAnimMC_71 extends MovieClip {
public var splashScreenAnimMC:MovieClip;
public var rootMC:MovieClip;
public function SplashScreenFadeInAnimMC_71(){
addFrameScript(0, frame1, 1, frame2, 47, frame48, 49, frame50, 123, frame124);
}
function frame1(){
rootMC = MovieClip(root);
}
function frame2(){
stop();
this.visible = false;
}
function frame124(){
stop();
this.x = 700;
this.visible = false;
BlinkLevel_Tutorial(this.parent).afterSplashScreenFadePoint();
}
function frame48(){
}
function frame50(){
splashScreenAnimMC.playAnim();
}
public function playFade():void{
this.x = 0;
this.y = 0;
this.visible = true;
gotoAndPlay("fade");
}
}
}//package Blink_fla
Section 60
//subline_6 (Blink_fla.subline_6)
package Blink_fla {
import flash.display.*;
public dynamic class subline_6 extends MovieClip {
public function subline_6(){
addFrameScript(45, frame46);
}
function frame46(){
stop();
}
}
}//package Blink_fla
Section 61
//TimerDisplayMC_27 (Blink_fla.TimerDisplayMC_27)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public dynamic class TimerDisplayMC_27 extends MovieClip {
public var currTimeUpFunc:Function;
public var timerFillMaskMC:MovieClip;
public var usingTimer:Boolean;
public var DEF_NUM_MSECS_FOR_WARNING:uint;
public var timer:Timer;
public var numMSecsRemaining:int;
public var timerSirenAnimMC:MovieClip;
public var maxNumMSecs:uint;
public function TimerDisplayMC_27(){
addFrameScript(0, frame1, 1, frame2);
}
public function startTimer():void{
if (this.usingTimer){
this.timer.start();
};
}
public function initTimer(_arg1:int, _arg2:Function):void{
this.numMSecsRemaining = _arg1;
this.maxNumMSecs = _arg1;
this.currTimeUpFunc = _arg2;
if (this.timer != null){
this.timer.removeEventListener("timer", tick);
this.timer.stop();
};
this.timer = new Timer(500);
this.timer.addEventListener("timer", tick, false, 0, true);
updateFillMask(this.numMSecsRemaining);
this.usingTimer = true;
timerSirenAnimMC.visible = false;
}
public function resetTimer():void{
if (this.usingTimer){
this.timer.reset();
};
}
public function stopTimer():void{
if (this.usingTimer){
this.timer.stop();
};
}
function frame1(){
DEF_NUM_MSECS_FOR_WARNING = 10000;
}
public function killTimer():void{
this.usingTimer = false;
removeAllEventListeners();
}
public function tick(_arg1:TimerEvent):void{
this.numMSecsRemaining = (this.numMSecsRemaining - 500);
updateFillMask(this.numMSecsRemaining);
if (((!(timerSirenAnimMC.visible)) && ((this.numMSecsRemaining < DEF_NUM_MSECS_FOR_WARNING)))){
timerSirenAnimMC.visible = true;
};
if (this.numMSecsRemaining <= 0){
stopTimer();
this.usingTimer = false;
this.currTimeUpFunc();
};
}
public function removeAllEventListeners():void{
if (this.timer != null){
this.timer.removeEventListener("timer", tick);
};
}
function frame2(){
stop();
timerSirenAnimMC.visible = false;
}
public function updateFillMask(_arg1:int):void{
if (_arg1 < 0){
timerFillMaskMC.x = -460;
} else {
timerFillMaskMC.x = (-460 + ((_arg1 / this.maxNumMSecs) * 494));
};
}
}
}//package Blink_fla
Section 62
//ToggleMusicBtnMC_54 (Blink_fla.ToggleMusicBtnMC_54)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class ToggleMusicBtnMC_54 extends MovieClip {
public var toggleMusicBtn:SimpleButton;
public function ToggleMusicBtnMC_54(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 10, frame11);
}
public function toggleMusic(_arg1:MouseEvent):void{
if (MovieClip(root).getSndManager().isOption_MusicOn()){
MovieClip(root).getSndManager().toggleMusicOn(false);
gotoAndStop("musicoff");
} else {
MovieClip(root).getSndManager().toggleMusicOn(true);
gotoAndStop("musicon");
};
}
function frame3(){
stop();
}
function frame1(){
toggleMusicBtn.addEventListener(MouseEvent.CLICK, toggleMusic, false, 0, true);
}
function frame2(){
stop();
if (MovieClip(root).getSndManager().isOption_MusicOn()){
gotoAndStop("musicon");
} else {
gotoAndStop("musicoff");
};
}
function frame11(){
stop();
}
}
}//package Blink_fla
Section 63
//ToggleSFXBtnMC_52 (Blink_fla.ToggleSFXBtnMC_52)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class ToggleSFXBtnMC_52 extends MovieClip {
public var toggleSFXBtn:SimpleButton;
public function ToggleSFXBtnMC_52(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 10, frame11);
}
function frame3(){
stop();
}
function frame1(){
toggleSFXBtn.addEventListener(MouseEvent.CLICK, toggleSFX, false, 0, true);
}
function frame2(){
stop();
if (MovieClip(root).getSndManager().isOption_SFXOn()){
gotoAndStop("sfxon");
} else {
gotoAndStop("sfxoff");
};
}
public function toggleSFX(_arg1:MouseEvent):void{
if (MovieClip(root).getSndManager().isOption_SFXOn()){
MovieClip(root).getSndManager().toggleSFXOn(false);
gotoAndStop("sfxoff");
} else {
MovieClip(root).getSndManager().toggleSFXOn(true);
gotoAndStop("sfxon");
};
}
function frame11(){
stop();
}
}
}//package Blink_fla
Section 64
//TrueSplashScreenMC_96 (Blink_fla.TrueSplashScreenMC_96)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class TrueSplashScreenMC_96 extends MovieClip {
public function TrueSplashScreenMC_96(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
addChild(MovieClip(root).playerBigFaceSprite);
}
}
}//package Blink_fla
Section 65
//TutorialControlsDisplayMC_64 (Blink_fla.TutorialControlsDisplayMC_64)
package Blink_fla {
import flash.display.*;
public dynamic class TutorialControlsDisplayMC_64 extends MovieClip {
public function TutorialControlsDisplayMC_64(){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 19, frame20, 29, frame30, 39, frame40, 49, frame50, 59, frame60);
}
function frame10(){
stop();
}
public function showControls_Attack():void{
gotoAndPlay("attack");
}
public function showControls_RunRight():void{
gotoAndPlay("runright");
}
function frame1(){
}
function frame20(){
stop();
}
function frame2(){
stop();
}
function frame30(){
stop();
}
public function showControls_Jump():void{
gotoAndPlay("jump");
}
public function showControls_RunLeft():void{
gotoAndPlay("runleft");
}
public function showControls_Carry():void{
gotoAndPlay("carry");
}
function frame40(){
stop();
}
function frame50(){
stop();
}
public function showControls_Blink():void{
gotoAndPlay("blink");
}
function frame60(){
stop();
}
}
}//package Blink_fla
Section 66
//UniformedMainCharaMC_141 (Blink_fla.UniformedMainCharaMC_141)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class UniformedMainCharaMC_141 extends MovieClip {
public var mainCharaUniformMC:MovieClip;
public function UniformedMainCharaMC_141(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
if (BlinkDoc(root).AvatarGender_male){
mainCharaUniformMC.showAsMale();
} else {
mainCharaUniformMC.showAsFemale();
};
}
}
}//package Blink_fla
Section 67
//Zoom_masterMC_16 (Blink_fla.Zoom_masterMC_16)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class Zoom_masterMC_16 extends MovieClip {
public var destY:Number;
public var initX:Number;
public var initY:Number;
public var zoomImgMC:MovieClip;
public var RAD_TO_DEG:Number;
public var DEG_TO_RAD:Number;
public var currAngle:Number;
public var destX:Number;
public function Zoom_masterMC_16(){
addFrameScript(0, frame1, 1, frame2);
}
public function doZoomLeft(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
this.initX = _arg1;
this.initY = _arg2;
this.destX = _arg3;
this.destY = _arg4;
this.currAngle = initZoomAngle((this.destX - this.initX), (this.destY - this.initY));
this.x = this.initX;
this.y = this.initY;
zoomImgMC.showZoomLeft();
this.removeEventListener(Event.ENTER_FRAME, enterFrame_zoom);
this.visible = true;
this.addEventListener(Event.ENTER_FRAME, enterFrame_zoom, false, 0, true);
}
public function enterFrame_zoom(_arg1:Event):void{
this.x = (this.x + (55 * Math.cos(this.currAngle)));
this.y = (this.y + (55 * Math.sin(this.currAngle)));
if ((((Math.abs((this.x - this.destX)) <= 55)) && ((Math.abs((this.y - this.destY)) <= 55)))){
this.removeEventListener(Event.ENTER_FRAME, enterFrame_zoom);
this.visible = false;
MovieClip(root).CurrLevel.whenZoomFinish_master();
} else {
if ((((this.x >= 550)) || ((this.x <= 0)))){
this.removeEventListener(Event.ENTER_FRAME, enterFrame_zoom);
this.visible = false;
MovieClip(root).CurrLevel.whenZoomFinish_master();
} else {
if ((((this.y <= 0)) || ((this.y >= 400)))){
this.removeEventListener(Event.ENTER_FRAME, enterFrame_zoom);
this.visible = false;
MovieClip(root).CurrLevel.whenZoomFinish_master();
};
};
};
}
function frame1(){
RAD_TO_DEG = (180 / Math.PI);
DEG_TO_RAD = (Math.PI / 180);
}
function frame2(){
stop();
}
public function initZoomAngle(_arg1:Number, _arg2:Number):Number{
return (Math.atan2(_arg2, _arg1));
}
public function doZoomRight(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
this.initX = _arg1;
this.initY = _arg2;
this.destX = _arg3;
this.destY = _arg4;
this.currAngle = initZoomAngle((this.destX - this.initX), (this.destY - this.initY));
this.x = this.initX;
this.y = this.initY;
zoomImgMC.showZoomRight();
this.removeEventListener(Event.ENTER_FRAME, enterFrame_zoom);
this.visible = true;
this.addEventListener(Event.ENTER_FRAME, enterFrame_zoom, false, 0, true);
}
}
}//package Blink_fla
Section 68
//ZoomImgMC_13 (Blink_fla.ZoomImgMC_13)
package Blink_fla {
import flash.display.*;
public dynamic class ZoomImgMC_13 extends MovieClip {
public function ZoomImgMC_13(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 9, frame10);
}
function frame10(){
stop();
}
function frame3(){
stop();
}
function frame1(){
}
function frame2(){
stop();
}
public function showZoomLeft():void{
gotoAndStop("zoomleft");
}
public function showZoomRight():void{
gotoAndStop("zoomright");
}
}
}//package Blink_fla
Section 69
//ZoomMC_12 (Blink_fla.ZoomMC_12)
package Blink_fla {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import flash.filters.*;
import flash.external.*;
import flash.system.*;
import flash.xml.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.printing.*;
public dynamic class ZoomMC_12 extends MovieClip {
public var destY:Number;
public var initX:Number;
public var initY:Number;
public var zoomImgMC:MovieClip;
public var RAD_TO_DEG:Number;
public var DEG_TO_RAD:Number;
public var currAngle:Number;
public var destX:Number;
public function ZoomMC_12(){
addFrameScript(0, frame1, 1, frame2);
}
public function doZoomLeft(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
this.initX = _arg1;
this.initY = _arg2;
this.destX = _arg3;
this.destY = _arg4;
this.currAngle = initZoomAngle((this.destX - this.initX), (this.destY - this.initY));
this.x = this.initX;
this.y = this.initY;
zoomImgMC.showZoomLeft();
this.removeEventListener(Event.ENTER_FRAME, enterFrame_zoom);
this.visible = true;
this.addEventListener(Event.ENTER_FRAME, enterFrame_zoom, false, 0, true);
}
public function enterFrame_zoom(_arg1:Event):void{
this.x = (this.x + (55 * Math.cos(this.currAngle)));
this.y = (this.y + (55 * Math.sin(this.currAngle)));
if ((((Math.abs((this.x - this.destX)) <= 55)) && ((Math.abs((this.y - this.destY)) <= 55)))){
this.removeEventListener(Event.ENTER_FRAME, enterFrame_zoom);
this.visible = false;
MovieClip(root).CurrLevel.whenZoomFinish();
} else {
if ((((this.x >= 550)) || ((this.x <= 0)))){
this.removeEventListener(Event.ENTER_FRAME, enterFrame_zoom);
this.visible = false;
MovieClip(root).CurrLevel.whenZoomFinish();
} else {
if ((((this.y <= 0)) || ((this.y >= 400)))){
this.removeEventListener(Event.ENTER_FRAME, enterFrame_zoom);
this.visible = false;
MovieClip(root).CurrLevel.whenZoomFinish();
};
};
};
}
function frame1(){
RAD_TO_DEG = (180 / Math.PI);
DEG_TO_RAD = (Math.PI / 180);
}
function frame2(){
stop();
}
public function initZoomAngle(_arg1:Number, _arg2:Number):Number{
return (Math.atan2(_arg2, _arg1));
}
public function doZoomRight(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
this.initX = _arg1;
this.initY = _arg2;
this.destX = _arg3;
this.destY = _arg4;
this.currAngle = initZoomAngle((this.destX - this.initX), (this.destY - this.initY));
this.x = this.initX;
this.y = this.initY;
zoomImgMC.showZoomRight();
this.removeEventListener(Event.ENTER_FRAME, enterFrame_zoom);
this.visible = true;
this.addEventListener(Event.ENTER_FRAME, enterFrame_zoom, false, 0, true);
}
}
}//package Blink_fla
Section 70
//AvatarSprite (example.AvatarSprite)
package example {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import meez.*;
public class AvatarSprite extends Sprite {
private var active:Object;
private var animations:Object;
public var frame:Rectangle;
private var frameRepeat:Number;
public var data:Object;
private var frameCounter:Number;
public function AvatarSprite(_arg1:Object, _arg2:Rectangle){
this.data = _arg1;
this.frame = _arg2;
this.animations = {};
this.active = null;
this.frameRepeat = 1;
this.frameCounter = 0;
this.scrollRect = _arg2;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function addDefaultAnimation(_arg1:String):void{
var _local2:Array;
var _local3:Number;
_local2 = AnimationDefs.getAnimations()[_arg1];
_local3 = 0;
while (_local3 < _local2.length) {
addAnimation(_local2[_local3].name, _local2[_local3].filmstrip, _local2[_local3].seq);
_local3++;
};
}
public function addAnimation(_arg1:String, _arg2:String, _arg3:Array):void{
var _local4:DisplayObject;
_local4 = getChildByName(_arg2);
if (!_local4){
Logger.warn((((("[" + _arg1) + "] Unknown filmstrip '") + _arg2) + "'"));
return;
};
animations[_arg1] = {name:_arg1, filmstrip:_local4, seq:_arg3};
animations[_arg1].framesPerRow = (_local4.width / frame.width);
animations[_arg1].ptr = -1;
_local4.visible = false;
}
public function duplicateAvSprite():AvatarSprite{
var _local1:AvatarSprite;
var _local2:Bitmap;
var _local3:*;
var _local4:*;
var _local5:Bitmap;
_local1 = new AvatarSprite(this.data, this.frame);
_local3 = 0;
while (_local3 < this.numChildren) {
_local2 = Bitmap(this.getChildAt(_local3));
_local5 = new Bitmap(_local2.bitmapData);
_local5.name = _local2.name;
_local1.addChild(_local5);
_local3++;
};
for (_local4 in this.animations) {
_local1.addAnimation(_local4, this.animations[_local4].filmstrip.name, this.animations[_local4].seq);
};
return (_local1);
}
public function setFrameRepeat(_arg1:Number):void{
this.frameRepeat = ((_arg1) || (this.frameRepeat));
this.frameCounter = 0;
}
public function playAnimation(_arg1:String, _arg2:String=null):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local3 = this.animations[_arg1];
if (!_local3){
Logger.warn((("Unknown animation '" + _arg1) + "'"));
return;
};
if (_local3 == this.active){
return;
};
if (this.active){
this.active.filmstrip.visible = false;
};
_local3.next = _arg2;
_local3.ptr = 0;
_local4 = _local3.seq[_local3.ptr];
_local5 = ((_local4 - 1) % _local3.framesPerRow);
_local6 = Math.floor(((_local4 - 1) / _local3.framesPerRow));
_local3.filmstrip.x = ((_local5 * -1) * this.frame.width);
_local3.filmstrip.y = ((_local6 * -1) * this.frame.height);
_local3.filmstrip.visible = true;
this.active = _local3;
}
public function onEnterFrame(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
if (!this.active){
return;
};
this.frameCounter++;
if (this.frameCounter < this.frameRepeat){
return;
};
this.frameCounter = 0;
this.active.ptr++;
_local2 = this.active.seq[(this.active.ptr - 1)];
_local3 = ((_local2 - 1) % this.active.framesPerRow);
_local4 = Math.floor(((_local2 - 1) / this.active.framesPerRow));
this.active.filmstrip.x = ((_local3 * -1) * this.frame.width);
this.active.filmstrip.y = ((_local4 * -1) * this.frame.height);
if (this.active.ptr >= this.active.seq.length){
if (this.active.next){
playAnimation(this.active.next);
} else {
this.active.ptr = 0;
};
};
}
}
}//package example
Section 71
//Bes_SpriteFilmstripLoader (example.Bes_SpriteFilmstripLoader)
package example {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import meez.*;
import meez.avatar.*;
import flash.utils.*;
import flash.filters.*;
public class Bes_SpriteFilmstripLoader {
private var loadCount:Number;
private var progressBarComp:ProgressBar;
public var filmstrips:Object;
private var errorCount:Number;
private var successFn:Function;
private var errorFn:Function;
private var fsl:FilmstripLoader;
public static var HEAVY_BLUR_LOW:BlurFilter = new BlurFilter(2, 2, 1);
public static var MEDIUM_SATURATION:ColorMatrixFilter = new ColorMatrixFilter([1.1699326, -0.0968946, -0.013038, 0, 1.49, -0.0490674, 1.1221054, -0.013038, 0, 1.49, -0.0490674, -0.0968946, 1.205962, 0, 1.49, 0, 0, 0, 1, 0]);
private static var DEFAULT_ERROR_FN = function (_arg1, _arg2){
trace((((("Load failed '" + _arg2) + "' (code=") + _arg1) + ")"));
};
public function Bes_SpriteFilmstripLoader(_arg1:Function, _arg2:Function=null){
this.successFn = _arg1;
this.errorFn = ((_arg2) || (DEFAULT_ERROR_FN));
this.loadCount = 0;
this.errorCount = 0;
this.filmstrips = {};
}
private function loadGeneratedFilmstrips(_arg1:AvatarSprite, _arg2:Array){
var _local3:Array;
var _local4:*;
var _local5:*;
if (!this.fsl){
this.fsl = new FilmstripLoader({});
this.fsl.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
this.fsl.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError);
};
_local3 = [];
Logger.debug((("Loading filmstrips for '" + _arg1.data.avatarId) + "'"));
for (_local4 in _arg2) {
Logger.debug((("Loading '" + _arg2[_local4]) + "'"));
_local5 = new Loader();
_local5.name = _arg2[_local4];
_local5.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoaded);
_arg1.addChild(_local5);
this.loadCount++;
_local3.push(_local5);
};
fsl.loadFilmstrips(_arg1.data.avatarId, _local3);
}
private function smoothImage(_arg1:BitmapData, _arg2:Rectangle):BitmapData{
var _local3:BitmapData;
var _local4:BitmapData;
_local3 = new BitmapData(_arg1.width, _arg1.height, true, 0xFFFFFF);
_local4 = new BitmapData(_arg1.width, _arg1.height, true, 0xFFFFFF);
_local3 = _arg1.clone();
_local4.applyFilter(_local3, new Rectangle(0, 0, _local4.width, _local4.height), new Point(0, 0), HEAVY_BLUR_LOW);
_local4.merge(_local3, new Rectangle(0, 0, _local3.width, _local3.height), new Point(0, 0), 235, 235, 235, 128);
_local4.applyFilter(_local4, new Rectangle(0, 0, _local4.width, _local4.height), new Point(0, 0), MEDIUM_SATURATION);
_arg1.dispose();
_local3.dispose();
if (isImageEmpty(_local4)){
return (null);
};
return (resizeImage(_local4, _arg2));
}
public function checkFinished():Boolean{
if (this.errorCount > 0){
return (true);
};
if ((((this.loadCount == 0)) && (!((this.successFn == null))))){
this.successFn();
return (true);
};
return (false);
}
function onImageLoaded(_arg1:Event){
var loaderInfo:LoaderInfo;
var fs:Loader;
var frame:Rectangle;
var fsBMP:BitmapData;
var smoothBMP:BitmapData;
var p:*;
var bmp:Bitmap;
var e = _arg1;
loaderInfo = LoaderInfo(e.target);
fs = loaderInfo.loader;
if (fs.name == "worldidle01"){
trace("[BEs] Found worldidle01");
frame = new Rectangle(0, 0, 180, 240);
} else {
frame = AvatarSprite(fs.parent).frame;
};
Logger.debug((("'" + fs.name) + "' loaded"));
this.filmstrips[fs.name] = fs;
fsBMP = new BitmapData(fs.width, fs.height, true, 0xFFFFFF);
try {
fsBMP.draw(fs, new Matrix(), new ColorTransform(), "normal", new Rectangle(0, 0, fs.width, fs.height), true);
smoothBMP = smoothImage(fsBMP, frame);
} catch(e) {
smoothBMP = null;
};
if (smoothBMP == null){
Logger.warn("Unable to generate smoothed image (security restrictions?)ONLOADED");
} else {
p = fs.parent;
bmp = new Bitmap(smoothBMP);
bmp.name = fs.name;
p.removeChild(fs);
p.addChild(bmp);
fsBMP.dispose();
};
loadCount--;
checkFinished();
}
public function loadFilmstrips(_arg1:AvatarSprite, _arg2:Array){
var _local3:*;
_local3 = _arg1.data.avatarId;
if (_local3.substring(0, 6) == "local:"){
loadLibraryFilmstrips(_arg1, _local3.substring(6), _arg2);
} else {
loadGeneratedFilmstrips(_arg1, _arg2);
};
}
private function resizeImage(_arg1:BitmapData, _arg2:Rectangle):BitmapData{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Matrix;
var _local10:BitmapData;
if (_arg1 == null){
return (null);
};
if ((((((_arg2.width == 180)) && ((_arg2.height == 240)))) || ((_arg2 == null)))){
return (_arg1);
};
_local3 = (_arg1.width / 180);
_local4 = (_arg1.width / 240);
_local5 = (_local3 * _arg2.width);
_local6 = (_local4 * _arg2.height);
_local7 = (_arg2.width / 180);
_local8 = (_arg2.height / 240);
_local9 = new Matrix();
_local9.scale(_local7, _local8);
_local10 = new BitmapData(_local5, _local6, true, 0);
_local10.draw(_arg1, _local9, new ColorTransform(), "normal", new Rectangle(0, 0, _local5, _local6), true);
_arg1.dispose();
return (_local10);
}
function onProgress(_arg1:ProgressEvent){
Logger.debug((("onProgress=" + Math.round(((_arg1.bytesLoaded * 100) / _arg1.bytesTotal))) + "%"));
if (this.progressBarComp != null){
trace("Bes_SpriteFilmStripLoader be's progress thing");
this.progressBarComp.setProgress(Math.round(((_arg1.bytesLoaded * 25) / _arg1.bytesTotal)), 100);
};
}
public function waitForAll(_arg1:Function){
this.successFn = _arg1;
checkFinished();
}
public function set ProgressBarComp(_arg1:ProgressBar):void{
this.progressBarComp = _arg1;
}
private function loadLibraryFilmstrips(_arg1:AvatarSprite, _arg2:String, _arg3:Array){
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:Class;
var _local8:BitmapData;
var _local9:*;
Logger.debug((("Loading library filmstrips for '" + _arg2) + "'"));
_local4 = 0;
while (_local4 < _arg3.length) {
Logger.debug((("Loading '" + _arg3[_local4]) + "'"));
_local5 = ((_arg2 + "_") + _arg3[_local4]);
_local6 = ("assets." + _local5);
_local7 = (getDefinitionByName(_local6) as Class);
if (_local7){
_local8 = new _local7(0, 0);
if (_arg3[_local4] == "worldidle01"){
_local8 = resizeImage(_local8, new Rectangle(0, 0, 180, 240));
} else {
_local8 = resizeImage(_local8, _arg1.frame);
};
_local9 = new Bitmap(_local8);
_local9.name = _arg3[_local4];
_arg1.addChild(_local9);
} else {
Logger.error((("Missing library image '" + _local6) + "'"));
};
_local4++;
};
checkFinished();
}
function onError(_arg1:Event){
this.errorFn(500, ("Render failed:" + _arg1));
}
private static function isImageEmpty(_arg1:BitmapData):Boolean{
var _local2:Rectangle;
_local2 = _arg1.getColorBoundsRect(4278190080, 0, false);
return (((_local2.width * _local2.height) == 0));
}
}
}//package example
Section 72
//SpriteFilmstripLoader (example.SpriteFilmstripLoader)
package example {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import meez.*;
import meez.avatar.*;
import flash.utils.*;
import flash.filters.*;
public class SpriteFilmstripLoader {
private var loadCount:Number;
public var filmstrips:Object;
private var errorCount:Number;
private var successFn:Function;
private var errorFn:Function;
private var fsl:FilmstripLoader;
public static var HEAVY_BLUR_LOW:BlurFilter = new BlurFilter(2, 2, 1);
public static var MEDIUM_SATURATION:ColorMatrixFilter = new ColorMatrixFilter([1.1699326, -0.0968946, -0.013038, 0, 1.49, -0.0490674, 1.1221054, -0.013038, 0, 1.49, -0.0490674, -0.0968946, 1.205962, 0, 1.49, 0, 0, 0, 1, 0]);
private static var DEFAULT_ERROR_FN = function (_arg1, _arg2){
trace((((("Load failed '" + _arg2) + "' (code=") + _arg1) + ")"));
};
public function SpriteFilmstripLoader(_arg1:Function, _arg2:Function=null){
this.successFn = _arg1;
this.errorFn = ((_arg2) || (DEFAULT_ERROR_FN));
this.loadCount = 0;
this.errorCount = 0;
this.filmstrips = {};
}
private function loadGeneratedFilmstrips(_arg1:AvatarSprite, _arg2:Array){
var _local3:Array;
var _local4:*;
var _local5:*;
if (!this.fsl){
this.fsl = new FilmstripLoader({});
this.fsl.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
this.fsl.loaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onError);
};
_local3 = [];
Logger.debug((("Loading filmstrips for '" + _arg1.data.avatarId) + "'"));
for (_local4 in _arg2) {
Logger.debug((("Loading '" + _arg2[_local4]) + "'"));
_local5 = new Loader();
_local5.name = _arg2[_local4];
_local5.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoaded);
_arg1.addChild(_local5);
this.loadCount++;
_local3.push(_local5);
};
fsl.loadFilmstrips(_arg1.data.avatarId, _local3);
}
private function smoothImage(_arg1:BitmapData, _arg2:Rectangle):BitmapData{
var _local3:BitmapData;
var _local4:BitmapData;
_local3 = new BitmapData(_arg1.width, _arg1.height, true, 0xFFFFFF);
_local4 = new BitmapData(_arg1.width, _arg1.height, true, 0xFFFFFF);
_local3 = _arg1.clone();
_local4.applyFilter(_local3, new Rectangle(0, 0, _local4.width, _local4.height), new Point(0, 0), HEAVY_BLUR_LOW);
_local4.merge(_local3, new Rectangle(0, 0, _local3.width, _local3.height), new Point(0, 0), 235, 235, 235, 128);
_local4.applyFilter(_local4, new Rectangle(0, 0, _local4.width, _local4.height), new Point(0, 0), MEDIUM_SATURATION);
_arg1.dispose();
_local3.dispose();
if (isImageEmpty(_local4)){
return (null);
};
return (resizeImage(_local4, _arg2));
}
private function resizeImage(_arg1:BitmapData, _arg2:Rectangle):BitmapData{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Matrix;
var _local10:BitmapData;
if (_arg1 == null){
return (null);
};
if ((((((_arg2.width == 180)) && ((_arg2.height == 240)))) || ((_arg2 == null)))){
return (_arg1);
};
_local3 = (_arg1.width / 180);
_local4 = (_arg1.width / 240);
_local5 = (_local3 * _arg2.width);
_local6 = (_local4 * _arg2.height);
_local7 = (_arg2.width / 180);
_local8 = (_arg2.height / 240);
_local9 = new Matrix();
_local9.scale(_local7, _local8);
_local10 = new BitmapData(_local5, _local6, true, 0);
_local10.draw(_arg1, _local9, new ColorTransform(), "normal", new Rectangle(0, 0, _local5, _local6), true);
_arg1.dispose();
return (_local10);
}
public function checkFinished():Boolean{
if (this.errorCount > 0){
return (true);
};
if ((((this.loadCount == 0)) && (!((this.successFn == null))))){
this.successFn();
return (true);
};
return (false);
}
function onImageLoaded(_arg1:Event){
var loaderInfo:LoaderInfo;
var fs:Loader;
var frame:Rectangle;
var fsBMP:BitmapData;
var smoothBMP:BitmapData;
var p:*;
var bmp:Bitmap;
var e = _arg1;
loaderInfo = LoaderInfo(e.target);
fs = loaderInfo.loader;
frame = AvatarSprite(fs.parent).frame;
Logger.debug((("'" + fs.name) + "' loaded"));
this.filmstrips[fs.name] = fs;
fsBMP = new BitmapData(fs.width, fs.height, true, 0xFFFFFF);
try {
fsBMP.draw(fs, new Matrix(), new ColorTransform(), "normal", new Rectangle(0, 0, fs.width, fs.height), true);
smoothBMP = smoothImage(fsBMP, frame);
} catch(e) {
smoothBMP = null;
};
if (smoothBMP == null){
Logger.warn("Unable to generate smoothed image (security restrictions?)ONLOADED");
} else {
p = fs.parent;
bmp = new Bitmap(smoothBMP);
bmp.name = fs.name;
p.removeChild(fs);
p.addChild(bmp);
fsBMP.dispose();
};
loadCount--;
checkFinished();
}
public function loadFilmstrips(_arg1:AvatarSprite, _arg2:Array){
var _local3:*;
_local3 = _arg1.data.avatarId;
if (_local3.substring(0, 6) == "local:"){
loadLibraryFilmstrips(_arg1, _local3.substring(6), _arg2);
} else {
loadGeneratedFilmstrips(_arg1, _arg2);
};
}
function onError(_arg1:Event){
this.errorFn(500, ("Render failed:" + _arg1));
}
function onProgress(_arg1:ProgressEvent){
Logger.debug((("onProgress=" + Math.round(((_arg1.bytesLoaded * 100) / _arg1.bytesTotal))) + "%"));
}
public function waitForAll(_arg1:Function){
this.successFn = _arg1;
checkFinished();
}
private function loadLibraryFilmstrips(_arg1:AvatarSprite, _arg2:String, _arg3:Array){
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:Class;
var _local8:BitmapData;
var _local9:*;
Logger.debug((("Loading library filmstrips for '" + _arg2) + "'"));
_local4 = 0;
while (_local4 < _arg3.length) {
Logger.debug((("Loading '" + _arg3[_local4]) + "'"));
_local5 = ((_arg2 + "_") + _arg3[_local4]);
_local6 = ("assets." + _local5);
_local7 = (getDefinitionByName(_local6) as Class);
if (_local7){
_local8 = new _local7(0, 0);
_local8 = resizeImage(_local8, _arg1.frame);
_local9 = new Bitmap(_local8);
_local9.name = _arg3[_local4];
_arg1.addChild(_local9);
} else {
Logger.error((("Missing library image '" + _local6) + "'"));
};
_local4++;
};
checkFinished();
}
private static function isImageEmpty(_arg1:BitmapData):Boolean{
var _local2:Rectangle;
_local2 = _arg1.getColorBoundsRect(4278190080, 0, false);
return (((_local2.width * _local2.height) == 0));
}
}
}//package example
Section 73
//IndeterminateBar (fl.controls.progressBarClasses.IndeterminateBar)
package fl.controls.progressBarClasses {
import flash.display.*;
import flash.events.*;
import fl.core.*;
public class IndeterminateBar extends UIComponent {
protected var bar:Sprite;
protected var barMask:Sprite;
protected var patternBmp:BitmapData;
protected var animationCount:uint;// = 0
private static var defaultStyles:Object = {indeterminateSkin:"ProgressBar_indeterminateSkin"};
public function IndeterminateBar(){
animationCount = 0;
super();
setSize(0, 0);
startAnimation();
}
protected function drawBar():void{
var _local1:Graphics;
if (patternBmp == null){
return;
};
_local1 = bar.graphics;
_local1.clear();
_local1.beginBitmapFill(patternBmp);
_local1.drawRect(0, 0, (_width + patternBmp.width), _height);
_local1.endFill();
}
protected function drawMask():void{
var _local1:Graphics;
_local1 = barMask.graphics;
_local1.clear();
_local1.beginFill(0, 0);
_local1.drawRect(0, 0, _width, _height);
_local1.endFill();
}
override public function get visible():Boolean{
return (super.visible);
}
override public function set visible(_arg1:Boolean):void{
if (_arg1){
startAnimation();
} else {
stopAnimation();
};
super.visible = _arg1;
}
protected function startAnimation():void{
addEventListener(Event.ENTER_FRAME, handleEnterFrame, false, 0, true);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawPattern();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawBar();
drawMask();
};
super.draw();
}
override protected function configUI():void{
bar = new Sprite();
addChild(bar);
barMask = new Sprite();
addChild(barMask);
bar.mask = barMask;
}
protected function stopAnimation():void{
removeEventListener(Event.ENTER_FRAME, handleEnterFrame);
}
protected function drawPattern():void{
var _local1:DisplayObject;
_local1 = getDisplayObjectInstance(getStyleValue("indeterminateSkin"));
if (patternBmp){
patternBmp.dispose();
};
patternBmp = new BitmapData((_local1.width << 0), (_local1.height << 0), true, 0);
patternBmp.draw(_local1);
}
protected function handleEnterFrame(_arg1:Event):void{
if (patternBmp == null){
return;
};
animationCount = ((animationCount + 2) % patternBmp.width);
bar.x = -(animationCount);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.progressBarClasses
Section 74
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import flash.display.*;
import flash.events.*;
import fl.core.*;
import fl.events.*;
import flash.utils.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 75
//Button (fl.controls.Button)
package fl.controls {
import flash.display.*;
import fl.core.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 76
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 77
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import flash.display.*;
import flash.events.*;
import fl.core.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 78
//ProgressBar (fl.controls.ProgressBar)
package fl.controls {
import flash.display.*;
import flash.events.*;
import fl.core.*;
import fl.controls.progressBarClasses.*;
public class ProgressBar extends UIComponent {
protected var _direction:String;// = "right"
protected var _mode:String;// = "event"
protected var _value:Number;// = 0
protected var _indeterminate:Boolean;// = true
protected var _minimum:Number;// = 0
protected var _maximum:Number;// = 0
protected var determinateBar:DisplayObject;
protected var _loaded:Number;
protected var _source:Object;
protected var track:DisplayObject;
protected var indeterminateBar:UIComponent;
private static var defaultStyles:Object = {trackSkin:"ProgressBar_trackSkin", barSkin:"ProgressBar_barSkin", indeterminateSkin:"ProgressBar_indeterminateSkin", indeterminateBar:IndeterminateBar, barPadding:0};
public function ProgressBar(){
_direction = ProgressBarDirection.RIGHT;
_indeterminate = true;
_mode = ProgressBarMode.EVENT;
_minimum = 0;
_maximum = 0;
_value = 0;
super();
}
public function get minimum():Number{
return (_minimum);
}
public function get source():Object{
return (_source);
}
public function set minimum(_arg1:Number):void{
if (_mode != ProgressBarMode.MANUAL){
return;
};
_minimum = _arg1;
invalidate(InvalidationType.DATA);
}
public function get maximum():Number{
return (_maximum);
}
protected function drawBars():void{
var _local1:DisplayObject;
var _local2:DisplayObject;
_local1 = determinateBar;
_local2 = indeterminateBar;
determinateBar = getDisplayObjectInstance(getStyleValue("barSkin"));
addChild(determinateBar);
indeterminateBar = (getDisplayObjectInstance(getStyleValue("indeterminateBar")) as UIComponent);
indeterminateBar.setStyle("indeterminateSkin", getStyleValue("indeterminateSkin"));
addChild(indeterminateBar);
if (((!((_local1 == null))) && (!((_local1 == determinateBar))))){
removeChild(_local1);
};
if (((!((_local2 == null))) && (!((_local2 == determinateBar))))){
removeChild(_local2);
};
}
protected function setupSourceEvents():void{
_source.addEventListener(ProgressEvent.PROGRESS, handleProgress, false, 0, true);
_source.addEventListener(Event.COMPLETE, handleComplete, false, 0, true);
}
public function set maximum(_arg1:Number):void{
setProgress(_value, _arg1);
}
public function set source(_arg1:Object):void{
if (_source == _arg1){
return;
};
if (_mode != ProgressBarMode.MANUAL){
resetProgress();
};
_source = _arg1;
if (_source == null){
return;
};
if (_mode == ProgressBarMode.EVENT){
setupSourceEvents();
} else {
if (_mode == ProgressBarMode.POLLED){
addEventListener(Event.ENTER_FRAME, pollSource, false, 0, true);
};
};
}
protected function drawTrack():void{
var _local1:DisplayObject;
_local1 = track;
track = getDisplayObjectInstance(getStyleValue("trackSkin"));
addChildAt(track, 0);
if (((!((_local1 == null))) && (!((_local1 == track))))){
removeChild(_local1);
};
}
protected function handleProgress(_arg1:ProgressEvent):void{
_setProgress(_arg1.bytesLoaded, _arg1.bytesTotal, true);
}
public function set sourceName(_arg1:String):void{
var _local2:DisplayObject;
if (!componentInspectorSetting){
return;
};
if (_arg1 == ""){
return;
};
_local2 = (parent.getChildByName(_arg1) as DisplayObject);
if (_local2 == null){
throw (new Error((("Source clip '" + _arg1) + "' not found on parent.")));
};
source = _local2;
}
protected function resetProgress():void{
if ((((_mode == ProgressBarMode.EVENT)) && (!((_source == null))))){
cleanupSourceEvents();
} else {
if (_mode == ProgressBarMode.POLLED){
removeEventListener(Event.ENTER_FRAME, pollSource);
} else {
if (_source != null){
_source = null;
};
};
};
_minimum = (_maximum = (_value = 0));
}
public function get percentComplete():Number{
return (((((_maximum <= _minimum)) || ((_value <= _minimum)))) ? 0 : Math.max(0, Math.min(100, (((_value - _minimum) / (_maximum - _minimum)) * 100))));
}
public function setProgress(_arg1:Number, _arg2:Number):void{
if (_mode != ProgressBarMode.MANUAL){
return;
};
_setProgress(_arg1, _arg2);
}
protected function pollSource(_arg1:Event):void{
if (_source == null){
return;
};
_setProgress(_source.bytesLoaded, _source.bytesTotal, true);
if ((((_maximum > 0)) && ((_maximum == _value)))){
removeEventListener(Event.ENTER_FRAME, pollSource);
dispatchEvent(new Event(Event.COMPLETE));
};
}
public function get indeterminate():Boolean{
return (_indeterminate);
}
public function set value(_arg1:Number):void{
setProgress(_arg1, _maximum);
}
public function set direction(_arg1:String):void{
_direction = _arg1;
invalidate(InvalidationType.DATA);
}
protected function _setProgress(_arg1:Number, _arg2:Number, _arg3:Boolean=false):void{
if ((((_arg1 == _value)) && ((_arg2 == _maximum)))){
return;
};
_value = _arg1;
_maximum = _arg2;
if (((!((_value == _loaded))) && (_arg3))){
dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _value, _maximum));
_loaded = _value;
};
if (_mode != ProgressBarMode.MANUAL){
setIndeterminate((_arg2 == 0));
};
invalidate(InvalidationType.DATA);
}
public function set mode(_arg1:String):void{
if (_mode == _arg1){
return;
};
resetProgress();
_mode = _arg1;
if ((((_arg1 == ProgressBarMode.EVENT)) && (!((_source == null))))){
setupSourceEvents();
} else {
if (_arg1 == ProgressBarMode.POLLED){
addEventListener(Event.ENTER_FRAME, pollSource, false, 0, true);
};
};
setIndeterminate(!((_mode == ProgressBarMode.MANUAL)));
}
public function reset():void{
var _local1:Object;
_setProgress(0, 0);
_local1 = _source;
_source = null;
source = _local1;
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawTrack();
drawBars();
invalidate(InvalidationType.STATE, false);
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.STATE)){
indeterminateBar.visible = _indeterminate;
determinateBar.visible = !(_indeterminate);
invalidate(InvalidationType.DATA, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
invalidate(InvalidationType.DATA, false);
};
if (((isInvalid(InvalidationType.DATA)) && (!(_indeterminate)))){
drawDeterminateBar();
};
super.draw();
}
override protected function configUI():void{
super.configUI();
}
protected function drawDeterminateBar():void{
var _local1:Number;
var _local2:Number;
_local1 = (percentComplete / 100);
_local2 = Number(getStyleValue("barPadding"));
determinateBar.width = Math.round(((width - (_local2 * 2)) * _local1));
determinateBar.x = ((_direction)==ProgressBarDirection.LEFT) ? ((width - _local2) - determinateBar.width) : _local2;
}
public function get value():Number{
return (_value);
}
public function set indeterminate(_arg1:Boolean):void{
if (((!((_mode == ProgressBarMode.MANUAL))) || ((_indeterminate == _arg1)))){
return;
};
setIndeterminate(_arg1);
}
protected function setIndeterminate(_arg1:Boolean):void{
if (_indeterminate == _arg1){
return;
};
_indeterminate = _arg1;
invalidate(InvalidationType.STATE);
}
protected function handleComplete(_arg1:Event):void{
_setProgress(_maximum, _maximum, true);
dispatchEvent(_arg1);
}
protected function drawLayout():void{
var _local1:Number;
_local1 = Number(getStyleValue("barPadding"));
track.width = width;
track.height = height;
indeterminateBar.setSize((width - (_local1 * 2)), (height - (_local1 * 2)));
indeterminateBar.move(_local1, _local1);
indeterminateBar.drawNow();
determinateBar.height = (height - (_local1 * 2));
determinateBar.y = _local1;
}
public function get direction():String{
return (_direction);
}
public function get mode():String{
return (_mode);
}
protected function cleanupSourceEvents():void{
_source.removeEventListener(ProgressEvent.PROGRESS, handleProgress);
_source.removeEventListener(Event.COMPLETE, handleComplete);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 79
//ProgressBarDirection (fl.controls.ProgressBarDirection)
package fl.controls {
public class ProgressBarDirection {
public static const RIGHT:String = "right";
public static const LEFT:String = "left";
}
}//package fl.controls
Section 80
//ProgressBarMode (fl.controls.ProgressBarMode)
package fl.controls {
public class ProgressBarMode {
public static const MANUAL:String = "manual";
public static const EVENT:String = "event";
public static const POLLED:String = "polled";
}
}//package fl.controls
Section 81
//TextInput (fl.controls.TextInput)
package fl.controls {
import flash.display.*;
import flash.events.*;
import fl.core.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.ui.*;
public class TextInput extends UIComponent implements IFocusManagerComponent {
protected var _html:Boolean;// = false
protected var _savedHTML:String;
protected var background:DisplayObject;
protected var _editable:Boolean;// = true
public var textField:TextField;
private static var defaultStyles:Object = {upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:0, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function TextInput(){
_editable = true;
_html = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
if (focusTarget != null){
focusTarget.drawFocus(_arg1);
return;
};
super.drawFocus(_arg1);
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
override protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((((_arg1 == textField)) || (super.isOurFocus(_arg1))));
}
protected function handleKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true));
};
}
public function set text(_arg1:String):void{
textField.text = _arg1;
_html = false;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
protected function updateTextFieldType():void{
textField.type = (((enabled) && (editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC;
textField.selectable = enabled;
}
public function get selectionEndIndex():int{
return (textField.selectionEndIndex);
}
public function get editable():Boolean{
return (_editable);
}
override protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (_arg1.target == this){
stage.focus = textField;
};
_local2 = focusManager;
if (((editable) && (_local2))){
_local2.showFocusIndicator = true;
if (((textField.selectable) && ((textField.selectionBeginIndex == textField.selectionBeginIndex)))){
setSelection(0, textField.length);
};
};
super.focusInHandler(_arg1);
if (editable){
setIMEMode(true);
};
}
public function get selectionBeginIndex():int{
return (textField.selectionBeginIndex);
}
public function set alwaysShowSelection(_arg1:Boolean):void{
textField.alwaysShowSelection = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
updateTextFieldType();
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
public function get horizontalScrollPosition():int{
return (textField.scrollH);
}
public function set condenseWhite(_arg1:Boolean):void{
textField.condenseWhite = _arg1;
}
public function set displayAsPassword(_arg1:Boolean):void{
textField.displayAsPassword = _arg1;
}
public function set horizontalScrollPosition(_arg1:int):void{
textField.scrollH = _arg1;
}
public function get restrict():String{
return (textField.restrict);
}
public function get textWidth():Number{
return (textField.textWidth);
}
public function get textHeight():Number{
return (textField.textHeight);
}
public function set editable(_arg1:Boolean):void{
_editable = _arg1;
updateTextFieldType();
}
public function get maxChars():int{
return (textField.maxChars);
}
public function get length():int{
return (textField.length);
}
public function getLineMetrics(_arg1:int):TextLineMetrics{
return (textField.getLineMetrics(_arg1));
}
public function get imeMode():String{
return (_imeMode);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
super.focusOutHandler(_arg1);
if (editable){
setIMEMode(false);
};
}
public function set htmlText(_arg1:String):void{
if (_arg1 == ""){
text = "";
return;
};
_html = true;
_savedHTML = _arg1;
textField.htmlText = _arg1;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
public function get text():String{
return (textField.text);
}
override public function get enabled():Boolean{
return (super.enabled);
}
public function get condenseWhite():Boolean{
return (textField.condenseWhite);
}
public function get alwaysShowSelection():Boolean{
return (textField.alwaysShowSelection);
}
override protected function draw():void{
var _local1:Object;
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawTextFormat();
drawBackground();
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function handleTextInput(_arg1:TextEvent):void{
_arg1.stopPropagation();
dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text));
}
override protected function configUI():void{
super.configUI();
tabChildren = true;
textField = new TextField();
addChild(textField);
updateTextFieldType();
textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true);
textField.addEventListener(Event.CHANGE, handleChange, false, 0, true);
textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true);
}
public function setSelection(_arg1:int, _arg2:int):void{
textField.setSelection(_arg1, _arg2);
}
public function get displayAsPassword():Boolean{
return (textField.displayAsPassword);
}
public function appendText(_arg1:String):void{
textField.appendText(_arg1);
}
public function set restrict(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
_arg1 = null;
};
textField.restrict = _arg1;
}
public function get htmlText():String{
return (textField.htmlText);
}
protected function drawBackground():void{
var _local1:DisplayObject;
var _local2:String;
_local1 = background;
_local2 = (enabled) ? "upSkin" : "disabledSkin";
background = getDisplayObjectInstance(getStyleValue(_local2));
if (background == null){
return;
};
addChildAt(background, 0);
if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){
removeChild(_local1);
};
}
override public function setFocus():void{
stage.focus = textField;
}
protected function drawLayout():void{
var _local1:Number;
_local1 = Number(getStyleValue("textPadding"));
if (background != null){
background.width = width;
background.height = height;
};
textField.width = (width - (2 * _local1));
textField.height = (height - (2 * _local1));
textField.x = (textField.y = _local1);
}
public function set maxChars(_arg1:int):void{
textField.maxChars = _arg1;
}
public function get maxHorizontalScrollPosition():int{
return (textField.maxScrollH);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
if (_html){
textField.htmlText = _savedHTML;
};
}
protected function handleChange(_arg1:Event):void{
_arg1.stopPropagation();
dispatchEvent(new Event(Event.CHANGE, true));
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 82
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 83
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 84
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.text.*;
import flash.utils.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 85
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 86
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import fl.core.*;
import flash.text.*;
import flash.utils.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 87
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 88
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 89
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 90
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.text.*;
import flash.utils.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 91
//FilmstripLoader (meez.avatar.FilmstripLoader)
package meez.avatar {
import flash.display.*;
import flash.events.*;
import meez.*;
import flash.net.*;
import flash.system.*;
import flash.xml.*;
public class FilmstripLoader {
public var loaderInfo:EventDispatcher;
private var renderApiHost;
private var completedRequests;
private var totalRequests;
private var core:Core;
public function FilmstripLoader(_arg1:Object){
this.core = Core.getInstance(_arg1);
this.loaderInfo = new EventDispatcher();
this.renderApiHost = Core.validString("render_api_host", this.core.cfg.render_api_host);
Logger.debug((("FilmstripLoader initialized (render_api_host=" + renderApiHost) + ")"));
this.totalRequests = 0;
this.completedRequests = 0;
}
private function getFilmstripId(_arg1:Loader):String{
return (String(_arg1.name.split(".").pop()));
}
public function onDefinitionLoaded(_arg1:String):void{
this.completedRequests++;
this.broadcastProgress();
}
public function onAPIError(_arg1:Number, _arg2:String):void{
this.loaderInfo.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, (((("API Error (code=" + _arg1) + ",msg=") + _arg2) + ")")));
}
public function loadFilmstrip(_arg1:String, _arg2:String, _arg3:Loader):void{
Core.validString("loadFilmstrip.avatarId", _arg1);
Core.validString("loadFilmstrip.filmstripId", _arg2);
_arg3.name = _arg2;
loadFilmstrips(_arg1, [_arg3]);
}
public function loadFilmstrips(_arg1:String, _arg2:Array):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
Core.validString("loadFilmstrip.avatarId", _arg1);
if (!Util.stringStartsWith("mzid:", _arg1)){
loaderInfo.dispatchEvent(new IOErrorEvent(IOErrorEvent.IO_ERROR, false, false, (("Unsupported avatarId '" + _arg1) + "'")));
return;
};
_local3 = _arg1.substring(5);
_local4 = this;
_local5 = new RequestHandler(this);
_local6 = "";
_local7 = 0;
while (_local7 < _arg2.length) {
_local10 = getFilmstripId(_arg2[_local7]);
_local5.filmstripTargets[_local10] = _arg2[_local7];
_local6 = (_local6 + (((_local6.length > 0)) ? "," : "" + _local10));
_local4.totalRequests = (_local4.totalRequests + 2);
_local4.broadcastProgress();
_local7++;
};
Logger.debug((((((("[" + _arg1) + "] loadFilmstrip(") + _arg1) + ",[") + _local6) + "])"));
_local8 = new URLLoader();
_local8.addEventListener(Event.COMPLETE, _local5.onAPIResponse);
_local8.addEventListener(IOErrorEvent.IO_ERROR, _local5.onIOError);
_local9 = (this.renderApiHost + "/rest/triggerimage");
_local9 = (_local9 + ("?meez_id=" + _local3));
_local9 = (_local9 + ("&triggers=" + _local6));
_local9 = (_local9 + "&monitor=true");
_local9 = (_local9 + ("&random=" + Math.round((Math.random() * 1000000)).toString(16)));
if (this.core.cfg.game_referrer_id){
_local9 = (_local9 + ("&site_ref=" + this.core.cfg.game_referrer_id));
};
Logger.debug((("Requesting filmstrip generation from '" + _local9) + "'"));
_local8.load(new URLRequest(_local9));
}
private function broadcastProgress():void{
var _local1:*;
var _local2:*;
_local1 = ((totalRequests)==0) ? 0 : Math.floor(((completedRequests * 100) / totalRequests));
_local2 = new ProgressEvent(ProgressEvent.PROGRESS);
_local2.bytesLoaded = _local1;
_local2.bytesTotal = 100;
this.loaderInfo.dispatchEvent(_local2);
}
public function onImageLoaded(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = _arg1.target.content;
Logger.debug((("loaded filmstrip image '" + _local2.name) + "'"));
this.completedRequests++;
this.broadcastProgress();
if (this.completedRequests == this.totalRequests){
this.loaderInfo.dispatchEvent(new Event(Event.COMPLETE));
};
}
public function onImageError(_arg1:Event):void{
this.loaderInfo.dispatchEvent(_arg1);
}
}
}//package meez.avatar
import flash.display.*;
import flash.events.*;
import meez.*;
import flash.net.*;
import flash.system.*;
import flash.xml.*;
class RequestHandler {
public var filmstripTargets:Object;
public var fsl:FilmstripLoader;
private function RequestHandler(_arg1:FilmstripLoader){
this.fsl = _arg1;
this.filmstripTargets = {};
}
public function onImageLoaded(_arg1:Event):void{
this.fsl.onImageLoaded(_arg1);
}
public function onIOError(_arg1:IOErrorEvent):void{
onAPIError(503, "Service temporarily unavailable");
}
public function onImageError(_arg1:Event):void{
this.fsl.onImageError(_arg1);
}
public function onAPIError(_arg1:Number, _arg2:String):void{
this.fsl.onAPIError(_arg1, _arg2);
}
public function loadFilmstrip(_arg1:String, _arg2:String):void{
var _local3:Loader;
var _local4:*;
if (!this.filmstripTargets[_arg1]){
Logger.warn((("Received unrequested filmstrip '" + _arg1) + "'"));
return;
};
this.fsl.onDefinitionLoaded(_arg1);
Logger.debug((((("Loading '" + _arg1) + "' from '") + _arg2) + "'"));
_local3 = this.filmstripTargets[_arg1];
_local3.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoaded);
_local3.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onImageError);
_local4 = new LoaderContext();
_local4.checkPolicyFile = true;
_local3.load(new URLRequest(_arg2), _local4);
}
public function onAPIResponse(_arg1:Event):void{
var _local2:XML;
var _local3:XMLList;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local2 = new XML(_arg1.target.data);
if (_local2.attribute("code") == 200){
_local3 = _local2.images.children();
if (_local3.length() > 0){
Logger.debug((("Received " + _local3.length()) + " filmstrip(s)"));
for each (_local4 in _local3) {
_local5 = _local4.attribute("id");
_local6 = _local4.attribute("url");
loadFilmstrip(_local5, _local6);
};
} else {
onAPIError(451, "No filmstrips generated");
};
} else {
_local7 = 500;
_local8 = "Unable to generate filmstrips";
if (_local2){
_local7 = Number(_local2.attribute("code"));
_local8 = (_local8 + ((" (" + ((_local2.text()) || ("-none-"))) + ")"));
};
onAPIError(_local7, _local8);
};
}
}
Section 92
//LoadVars (meez.compat.LoadVars)
package meez.compat {
import flash.events.*;
import meez.*;
import flash.net.*;
public class LoadVars {
public var onLoad:Function;// = null
public var data:Object;
private var lvClient:URLLoader;
public function LoadVars(){
onLoad = null;
data = {};
super();
this.lvClient = new URLLoader();
this.lvClient.dataFormat = URLLoaderDataFormat.VARIABLES;
}
public function onHttpStatus(_arg1:HTTPStatusEvent):void{
Logger.debug((("Response received (status=" + _arg1.status) + ")"));
}
public function onLoadError(_arg1:IOErrorEvent):void{
Logger.warn((("LoadVars failed (e=" + _arg1) + ")"));
this.onLoad(false);
}
public function load(_arg1:String){
var apiRequest:URLRequest;
var url = _arg1;
apiRequest = new URLRequest(url);
this.lvClient.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
this.lvClient.addEventListener(Event.COMPLETE, onLoadComplete);
this.lvClient.addEventListener(HTTPStatusEvent.HTTP_STATUS, onHttpStatus);
try {
this.lvClient.load(apiRequest);
} catch(e:SecurityError) {
Logger.error((("LoadVars failed (e=" + e) + ")"));
this.onLoad(false);
};
}
public function onLoadComplete(_arg1:Event):void{
Logger.warn((("LoadVars worked (evt=" + _arg1) + ")"));
this.data = this.lvClient.data;
this.onLoad(true);
}
}
}//package meez.compat
Section 93
//AnimationDefs (meez.AnimationDefs)
package meez {
public class AnimationDefs {
public static var BMX_ANIMATIONS:Array = [{name:"bikecoast-right", filmstrip:"fgbike03", seq:[1, 1, 2, 2]}, {name:"bikecoast-rightback", filmstrip:"fgbike03", seq:[7, 7, 8, 8]}, {name:"bikecoast-back", filmstrip:"fgbike03", seq:[13, 13, 14, 14]}, {name:"bikecoast-leftback", filmstrip:"fgbike03", seq:[19, 19, 20, 20]}, {name:"bikecoast-left", filmstrip:"fgbike03", seq:[25, 25, 26, 26]}, {name:"bikecoast-leftfront", filmstrip:"fgbike03", seq:[31, 31, 32, 32]}, {name:"bikecoast-front", filmstrip:"fgbike03", seq:[37, 37, 38, 38]}, {name:"bikecoast-rightfront", filmstrip:"fgbike03", seq:[43, 43, 44, 44]}, {name:"bikejump-right", filmstrip:"fgbike03", seq:[3, 3, 4, 4]}, {name:"bikejump-rightback", filmstrip:"fgbike03", seq:[9, 9, 10, 10]}, {name:"bikejump-back", filmstrip:"fgbike03", seq:[15, 15, 16, 16]}, {name:"bikejump-leftback", filmstrip:"fgbike03", seq:[21, 21, 22, 22]}, {name:"bikejump-left", filmstrip:"fgbike03", seq:[27, 27, 28, 28]}, {name:"bikejump-leftfront", filmstrip:"fgbike03", seq:[33, 33, 34, 34]}, {name:"bikejump-front", filmstrip:"fgbike03", seq:[39, 39, 40, 40]}, {name:"bikejump-rightfront", filmstrip:"fgbike03", seq:[45, 45, 46, 46]}, {name:"biketrick-right", filmstrip:"fgbike03", seq:[5, 11, 17, 23, 29, 35, 41, 47]}, {name:"biketrick-rightback", filmstrip:"fgbike03", seq:[11, 17, 23, 29, 35, 41, 47, 5]}, {name:"biketrick-back", filmstrip:"fgbike03", seq:[17, 23, 29, 35, 41, 47, 5, 11]}, {name:"biketrick-leftback", filmstrip:"fgbike03", seq:[23, 29, 35, 41, 47, 5, 11, 17]}, {name:"biketrick-left", filmstrip:"fgbike03", seq:[29, 35, 41, 47, 5, 11, 17, 23]}, {name:"biketrick-leftfront", filmstrip:"fgbike03", seq:[35, 41, 47, 5, 11, 17, 23, 29]}, {name:"biketrick-front", filmstrip:"fgbike03", seq:[41, 47, 5, 11, 17, 23, 29, 35]}, {name:"biketrick-rightfront", filmstrip:"fgbike03", seq:[47, 5, 11, 17, 23, 29, 35, 41]}, {name:"bikefall-right", filmstrip:"fgbike03", seq:[6, 6]}, {name:"bikefall-rightback", filmstrip:"fgbike03", seq:[12, 12]}, {name:"bikefall-back", filmstrip:"fgbike03", seq:[18, 18]}, {name:"bikefall-leftback", filmstrip:"fgbike03", seq:[24, 24]}, {name:"bikefall-left", filmstrip:"fgbike03", seq:[30, 30]}, {name:"bikefall-leftfront", filmstrip:"fgbike03", seq:[36, 36]}, {name:"bikefall-front", filmstrip:"fgbike03", seq:[42, 42]}, {name:"bikefall-rightfront", filmstrip:"fgbike03", seq:[48, 48]}, {name:"bikepedal-right", filmstrip:"fgbike03", seq:[50, 51, 52, 53, 54]}, {name:"bikepedal-rightback", filmstrip:"fgbike03", seq:[57, 58, 59, 60, 61]}, {name:"bikepedal-back", filmstrip:"fgbike03", seq:[63, 64, 65, 66, 67]}, {name:"bikepedal-leftback", filmstrip:"fgbike03", seq:[69, 70, 71, 72, 73]}, {name:"bikepedal-left", filmstrip:"fgbike03", seq:[75, 76, 77, 78, 79]}, {name:"bikepedal-leftfront", filmstrip:"fgbike03", seq:[81, 82, 83, 84, 85]}, {name:"bikepedal-front", filmstrip:"fgbike03", seq:[87, 88, 89, 90, 91]}, {name:"bikepedal-rightfront", filmstrip:"fgbike03", seq:[93, 94, 95, 96, 97]}];
public static var DRUMS_ANIMATIONS:Array = [{name:"drumsplay", filmstrip:"fgdrumset01", seq:[1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 1, 1, 2, 2, 1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 4, 4, 6, 6, 4, 4, 7, 7, 4, 4, 7, 7, 1, 1, 2, 2, 3, 3, 2, 2, 4, 4, 7, 7]}, {name:"drumsrockout", filmstrip:"fgdrumset01", seq:[8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 11, 10, 10, 11, 12, 12, 11, 13, 13, 11, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 8, 9, 11, 12, 12, 11, 14, 14]}, {name:"drumsmessup", filmstrip:"fgdrumset01", seq:[16, 17, 17]}, {name:"drumsidle", filmstrip:"fgdrumset01", seq:[18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23]}];
public static var WTF = [{name:"wtf", filmstrip:"wtfworld01", seq:[1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 1, 2, 2]}];
public static var ASLEEP = [{name:"asleep", filmstrip:"asleepworld01", seq:[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2]}];
public static var SINGER_ANIMATIONS:Array = [{name:"singerplay", filmstrip:"fgsinger01", seq:[1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13]}, {name:"singerrockout", filmstrip:"fgsinger01", seq:[14, 14, 15, 15, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 19, 19, 18, 18]}, {name:"singermessup", filmstrip:"fgsinger01", seq:[21, 21]}, {name:"singeridle", filmstrip:"fgsinger01", seq:[22, 22, 23, 23]}];
public static var DANCE_ANIMATIONS:Array = [{name:"danceloop", filmstrip:"fgdance01", seq:[1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 2, 2, 3, 3, 2, 2, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 5, 5, 4, 4, 5, 5]}, {name:"dancemove1", filmstrip:"fgdance01", seq:[7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12]}, {name:"dancemove2", filmstrip:"fgdance01", seq:[13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18]}, {name:"dancemove3", filmstrip:"fgdance01", seq:[19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 22, 22, 21, 21, 20, 20]}, {name:"dancemove4", filmstrip:"fgdance01", seq:[24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 30, 30]}, {name:"dancemove5", filmstrip:"fgdance01", seq:[31, 31, 32, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38, 38, 39, 39]}, {name:"dancemove6", filmstrip:"fgdance01", seq:[40, 40, 41, 41, 42, 42, 43, 43]}, {name:"dancefail", filmstrip:"fgdance01", seq:[44, 44]}];
public static var BCAR_ANIMATIONS:Array = [{name:"bcardrive-right", filmstrip:"fgvehicle02", seq:[1]}, {name:"bcardrive-rightback", filmstrip:"fgvehicle02", seq:[16]}, {name:"bcardrive-back", filmstrip:"fgvehicle02", seq:[31]}, {name:"bcardrive-leftback", filmstrip:"fgvehicle02", seq:[46]}, {name:"bcardrive-left", filmstrip:"fgvehicle02", seq:[61]}, {name:"bcardrive-leftfront", filmstrip:"fgvehicle02", seq:[76]}, {name:"bcardrive-front", filmstrip:"fgvehicle02", seq:[91]}, {name:"bcardrive-rightfront", filmstrip:"fgvehicle02", seq:[106]}, {name:"bcarfliph-right", filmstrip:"fgvehicle02", seq:[2, 3, 4, 5, 6, 7, 8]}, {name:"bcarfliph-rightback", filmstrip:"fgvehicle02", seq:[17, 18, 19, 20, 21, 22, 23]}, {name:"bcarfliph-back", filmstrip:"fgvehicle02", seq:[32, 33, 34, 35, 36, 37, 38]}, {name:"bcarfliph-leftback", filmstrip:"fgvehicle02", seq:[47, 48, 49, 50, 51, 52, 53]}, {name:"bcarfliph-left", filmstrip:"fgvehicle02", seq:[62, 63, 64, 65, 66, 67, 68]}, {name:"bcarfliph-leftfront", filmstrip:"fgvehicle02", seq:[77, 78, 79, 80, 81, 82, 83]}, {name:"bcarfliph-front", filmstrip:"fgvehicle02", seq:[92, 93, 94, 95, 96, 97, 98]}, {name:"bcarfliph-rightfront", filmstrip:"fgvehicle02", seq:[107, 108, 109, 110, 111, 112, 113]}, {name:"bcarflipv-right", filmstrip:"fgvehicle02", seq:[9, 10, 11, 12, 13, 14, 15]}, {name:"bcarflipv-rightback", filmstrip:"fgvehicle02", seq:[24, 25, 26, 27, 28, 29, 30]}, {name:"bcarflipv-back", filmstrip:"fgvehicle02", seq:[39, 40, 41, 42, 43, 44, 45]}, {name:"bcarflipv-leftback", filmstrip:"fgvehicle02", seq:[54, 55, 56, 57, 58, 59, 60]}, {name:"bcarflipv-left", filmstrip:"fgvehicle02", seq:[69, 70, 71, 72, 73, 74, 75]}, {name:"bcarflipv-leftfront", filmstrip:"fgvehicle02", seq:[84, 85, 86, 87, 88, 89, 90]}, {name:"bcarflipv-front", filmstrip:"fgvehicle02", seq:[99, 100, 101, 102, 103, 104, 105]}, {name:"bcarflipv-rightfront", filmstrip:"fgvehicle02", seq:[114, 115, 116, 117, 118, 119, 120]}];
public static var HOVER = [{name:"hover", filmstrip:"hover01", seq:[1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 2, 2]}];
public static var DCAR_ANIMATIONS:Array = [{name:"dcardrive-right", filmstrip:"fgvehicle04", seq:[1]}, {name:"dcardrive-rightback", filmstrip:"fgvehicle04", seq:[16]}, {name:"dcardrive-back", filmstrip:"fgvehicle04", seq:[31]}, {name:"dcardrive-leftback", filmstrip:"fgvehicle04", seq:[46]}, {name:"dcardrive-left", filmstrip:"fgvehicle04", seq:[61]}, {name:"dcardrive-leftfront", filmstrip:"fgvehicle04", seq:[76]}, {name:"dcardrive-front", filmstrip:"fgvehicle04", seq:[91]}, {name:"dcardrive-rightfront", filmstrip:"fgvehicle04", seq:[106]}, {name:"dcarfliph-right", filmstrip:"fgvehicle04", seq:[2, 3, 4, 5, 6, 7, 8]}, {name:"dcarfliph-rightback", filmstrip:"fgvehicle04", seq:[17, 18, 19, 20, 21, 22, 23]}, {name:"dcarfliph-back", filmstrip:"fgvehicle04", seq:[32, 33, 34, 35, 36, 37, 38]}, {name:"dcarfliph-leftback", filmstrip:"fgvehicle04", seq:[47, 48, 49, 50, 51, 52, 53]}, {name:"dcarfliph-left", filmstrip:"fgvehicle04", seq:[62, 63, 64, 65, 66, 67, 68]}, {name:"dcarfliph-leftfront", filmstrip:"fgvehicle04", seq:[77, 78, 79, 80, 81, 82, 83]}, {name:"dcarfliph-front", filmstrip:"fgvehicle04", seq:[92, 93, 94, 95, 96, 97, 98]}, {name:"dcarfliph-rightfront", filmstrip:"fgvehicle04", seq:[107, 108, 109, 110, 111, 112, 113]}, {name:"dcarflipv-right", filmstrip:"fgvehicle04", seq:[9, 10, 11, 12, 13, 14, 15]}, {name:"dcarflipv-rightback", filmstrip:"fgvehicle04", seq:[24, 25, 26, 27, 28, 29, 30]}, {name:"dcarflipv-back", filmstrip:"fgvehicle04", seq:[39, 40, 41, 42, 43, 44, 45]}, {name:"dcarflipv-leftback", filmstrip:"fgvehicle04", seq:[54, 55, 56, 57, 58, 59, 60]}, {name:"dcarflipv-left", filmstrip:"fgvehicle04", seq:[69, 70, 71, 72, 73, 74, 75]}, {name:"dcarflipv-leftfront", filmstrip:"fgvehicle04", seq:[84, 85, 86, 87, 88, 89, 90]}, {name:"dcarflipv-front", filmstrip:"fgvehicle04", seq:[99, 100, 101, 102, 103, 104, 105]}, {name:"dcarflipv-rightfront", filmstrip:"fgvehicle04", seq:[114, 115, 116, 117, 118, 119, 120]}];
public static var PLATFORMER_ANIMATIONS = [{name:"run-right", filmstrip:"fgplatformer01", seq:[1, 2, 3, 4, 5, 6, 7, 9]}, {name:"run-back", filmstrip:"fgplatformer01", seq:[10, 11, 12, 13, 14, 15, 16, 17, 18]}, {name:"run-left", filmstrip:"fgplatformer01", seq:[19, 20, 21, 22, 23, 24, 25, 26, 27]}, {name:"run-front", filmstrip:"fgplatformer01", seq:[28, 29, 30, 31, 32, 33, 34, 35, 36]}, {name:"walk-right", filmstrip:"fgplatformer01", seq:[38, 39, 40, 41, 42, 43, 44, 45, 46, 47]}, {name:"walk-back", filmstrip:"fgplatformer01", seq:[49, 50, 51, 52, 53, 54, 55, 56, 57, 58]}, {name:"walk-left", filmstrip:"fgplatformer01", seq:[60, 61, 62, 63, 64, 65, 66, 67, 68, 69]}, {name:"walk-front", filmstrip:"fgplatformer01", seq:[71, 72, 73, 74, 75, 76, 77, 78, 79, 80]}, {name:"push-right", filmstrip:"fgplatformer01", seq:[82, 83, 84, 85, 86, 87, 88, 89, 90, 91]}, {name:"push-back", filmstrip:"fgplatformer01", seq:[93, 94, 95, 96, 97, 98, 99, 100, 101, 102]}, {name:"push-left", filmstrip:"fgplatformer01", seq:[104, 105, 106, 107, 108, 109, 110, 111, 112, 113]}, {name:"push-front", filmstrip:"fgplatformer01", seq:[115, 116, 117, 118, 119, 120, 121, 122, 123, 124]}, {name:"pjump-right", filmstrip:"fgplatformer01", seq:[125, 125, 125]}, {name:"pjump-back", filmstrip:"fgplatformer01", seq:[129, 129, 129]}, {name:"pjump-left", filmstrip:"fgplatformer01", seq:[133, 133, 133]}, {name:"pjump-front", filmstrip:"fgplatformer01", seq:[137, 137, 137]}, {name:"jump-right", filmstrip:"fgplatformer01", seq:[126, 127, 128, 128, 128]}, {name:"jump-back", filmstrip:"fgplatformer01", seq:[130, 130, 131, 131, 131, 132]}, {name:"jump-left", filmstrip:"fgplatformer01", seq:[134, 134, 135, 135, 135, 136]}, {name:"jump-front", filmstrip:"fgplatformer01", seq:[138, 138, 139, 139, 140]}, {name:"flip-right", filmstrip:"fgplatformer01", seq:[141, 141, 141]}, {name:"flip-back", filmstrip:"fgplatformer01", seq:[142, 142, 142]}, {name:"flip-left", filmstrip:"fgplatformer01", seq:[143, 143, 143]}, {name:"flip-front", filmstrip:"fgplatformer01", seq:[144, 144, 144]}, {name:"throw-right", filmstrip:"fgplatformer01", seq:[145, 146, 147]}, {name:"throw-back", filmstrip:"fgplatformer01", seq:[148, 149, 150]}, {name:"throw-left", filmstrip:"fgplatformer01", seq:[151, 152, 153]}, {name:"throw-front", filmstrip:"fgplatformer01", seq:[154, 155, 156]}, {name:"slide-right", filmstrip:"fgplatformer01", seq:[157, 157, 157]}, {name:"slide-back", filmstrip:"fgplatformer01", seq:[158, 158, 158]}, {name:"slide-left", filmstrip:"fgplatformer01", seq:[159, 159, 159]}, {name:"slide-front", filmstrip:"fgplatformer01", seq:[160, 160, 160]}, {name:"duck-right", filmstrip:"fgplatformer01", seq:[161, 161]}, {name:"duck-back", filmstrip:"fgplatformer01", seq:[162, 162]}, {name:"duck-left", filmstrip:"fgplatformer01", seq:[163, 163]}, {name:"duck-front", filmstrip:"fgplatformer01", seq:[164, 164]}, {name:"climb-right", filmstrip:"fgplatformer01", seq:[165, 165, 166, 166]}, {name:"climb-back", filmstrip:"fgplatformer01", seq:[167, 167, 168, 168]}, {name:"climb-left", filmstrip:"fgplatformer01", seq:[169, 169, 170, 170]}, {name:"punch-right", filmstrip:"fgplatformer01", seq:[173, 173]}, {name:"punch-back", filmstrip:"fgplatformer01", seq:[174, 174]}, {name:"punch-left", filmstrip:"fgplatformer01", seq:[175, 175]}, {name:"punch-front", filmstrip:"fgplatformer01", seq:[176, 176]}, {name:"kick-right", filmstrip:"fgplatformer01", seq:[177, 177]}, {name:"kick-back", filmstrip:"fgplatformer01", seq:[178, 178]}, {name:"kick-left", filmstrip:"fgplatformer01", seq:[179, 179]}, {name:"kick-front", filmstrip:"fgplatformer01", seq:[180, 180]}, {name:"die-right", filmstrip:"fgplatformer01", seq:[181, 181, 182, 182, 182, 182]}, {name:"die-back", filmstrip:"fgplatformer01", seq:[183, 183, 184, 184, 184, 184]}, {name:"die-left", filmstrip:"fgplatformer01", seq:[185, 185, 186, 186, 186, 186]}, {name:"die-front", filmstrip:"fgplatformer01", seq:[187, 187, 188, 188, 188, 188]}];
public static var SKATE_ANIMATIONS:Array = [{name:"skatecoast-right", filmstrip:"fgskate01", seq:[1, 1, 2, 2]}, {name:"skatecoast-rightback", filmstrip:"fgskate01", seq:[17, 17, 18, 18]}, {name:"skatecoast-back", filmstrip:"fgskate01", seq:[33, 33, 34, 34]}, {name:"skatecoast-leftback", filmstrip:"fgskate01", seq:[49, 49, 50, 50]}, {name:"skatecoast-left", filmstrip:"fgskate01", seq:[65, 65, 66, 66]}, {name:"skatecoast-leftfront", filmstrip:"fgskate01", seq:[81, 81, 82, 82]}, {name:"skatecoast-front", filmstrip:"fgskate01", seq:[97, 97, 98, 98]}, {name:"skatecoast-rightfront", filmstrip:"fgskate01", seq:[113, 113, 114, 114]}, {name:"skatepush-right", filmstrip:"fgskate01", seq:[3, 3, 4, 4, 5, 5]}, {name:"skatepush-rightback", filmstrip:"fgskate01", seq:[19, 19, 20, 20, 21, 21]}, {name:"skatepush-back", filmstrip:"fgskate01", seq:[35, 35, 36, 36, 37, 37]}, {name:"skatepush-leftback", filmstrip:"fgskate01", seq:[51, 51, 52, 52, 53, 53]}, {name:"skatepush-left", filmstrip:"fgskate01", seq:[67, 67, 68, 68, 69, 69]}, {name:"skatepush-leftfront", filmstrip:"fgskate01", seq:[83, 83, 84, 84, 85, 85]}, {name:"skatepush-front", filmstrip:"fgskate01", seq:[99, 99, 100, 100, 101, 101]}, {name:"skatepush-rightfront", filmstrip:"fgskate01", seq:[115, 115, 116, 116, 117, 117]}, {name:"skatejump-right", filmstrip:"fgskate01", seq:[6, 7, 8, 9]}, {name:"skatejump-rightback", filmstrip:"fgskate01", seq:[22, 23, 24, 25]}, {name:"skatejump-back", filmstrip:"fgskate01", seq:[38, 39, 40, 41]}, {name:"skatejump-leftback", filmstrip:"fgskate01", seq:[54, 55, 56, 57]}, {name:"skatejump-left", filmstrip:"fgskate01", seq:[70, 71, 72, 73]}, {name:"skatejump-leftfront", filmstrip:"fgskate01", seq:[86, 87, 88, 89]}, {name:"skatejump-front", filmstrip:"fgskate01", seq:[102, 103, 104, 105]}, {name:"skatejump-rightfront", filmstrip:"fgskate01", seq:[118, 119, 120, 121]}, {name:"skatetrick-right", filmstrip:"fgskate01", seq:[10, 11, 12, 13, 14]}, {name:"skatetrick-rightback", filmstrip:"fgskate01", seq:[26, 27, 28, 29, 30]}, {name:"skatetrick-back", filmstrip:"fgskate01", seq:[42, 43, 44, 45, 46]}, {name:"skatetrick-leftback", filmstrip:"fgskate01", seq:[58, 59, 60, 61, 62]}, {name:"skatetrick-left", filmstrip:"fgskate01", seq:[74, 75, 76, 77, 78]}, {name:"skatetrick-leftfront", filmstrip:"fgskate01", seq:[90, 91, 92, 93, 94]}, {name:"skatetrick-front", filmstrip:"fgskate01", seq:[106, 107, 108, 109, 110]}, {name:"skatetrick-rightfront", filmstrip:"fgskate01", seq:[122, 123, 124, 125, 126]}, {name:"skatefall-right", filmstrip:"fgskate01", seq:[15, 16, 16, 16, 16]}, {name:"skatefall-rightback", filmstrip:"fgskate01", seq:[31, 32, 32, 32, 32]}, {name:"skatefall-back", filmstrip:"fgskate01", seq:[47, 48, 48, 48, 48]}, {name:"skatefall-leftback", filmstrip:"fgskate01", seq:[63, 64, 64, 64, 64]}, {name:"skatefall-left", filmstrip:"fgskate01", seq:[79, 80, 80, 80, 80]}, {name:"skatefall-leftfront", filmstrip:"fgskate01", seq:[95, 96, 96, 96, 96]}, {name:"skatefall-front", filmstrip:"fgskate01", seq:[111, 112, 112, 112, 112]}, {name:"skatefall-rightfront", filmstrip:"fgskate01", seq:[127, 128, 128, 128, 128]}];
public static var SAD = [{name:"sad", filmstrip:"sadworld01", seq:[1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3]}];
public static var HELLO = [{name:"hello", filmstrip:"helloworld01", seq:[1, 1, 2, 2, 3, 3, 3, 2, 2, 1, 1, 2, 2, 3, 3, 3, 2, 2]}];
public static var KISS = [{name:"kiss", filmstrip:"kissworld01", seq:[1, 1, 2, 2, 3, 3, 3, 2, 2, 1, 1, 2, 2, 3, 3, 3, 2, 2]}];
public static var MARTIALARTS_ANIMATIONS:Array = [{name:"martial-idle", filmstrip:"fgmartialarts01", seq:[1, 1, 2, 2, 3, 3, 4, 4, 4, 3, 3, 2, 2, 1]}, {name:"martial-doublepunch", filmstrip:"fgmartialarts01", seq:[5, 6, 7, 8, 9, 9, 10]}, {name:"martial-flykick", filmstrip:"fgmartialarts01", seq:[14, 15, 16, 17]}, {name:"martial-spinkick", filmstrip:"fgmartialarts01", seq:[14, 15, 35, 36, 37, 39, 41, 34, 16, 17, 17, 13]}, {name:"martial-sidekick", filmstrip:"fgmartialarts01", seq:[80, 81, 82, 82, 83]}, {name:"martial-uppercut", filmstrip:"fgmartialarts01", seq:[68, 69, 70, 71, 72, 72, 73, 74, 75, 76, 77]}, {name:"martial-blockhigh", filmstrip:"fgmartialarts01", seq:[78, 79]}, {name:"martial-blocklow", filmstrip:"fgmartialarts01", seq:[80, 80]}, {name:"martial-croucha", filmstrip:"fgmartialarts01", seq:[11, 12]}, {name:"martial-crouchb", filmstrip:"fgmartialarts01", seq:[11, 84]}, {name:"martial-die", filmstrip:"fgmartialarts01", seq:[65, 66, 67]}, {name:"martial-wushu", filmstrip:"fgmartialarts01", seq:[42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 54, 54]}, {name:"martial-falling", filmstrip:"fgmartialarts01", seq:[64]}, {name:"martial-hitgut", filmstrip:"fgmartialarts01", seq:[25, 26, 27, 27, 28, 29, 30, 31]}, {name:"martial-hithead", filmstrip:"fgmartialarts01", seq:[18, 19, 20, 20, 21, 22, 23, 24]}, {name:"martial-hituppercut", filmstrip:"fgmartialarts01", seq:[56, 57, 58]}, {name:"martial-hituppercutfall", filmstrip:"fgmartialarts01", seq:[56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68]}, {name:"martial-jumpa", filmstrip:"fgmartialarts01", seq:[32, 33]}, {name:"martial-jumpb", filmstrip:"fgmartialarts01", seq:[11, 55]}, {name:"martial-jumpc", filmstrip:"fgmartialarts01", seq:[11, 15]}, {name:"martial-spinjump", filmstrip:"fgmartialarts01", seq:[34, 35, 36, 37, 38, 39, 40, 41]}];
public static var HIRES_IDLE = [{name:"hiidle-front", filmstrip:"fgworldidle01", seq:[2, 4, 2, 3, 3, 3, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 3]}, {name:"hiidle-right", filmstrip:"fgworldidle01", seq:[6, 8, 6, 7, 7, 7, 6, 6, 6, 5, 5, 5, 6, 6, 6, 6, 7, 7]}, {name:"hiidle-back", filmstrip:"fgworldidle01", seq:[10, 12, 10, 11, 11, 11, 10, 10, 10, 9, 9, 9, 10, 10, 10, 10, 11, 11]}, {name:"hiidle-left", filmstrip:"fgworldidle01", seq:[14, 16, 14, 15, 15, 15, 14, 14, 14, 13, 13, 13, 14, 14, 14, 14, 15, 15]}];
public static var GUITAR_ANIMATIONS:Array = [{name:"guitarplay", filmstrip:"fgguitar01", seq:[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 3, 3, 4, 4, 1, 1, 2, 2, 5, 5, 6, 6]}, {name:"guitarrockout", filmstrip:"fgguitar01", seq:[7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 7, 7, 8, 8, 9, 9, 10, 10]}, {name:"guitarmessup", filmstrip:"fgguitar01", seq:[13, 13]}, {name:"guitaridle", filmstrip:"fgguitar01", seq:[14, 14, 15, 15]}];
public static var BUTTONPUSH = [{name:"buttonpush", filmstrip:"buttonpush01", seq:[1, 1, 2, 2, 2, 2, 2, 2]}];
public static var SHUTUP = [{name:"shutup", filmstrip:"shutupworld01", seq:[1, 1, 1, 2, 2, 3, 3, 3]}];
public static var YAY = [{name:"yay", filmstrip:"yayworld01", seq:[1, 1, 2, 2, 2, 3, 3, 3, 3, 2, 2, 1, 1]}];
public static var IDLE = [{name:"idle", filmstrip:"worldidle01", seq:[2, 4, 2, 3, 3, 3, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 3, 2, 2, 1, 1, 1, 2, 2, 2, 3, 3, 3, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 2, 2, 1, 1, 1, 2, 2, 2, 3, 3, 3, 2, 2, 1, 1, 1, 2, 4, 2, 2, 3, 3, 2, 1, 1, 1, 2, 2, 2, 3, 3, 3, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 2, 2, 1, 1, 1, 1]}];
public static var LOWRESWALK_ANIMATIONS = [{name:"lowwalk-back", filmstrip:"walk01", seq:[9, 9, 10, 10, 11, 11, 12, 12]}, {name:"lowwalk-front", filmstrip:"walk01", seq:[1, 1, 2, 2, 3, 3, 4, 4]}, {name:"lowwalk-left", filmstrip:"walk01", seq:[13, 13, 14, 14, 15, 15, 16, 16]}, {name:"lowwalk-right", filmstrip:"walk01", seq:[5, 5, 6, 6, 7, 7, 8, 8]}];
public static var INDIANSTYLE = [{name:"indianstyle", filmstrip:"indianstyle01", seq:[1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2]}];
public static var ISO_PLATFORMER_ANIMATIONS = [{name:"run-right", filmstrip:"fgplatformer02", seq:[1, 2, 3, 4, 5, 6, 7, 9]}, {name:"run-back", filmstrip:"fgplatformer02", seq:[10, 11, 12, 13, 14, 15, 16, 17, 18]}, {name:"run-left", filmstrip:"fgplatformer02", seq:[19, 20, 21, 22, 23, 24, 25, 26, 27]}, {name:"run-front", filmstrip:"fgplatformer02", seq:[28, 29, 30, 31, 32, 33, 34, 35, 36]}, {name:"walk-right", filmstrip:"fgplatformer02", seq:[38, 39, 40, 41, 42, 43, 44, 45, 46, 47]}, {name:"walk-back", filmstrip:"fgplatformer02", seq:[49, 50, 51, 52, 53, 54, 55, 56, 57, 58]}, {name:"walk-left", filmstrip:"fgplatformer02", seq:[60, 61, 62, 63, 64, 65, 66, 67, 68, 69]}, {name:"walk-front", filmstrip:"fgplatformer02", seq:[71, 72, 73, 74, 75, 76, 77, 78, 79, 80]}, {name:"push-right", filmstrip:"fgplatformer02", seq:[82, 83, 84, 85, 86, 87, 88, 89, 90, 91]}, {name:"push-back", filmstrip:"fgplatformer02", seq:[93, 94, 95, 96, 97, 98, 99, 100, 101, 102]}, {name:"push-left", filmstrip:"fgplatformer02", seq:[104, 105, 106, 107, 108, 109, 110, 111, 112, 113]}, {name:"push-front", filmstrip:"fgplatformer02", seq:[115, 116, 117, 118, 119, 120, 121, 122, 123, 124]}, {name:"pjump-right", filmstrip:"fgplatformer02", seq:[125, 125, 125]}, {name:"pjump-back", filmstrip:"fgplatformer02", seq:[129, 129, 129]}, {name:"pjump-left", filmstrip:"fgplatformer02", seq:[133, 133, 133]}, {name:"pjump-front", filmstrip:"fgplatformer02", seq:[137, 137, 137]}, {name:"jump-right", filmstrip:"fgplatformer02", seq:[126, 127, 128, 128, 128]}, {name:"jump-back", filmstrip:"fgplatformer02", seq:[130, 130, 131, 131, 131, 132]}, {name:"jump-left", filmstrip:"fgplatformer02", seq:[134, 134, 135, 135, 135, 136]}, {name:"jump-front", filmstrip:"fgplatformer02", seq:[138, 138, 139, 139, 140]}, {name:"flip-right", filmstrip:"fgplatformer02", seq:[141, 141, 141]}, {name:"flip-back", filmstrip:"fgplatformer02", seq:[142, 142, 142]}, {name:"flip-left", filmstrip:"fgplatformer02", seq:[143, 143, 143]}, {name:"flip-front", filmstrip:"fgplatformer02", seq:[144, 144, 144]}, {name:"throw-right", filmstrip:"fgplatformer02", seq:[145, 146, 147]}, {name:"throw-back", filmstrip:"fgplatformer02", seq:[148, 149, 150]}, {name:"throw-left", filmstrip:"fgplatformer02", seq:[151, 152, 153]}, {name:"throw-front", filmstrip:"fgplatformer02", seq:[154, 155, 156]}, {name:"slide-right", filmstrip:"fgplatformer02", seq:[157, 157, 157]}, {name:"slide-back", filmstrip:"fgplatformer02", seq:[158, 158, 158]}, {name:"slide-left", filmstrip:"fgplatformer02", seq:[159, 159, 159]}, {name:"slide-front", filmstrip:"fgplatformer02", seq:[160, 160, 160]}, {name:"duck-right", filmstrip:"fgplatformer02", seq:[161, 161]}, {name:"duck-back", filmstrip:"fgplatformer02", seq:[162, 162]}, {name:"duck-left", filmstrip:"fgplatformer02", seq:[163, 163]}, {name:"duck-front", filmstrip:"fgplatformer02", seq:[164, 164]}, {name:"climb-right", filmstrip:"fgplatformer02", seq:[165, 165, 166, 166]}, {name:"climb-back", filmstrip:"fgplatformer02", seq:[167, 167, 168, 168]}, {name:"climb-left", filmstrip:"fgplatformer02", seq:[169, 169, 170, 170]}, {name:"punch-right", filmstrip:"fgplatformer02", seq:[173, 173]}, {name:"punch-back", filmstrip:"fgplatformer02", seq:[174, 174]}, {name:"punch-left", filmstrip:"fgplatformer02", seq:[175, 175]}, {name:"punch-front", filmstrip:"fgplatformer02", seq:[176, 176]}, {name:"kick-right", filmstrip:"fgplatformer02", seq:[177, 177]}, {name:"kick-back", filmstrip:"fgplatformer02", seq:[178, 178]}, {name:"kick-left", filmstrip:"fgplatformer02", seq:[179, 179]}, {name:"kick-front", filmstrip:"fgplatformer02", seq:[180, 180]}, {name:"die-right", filmstrip:"fgplatformer02", seq:[181, 181, 182, 182, 182, 182]}, {name:"die-back", filmstrip:"fgplatformer02", seq:[183, 183, 184, 184, 184, 184]}, {name:"die-left", filmstrip:"fgplatformer02", seq:[185, 185, 186, 186, 186, 186]}, {name:"die-front", filmstrip:"fgplatformer02", seq:[187, 187, 188, 188, 188, 188]}];
public static var CCAR_ANIMATIONS:Array = [{name:"ccardrive-right", filmstrip:"fgvehicle03", seq:[1]}, {name:"ccardrive-rightback", filmstrip:"fgvehicle03", seq:[16]}, {name:"ccardrive-back", filmstrip:"fgvehicle03", seq:[31]}, {name:"ccardrive-leftback", filmstrip:"fgvehicle03", seq:[46]}, {name:"ccardrive-left", filmstrip:"fgvehicle03", seq:[61]}, {name:"ccardrive-leftfront", filmstrip:"fgvehicle03", seq:[76]}, {name:"ccardrive-front", filmstrip:"fgvehicle03", seq:[91]}, {name:"ccardrive-rightfront", filmstrip:"fgvehicle03", seq:[106]}, {name:"ccarfliph-right", filmstrip:"fgvehicle03", seq:[2, 3, 4, 5, 6, 7, 8]}, {name:"ccarfliph-rightback", filmstrip:"fgvehicle03", seq:[17, 18, 19, 20, 21, 22, 23]}, {name:"ccarfliph-back", filmstrip:"fgvehicle03", seq:[32, 33, 34, 35, 36, 37, 38]}, {name:"ccarfliph-leftback", filmstrip:"fgvehicle03", seq:[47, 48, 49, 50, 51, 52, 53]}, {name:"ccarfliph-left", filmstrip:"fgvehicle03", seq:[62, 63, 64, 65, 66, 67, 68]}, {name:"ccarfliph-leftfront", filmstrip:"fgvehicle03", seq:[77, 78, 79, 80, 81, 82, 83]}, {name:"ccarfliph-front", filmstrip:"fgvehicle03", seq:[92, 93, 94, 95, 96, 97, 98]}, {name:"ccarfliph-rightfront", filmstrip:"fgvehicle03", seq:[107, 108, 109, 110, 111, 112, 113]}, {name:"ccarflipv-right", filmstrip:"fgvehicle03", seq:[9, 10, 11, 12, 13, 14, 15]}, {name:"ccarflipv-rightback", filmstrip:"fgvehicle03", seq:[24, 25, 26, 27, 28, 29, 30]}, {name:"ccarflipv-back", filmstrip:"fgvehicle03", seq:[39, 40, 41, 42, 43, 44, 45]}, {name:"ccarflipv-leftback", filmstrip:"fgvehicle03", seq:[54, 55, 56, 57, 58, 59, 60]}, {name:"ccarflipv-left", filmstrip:"fgvehicle03", seq:[69, 70, 71, 72, 73, 74, 75]}, {name:"ccarflipv-leftfront", filmstrip:"fgvehicle03", seq:[84, 85, 86, 87, 88, 89, 90]}, {name:"ccarflipv-front", filmstrip:"fgvehicle03", seq:[99, 100, 101, 102, 103, 104, 105]}, {name:"ccarflipv-rightfront", filmstrip:"fgvehicle03", seq:[114, 115, 116, 117, 118, 119, 120]}];
public static var BASS_ANIMATIONS:Array = [{name:"bassplay", filmstrip:"fgbass01", seq:[1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 3, 3, 4, 4, 1, 1, 2, 2, 5, 5, 6, 6]}, {name:"bassrockout", filmstrip:"fgbass01", seq:[7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 7, 7, 8, 8, 9, 9, 10, 10]}, {name:"bassmessup", filmstrip:"fgbass01", seq:[13, 13]}, {name:"bassidle", filmstrip:"fgbass01", seq:[14, 14, 15, 15]}];
public static var LAUGH = [{name:"laugh", filmstrip:"laughworld01", seq:[1, 1, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3, 3, 2, 2, 2, 3, 3]}];
public static var ACAR_ANIMATIONS:Array = [{name:"acardrive-right", filmstrip:"fgvehicle01", seq:[1]}, {name:"acardrive-rightback", filmstrip:"fgvehicle01", seq:[16]}, {name:"acardrive-back", filmstrip:"fgvehicle01", seq:[31]}, {name:"acardrive-leftback", filmstrip:"fgvehicle01", seq:[46]}, {name:"acardrive-left", filmstrip:"fgvehicle01", seq:[61]}, {name:"acardrive-leftfront", filmstrip:"fgvehicle01", seq:[76]}, {name:"acardrive-front", filmstrip:"fgvehicle01", seq:[91]}, {name:"acardrive-rightfront", filmstrip:"fgvehicle01", seq:[106]}, {name:"acarfliph-right", filmstrip:"fgvehicle01", seq:[2, 3, 4, 5, 6, 7, 8]}, {name:"acarfliph-rightback", filmstrip:"fgvehicle01", seq:[17, 18, 19, 20, 21, 22, 23]}, {name:"acarfliph-back", filmstrip:"fgvehicle01", seq:[32, 33, 34, 35, 36, 37, 38]}, {name:"acarfliph-leftback", filmstrip:"fgvehicle01", seq:[47, 48, 49, 50, 51, 52, 53]}, {name:"acarfliph-left", filmstrip:"fgvehicle01", seq:[62, 63, 64, 65, 66, 67, 68]}, {name:"acarfliph-leftfront", filmstrip:"fgvehicle01", seq:[77, 78, 79, 80, 81, 82, 83]}, {name:"acarfliph-front", filmstrip:"fgvehicle01", seq:[92, 93, 94, 95, 96, 97, 98]}, {name:"acarfliph-rightfront", filmstrip:"fgvehicle01", seq:[107, 108, 109, 110, 111, 112, 113]}, {name:"acarflipv-right", filmstrip:"fgvehicle01", seq:[9, 10, 11, 12, 13, 14, 15]}, {name:"acarflipv-rightback", filmstrip:"fgvehicle01", seq:[24, 25, 26, 27, 28, 29, 30]}, {name:"acarflipv-back", filmstrip:"fgvehicle01", seq:[39, 40, 41, 42, 43, 44, 45]}, {name:"acarflipv-leftback", filmstrip:"fgvehicle01", seq:[54, 55, 56, 57, 58, 59, 60]}, {name:"acarflipv-left", filmstrip:"fgvehicle01", seq:[69, 70, 71, 72, 73, 74, 75]}, {name:"acarflipv-leftfront", filmstrip:"fgvehicle01", seq:[84, 85, 86, 87, 88, 89, 90]}, {name:"acarflipv-front", filmstrip:"fgvehicle01", seq:[99, 100, 101, 102, 103, 104, 105]}, {name:"acarflipv-rightfront", filmstrip:"fgvehicle01", seq:[114, 115, 116, 117, 118, 119, 120]}];
public static var SERVER_ANIMATIONS = [{name:"serverwalk-front", filmstrip:"fgserver01", seq:[1, 1, 2, 2, 3, 3, 4, 4]}, {name:"serverwalk-right", filmstrip:"fgserver01", seq:[5, 5, 6, 6, 7, 7, 8, 8]}, {name:"serverwalk-back", filmstrip:"fgserver01", seq:[9, 9, 10, 10, 11, 11, 12, 12]}, {name:"serverwalk-left", filmstrip:"fgserver01", seq:[13, 13, 14, 14, 15, 15, 16, 16]}, {name:"serveridle", filmstrip:"fgserver01", seq:[17, 17, 18, 18, 19, 19, 19, 18, 18, 17, 17, 17, 18, 18, 19, 19, 20, 19, 19, 18, 18]}];
public static var SMILE = [{name:"smile", filmstrip:"smileworld01", seq:[1, 1, 2, 2, 2, 2, 3, 3, 3, 2, 2, 2, 2]}];
public static function getFilmstrips():Object{
var _local1:Object;
_local1 = {IDLE:"worldidle01", HIRESIDLE:"fgworldidle01", LOWRESWALK:"walk01", SERVER:"fgserver01", PLATFORMER:"fgplatformer01", ISOPLATFORMER:"fgplatformer02", MARTIALARTS:"martialarts01", KISS:"kissworld01", LAUGH:"laughworld01", SAD:"sadworld01", SHUTUP:"shutupworld01", SMILE:"smileworld01", INDIANSTYLE:"indianstyle01", WTF:"wtfworld01", YAY:"yayworld01", HOVER:"hover01", BUTTONPUSH:"buttonpush01", HELLO:"helloworld01", ASLEEP:"asleepworld01", BMX:"fgbike03", SKATE:"fgskate01", ACAR:"fgvehicle01", BCAR:"fgvehicle02", CCAR:"fgvehicle03", DCAR:"fgvehicle04", DANCE:"fgdance01", BASS:"fgbass01", GUITAR:"fgguitar01", DRUMS:"fgdrumset01", SINGER:"fgsinger01"};
return (_local1);
}
public static function getAnimations():Object{
var _local1:Object;
_local1 = {IDLE:IDLE, HIRESIDLE:HIRES_IDLE, LOWRESWALK:LOWRESWALK_ANIMATIONS, PLATFORMER:PLATFORMER_ANIMATIONS, ISOPLATFORMER:ISO_PLATFORMER_ANIMATIONS, MARTIALARTS:MARTIALARTS_ANIMATIONS, SERVER:SERVER_ANIMATIONS, KISS:KISS, LAUGH:LAUGH, SAD:SAD, SHUTUP:SHUTUP, SMILE:SMILE, INDIANSTYLE:INDIANSTYLE, WTF:WTF, YAY:YAY, HOVER:HOVER, BUTTONPUSH:BUTTONPUSH, HELLO:HELLO, ASLEEP:ASLEEP, BMX:BMX_ANIMATIONS, SKATE:SKATE_ANIMATIONS, ACAR:ACAR_ANIMATIONS, BCAR:BCAR_ANIMATIONS, CCAR:CCAR_ANIMATIONS, DCAR:DCAR_ANIMATIONS, DANCE:DANCE_ANIMATIONS, BASS:BASS_ANIMATIONS, GUITAR:GUITAR_ANIMATIONS, DRUMS:DRUMS_ANIMATIONS, SINGER:SINGER_ANIMATIONS};
return (_local1);
}
}
}//package meez
Section 94
//Core (meez.Core)
package meez {
import flash.net.*;
import flash.external.*;
public class Core {
public var cfg:Object;
private var js:Object;
private var lc:Object;
private static var _singleton:Core = null;
public function Core(_arg1:Object){
this.cfg = _arg1;
if (((_arg1.export_javascript) && (ExternalInterface.available))){
Logger.debug("Exporting javascript events");
this.js = {enabled:true};
enableJSTracing();
enableContainerEventHandler();
};
if (_arg1.export_flash){
Logger.debug((("Exporting flash events to local connection '" + _arg1.export_flash) + "'"));
this.lc = {id:_arg1.export_flash, conn:new LocalConnection()};
};
}
public function sendLocal(_arg1:String, _arg2:Object=null, _arg3:Object=null):void{
this.lc.conn.send(this.lc.id, _arg1, _arg2, _arg3);
}
public function enableContainerEventHandler():void{
ExternalInterface.addCallback("containerEvent", onContainerEvent);
Logger.debug("Enabled JS handler 'containerEvent'");
}
public function enableJSTracing():void{
Logger.externalLogger = function (_arg1:Number, _arg2:String){
ExternalInterface.call("meezTrace", _arg2);
};
}
public function onContainerEvent(_arg1:String, _arg2:String):void{
Logger.debug(((("[Container] '" + _arg1) + "' : ") + _arg2));
}
public function isJavascriptExportEnabled():Boolean{
return ((this.js) ? true : false);
}
public function isFlashExportEnabled():Boolean{
return ((this.lc) ? true : false);
}
public static function getInstance(_arg1:Object):Core{
if (_singleton){
return (_singleton);
};
_singleton = new Core(_arg1);
return (_singleton);
}
public static function validNumber(_arg1:String, _arg2:Object):Number{
if (!_arg2){
Logger.error((("'" + _arg1) + "' must be a valid Number"));
};
return (Number(_arg2));
}
public static function validString(_arg1:String, _arg2:Object, _arg3:Object=null):String{
var _local4:*;
var _local5:*;
if (!_arg2){
Logger.error((("'" + _arg1) + "' must be a valid String"));
};
if (_arg3){
if (((_arg3.maxLength) && ((_arg2.length > _arg3.maxLength)))){
Logger.warn((((("'" + _arg1) + "' cannot be greater than ") + _arg3.maxLength) + " characters"));
};
if (((_arg3.enum) && (!(_arg3.enum[_arg2.toUpperCase()])))){
_local4 = [];
for (_local5 in _arg3.enum) {
_local4.push(_local5.toUpperCase());
};
Logger.warn(((((("'" + _arg2.toUpperCase()) + "' (") + _arg1) + ") is not one of ") + _local4.join(",")));
};
};
return (String(_arg2));
}
}
}//package meez
Section 95
//FlashUtil (meez.FlashUtil)
package meez {
import flash.display.*;
public class FlashUtil {
public static function loadFlashVars(_arg1:Object):Object{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = LoaderInfo(_arg1.loaderInfo).parameters;
_local3 = {};
for (_local4 in _local2) {
_local3[_local4] = String(_local2[_local4]);
};
_local3["_url"] = _arg1.loaderInfo.url;
return (_local3);
}
}
}//package meez
Section 96
//Games (meez.Games)
package meez {
import flash.net.*;
import meez.compat.*;
import flash.external.*;
public class Games {
private var resourceRoot:String;
private var lastGameplayId:Number;
private var core:Core;
private var cfg:Object;
private var platform:Object;
public static var DEFAULT_ALLOWEDDOMAINS = ["*.meez.com", "*.donnerwood.com"];
public static var DEFAULT_SUCCESS = defaultSuccessHandler;
public static var DEFAULT_ERROR = defaultErrorHandler;
public static var VERSION = "1.1.11";
public static var Event = {LOADED:"LOADED", NEWGAME:"NEWGAME", INGAMEREG:"INGAMEREG", CHECKPOINT:"CHECKPOINT", GAMEOVER:"GAMEOVER", WINAMOUNT:"WINAMOUNT", WINAWARD:"WINAWARD", WINITEM:"WINITEM"};
public static var Emotion = {SADDEST:0, SADDER:2, SAD:3, NORMAL:5, HAPPY:7, HAPPIER:8, HAPPIEST:10};
public function Games(_arg1:Object){
this.core = Core.getInstance(_arg1);
this.cfg = _arg1;
this.resourceRoot = ((_arg1.game_resource_root) || (""));
if (_arg1.game_api_host){
this.platform = {cfg:_arg1, host:_arg1.game_api_host};
Logger.debug((("Arcadia Platform (host='" + this.platform.host) + "')"));
} else {
this.platform = {cfg:_arg1};
Logger.debug("Arcadia Local");
};
Logger.debug((("Meez Games Client API (" + VERSION) + ") initialized"));
Logger.debug(((" - game='" + _arg1.game_id) + "'"));
Logger.debug(((((" - player=" + _arg1.game_player_id) + " (") + (isAuthenticated()) ? "auth" : "no-auth") + ")"));
Logger.debug((" - referrer=" + (hasReferrer()) ? _arg1.game_referrer_id : "-none-"));
}
public function postGameScore(_arg1:String, _arg2:Number, _arg3:String, _arg4:String, _arg5:Function=null, _arg6:Function=null):void{
var _local7:*;
var _local8:*;
var _local9:*;
_arg1 = getFullGameId(_arg1);
Core.validString("postScore.gameId", _arg1);
Core.validNumber("postScore.score", _arg2);
Core.validString("postScore.scoreDetail", _arg3, {maxLength:64});
Core.validString("postScore.scoreEvent", _arg4, {enum:Games.Event});
_arg5 = ((_arg5) || (DEFAULT_SUCCESS));
_arg6 = ((_arg6) || (DEFAULT_ERROR));
Logger.debug((((((("postScore(" + _arg2) + ",") + _arg3) + ",") + _arg4) + ")"));
broadcastEvent(_arg4, _arg1);
if (!isRemote()){
_arg6("501", "Platform not available");
return;
};
if (!isAuthenticated()){
_arg6("403", "No-Authentication - score not posted");
return;
};
_local7 = (this.platform.host + "/api.fv/v1/score.postScore");
_local7 = (_local7 + ("?game_id=" + _arg1));
_local7 = (_local7 + ("&player_id=" + this.platform.cfg.game_player_id));
_local7 = (_local7 + ("&game_score=" + _arg2));
_local7 = (_local7 + ("&score_detail=" + _arg3));
_local8 = getGameplayId(_arg4);
if (_local8 > 0){
_local7 = (_local7 + ("&score_gameplay_id=" + _local8));
};
_local7 = (_local7 + ("&score_auth=" + calcA9Auth(this.platform.cfg.game_auth)));
_local9 = createWinEventHandler(_arg5);
execRequest(_local7, _local9, _arg6);
}
public function getLatestGameScore(_arg1:String, _arg2:Function, _arg3:Function=null):void{
var url:*;
var successHandlerFn:*;
var gameId = _arg1;
var successFn = _arg2;
var errorFn = _arg3;
gameId = getFullGameId(gameId);
Core.validString("postScore.gameId", gameId);
errorFn = ((errorFn) || (DEFAULT_ERROR));
if (!isRemote()){
errorFn("501", "Platform not available");
return;
};
if (!isAuthenticated()){
Logger.debug("No-authentication provided. Score not requested");
successFn(null);
return;
};
url = (this.platform.host + "/api.fv/v1/score.getLatest");
url = (url + ("?game_id=" + gameId));
url = (url + ("&player_id=" + this.platform.cfg.game_player_id));
url = (url + ("&random=" + Math.round((Math.random() * 1000000)).toString(16)));
successHandlerFn = function (_arg1){
var _local2:*;
if (_arg1["scores.0.playerId"]){
_local2 = {playerId:_arg1["scores.0.playerId"], displayName:_arg1["scores.0.displayName"], score:Number(_arg1["scores.0.score"]), scoreDetail:_arg1["scores.0.scoreDetail"]};
};
successFn(_local2);
};
execRequest(url, successHandlerFn, errorFn);
}
private function execRequest(_arg1, _arg2, _arg3):void{
var apiRequest:LoadVars;
var url = _arg1;
var successFn = _arg2;
var errorFn = _arg3;
if (this.platform.cfg.site_auth){
url = ((url + "&site_auth=") + this.platform.cfg.site_auth);
};
if (this.platform.cfg.game_referrer_id){
url = ((url + "&site_ref=") + this.platform.cfg.game_referrer_id);
};
apiRequest = new LoadVars();
apiRequest.onLoad = function (_arg1:Boolean){
var _local2:*;
_local2 = ((this.data) || (this));
if (_arg1){
if (_local2.code == 200){
Logger.debug("- 200 OK");
successFn(_local2);
} else {
Logger.debug(((("- " + _local2.code) + " ") + _local2.msg));
errorFn(_local2.code, _local2.msg);
};
} else {
Logger.debug("- 500 Unable to access platform");
errorFn(500, "Unable to access platform");
};
};
Logger.debug((("Request('" + url) + "')"));
apiRequest.load(url);
}
public function getResourceRoot():String{
return (this.resourceRoot);
}
public function postScore(_arg1:Number, _arg2:String, _arg3:String, _arg4:Function=null, _arg5:Function=null):void{
postGameScore(this.platform.cfg.game_id, _arg1, _arg2, _arg3, _arg4, _arg5);
}
private function broadcastWinEvents(_arg1:Object, _arg2:String, _arg3:String):Number{
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
_local4 = Number(_arg1[(_arg2 + ".count")]);
if (_local4 > 0){
_local5 = 0;
while (_local5 < _local4) {
_local6 = _arg1[(((_arg2 + ".") + _local5) + ".id")];
if (!_local6){
} else {
_local7 = _arg1[(((_arg2 + ".") + _local5) + ".updateValue")];
_local8 = _arg1[(((_arg2 + ".") + _local5) + ".newValue")];
_local9 = _local6;
_local9 = (_local9 + (_local7) ? ("|" + _local7) : "");
_local9 = (_local9 + (_local8) ? ("|" + _local8) : "");
broadcastEvent(_arg3, _local9);
};
_local5++;
};
};
return (_local4);
}
public function getLatestScore(_arg1:Function, _arg2:Function=null):void{
getLatestGameScore(this.platform.cfg.game_id, _arg1, _arg2);
}
public function siteLock(_arg1:Array=null, _arg2:Function=null):Boolean{
var _local3:Object;
var _local4:*;
_arg1 = ((_arg1) || (DEFAULT_ALLOWEDDOMAINS));
_local3 = Util.parseUrl(this.cfg._url);
_local4 = 0;
while (_local4 < _arg1.length) {
if (Util.wildcardMatch(_arg1[_local4], _local3.host)){
return (true);
};
_local4++;
};
Logger.warn((("siteLock(" + _local3.host) + ") failed"));
if (_arg2 != null){
_arg2();
};
return (false);
}
public function inGameReg():void{
broadcastEvent(Event.INGAMEREG);
}
public function getPlayer(_arg1:Function, _arg2:Function=null):void{
var url:*;
var successHandlerFn:*;
var successFn = _arg1;
var errorFn = _arg2;
errorFn = ((errorFn) || (DEFAULT_ERROR));
if (!isRemote()){
errorFn("501", "Platform not available");
return;
};
url = (this.platform.host + "/api.fv/v1/player.get");
url = (url + ("?player_id=" + this.platform.cfg.game_player_id));
url = (url + ("&random=" + Math.round((Math.random() * 1000000)).toString(16)));
successHandlerFn = function (_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = {id:_arg1["playerId"], name:_arg1["name"], tag:_arg1["tag"], avatarId:_arg1["avatar"], attribs:{}};
for (_local3 in _arg1) {
_local4 = Util.stringStartsWith("attrib.", _local3);
if (!_local4){
} else {
_local2.attribs[_local3.substr(7)] = _arg1[_local3];
};
};
successFn(_local2);
};
execRequest(url, successHandlerFn, errorFn);
}
private function getFullGameId(_arg1:String=null):String{
if (!_arg1){
return (this.cfg.game_id);
};
if (_arg1.indexOf(".") == -1){
return (((this.cfg.game_id + ".") + _arg1));
};
return (_arg1);
}
private function isAuthenticated():Boolean{
return (!((this.platform.cfg.game_auth == null)));
}
public function broadcastEvent(_arg1:String, _arg2:String=null):void{
_arg1 = _arg1.toUpperCase();
Core.validString("broadcastEvent.event", _arg1, {enum:Games.Event});
Logger.debug((((("Games.broadcastEvent(" + _arg1) + ",") + _arg2) + ")"));
if (_arg1 == Event.NEWGAME){
this.lastGameplayId = 0;
};
if (this.core.isJavascriptExportEnabled()){
ExternalInterface.call("meezEvent", _arg1, _arg2);
};
if (this.core.isFlashExportEnabled()){
this.core.sendLocal("event", _arg1, _arg2);
};
}
private function calcC1Auth(_arg1, _arg2){
return (((("c1" + _arg1) + ":") + _arg2));
}
public function postChallengeScore(_arg1:String, _arg2:Number, _arg3:String, _arg4:Function, _arg5:Function):void{
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
_local6 = getFullGameId();
_local7 = Event.GAMEOVER;
Core.validString("postChallengeScore.gameId", _local6);
Core.validNumber("postChallengeScore.score", _arg2);
Core.validString("postChallengeScore.scoreDetail", _arg3, {maxLength:64});
Core.validString("postChallengeScore.scoreEvent", _local7, {enum:Games.Event});
_arg4 = ((_arg4) || (DEFAULT_SUCCESS));
_arg5 = ((_arg5) || (DEFAULT_ERROR));
if (!isRemote()){
_arg5("501", "Platform not available");
return;
};
if (!isAuthenticated()){
_arg5("403", "No-Authentication - score not posted");
return;
};
Logger.debug((((((((("postChallengeScore(" + _arg1) + ",") + _arg2) + ",") + _arg3) + ",") + _local7) + ")"));
broadcastEvent(_local7, _local6);
_local8 = (this.platform.host + "/api.fv/v1/challenge.postScore");
_local8 = (_local8 + ("?game_id=" + _local6));
_local8 = (_local8 + ("&challenge_id=" + _arg1));
_local8 = (_local8 + ("&player_id=" + this.platform.cfg.game_player_id));
_local8 = (_local8 + ("&game_score=" + _arg2));
_local8 = (_local8 + ("&score_detail=" + _arg3));
_local8 = (_local8 + ("&score_auth=" + calcC1Auth(_arg1, this.platform.cfg.game_auth)));
_local9 = createWinEventHandler(_arg4);
execRequest(_local8, _local9, _arg5);
}
private function createWinEventHandler(_arg1:Function):Function{
var callback:*;
var successHandlerFn:*;
var successFn = _arg1;
callback = this;
successHandlerFn = function (_arg1){
if (callback.broadcastWinEvents(_arg1, "winAmount", Event.WINAMOUNT) > 0){
callback.emote(Emotion.HAPPY);
};
if ((((callback.broadcastWinEvents(_arg1, "winItem", Event.WINITEM) > 0)) || ((callback.broadcastWinEvents(_arg1, "winAward", Event.WINAWARD) > 0)))){
callback.emote(Emotion.HAPPIEST);
};
successFn(_arg1);
};
return (successHandlerFn);
}
private function hasReferrer():Boolean{
return (!((this.platform.cfg.game_referrer_id == null)));
}
public function newGame(_arg1:String=null){
_arg1 = getFullGameId(_arg1);
broadcastEvent(Event.NEWGAME, _arg1);
}
private function calcA9Auth(_arg1:String):String{
var _local2:*;
_local2 = new Date();
return (((("a9" + (_local2.getTime() / 1000).toString(16)) + ":") + _arg1));
}
public function emote(_arg1:Object):void{
Core.validString("emote.emotion", _arg1);
Logger.debug((("Games.emote(" + _arg1) + ")"));
if (this.core.isJavascriptExportEnabled()){
ExternalInterface.call("meezEmote", _arg1);
};
if (this.core.isFlashExportEnabled()){
this.core.sendLocal("emote", _arg1);
};
}
private function getGameplayId(_arg1:String):String{
var _local2:*;
var _local3:*;
if (_arg1 == Event.GAMEOVER){
_local2 = ((this.lastGameplayId) || (0));
this.lastGameplayId = 0;
} else {
if (((this.lastGameplayId) && ((this.lastGameplayId > 0)))){
_local2 = this.lastGameplayId;
} else {
_local3 = new Date();
_local2 = Math.floor((_local3.getTime() / 1000));
};
this.lastGameplayId = _local2;
};
return (_local2);
}
public function checkChallenge(_arg1:String, _arg2:Function, _arg3:Function){
var _local4:*;
Core.validString("checkChallenge.challengeId", _arg1);
if (!isRemote()){
_arg3("501", "Platform not available");
return;
};
_local4 = (this.platform.host + "/api.fv/v1/challenge.check");
_local4 = (_local4 + ("?game_id=" + this.platform.cfg.game_id));
_local4 = (_local4 + ("&challenge_id=" + _arg1));
_local4 = (_local4 + ("&player_id=" + this.platform.cfg.game_player_id));
_local4 = (_local4 + ("&random=" + Math.round((Math.random() * 1000000)).toString(16)));
execRequest(_local4, _arg2, _arg3);
}
private function isRemote():Boolean{
return (((this.platform) && (this.platform.host)));
}
public static function defaultSuccessHandler(_arg1):void{
Logger.debug("[success]");
}
public static function defaultErrorHandler(_arg1, _arg2):void{
Logger.error((((("[error:" + _arg1) + ":") + _arg2) + "]"));
}
public static function O2S(_arg1):String{
var _local2:*;
var _local3:*;
var _local4:Number;
_local2 = "";
for (_local3 in _arg1) {
if (_arg1[_local3] == null){
} else {
_local4 = Number(_arg1[_local3]);
if (!isNaN(_local4)){
_local2 = (_local2 + (_local3 + _arg1[_local3]));
} else {
Logger.warn((((("Value of '" + _local3) + "' is not a number ('") + _arg1[_local3]) + "') - ignoring"));
};
};
};
return (_local2);
}
public static function S2O(_arg1):Object{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = {};
_local5 = 0;
while (_local5 < _arg1.length) {
_local3 = "";
while ((((((_local5 < _arg1.length)) && ((_arg1.charAt(_local5) >= "a")))) && ((_arg1.charAt(_local5) <= "z")))) {
var _temp1 = _local5;
_local5 = (_local5 + 1);
_local3 = (_local3 + _arg1.charAt(_temp1));
};
_local4 = "";
while ((((((_local5 < _arg1.length)) && ((_arg1.charAt(_local5) >= "0")))) && ((_arg1.charAt(_local5) <= "9")))) {
var _temp2 = _local5;
_local5 = (_local5 + 1);
_local4 = (_local4 + _arg1.charAt(_temp2));
};
_local2[_local3] = Number(_local4);
};
return (_local2);
}
}
}//package meez
Section 97
//Logger (meez.Logger)
package meez {
public class Logger {
public static var Level:Object = {DEBUG:0, WARN:1, ERROR:2, INFO:3};
public static var externalLogger:Function;
public static var LevelStr:Array = ["DEBUG", "WARN", "ERROR", "INFO"];
public static function debug(_arg1:String):void{
log(Level.DEBUG, _arg1);
}
public static function log(_arg1:Number, _arg2:String):void{
if (externalLogger != null){
externalLogger(_arg1, _arg2);
} else {
trace(((("[" + LevelStr[_arg1]) + "] ") + _arg2));
};
}
public static function warn(_arg1:String):void{
log(Level.WARN, _arg1);
}
public static function info(_arg1:String):void{
log(Level.INFO, _arg1);
}
public static function error(_arg1:String):void{
log(Level.ERROR, _arg1);
}
}
}//package meez
Section 98
//Util (meez.Util)
package meez {
public class Util {
public static function stringStartsWith(_arg1:String, _arg2:String):Boolean{
return ((_arg2.substr(0, _arg1.length) == _arg1));
}
public static function wildcardMatch(_arg1:String, _arg2:String):Boolean{
if (stringStartsWith("*", _arg1)){
return (((_arg1.length)==1) ? true : stringEndsWith(_arg1.substr(1), _arg2));
} else {
//unresolved if
};
return (!NULL!);
return ((_arg1 == _arg2));
}
public static function parseUrl(_arg1:String):Object{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
_local2 = _arg1.split("://");
_local3 = _local2.shift();
_local2 = _local2[0].split("/");
_local4 = _local2.shift();
_local2 = _local2.join("/").split("?");
_local5 = ("/" + _local2.shift());
_local6 = _local2.shift();
_local2 = _local4.split(":");
_local7 = _local2[0];
_local8 = (_local2[1]) ? Number(_local2[1]) : ((_local3 == "https")) ? 443 : 80;
return ({method:_local3, host:_local7, port:_local8, path:_local5, query:_local6});
}
public static function stringEndsWith(_arg1:String, _arg2:String):Boolean{
var _local3:*;
_local3 = _arg1.length;
return ((((_arg2.length >= _local3)) && ((_arg2.substr((_arg2.length - _local3), _local3) == _arg1))));
}
}
}//package meez
Section 99
//MochiScores (mochi.MochiScores)
package mochi {
import flash.display.*;
import flash.text.*;
public class MochiScores {
private static var boardID:String;
public static var onErrorHandler:Object;
public static var onCloseHandler:Object;
public static function showLeaderboard(_arg1:Object=null):void{
var options = _arg1;
if (options != null){
if (options.clip != null){
if ((options.clip is Sprite)){
MochiServices.setContainer(options.clip);
};
delete options.clip;
} else {
MochiServices.setContainer();
};
MochiServices.stayOnTop();
if (options.name != null){
if ((options.name is TextField)){
if (options.name.text.length > 0){
options.name = options.name.text;
};
};
};
if (options.score != null){
if ((options.score is TextField)){
if (options.score.text.length > 0){
options.score = options.score.text;
};
};
};
if (options.onDisplay != null){
options.onDisplay();
} else {
if (MochiServices.clip != null){
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
};
} else {
options = {};
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.stop();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onDisplay.");
};
};
if (options.onClose != null){
onCloseHandler = options.onClose;
} else {
onCloseHandler = function ():void{
if ((MochiServices.clip is MovieClip)){
MochiServices.clip.play();
} else {
trace("Warning: Container is not a MovieClip, cannot call default onClose.");
};
};
};
if (options.onError != null){
onErrorHandler = options.onError;
} else {
onErrorHandler = null;
};
if (options.boardID == null){
if (MochiScores.boardID != null){
options.boardID = MochiScores.boardID;
};
};
MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
public static function closeLeaderboard():void{
MochiServices.send("scores_closeLeaderboard");
}
public static function getPlayerInfo(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_getPlayerInfo", null, _arg1, _arg2);
}
public static function requestList(_arg1:Object, _arg2:Object=null):void{
MochiServices.send("scores_requestList", null, _arg1, _arg2);
}
public static function scoresArrayToObjects(_arg1:Object):Object{
var _local2:Object;
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
var _local7:String;
var _local8:String;
_local2 = {};
for (_local7 in _arg1) {
if (typeof(_arg1[_local7]) == "object"){
if (((!((_arg1[_local7].cols == null))) && (!((_arg1[_local7].rows == null))))){
_local2[_local7] = [];
_local5 = _arg1[_local7];
_local4 = 0;
while (_local4 < _local5.rows.length) {
_local6 = {};
_local3 = 0;
while (_local3 < _local5.cols.length) {
_local6[_local5.cols[_local3]] = _local5.rows[_local4][_local3];
_local3++;
};
_local2[_local7].push(_local6);
_local4++;
};
} else {
_local2[_local7] = {};
for (_local8 in _arg1[_local7]) {
_local2[_local7][_local8] = _arg1[_local7][_local8];
};
};
} else {
_local2[_local7] = _arg1[_local7];
};
};
return (_local2);
}
public static function submit(_arg1:Number, _arg2:String, _arg3:Object=null, _arg4:Object=null):void{
MochiServices.send("scores_submit", {score:_arg1, name:_arg2}, _arg3, _arg4);
}
public static function onClose(_arg1:Object=null):void{
if (_arg1 != null){
if (_arg1.error != null){
if (_arg1.error == true){
if (onErrorHandler != null){
if (_arg1.errorCode == null){
_arg1.errorCode = "IOError";
};
onErrorHandler(_arg1.errorCode);
MochiServices.doClose();
return;
};
};
};
};
onCloseHandler();
MochiServices.doClose();
}
public static function setBoardID(_arg1:String):void{
MochiScores.boardID = _arg1;
MochiServices.send("scores_setBoardID", {boardID:_arg1});
}
}
}//package mochi
Section 100
//MochiServices (mochi.MochiServices)
package mochi {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiServices {
private static var _container:Object;
private static var _connected:Boolean = false;
private static var _swfVersion:String;
private static var _sendChannel:LocalConnection;
private static var _rcvChannelName:String;
private static var _gatewayURL:String = "http://www.mochiads.com/static/lib/services/services.swf";
private static var _clip:MovieClip;
private static var _loader:Loader;
private static var _id:String;
private static var _listenChannel:LocalConnection;
private static var _timer:Timer;
private static var _sendChannelName:String;
private static var _startTime:Number;
private static var _connecting:Boolean = false;
public static var onError:Object;
private static var _listenChannelName:String = "__mochiservices";
private static var _rcvChannel:LocalConnection;
public static function isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function send(_arg1:String, _arg2:Object=null, _arg3:Object=null, _arg4:Object=null):void{
if (_connected){
_sendChannel.send(_sendChannelName, "onReceive", {methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
} else {
if ((((_clip == null)) || (!(_connecting)))){
onError("NotConnected");
handleError(_arg2, _arg3, _arg4);
flush(true);
return;
};
_clip._queue.push({methodName:_arg1, args:_arg2, callbackID:_clip._nextcallbackID});
};
if (_clip != null){
if (((!((_clip._callbacks == null))) && (!((_clip._nextcallbackID == null))))){
_clip._callbacks[_clip._nextcallbackID] = {callbackObject:_arg3, callbackMethod:_arg4};
_clip._nextcallbackID++;
};
};
}
public static function get connected():Boolean{
return (_connected);
}
private static function flush(_arg1:Boolean):void{
var _local2:Object;
var _local3:Object;
if (_clip != null){
if (_clip._queue != null){
while (_clip._queue.length > 0) {
_local2 = _clip._queue.shift();
_local3 = null;
if (_local2 != null){
if (_local2.callbackID != null){
_local3 = _clip._callbacks[_local2.callbackID];
};
delete _clip._callbacks[_local2.callbackID];
if (((_arg1) && (!((_local3 == null))))){
handleError(_local2.args, _local3.callbackObject, _local3.callbackMethod);
};
};
};
};
};
}
private static function clickMovie(_arg1:String, _arg2:Function):MovieClip{
var _local3:Array;
var _local4:int;
var _local5:Array;
var _local6:Array;
var _local7:MovieClip;
var _local8:LocalConnection;
var _local9:String;
var _local10:ByteArray;
var _local11:ByteArray;
var _local12:uint;
var _local13:uint;
var _local14:Loader;
_local3 = [150, 21, 0, 7, 1, 0, 0, 0, 0, 98, 116, 110, 0, 7, 2, 0, 0, 0, 0, 116, 104, 105, 115, 0, 28, 150, 22, 0, 0, 99, 114, 101, 97, 116, 101, 69, 109, 112, 116, 121, 77, 111, 118, 105, 101, 67, 108, 105, 112, 0, 82, 135, 1, 0, 0, 23, 150, 13, 0, 4, 0, 0, 111, 110, 82, 101, 108, 101, 97, 115, 101, 0, 142, 8, 0, 0, 0, 0, 2, 42, 0, 114, 0, 150, 17, 0, 0, 32, 0, 7, 1, 0, 0, 0, 8, 0, 0, 115, 112, 108, 105, 116, 0, 82, 135, 1, 0, 1, 23, 150, 7, 0, 4, 1, 7, 0, 0, 0, 0, 78, 150, 8, 0, 0, 95, 98, 108, 97, 110, 107, 0, 154, 1, 0, 0, 150, 7, 0, 0, 99, 108, 105, 99, 107, 0, 150, 7, 0, 4, 1, 7, 1, 0, 0, 0, 78, 150, 27, 0, 7, 2, 0, 0, 0, 7, 0, 0, 0, 0, 0, 76, 111, 99, 97, 108, 67, 111, 110, 110, 101, 99, 116, 105, 111, 110, 0, 64, 150, 6, 0, 0, 115, 101, 110, 100, 0, 82, 79, 150, 15, 0, 4, 0, 0, 95, 97, 108, 112, 104, 97, 0, 7, 0, 0, 0, 0, 79, 150, 23, 0, 7, 0xFF, 0, 0xFF, 0, 7, 1, 0, 0, 0, 4, 0, 0, 98, 101, 103, 105, 110, 70, 105, 108, 108, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 109, 111, 118, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 100, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 100, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 25, 0, 7, 0, 0, 0, 0, 7, 0, 0, 0, 0, 7, 2, 0, 0, 0, 4, 0, 0, 108, 105, 110, 101, 84, 111, 0, 82, 23, 150, 16, 0, 7, 0, 0, 0, 0, 4, 0, 0, 101, 110, 100, 70, 105, 108, 108, 0, 82, 23];
_local5 = [104, 0, 31, 64, 0, 7, 208, 0, 0, 12, 1, 0, 67, 2, 0xFF, 0xFF, 0xFF, 63, 3];
_local6 = [0, 64, 0, 0, 0];
_local7 = new MovieClip();
_local8 = new LocalConnection();
_local9 = ((("_click_" + Math.floor((Math.random() * 999999))) + "_") + Math.floor(new Date().getTime()));
_local8 = new LocalConnection();
_local7.lc = _local8;
_local7.click = _arg2;
_local8.client = _local7;
_local8.connect(_local9);
_local10 = new ByteArray();
_local11 = new ByteArray();
_local11.endian = Endian.LITTLE_ENDIAN;
_local11.writeShort(1);
_local11.writeUTFBytes(((_arg1 + " ") + _local9));
_local11.writeByte(0);
_local12 = ((_local3.length + _local11.length) + 4);
_local13 = (_local12 + 35);
_local10.endian = Endian.LITTLE_ENDIAN;
_local10.writeUTFBytes("FWS");
_local10.writeByte(8);
_local10.writeUnsignedInt(_local13);
for each (_local4 in _local5) {
_local10.writeByte(_local4);
};
_local10.writeUnsignedInt(_local12);
_local10.writeByte(136);
_local10.writeShort(_local11.length);
_local10.writeBytes(_local11);
for each (_local4 in _local3) {
_local10.writeByte(_local4);
};
for each (_local4 in _local6) {
_local10.writeByte(_local4);
};
_local14 = new Loader();
_local14.loadBytes(_local10);
_local7.addChild(_local14);
return (_local7);
}
private static function init(_arg1:String, _arg2:Object):void{
_id = _arg1;
if (_arg2 != null){
_container = _arg2;
loadCommunicator(_arg1, _container);
};
}
public static function get childClip():Object{
return (_clip);
}
public static function get id():String{
return (_id);
}
public static function stayOnTop():void{
_container.addEventListener(Event.ENTER_FRAME, MochiServices.bringToTop, false, 0, true);
if (_clip != null){
_clip.visible = true;
};
}
public static function addLinkEvent(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:Function=null):void{
var netup:Boolean;
var vars:Object;
var s:String;
var i:Number;
var x:String;
var req:URLRequest;
var loader:Loader;
var err:Function;
var complete:Function;
var setURL:Function;
var url = _arg1;
var burl = _arg2;
var btn = _arg3;
var onClick = _arg4;
vars = new Object();
vars["mav"] = getVersion();
vars["swfv"] = "9";
vars["swfurl"] = btn.loaderInfo.loaderURL;
vars["fv"] = Capabilities.version;
vars["os"] = Capabilities.os;
vars["lang"] = Capabilities.language;
vars["scres"] = ((Capabilities.screenResolutionX + "x") + Capabilities.screenResolutionY);
s = "?";
i = 0;
for (x in vars) {
if (i != 0){
s = (s + "&");
};
i = (i + 1);
s = (((s + x) + "=") + escape(vars[x]));
};
req = new URLRequest("http://x.mochiads.com/linkping.swf");
loader = new Loader();
err = function (_arg1:Object):void{
netup = false;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
complete = function (_arg1:Object):void{
netup = true;
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, err);
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, complete);
loader.load(req);
setURL = function ():void{
var _local1:String;
var _local2:DisplayObject;
if (netup){
_local1 = (url + s);
} else {
_local1 = burl;
};
_local2 = clickMovie(_local1, onClick);
btn.addChild(_local2);
_local2.scaleX = (0.01 * btn.width);
_local2.scaleY = (0.01 * btn.height);
};
setTimeout(setURL, 1500);
}
public static function getVersion():String{
return ("1.35");
}
public static function disconnect():void{
if (((_connected) || (_connecting))){
if (_clip != null){
if (_clip.parent != null){
if ((_clip.parent is Sprite)){
Sprite(_clip.parent).removeChild(_clip);
_clip = null;
};
};
};
_connecting = (_connected = false);
flush(true);
try {
_listenChannel.close();
_rcvChannel.close();
} catch(error:Error) {
};
};
if (_timer != null){
try {
_timer.stop();
} catch(error:Error) {
};
};
}
public static function allowDomains(_arg1:String):String{
var _local2:String;
Security.allowDomain("*");
Security.allowInsecureDomain("*");
if (_arg1.indexOf("http://") != -1){
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain(_local2);
Security.allowInsecureDomain(_local2);
};
return (_local2);
}
public static function doClose():void{
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
if (_clip.parent != null){
Sprite(_clip.parent).removeChild(_clip);
};
}
public static function setContainer(_arg1:Object=null, _arg2:Boolean=true):void{
if (_arg1 != null){
if ((_arg1 is Sprite)){
_container = _arg1;
};
};
if (_arg2){
if ((_container is Sprite)){
Sprite(_container).addChild(_clip);
};
};
}
private static function onStatus(_arg1:StatusEvent):void{
switch (_arg1.level){
case "error":
_connected = false;
_listenChannel.connect(_listenChannelName);
break;
};
}
private static function initComChannels():void{
if (!_connected){
_sendChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion(), parentURL:_container.loaderInfo.loaderURL});
_rcvChannel.addEventListener(StatusEvent.STATUS, MochiServices.onStatus);
_clip.onReceive = function (_arg1:Object):void{
var cb:String;
var cblst:Object;
var method:*;
var methodName:String;
var obj:Object;
var pkg = _arg1;
cb = pkg.callbackID;
cblst = this.client._callbacks[cb];
if (!cblst){
return;
};
method = cblst.callbackMethod;
methodName = "";
obj = cblst.callbackObject;
if (((obj) && ((typeof(method) == "string")))){
methodName = method;
if (obj[method] != null){
method = obj[method];
} else {
trace((("Error: Method " + method) + " does not exist."));
};
};
if (method != undefined){
try {
method.apply(obj, pkg.args);
} catch(error:Error) {
trace(((("Error invoking callback method '" + methodName) + "': ") + error.toString()));
};
} else {
if (obj != null){
try {
obj(pkg.args);
} catch(error:Error) {
trace(("Error invoking method on object: " + error.toString()));
};
};
};
delete this.client._callbacks[cb];
};
_clip.onError = function ():void{
MochiServices.onError("IOError");
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_clip._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _clip._queue.shift());
};
};
}
private static function listen():void{
_listenChannel = new LocalConnection();
_listenChannel.client = _clip;
_clip.handshake = function (_arg1:Object):void{
MochiServices.comChannelName = _arg1.newChannel;
};
_listenChannel.allowDomain("*", "localhost");
_listenChannel.allowInsecureDomain("*", "localhost");
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
private static function handleError(_arg1:Object, _arg2:Object, _arg3:Object):void{
var args = _arg1;
var callbackObject = _arg2;
var callbackMethod = _arg3;
if (args != null){
if (args.onError != null){
args.onError.apply(null, ["NotConnected"]);
};
if (((!((args.options == null))) && (!((args.options.onError == null))))){
args.options.onError.apply(null, ["NotConnected"]);
};
};
if (callbackMethod != null){
args = {};
args.error = true;
args.errorCode = "NotConnected";
if (((!((callbackObject == null))) && ((callbackMethod is String)))){
try {
var _local5 = callbackObject;
_local5[callbackMethod](args);
} catch(error:Error) {
};
} else {
if (callbackMethod != null){
try {
callbackMethod.apply(args);
} catch(error:Error) {
};
};
};
};
}
public static function get clip():Object{
return (_container);
}
public static function set comChannelName(_arg1:String):void{
if (_arg1 != null){
if (_arg1.length > 3){
_sendChannelName = (_arg1 + "_fromgame");
_rcvChannelName = _arg1;
initComChannels();
};
};
}
private static function loadCommunicator(_arg1:String, _arg2:Object):MovieClip{
var clipname:String;
var f:Function;
var req:URLRequest;
var id = _arg1;
var clip = _arg2;
clipname = ("_mochiservices_com_" + id);
if (_clip != null){
return (_clip);
};
if (!MochiServices.isNetworkAvailable()){
return (null);
};
MochiServices.allowDomains(_gatewayURL);
_clip = createEmptyMovieClip(clip, clipname, 10336, false);
_loader = new Loader();
_timer = new Timer(1000, 0);
_startTime = getTimer();
_timer.addEventListener(TimerEvent.TIMER, connectWait);
_timer.start();
f = function (_arg1:Object):void{
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f);
req = new URLRequest(_gatewayURL);
_loader.load(req);
_clip.addChild(_loader);
_clip._mochiservices_com = _loader;
_sendChannel = new LocalConnection();
_clip._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain("*", "localhost");
_rcvChannel.allowInsecureDomain("*", "localhost");
_rcvChannel.client = _clip;
_clip._nextcallbackID = 0;
_clip._callbacks = {};
listen();
return (_clip);
}
public static function bringToTop(_arg1:Event):void{
var e = _arg1;
if (MochiServices.clip != null){
if (MochiServices.childClip != null){
try {
if (MochiServices.clip.numChildren > 1){
MochiServices.clip.setChildIndex(MochiServices.childClip, (MochiServices.clip.numChildren - 1));
};
} catch(errorObject:Error) {
trace("Warning: Depth sort error.");
_container.removeEventListener(Event.ENTER_FRAME, MochiServices.bringToTop);
};
};
};
}
public static function connect(_arg1:String, _arg2:Object, _arg3:Object=null):void{
var id = _arg1;
var clip = _arg2;
var onError = _arg3;
if ((clip is DisplayObject)){
if (((!(_connected)) && ((_clip == null)))){
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
};
} else {
trace("Error, MochiServices requires a Sprite, Movieclip or instance of the stage.");
};
if (onError != null){
MochiServices.onError = onError;
} else {
if (MochiServices.onError == null){
MochiServices.onError = function (_arg1:String):void{
trace(_arg1);
};
};
};
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Boolean=true):MovieClip{
var mc:MovieClip;
var parent = _arg1;
var name = _arg2;
var depth = _arg3;
var doAdd = _arg4;
mc = new MovieClip();
if (doAdd){
if (((false) && (depth))){
parent.addChildAt(mc, depth);
} else {
parent.addChild(mc);
};
};
try {
parent[name] = mc;
} catch(e:Error) {
throw (new Error("MochiServices requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
mc["_name"] = name;
return (mc);
}
public static function connectWait(_arg1:TimerEvent):void{
if ((getTimer() - _startTime) > 10000){
if (!_connected){
_clip._mochiad_ctr_failed = true;
trace("MochiServices could not load.");
MochiServices.disconnect();
MochiServices.onError("IOError");
};
_timer.stop();
};
}
}
}//package mochi
Section 101
//Attack (Attack)
package {
import flash.media.*;
public dynamic class Attack extends Sound {
}
}//package
Section 102
//B_SoundManager (B_SoundManager)
package {
import flash.display.*;
import flash.events.*;
import flash.media.*;
import flash.utils.*;
public class B_SoundManager {
var sFX_BuildingCrumble:Sound;
var musicFade_MenuTimer:Timer;
var playing_GameplayMus:Boolean;
var sFX_BarrelExplode:Sound;
var music_Gameplay:Sound;
var musicFade_GameplayTimer:Timer;
var sFX_TutorialTaskSuccess:Sound;
var currPos_GameplayMus:Number;
var sFX_ScoreRack:Sound;
var sFX_DialogueAdvance:Sound;
var playing_MenuMus:Boolean;
var sndChannel_GameplayMus:SoundChannel;
var sFX_BrickBreak:Sound;
var music_Menu:Sound;
var option_SFXOn:Boolean;
var sFX_Attack:Sound;
var sFX_CivExitAnim:Sound;
var musicVolume_Gameplay:Number;
var sndChannel_MenuMus:SoundChannel;
var sFX_BarrelCut:Sound;
var sFX_Zoom:Sound;
var rootMC:MovieClip;
var option_MusicOn:Boolean;
var sFX_ToggleSFXOn:Sound;
public function B_SoundManager(_arg1:MovieClip){
this.rootMC = _arg1;
this.option_SFXOn = true;
this.option_MusicOn = true;
this.music_Gameplay = new Music_Gameplay();
this.music_Menu = new Music_Menu();
this.playing_GameplayMus = false;
this.playing_MenuMus = false;
this.sndChannel_GameplayMus = new SoundChannel();
this.sndChannel_MenuMus = new SoundChannel();
this.currPos_GameplayMus = 0;
this.musicVolume_Gameplay = 1;
this.musicFade_GameplayTimer = new Timer(200);
this.musicFade_MenuTimer = new Timer(200);
this.sFX_ToggleSFXOn = new TutorialSuccess();
this.sFX_Zoom = new Bes_Zoom();
this.sFX_TutorialTaskSuccess = new TutorialSuccess();
this.sFX_BrickBreak = new BrickBreak();
this.sFX_Attack = new Attack();
this.sFX_BarrelCut = new BarrelCut();
this.sFX_CivExitAnim = new CivExitAnim();
this.sFX_BarrelExplode = new BarrelExplode();
this.sFX_BuildingCrumble = new BuildingCrumble();
this.sFX_ScoreRack = new ScoreRack();
this.sFX_DialogueAdvance = new DialogueAdvance();
}
function decreaseMenuMusVol(_arg1:TimerEvent):void{
if (this.sndChannel_MenuMus.soundTransform.volume >= 0.1){
setVolume((this.sndChannel_MenuMus.soundTransform.volume - 0.1), this.sndChannel_MenuMus);
} else {
this.musicFade_MenuTimer.removeEventListener("timer", decreaseMenuMusVol);
stopMusic_MenuMus();
setVolume(1, this.sndChannel_MenuMus);
};
}
public function playMusic_MenuMus():void{
if (((this.option_MusicOn) && (!(this.playing_MenuMus)))){
this.playing_MenuMus = true;
this.sndChannel_MenuMus = this.music_Menu.play();
this.sndChannel_MenuMus.addEventListener(Event.SOUND_COMPLETE, sndCompleteHandler_MenuMus, false, 0, true);
};
}
function sndCompleteHandler_GameplayMus(_arg1:Event):void{
trace(("GAMEPLAY SONG FINISHED ONCE--" + this.sndChannel_GameplayMus.willTrigger(Event.SOUND_COMPLETE)));
this.sndChannel_GameplayMus = this.music_Gameplay.play();
this.sndChannel_GameplayMus.addEventListener(Event.SOUND_COMPLETE, sndCompleteHandler_GameplayMus, false, 0, true);
}
public function playSFX_CivExitAnim():void{
if (this.option_SFXOn){
this.sFX_CivExitAnim.play();
};
}
function decreaseGameplayMusVol(_arg1:TimerEvent):void{
if (this.sndChannel_GameplayMus.soundTransform.volume >= 0.1){
setVolume((this.sndChannel_GameplayMus.soundTransform.volume - 0.1), this.sndChannel_GameplayMus);
} else {
this.musicFade_GameplayTimer.removeEventListener("timer", decreaseGameplayMusVol);
stopMusic_GameplayMus();
changeMusicVolume_GameplayTo(1);
};
}
public function playSFX_BarrelCut():void{
if (this.option_SFXOn){
this.sFX_BarrelCut.play();
};
}
public function get Playing_MenuMus():Boolean{
return (this.playing_MenuMus);
}
function setVolume(_arg1:Number, _arg2:SoundChannel):void{
var _local3:SoundTransform;
_local3 = _arg2.soundTransform;
_local3.volume = _arg1;
_arg2.soundTransform = _local3;
}
public function playSFX_ToggleSFXOn():void{
if (this.option_SFXOn){
this.sFX_ToggleSFXOn.play();
};
}
public function isOption_SFXOn():Boolean{
return (this.option_SFXOn);
}
public function stopMusic_GameplayMus():void{
this.currPos_GameplayMus = this.sndChannel_GameplayMus.position;
this.sndChannel_GameplayMus.stop();
this.playing_GameplayMus = false;
}
public function fadeOutMusic_Menu():void{
this.musicFade_MenuTimer.addEventListener("timer", decreaseMenuMusVol, false, 0, true);
this.musicFade_MenuTimer.start();
}
public function playSFX_BrickBreak():void{
if (this.option_SFXOn){
this.sFX_BrickBreak.play();
};
}
public function playSFX_BarrelExplode():void{
if (this.option_SFXOn){
this.sFX_BarrelExplode.play();
};
}
function sndCompleteHandler_MenuMus(_arg1:Event):void{
this.sndChannel_MenuMus = this.music_Menu.play();
this.sndChannel_MenuMus.addEventListener(Event.SOUND_COMPLETE, sndCompleteHandler_MenuMus, false, 0, true);
}
public function playSFX_BuildingCrumble():void{
if (this.option_SFXOn){
this.sFX_BuildingCrumble.play();
};
}
public function tryPlayMusic_GameplayMus(_arg1:Boolean=false):void{
if (!this.playing_GameplayMus){
playMusic_GameplayMus(_arg1);
};
}
public function playSFX_Attack():void{
if (this.option_SFXOn){
this.sFX_Attack.play();
};
}
public function playMusic_GameplayMus(_arg1:Boolean=false):void{
if (((this.option_MusicOn) && (!(this.playing_GameplayMus)))){
this.playing_GameplayMus = true;
this.sndChannel_GameplayMus = this.music_Gameplay.play((_arg1) ? 0 : this.currPos_GameplayMus);
setVolume(this.musicVolume_Gameplay, this.sndChannel_GameplayMus);
this.sndChannel_GameplayMus.addEventListener(Event.SOUND_COMPLETE, sndCompleteHandler_GameplayMus, false, 0, true);
};
}
public function playSFX_Zoom():void{
if (this.option_SFXOn){
this.sFX_Zoom.play();
};
}
public function changeMusicVolume_GameplayTo(_arg1:Number):void{
this.musicVolume_Gameplay = _arg1;
setVolume(this.musicVolume_Gameplay, this.sndChannel_GameplayMus);
}
public function playSFX_TutorialTaskSuccess():void{
if (this.option_SFXOn){
this.sFX_TutorialTaskSuccess.play();
};
}
public function toggleSFXOn(_arg1:Boolean):void{
if (_arg1){
this.option_SFXOn = true;
playSFX_ToggleSFXOn();
} else {
this.option_SFXOn = false;
};
}
public function playSFX_ScoreRack():void{
if (this.option_SFXOn){
this.sFX_ScoreRack.play();
};
}
public function isOption_MusicOn():Boolean{
return (this.option_MusicOn);
}
public function stopMusic_MenuMus():void{
this.sndChannel_MenuMus.stop();
this.playing_MenuMus = false;
}
public function tryPlayMusic_MenuMus():void{
if (!this.playing_MenuMus){
playMusic_MenuMus();
};
}
public function playSFX_DialogueAdvance():void{
if (this.option_SFXOn){
this.sFX_DialogueAdvance.play();
};
}
public function fadeOutMusic_Gameplay():void{
this.musicFade_GameplayTimer.addEventListener("timer", decreaseGameplayMusVol, false, 0, true);
this.musicFade_GameplayTimer.start();
}
public function toggleMusicOn(_arg1:Boolean):void{
if (_arg1){
this.option_MusicOn = true;
this.rootMC.onMusicToggleOn();
} else {
this.rootMC.onMusicToggleOff();
this.option_MusicOn = false;
};
}
}
}//package
Section 103
//BackBtn (BackBtn)
package {
import flash.display.*;
public dynamic class BackBtn extends SimpleButton {
}
}//package
Section 104
//BarrelCut (BarrelCut)
package {
import flash.media.*;
public dynamic class BarrelCut extends Sound {
}
}//package
Section 105
//BarrelExplode (BarrelExplode)
package {
import flash.media.*;
public dynamic class BarrelExplode extends Sound {
}
}//package
Section 106
//Bes_Zoom (Bes_Zoom)
package {
import flash.media.*;
public dynamic class Bes_Zoom extends Sound {
}
}//package
Section 107
//Blink_Gameplay (Blink_Gameplay)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class Blink_Gameplay extends BlinkLevel {
public var hitAreaMC:MovieClip;
public var testBtn:SimpleButton;
public var zoom_masterMC:MovieClip;
public var mainCharaMC:MovieClip;
public var zoomMC:MovieClip;
public var pauseBtn:SimpleButton;
public var s1ScoreTxt:TextField;
public var civilianMC2:Civilian;
public var civilianMC1:Civilian;
public var masterScoreTxt:TextField;
public var civilianMC3:Civilian;
public var s1Score:uint;
public var screen_PauseMC:MovieClip;
public var breakableWallMC:MovieClip;
public var masterScore:uint;
public var blinkFacingLeft:Boolean;
public var blink_masterFacingLeft:Boolean;
public var dialogueBoxMC:MovieClip;
public var mirageAnimMC:MovieClip;
public var groundHeightMC:MovieClip;
public var hUD_MC:MovieClip;
public var masterCharaMC:MovieClip;
public var numHits:uint;
public var destinationIconAnimMC:MovieClip;
public var mirage_masterAnimMC:MovieClip;
public function Blink_Gameplay(){
addFrameScript(0, frame1, 1, frame2);
super();
this.currMissionObjectiveStr = ("Your mission objective right now is to\n" + "practice what you need. This is only a test stage.");
this.currKR = this.blankKeyboardReceiver;
this.prePausedCurrKR = this.gameplayKR;
}
public function master_tryTeleportTo(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
MovieClip(root).getSndManager().playSFX_Zoom();
mirage_masterAnimMC.x = masterCharaMC.x;
mirage_masterAnimMC.y = masterCharaMC.y;
if (_arg1 < 25){
_local3 = 25;
} else {
if (_arg1 > 495){
_local3 = 495;
} else {
_local3 = _arg1;
};
};
if (_arg2 < 40){
_local4 = 40;
} else {
if (_arg2 > 305){
_local4 = 305;
} else {
_local4 = _arg2;
};
};
if ((_local3 - masterCharaMC.x) <= 0){
this.blink_masterFacingLeft = true;
masterCharaMC.switchToCharState(masterCharaMC.CHAR_STATE_BLINK_LEFT);
mirage_masterAnimMC.doFade_Left();
zoom_masterMC.doZoomLeft(masterCharaMC.x, masterCharaMC.y, (_local3 - 45), (_local4 - 60));
} else {
this.blink_masterFacingLeft = false;
masterCharaMC.switchToCharState(masterCharaMC.CHAR_STATE_BLINK_RIGHT);
mirage_masterAnimMC.doFade_Right();
zoom_masterMC.doZoomRight(masterCharaMC.x, masterCharaMC.y, (_local3 - 45), (_local4 - 60));
};
masterCharaMC.visible = false;
masterCharaMC.setFrozen(true);
masterCharaMC.x = (_local3 - 45);
masterCharaMC.y = (_local4 - 60);
masterCharaMC.yVel = 0;
}
override public function whenMasterCharaHit():void{
s1ScoreTxt.text = String(++s1Score);
}
public function whenZoomFinish_master():void{
masterCharaMC.visible = true;
if (this.blink_masterFacingLeft){
masterCharaMC.animateLeftBlinkArrival();
} else {
masterCharaMC.animateRightBlinkArrival();
};
masterCharaMC.aerial = !((masterCharaMC.y == 245));
masterCharaMC.setFrozen(false);
}
override public function initLevel():void{
this.pausableMCArr.push(mainCharaMC);
this.pausableMCArr.push(masterCharaMC);
mainCharaMC.prePauseEnterFrame_xyUpdate = mainCharaMC.defEnterFrame_xyUpdate;
mainCharaMC.currEnterFrame_xyUpdate = function (){
};
masterCharaMC.currEnterFrame_xyUpdate = function (){
};
masterCharaMC.prePauseEnterFrame_xyUpdate = masterCharaMC.defEnterFrame_xyUpdate;
masterCharaMC.aggressive = true;
masterCharaMC.currAIPhase = (masterCharaMC.currAIPhase = masterCharaMC.AI_PHASE_HARD_CHASE);
masterCharaMC.prePauseEnterFrame_AI = masterCharaMC.enterFrame_AI_HardChase;
masterCharaMC.currEnterFrame_AI = function (){
};
screen_PauseMC.addEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy, false, 0, true);
dialogueBoxMC.displayDialogueLine(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "Blink game private prototype"));
}
function frame2(){
stop();
}
override public function unpauseLevel():void{
super.unpauseLevel();
mainCharaMC.currKR = this.currKR;
}
function frame1(){
pauseBtn.addEventListener(MouseEvent.MOUSE_UP, pauseGame_MOUSE, false, 0, true);
hitAreaMC.addEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp, false, 0, true);
testBtn.addEventListener(MouseEvent.MOUSE_UP, testFunc_MOUSE, false, 0, true);
s1Score = 0;
masterScore = 0;
}
public function pauseGame_MOUSE(_arg1:MouseEvent):void{
pauseGame();
}
public function showMissionObjectiveWhenPauseScreenRdy(_arg1:Event):void{
screen_PauseMC.removeEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy);
screen_PauseMC.showMissionObjective();
}
override public function whenMainCharaHit():void{
masterScoreTxt.text = String(++masterScore);
}
override public function exitLevel():void{
mainCharaMC.removeEventListener_xyUpdate();
masterCharaMC.removeEventListener_xyUpdate();
masterCharaMC.removeEventListener_AI();
MovieClip(root).getSndManager().stopMusic_GameplayMus();
}
public function pauseGame():void{
pauseLevel();
}
override public function pauseLevel():void{
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
screen_PauseMC.showPauseMenu();
}
public function tryTeleportTo(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
MovieClip(root).getSndManager().playSFX_Zoom();
mirageAnimMC.x = mainCharaMC.x;
mirageAnimMC.y = mainCharaMC.y;
if (_arg1 < 25){
_local3 = 25;
} else {
if (_arg1 > 495){
_local3 = 495;
} else {
_local3 = _arg1;
};
};
if (_arg2 < 40){
_local4 = 40;
} else {
if (_arg2 > 305){
_local4 = 305;
} else {
_local4 = _arg2;
};
};
if ((_local3 - mainCharaMC.x) <= 0){
this.blinkFacingLeft = true;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_LEFT);
mirageAnimMC.doFade_Left();
zoomMC.doZoomLeft(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
} else {
this.blinkFacingLeft = false;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_RIGHT);
mirageAnimMC.doFade_Right();
zoomMC.doZoomRight(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
};
mainCharaMC.visible = false;
mainCharaMC.setFrozen(true);
mainCharaMC.x = (_local3 - 45);
mainCharaMC.y = (_local4 - 60);
mainCharaMC.yVel = 0;
}
public function whenZoomFinish():void{
mainCharaMC.visible = true;
if (this.blinkFacingLeft){
mainCharaMC.animateLeftBlinkArrival();
} else {
mainCharaMC.animateRightBlinkArrival();
};
mainCharaMC.aerial = !((mainCharaMC.y == 245));
mainCharaMC.setFrozen(false);
}
public function hitAreaMouseUp(_arg1:MouseEvent):void{
tryTeleportTo(mouseX, mouseY);
}
public function testFunc_MOUSE(_arg1:MouseEvent):void{
masterCharaMC.startShowAsDamaged();
}
public function breakableWallRandomRespawnPos():void{
breakableWallMC.spawnAt((50 + Math.round((Math.random() * 450))), (10 + Math.round((Math.random() * 220))), breakableWallMC.defHitTestFunc);
}
override public function onLevelStartMissionObjClosed():void{
MovieClip(root).getSndManager().playMusic_GameplayMus(true);
screen_PauseMC.resumeGame();
}
}
}//package
Section 108
//Blink_KeyboardReceiver (Blink_KeyboardReceiver)
package {
public class Blink_KeyboardReceiver {
var keyPressed_RIGHT:Boolean;
var keyPressed_LEFT:Boolean;
var keyPressed_UP:Boolean;
var keyPressed_DOWN:Boolean;
public function Blink_KeyboardReceiver(){
forceAllKeysReleased();
}
public function whenKeyPressed_DOWN():void{
trace("impotent DOWN PRessed");
}
public function set KeyPressed_RIGHT(_arg1):void{
this.keyPressed_RIGHT = _arg1;
}
public function whenKeyReleased_LEFT():void{
trace("impotent LEFT REleased");
}
public function set KeyPressed_LEFT(_arg1):void{
this.keyPressed_LEFT = _arg1;
}
public function whenKeyReleased_UP():void{
trace("impotent UP REleased");
}
public function whenKeyPressed_RIGHT():void{
trace("impotent RIGHT PRessed");
}
public function whenKeyReleased_DOWN():void{
trace("impotent DOWN REleased");
}
public function get KeyPressed_RIGHT():Boolean{
return (this.keyPressed_RIGHT);
}
public function get KeyPressed_LEFT():Boolean{
return (this.keyPressed_LEFT);
}
public function whenKeyReleased_RIGHT():void{
trace("impotent RIGHT REleased");
}
public function forceAllKeysReleased():void{
this.keyPressed_RIGHT = (this.keyPressed_DOWN = (this.keyPressed_LEFT = (this.keyPressed_UP = false)));
}
public function whenKeyPressed_LEFT():void{
trace("impotent LEFT PRessed");
}
public function doKeysPressedSweep():void{
if (this.keyPressed_RIGHT){
whenKeyPressed_RIGHT();
} else {
if (this.keyPressed_LEFT){
whenKeyPressed_LEFT();
} else {
if (this.keyPressed_DOWN){
whenKeyPressed_DOWN();
} else {
if (this.keyPressed_UP){
whenKeyPressed_UP();
} else {
whenKeyReleased_RIGHT();
};
};
};
};
}
public function whenKeyPressed_UP():void{
trace("impotent UP PRessed");
}
}
}//package
Section 109
//Blink_KeyboardReceiver_Gameplay (Blink_KeyboardReceiver_Gameplay)
package {
import flash.display.*;
import flash.utils.*;
public class Blink_KeyboardReceiver_Gameplay extends Blink_KeyboardReceiver {
var lastRecordedAtkKeyReleaseTime_RIGHT;
var gameplayScreenMC:MovieClip;
var MAX_ATK_KEY_RELEASE_INTERVAL:uint;// = 300
var lastRecordedAtkKeyReleaseTime_LEFT:int;
public function Blink_KeyboardReceiver_Gameplay(_arg1:MovieClip){
MAX_ATK_KEY_RELEASE_INTERVAL = 300;
super();
forceAllKeysReleased();
this.lastRecordedAtkKeyReleaseTime_LEFT = getTimer();
this.gameplayScreenMC = _arg1;
}
override public function whenKeyPressed_DOWN():void{
if (!this.keyPressed_DOWN){
this.keyPressed_DOWN = true;
if (this.keyPressed_UP){
return;
};
this.gameplayScreenMC.mainCharaMC.tryAnimateCarryMotion();
};
}
override public function whenKeyReleased_LEFT():void{
this.keyPressed_LEFT = false;
if (this.keyPressed_RIGHT){
this.gameplayScreenMC.mainCharaMC.animateRightMovement();
} else {
if ((getTimer() - this.lastRecordedAtkKeyReleaseTime_LEFT) <= MAX_ATK_KEY_RELEASE_INTERVAL){
this.gameplayScreenMC.mainCharaMC.tryAttackLeft();
} else {
this.gameplayScreenMC.mainCharaMC.animateIdleMovement();
};
};
this.lastRecordedAtkKeyReleaseTime_LEFT = getTimer();
}
override public function whenKeyPressed_RIGHT():void{
if (!this.keyPressed_RIGHT){
this.keyPressed_RIGHT = true;
if (this.keyPressed_LEFT){
this.gameplayScreenMC.mainCharaMC.animateIdleMovement();
} else {
this.gameplayScreenMC.mainCharaMC.animateRightMovement();
};
};
}
override public function whenKeyReleased_RIGHT():void{
this.keyPressed_RIGHT = false;
if (this.keyPressed_LEFT){
this.gameplayScreenMC.mainCharaMC.animateLeftMovement();
} else {
if ((getTimer() - this.lastRecordedAtkKeyReleaseTime_RIGHT) <= MAX_ATK_KEY_RELEASE_INTERVAL){
this.gameplayScreenMC.mainCharaMC.tryAttackRight();
} else {
this.gameplayScreenMC.mainCharaMC.animateIdleMovement();
};
};
this.lastRecordedAtkKeyReleaseTime_RIGHT = getTimer();
}
override public function whenKeyReleased_DOWN():void{
this.keyPressed_DOWN = false;
}
override public function whenKeyPressed_LEFT():void{
if (!this.keyPressed_LEFT){
this.keyPressed_LEFT = true;
if (this.keyPressed_RIGHT){
this.gameplayScreenMC.mainCharaMC.animateIdleMovement();
} else {
this.gameplayScreenMC.mainCharaMC.animateLeftMovement();
};
};
}
override public function whenKeyReleased_UP():void{
this.keyPressed_UP = false;
}
override public function whenKeyPressed_UP():void{
if (!this.keyPressed_UP){
this.keyPressed_UP = true;
if (this.keyPressed_DOWN){
} else {
if (this.keyPressed_LEFT){
if (this.keyPressed_RIGHT){
this.gameplayScreenMC.mainCharaMC.animateJumpUpMovement();
} else {
this.gameplayScreenMC.mainCharaMC.animateJumpLeftMovement();
};
} else {
if (this.keyPressed_RIGHT){
this.gameplayScreenMC.mainCharaMC.animateJumpRightMovement();
} else {
this.gameplayScreenMC.mainCharaMC.animateJumpUpMovement();
};
};
};
};
}
}
}//package
Section 110
//Blink_KeyboardReceiver_GameplayNoAttack (Blink_KeyboardReceiver_GameplayNoAttack)
package {
import flash.display.*;
public class Blink_KeyboardReceiver_GameplayNoAttack extends Blink_KeyboardReceiver {
var gameplayScreenMC:MovieClip;
public function Blink_KeyboardReceiver_GameplayNoAttack(_arg1:MovieClip){
forceAllKeysReleased();
this.gameplayScreenMC = _arg1;
}
override public function whenKeyPressed_DOWN():void{
if (!this.keyPressed_DOWN){
this.keyPressed_DOWN = true;
if (this.keyPressed_UP){
return;
};
this.gameplayScreenMC.mainCharaMC.tryAnimateCarryMotion();
};
}
override public function whenKeyReleased_LEFT():void{
this.keyPressed_LEFT = false;
if (this.keyPressed_RIGHT){
this.gameplayScreenMC.mainCharaMC.animateRightMovement();
} else {
this.gameplayScreenMC.mainCharaMC.animateIdleMovement();
};
}
override public function whenKeyPressed_RIGHT():void{
if (!this.keyPressed_RIGHT){
this.keyPressed_RIGHT = true;
if (this.keyPressed_LEFT){
this.gameplayScreenMC.mainCharaMC.animateIdleMovement();
} else {
this.gameplayScreenMC.mainCharaMC.animateRightMovement();
};
};
}
override public function whenKeyReleased_RIGHT():void{
this.keyPressed_RIGHT = false;
if (this.keyPressed_LEFT){
this.gameplayScreenMC.mainCharaMC.animateLeftMovement();
} else {
this.gameplayScreenMC.mainCharaMC.animateIdleMovement();
};
}
override public function whenKeyReleased_DOWN():void{
this.keyPressed_DOWN = false;
}
override public function whenKeyPressed_LEFT():void{
if (!this.keyPressed_LEFT){
this.keyPressed_LEFT = true;
if (this.keyPressed_RIGHT){
this.gameplayScreenMC.mainCharaMC.animateIdleMovement();
} else {
this.gameplayScreenMC.mainCharaMC.animateLeftMovement();
};
};
}
override public function whenKeyReleased_UP():void{
this.keyPressed_UP = false;
}
override public function whenKeyPressed_UP():void{
if (!this.keyPressed_UP){
this.keyPressed_UP = true;
if (this.keyPressed_DOWN){
} else {
if (this.keyPressed_LEFT){
if (this.keyPressed_RIGHT){
this.gameplayScreenMC.mainCharaMC.animateJumpUpMovement();
} else {
this.gameplayScreenMC.mainCharaMC.animateJumpLeftMovement();
};
} else {
if (this.keyPressed_RIGHT){
this.gameplayScreenMC.mainCharaMC.animateJumpRightMovement();
} else {
this.gameplayScreenMC.mainCharaMC.animateJumpUpMovement();
};
};
};
};
}
}
}//package
Section 111
//BlinkConsts (BlinkConsts)
package {
public class BlinkConsts {
public static const LEVEL3_NAME:String = "Explosions";
public static const LEVEL7_NAME:String = "Final";
public static const FAIL_MSG_TIME_UP:String = "Time's Up";
public static const SPEAKER_NUM_S1:uint = 0;
public static const FAIL_MSG_ATTACK_CIV:String = "Don't attack civilians.";
public static const LEVEL4_NAME:String = "PeopleFalling";
public static const LEVEL2_NAME:String = "Fire";
public static const DIFFICULTY_NUM_NORMAL:uint = 1;
public static const FAIL_MSG_DDROP_CIV:String = "Don't drop civilians from great heights.";
public static const BEST_POSSIBLE_SCORE:uint = 140000;
public static const LEVEL6_NAME:String = "NotBoth";
public static const DIFFICULTY_NUM_HARD:uint = 2;
public static const DEF_NUM_CHANCES:uint = 3;
public static const SCREEN_TYPE_NUM_GAMEPLAY:uint = 1;
public static const LEVEL5_NAME:String = "EveryoneFalling";
public static const SCREEN_TYPE_NUM_MAIN_MENU:uint = 0;
public static const SPEAKER_NUM_MASTER:uint = 1;
public static const LEVEL1_NAME:String = "Tutorial";
public static const DIFFICULTY_NUM_EASY:uint = 0;
}
}//package
Section 112
//BlinkDoc (BlinkDoc)
package {
import fl.controls.*;
import flash.display.*;
import flash.events.*;
import example.*;
import flash.geom.*;
import meez.*;
import meez.avatar.*;
import fl.events.*;
import flash.net.*;
import flash.text.*;
import flash.utils.*;
import mochi.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class BlinkDoc extends MovieClip {
public var screen_Level_PeopleFallingMC:BlinkLevel_PeopleFalling;
var sndManager:B_SoundManager;
var ending2_achieved:Boolean;
public var screen_GameplayMC:Blink_Gameplay;
public var avatarLoad4Timer:Timer;
var api:Games;
public var sfsl_master:SpriteFilmstripLoader;
public var sfsl_maleCivilian:SpriteFilmstripLoader;
public var screen_Level_EveryoneFallingMC:BlinkLevel_EveryoneFalling;
public var maleCivilianAvSprite:AvatarSprite;
var sharedObjWorks:Boolean;
var sharedObj:SharedObject;
public var guyButton:MovieClip;
public var loadingPercentTxt:TextField;
public var screen_Level_NotBothMC:BlinkLevel_NotBoth;
public var playerChargeLeftSprite:Sprite;
var currLevel:BlinkLevel;
var currLevelFrameLblStr:String;
public var screen_Level_FireMC:BlinkLevel_Fire;
var startedNewSingleLevelSession:Boolean;
var currDifficultyNum:uint;
var levelsUnlockedNum:uint;
var score:uint;
public var screen_Level_TutorialMC:BlinkLevel_Tutorial;
public var progressBarMC:MovieClip;
var currScreenTypeNum:uint;
public var avatarLoad2Timer:Timer;
var ending1FirstTime:Boolean;
public var progressBarComp:ProgressBar;
var meezCfg:Object;
public var EMBEDDED_PLAYERS;
public var player:AvatarSprite;
var versStr:String;// = "1.05.201p4all"
public var girlButton:MovieClip;
var ending1_achieved:Boolean;
public var screen_Level_FinalMC:BlinkLevel_Final;
public var screenMCOverlayMC:MovieClip;
var playingThroughLevels:Boolean;
public var statusTxt:TextField;
var splashScreenShown:Boolean;
public var importButton:SimpleButton;
public var FILMSTRIP_FRAME;
public var playerFaceSprite:Sprite;
public var playerBigFaceSprite:Sprite;
public var maleAttribsObj:Object;
public var numFilmstripSpritesLoaded:uint;
public var femaleCivilianAvSprite:AvatarSprite;
var numMissionFailures:uint;
public var avatarLoad3Timer:Timer;
public var MASTER_ANIMATIONS;
var numChances:int;
public var PLAYER_ANIMATIONS;
public var NUM_FILMSTRIP_SPRITES_TO_LOAD3:uint;
public var NUM_FILMSTRIP_SPRITES_TO_LOAD4:uint;
public var sfsl_femaleCivilian:SpriteFilmstripLoader;
public var NUM_FILMSTRIP_SPRITES_TO_LOAD2:uint;
var attemptedHighScoreSubmission:Boolean;
public var CIVILIAN_ANIMATIONS;
public var NUM_FILMSTRIP_SPRITES_TO_LOAD1:uint;
var avatarGender_male:Boolean;
public var femaleAttribsObj:Object;
var gamePaused:Boolean;
public var playerChargeRightSprite:Sprite;
public var screen_Level_ExplosionsMC:BlinkLevel_Explosions;
public var masterAvSprite:AvatarSprite;
public var sfsl:Bes_SpriteFilmstripLoader;
var ending2FirstTime:Boolean;
public var importWindow:MovieClip;
public function BlinkDoc(){
versStr = "1.05.201p4all";
super();
addFrameScript(0, frame1, 1, frame2, 21, frame22, 31, frame32, 41, frame42, 51, frame52, 60, frame61, 70, frame71, 81, frame82, 91, frame92, 101, frame102, 111, frame112, 121, frame122, 131, frame132, 141, frame142, 151, frame152, 161, frame162, 172, frame173, 182, frame183, 192, frame193, 202, frame203, 212, frame213, 222, frame223, 232, frame233, 242, frame243, 252, frame253, 261, frame262, 271, frame272);
stop();
stage.showDefaultContextMenu = false;
stage.scaleMode = StageScaleMode.NO_SCALE;
this.tabChildren = false;
this.meezCfg = FlashUtil.loadFlashVars(this.root);
this.meezCfg.game_api_host = ((this.meezCfg.game_api_host) || ("http://meez.arc.meezapi.com"));
this.meezCfg.render_api_host = ((this.meezCfg.render_api_host) || ("http://trigger.meezapi.com"));
this.api = new Games(this.meezCfg);
this.currScreenTypeNum = BlinkConsts.SCREEN_TYPE_NUM_MAIN_MENU;
this.gamePaused = false;
this.playingThroughLevels = true;
this.startedNewSingleLevelSession = false;
this.currDifficultyNum = BlinkConsts.DIFFICULTY_NUM_NORMAL;
this.numChances = 3;
this.score = 0;
this.numMissionFailures = 0;
this.splashScreenShown = false;
this.ending1_achieved = (this.ending2_achieved = false);
this.ending1FirstTime = (this.ending2FirstTime = true);
this.levelsUnlockedNum = 0;
this.sharedObjWorks = true;
try {
this.sharedObj = SharedObject.getLocal("Blink_SO");
} catch(error:Error) {
this.sharedObjWorks = false;
trace("--in BlinkDoc constructor, shared object creation error");
};
if (this.sharedObjWorks){
trace("BlinkDock SharedObj Works!!");
if (this.sharedObj.data.splashScreenShown == undefined){
this.sharedObj.data.splashScreenShown = false;
} else {
this.splashScreenShown = this.sharedObj.data.splashScreenShown;
trace(("SharedObj test splashScreenShown = " + this.splashScreenShown));
};
if (this.sharedObj.data.ending1_achieved == undefined){
this.sharedObj.data.ending1_achieved = false;
} else {
this.ending1_achieved = this.sharedObj.data.ending1_achieved;
trace(("SharedObj test this.ending1_achieved = " + this.ending1_achieved));
this.ending1FirstTime = false;
};
if (this.sharedObj.data.ending2_achieved == undefined){
this.sharedObj.data.ending2_achieved = false;
} else {
this.ending2_achieved = this.sharedObj.data.ending2_achieved;
trace(("SharedObj test this.ending2_achieved = " + this.ending2_achieved));
this.ending2FirstTime = false;
};
if (this.sharedObj.data.levelsUnlockedNum == undefined){
this.sharedObj.data.levelsUnlockedNum = 0;
} else {
this.levelsUnlockedNum = this.sharedObj.data.levelsUnlockedNum;
};
};
}
public function getSndManager():B_SoundManager{
return (this.sndManager);
}
public function set SplashScreenShown(_arg1:Boolean):void{
this.splashScreenShown = _arg1;
}
public function get Ending2FirstTime():Boolean{
return (this.ending2FirstTime);
}
function frame272(){
stop();
}
public function onMusicToggleOn():void{
if (this.currScreenTypeNum == BlinkConsts.SCREEN_TYPE_NUM_MAIN_MENU){
MovieClip(root).getSndManager().playMusic_MenuMus();
} else {
this.currLevel.onMusicToggleOn();
};
}
public function get Ending2_achieved():Boolean{
return (this.ending2_achieved);
}
public function set Ending1_achieved(_arg1:Boolean):void{
this.ending1_achieved = _arg1;
}
public function set Ending2FirstTime(_arg1:Boolean):void{
this.ending2FirstTime = _arg1;
}
public function startHighScoreSubmit_GameCleared(_arg1:String, _arg2:int, _arg3:MovieClip):void{
var idStr = _arg1;
var scoreVal = _arg2;
var screenHighScoreMC = _arg3;
MochiScores.showLeaderboard({boardID:idStr, score:scoreVal, res:"470x320", clip:screenHighScoreMC.highScoresContainerMC, onClose:function ():void{
screenHighScoreMC.gotoAndStop("idle");
}, onError:function ():void{
trace("error loading leaderboard!");
screenHighScoreMC.statusTxt.text = "error loading leaderboard!";
screenHighScoreMC.displayBackBtn();
}});
}
public function get SharedObj():SharedObject{
return (this.sharedObj);
}
public function generateIdleStillSprite(_arg1:BitmapData):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginBitmapFill(_arg1);
_local2.graphics.drawRect(0, 0, 180, 240);
_local2.graphics.endFill();
_local2.x = 0;
_local2.y = 0;
return (_local2);
}
public function hideMC(_arg1:MovieClip):void{
_arg1.visible = false;
_arg1.x = 700;
}
public function get CurrLevel():BlinkLevel{
return (this.currLevel);
}
function frame173(){
stop();
stage.addEventListener(KeyboardEvent.KEY_DOWN, whenKeyPressed, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, whenKeyReleased, false, 0, true);
MovieClip(root).currScreenTypeNum = BlinkConsts.SCREEN_TYPE_NUM_GAMEPLAY;
currLevel = screen_Level_NotBothMC;
MovieClip(root).CurrLevelFrameLblStr = "level_notboth";
currLevel.initLevel();
}
public function isOnAcceptedDomain():Boolean{
var _local1:String;
_local1 = this.loaderInfo.url;
return (true);
}
public function onFilmstripsLoaded_master(){
var j:*;
showStatus("creating animations 4...");
j = 0;
while (j < MASTER_ANIMATIONS.length) {
masterAvSprite.addDefaultAnimation(MASTER_ANIMATIONS[j]);
j = (j + 1);
};
masterAvSprite.addAnimation("idle-turn-backtoright", "fgworldidle01", [9, 10, 11, 12]);
masterAvSprite.addAnimation("chargecrouch-left", "fgplatformer01", [136]);
masterAvSprite.addAnimation("chargecrouch-right", "fgplatformer01", [128]);
masterAvSprite.addAnimation("blinkarrival-left", "fgplatformer01", [136, 140]);
masterAvSprite.addAnimation("blinkarrival-right", "fgplatformer01", [128, 132]);
masterAvSprite.addAnimation("blinkdescend-left", "fgplatformer01", [140]);
masterAvSprite.addAnimation("blinkdescend-right", "fgplatformer01", [132]);
masterAvSprite.addAnimation("attack-left", "fgplatformer01", [175, 175, 176, 176]);
masterAvSprite.addAnimation("attack-right", "fgplatformer01", [173, 173, 174, 174]);
masterAvSprite.addAnimation("attackend-left", "fgplatformer01", [176]);
masterAvSprite.addAnimation("attackend-right", "fgplatformer01", [174]);
masterAvSprite.addAnimation("carrymotion-left", "fgplatformer01", [163, 162, 162]);
masterAvSprite.addAnimation("carrymotion-right", "fgplatformer01", [161, 162, 162]);
masterAvSprite.addAnimation("carrymotionend-left", "fgplatformer01", [162]);
masterAvSprite.addAnimation("carrymotionend-right", "fgplatformer01", [162]);
this.numFilmstripSpritesLoaded++;
if (this.numFilmstripSpritesLoaded >= NUM_FILMSTRIP_SPRITES_TO_LOAD4){
progressBarComp.setProgress(100, 100);
screenMCOverlayMC.fadeToAndFromBlack(function (){
gotoAndStop("mainmenu");
});
};
}
public function set Ending2_achieved(_arg1:Boolean):void{
this.ending2_achieved = _arg1;
}
public function generateBodySprite(_arg1:BitmapData):Sprite{
var _local2:Sprite;
var _local3:Sprite;
_local2 = new Sprite();
_local2.graphics.beginBitmapFill(_arg1);
_local2.graphics.drawRect(0, 0, 180, 240);
_local2.graphics.endFill();
_local2.x = 0;
_local2.y = 0;
_local3 = new Sprite();
_local3.addChild(_local2);
_local3.x = 0;
_local3.y = 0;
return (_local2);
}
function frame22(){
stop();
importWindow.visible = false;
guyButton.addEventListener("mouseOver", onRollOverGlow);
guyButton.addEventListener("mouseOut", onRollOutGlow);
girlButton.addEventListener("mouseOut", onRollOutGlow);
girlButton.addEventListener("mouseOver", onRollOverGlow);
guyButton.addEventListener(MouseEvent.CLICK, onReleaseGuy);
girlButton.addEventListener(MouseEvent.CLICK, onReleaseGirl);
importButton.addEventListener(MouseEvent.CLICK, onImportRelease);
this.importWindow.closeButton.addEventListener(MouseEvent.CLICK, onCloseRelease);
this.importWindow.getYourOwnButton.addEventListener(MouseEvent.CLICK, onGetRelease);
this.importWindow.goButton.addEventListener(MouseEvent.CLICK, onGoButtonPress_MOUSE);
this.importWindow.nameField.addEventListener(ComponentEvent.ENTER, submitInput, false, 0, true);
}
public function get SharedObjWorks():Boolean{
return (this.sharedObjWorks);
}
function frame1(){
MochiAd.showPreGameAd({clip:root, id:"f11e7eacf80bb461", res:"550x400", background:0, color:0xFF8A00, outline:0xFF8A00, no_bg:false});
MochiServices.connect("f11e7eacf80bb461", root);
}
function frame2(){
stop();
}
public function onCloseRelease(_arg1:MouseEvent){
importWindow.visible = false;
}
function frame183(){
stop();
stage.addEventListener(KeyboardEvent.KEY_DOWN, whenKeyPressed, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, whenKeyReleased, false, 0, true);
MovieClip(root).currScreenTypeNum = BlinkConsts.SCREEN_TYPE_NUM_GAMEPLAY;
currLevel = screen_Level_FinalMC;
MovieClip(root).CurrLevelFrameLblStr = "level_final";
currLevel.initLevel();
}
function frame193(){
stop();
}
function frame162(){
stop();
stage.addEventListener(KeyboardEvent.KEY_DOWN, whenKeyPressed, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, whenKeyReleased, false, 0, true);
MovieClip(root).currScreenTypeNum = BlinkConsts.SCREEN_TYPE_NUM_GAMEPLAY;
currLevel = screen_Level_EveryoneFallingMC;
MovieClip(root).CurrLevelFrameLblStr = "level_everyonefalling";
currLevel.initLevel();
}
public function gotoAppropriatePostLoadFrame():void{
if (!meezCfg.game_player_id){
gotoAndStop("characterSelector");
} else {
gotoAndPlay("beginloadAvatars");
};
}
public function onGoButtonPress(){
meezCfg.game_player_id = (importWindow.nameField.text + "@meez.com");
api = new Games(meezCfg);
api.getPlayer(validPlayer, invalidPlayer);
}
function frame32(){
progressBarComp.mode = ProgressBarMode.MANUAL;
this.sndManager = new B_SoundManager(this);
}
public function onGoButtonPress_MOUSE(_arg1:MouseEvent):void{
onGoButtonPress();
}
function frame152(){
stop();
stage.addEventListener(KeyboardEvent.KEY_DOWN, whenKeyPressed, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, whenKeyReleased, false, 0, true);
MovieClip(root).currScreenTypeNum = BlinkConsts.SCREEN_TYPE_NUM_GAMEPLAY;
currLevel = screen_Level_PeopleFallingMC;
MovieClip(root).CurrLevelFrameLblStr = "level_peoplefalling";
currLevel.initLevel();
}
public function submitInput(_arg1:ComponentEvent):void{
onGoButtonPress();
}
public function get LevelsUnlockedNum():uint{
return (this.levelsUnlockedNum);
}
public function get Score():uint{
return (this.score);
}
public function onFilmstripsLoadErr():void{
gotoAndStop("avatarloaderror");
}
public function difficultyNumToStr(_arg1:uint):String{
switch (_arg1){
case BlinkConsts.DIFFICULTY_NUM_EASY:
return ("Easy");
case BlinkConsts.DIFFICULTY_NUM_NORMAL:
return ("Normal");
case BlinkConsts.DIFFICULTY_NUM_HARD:
return ("Hard");
default:
trace(("--in BlinkDoc.difficultyNumToStr(), invalid dN: " + _arg1));
return ("Normal");
};
}
public function onMusicToggleOff():void{
if (this.currScreenTypeNum == BlinkConsts.SCREEN_TYPE_NUM_MAIN_MENU){
getSndManager().stopMusic_MenuMus();
} else {
this.currLevel.onMusicToggleOff();
};
}
public function set PlayingThroughLevels(_arg1:Boolean):void{
this.playingThroughLevels = _arg1;
}
public function tryUpdateLevelsUnlockedNum(_arg1:uint):void{
var newNum = _arg1;
if (this.levelsUnlockedNum < newNum){
this.levelsUnlockedNum = newNum;
};
if (this.sharedObjWorks){
this.sharedObj.data.levelsUnlockedNum = this.levelsUnlockedNum;
try {
this.sharedObj.flush();
} catch(error:Error) {
trace("--in BlinkDoc.tryUpdateLevelsUnlockedNum(), sharedObj.flush() failed.");
};
};
}
public function get CurrDifficultyNum():uint{
return (this.currDifficultyNum);
}
public function get CurrLevelFrameLblStr():String{
return (this.currLevelFrameLblStr);
}
function frame42(){
stop();
avatarLoad2Timer = new Timer(500, 1);
avatarLoad2Timer.addEventListener("timer", gotoAvatarLoad2, false, 0, true);
NUM_FILMSTRIP_SPRITES_TO_LOAD1 = 1;
numFilmstripSpritesLoaded = 0;
FILMSTRIP_FRAME = new Rectangle(0, 0, 90, 120);
PLAYER_ANIMATIONS = ["IDLE", "HIRESIDLE", "PLATFORMER"];
maleAttribsObj = {};
maleAttribsObj["avatar.gender"] = "m";
femaleAttribsObj = {};
femaleAttribsObj["avatar.gender"] = "f";
EMBEDDED_PLAYERS = {};
EMBEDDED_PLAYERS["guy@local"] = {id:"guy@local", name:"guy", tag:"Embedded Guy", avatarId:"local:guy", attribs:maleAttribsObj};
EMBEDDED_PLAYERS["baron@local"] = {id:"baron@local", name:"baron", tag:"Embedded Baron", avatarId:"local:baron", attribs:femaleAttribsObj};
sfsl = new Bes_SpriteFilmstripLoader(onFilmstripsLoaded, onFilmstripsLoadErr);
this.sfsl.ProgressBarComp = progressBarComp;
showStatus("loading your avatar...");
trace(((("api is: " + api) + ", player: ") + meezCfg.game_player_id));
if (EMBEDDED_PLAYERS[meezCfg.game_player_id]){
onPlayerLoaded(EMBEDDED_PLAYERS[meezCfg.game_player_id]);
} else {
api.getPlayer(onPlayerLoaded);
};
}
public function gotoAvatarLoad2(_arg1:TimerEvent):void{
gotoAndStop("loadAvatars2");
}
public function gotoAvatarLoad3(_arg1:TimerEvent):void{
gotoAndStop("loadAvatars3");
}
public function gotoAvatarLoad4(_arg1:TimerEvent):void{
gotoAndStop("loadAvatars4");
}
public function get StartedNewSingleLevelSession():Boolean{
return (this.startedNewSingleLevelSession);
}
public function set SharedObjWorks(_arg1:Boolean):void{
this.sharedObjWorks = _arg1;
}
public function onFilmstripsLoaded_femaleCivilian(){
var _local1:*;
showStatus("creating animations 3...");
_local1 = 0;
while (_local1 < CIVILIAN_ANIMATIONS.length) {
femaleCivilianAvSprite.addDefaultAnimation(CIVILIAN_ANIMATIONS[_local1]);
_local1++;
};
femaleCivilianAvSprite.addAnimation("idle-right", "fgplatformer01", [74, 74, 75, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74]);
femaleCivilianAvSprite.addAnimation("falling", "fgplatformer01", [185]);
this.numFilmstripSpritesLoaded++;
if (this.numFilmstripSpritesLoaded >= NUM_FILMSTRIP_SPRITES_TO_LOAD3){
avatarLoad4Timer.start();
progressBarComp.setProgress(75, 100);
};
}
public function determineFinalGradeStr():String{
return (((Math.round(((this.score * 100000) / BlinkConsts.BEST_POSSIBLE_SCORE)) / 1000) + "%"));
}
function frame52(){
stop();
avatarLoad3Timer = new Timer(500, 1);
avatarLoad3Timer.addEventListener("timer", gotoAvatarLoad3, false, 0, true);
NUM_FILMSTRIP_SPRITES_TO_LOAD2 = 1;
this.numFilmstripSpritesLoaded = 0;
CIVILIAN_ANIMATIONS = ["PLATFORMER"];
sfsl_maleCivilian = new SpriteFilmstripLoader(onFilmstripsLoaded_maleCivilian, onFilmstripsLoadErr);
onPlayerLoaded2();
}
public function set NumChances(_arg1:int):void{
this.numChances = _arg1;
}
function frame61(){
stop();
avatarLoad4Timer = new Timer(500, 1);
avatarLoad4Timer.addEventListener("timer", gotoAvatarLoad4, false, 0, true);
NUM_FILMSTRIP_SPRITES_TO_LOAD3 = 1;
sfsl_femaleCivilian = new SpriteFilmstripLoader(onFilmstripsLoaded_femaleCivilian, onFilmstripsLoadErr);
onPlayerLoaded3();
}
public function onReleaseGuy(_arg1:MouseEvent){
meezCfg.game_player_id = "guy@local";
gotoAndPlay("beginloadAvatars");
}
public function get Ending1_achieved():Boolean{
return (this.ending1_achieved);
}
public function get Ending1FirstTime():Boolean{
return (this.ending1FirstTime);
}
public function onPlayerLoaded2():void{
showStatus("creating sprite 2...");
maleCivilianAvSprite = new AvatarSprite({id:"malecivilian@local", name:"malecivilian", tag:"Embedded Male Civilian", avatarId:"local:malecivilian"}, FILMSTRIP_FRAME);
maleCivilianAvSprite.setFrameRepeat(2);
showStatus("loading animations 2...");
sfsl_maleCivilian.loadFilmstrips(maleCivilianAvSprite, [AnimationDefs.getFilmstrips().PLATFORMER]);
}
public function onPlayerLoaded3():void{
showStatus("creating sprite 3...");
femaleCivilianAvSprite = new AvatarSprite({id:"xoxolexi568@local", name:"xoxolexi568", tag:"Embedded Female Civilian", avatarId:"local:xoxolexi568"}, FILMSTRIP_FRAME);
femaleCivilianAvSprite.setFrameRepeat(2);
showStatus("loading animations 3...");
sfsl_femaleCivilian.loadFilmstrips(femaleCivilianAvSprite, [AnimationDefs.getFilmstrips().PLATFORMER]);
}
public function onGetRelease(_arg1:MouseEvent){
navigateToURL(new URLRequest(((("http://www.meez.com/main.dm?src=" + meezCfg.game_referrer_id) + ".") + "contest")));
}
public function onImportRelease(_arg1:MouseEvent){
importWindow.visible = true;
stage.focus = importWindow.nameField;
}
public function get VersStr():String{
return (this.versStr);
}
public function generateChargeLeftSprite(_arg1:BitmapData):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginBitmapFill(_arg1);
_local2.graphics.drawRect(630, 960, 90, 120);
_local2.graphics.endFill();
_local2.x = -630;
_local2.y = -960;
return (_local2);
}
public function get SplashScreenShown():Boolean{
return (this.splashScreenShown);
}
public function whenKeyReleased(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Keyboard.RIGHT:
case 68:
currLevel.whenKeyReleased_RIGHT();
break;
case Keyboard.DOWN:
case 83:
currLevel.whenKeyReleased_DOWN();
break;
case Keyboard.LEFT:
case 65:
currLevel.whenKeyReleased_LEFT();
break;
case Keyboard.UP:
case 87:
currLevel.whenKeyReleased_UP();
break;
case 80:
currLevel.pauseGameToggle();
break;
default:
break;
};
}
public function get PlayingThroughLevels():Boolean{
return (this.playingThroughLevels);
}
function frame71(){
stop();
NUM_FILMSTRIP_SPRITES_TO_LOAD4 = 1;
this.numFilmstripSpritesLoaded = 0;
MASTER_ANIMATIONS = ["HIRESIDLE", "PLATFORMER", "LOWRESWALK"];
sfsl_master = new SpriteFilmstripLoader(onFilmstripsLoaded_master, onFilmstripsLoadErr);
showStatus("loading avatar stuff...");
onPlayerLoaded4();
}
public function set Score(_arg1:uint):void{
this.score = _arg1;
}
function frame82(){
stop();
}
public function set LevelsUnlockedNum(_arg1:uint):void{
this.levelsUnlockedNum = _arg1;
}
public function onPlayerLoaded4():void{
showStatus("creating sprite 4...");
masterAvSprite = new AvatarSprite({id:"bes_master@local", name:"bes_master", tag:"Embedded Master", avatarId:"local:bes_master"}, FILMSTRIP_FRAME);
masterAvSprite.setFrameRepeat(2);
showStatus("loading animation 4...");
sfsl_master.loadFilmstrips(masterAvSprite, [AnimationDefs.getFilmstrips().HIRESIDLE, AnimationDefs.getFilmstrips().PLATFORMER, AnimationDefs.getFilmstrips().LOWRESWALK]);
}
public function set AvatarGender_male(_arg1:Boolean):void{
this.avatarGender_male = _arg1;
}
public function set NumMissionFailures(_arg1:uint):void{
this.numMissionFailures = _arg1;
}
public function set CurrDifficultyNum(_arg1:uint):void{
this.currDifficultyNum = _arg1;
}
public function linkToPlay4All():void{
trace("Linking to Play 4 All");
navigateToURL(new URLRequest("http://play4all.net"));
}
function frame213(){
stop();
}
function frame92(){
stop();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, whenKeyPressed);
stage.removeEventListener(KeyboardEvent.KEY_UP, whenKeyReleased);
MovieClip(root).currScreenTypeNum = BlinkConsts.SCREEN_TYPE_NUM_MAIN_MENU;
}
public function showStatus(_arg1:String){
statusTxt.text = _arg1;
}
function frame203(){
stop();
}
public function showMochiLeaderBoard(_arg1:String, _arg2:MovieClip):void{
var idStr = _arg1;
var screenHighScoreMC = _arg2;
MochiScores.showLeaderboard({boardID:idStr, res:"470x320", clip:screenHighScoreMC.highScoresContainerMC, onClose:function ():void{
screenHighScoreMC.gotoAndStop("idle");
}, onError:function ():void{
trace("error loading leaderboard!");
screenHighScoreMC.statusTxt.text = "error loading leaderboard!";
screenHighScoreMC.backBtn.x = 6;
}});
}
public function onRollOutGlow(_arg1:MouseEvent){
_arg1.target.filters = [];
}
function frame102(){
stop();
stage.removeEventListener(KeyboardEvent.KEY_DOWN, whenKeyPressed);
stage.removeEventListener(KeyboardEvent.KEY_UP, whenKeyReleased);
MovieClip(root).currScreenTypeNum = BlinkConsts.SCREEN_TYPE_NUM_MAIN_MENU;
}
function frame223(){
stop();
gotoAndStop(MovieClip(root).CurrLevelFrameLblStr);
}
public function millisecsToStr(_arg1:uint):String{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:String;
_local2 = 60;
_local3 = 1000;
_local4 = Math.floor((_arg1 / (_local2 * _local3)));
_local5 = (_arg1 - ((_local4 * _local2) * _local3));
_local6 = Math.floor((_local5 / _local3));
_local5 = (_local5 - (_local6 * _local3));
_local7 = "";
if (_local5 == 0){
_local7 = "000";
} else {
if (_local5 < 10){
_local7 = ("00" + _local5);
} else {
if (_local5 < 100){
_local7 = ("0" + _local5);
} else {
_local7 = String(_local5);
};
};
};
return (((((((((_local4)<10) ? "0" : "" + _local4) + ":") + ((_local6)<10) ? "0" : "") + _local6) + ".") + _local7));
}
public function set StartedNewSingleLevelSession(_arg1:Boolean):void{
this.startedNewSingleLevelSession = _arg1;
}
function frame112(){
stop();
stage.addEventListener(KeyboardEvent.KEY_DOWN, whenKeyPressed, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, whenKeyReleased, false, 0, true);
MovieClip(root).currScreenTypeNum = BlinkConsts.SCREEN_TYPE_NUM_GAMEPLAY;
currLevel = screen_GameplayMC;
currLevel.initLevel();
}
public function set CurrLevelFrameLblStr(_arg1:String):void{
this.currLevelFrameLblStr = _arg1;
}
public function get NumMissionFailures():uint{
return (this.numMissionFailures);
}
public function get NumChances():int{
return (this.numChances);
}
public function startHighScoreSubmit(_arg1:String, _arg2:int, _arg3:MovieClip):void{
var idStr = _arg1;
var scoreVal = _arg2;
var screenHighScoreMC = _arg3;
MochiScores.showLeaderboard({boardID:idStr, score:scoreVal, res:"470x320", clip:screenHighScoreMC.highScoresContainerMC, onClose:function ():void{
screenHighScoreMC.gotoAndStop("levelfailedchoices");
}, onError:function ():void{
trace("error loading leaderboard!");
screenHighScoreMC.statusTxt.text = "error loading leaderboard!";
screenHighScoreMC.displayBackBtn();
}});
}
public function get AvatarGender_male():Boolean{
return (this.avatarGender_male);
}
public function onRollOverGlow(_arg1:MouseEvent){
_arg1.target.filters = [new GlowFilter(16351507)];
}
public function set AttemptedHighScoreSubmission(_arg1:Boolean):void{
this.attemptedHighScoreSubmission = _arg1;
}
function frame233(){
stop();
currLevel.whenNextLevel();
}
function onUpdateLoaded(_arg1:Event){
var _local2:Number;
_local2 = Math.round(((this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal) * 100));
loadingPercentTxt.text = (_local2 + "%");
progressBarMC.setProgressTo((_local2 / 100));
}
public function onFilmstripsLoaded_maleCivilian(){
var _local1:*;
showStatus("creating animations 2...");
_local1 = 0;
while (_local1 < CIVILIAN_ANIMATIONS.length) {
maleCivilianAvSprite.addDefaultAnimation(CIVILIAN_ANIMATIONS[_local1]);
_local1++;
};
maleCivilianAvSprite.addAnimation("idle-right", "fgplatformer01", [74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74, 75]);
maleCivilianAvSprite.addAnimation("falling", "fgplatformer01", [185]);
this.numFilmstripSpritesLoaded++;
if (this.numFilmstripSpritesLoaded >= NUM_FILMSTRIP_SPRITES_TO_LOAD2){
avatarLoad3Timer.start();
progressBarComp.setProgress(50, 100);
};
}
public function generateFaceIconSprite(_arg1:BitmapData):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginBitmapFill(_arg1);
_local2.graphics.drawRect(63, (this.avatarGender_male) ? 26 : 33, 50, 50);
_local2.graphics.endFill();
_local2.x = -63;
_local2.y = (this.avatarGender_male) ? -26 : -33;
return (_local2);
}
function frame122(){
stop();
stage.addEventListener(KeyboardEvent.KEY_DOWN, whenKeyPressed, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, whenKeyReleased, false, 0, true);
MovieClip(root).currScreenTypeNum = BlinkConsts.SCREEN_TYPE_NUM_GAMEPLAY;
currLevel = screen_Level_TutorialMC;
MovieClip(root).CurrLevelFrameLblStr = "level_tutorial";
currLevel.initLevel();
}
public function onFilmstripsLoaded(){
var _local1:*;
showStatus("creating animations 1...");
_local1 = 0;
while (_local1 < PLAYER_ANIMATIONS.length) {
player.addDefaultAnimation(PLAYER_ANIMATIONS[_local1]);
_local1++;
};
player.addAnimation("idle-turn-fronttoleft", "fgworldidle01", [4, 3, 2, 1]);
player.addAnimation("idle-still", "worldidle01", [1]);
player.addAnimation("falling", "fgplatformer01", [185]);
player.addAnimation("chargecrouch-left", "fgplatformer01", [136]);
player.addAnimation("chargecrouch-right", "fgplatformer01", [128]);
player.addAnimation("blinkarrival-left", "fgplatformer01", [136, 140]);
player.addAnimation("blinkarrival-right", "fgplatformer01", [128, 132]);
player.addAnimation("blinkdescend-left", "fgplatformer01", [140]);
player.addAnimation("blinkdescend-right", "fgplatformer01", [132]);
player.addAnimation("attack-left", "fgplatformer01", [175, 175, 176, 176]);
player.addAnimation("attack-right", "fgplatformer01", [173, 173, 174, 174]);
player.addAnimation("attackend-left", "fgplatformer01", [176]);
player.addAnimation("attackend-right", "fgplatformer01", [174]);
player.addAnimation("carrymotion-left", "fgplatformer01", [163, 162, 162]);
player.addAnimation("carrymotion-right", "fgplatformer01", [161, 162, 162]);
player.addAnimation("carrymotionend-left", "fgplatformer01", [162]);
player.addAnimation("carrymotionend-right", "fgplatformer01", [162]);
this.playerFaceSprite = generateFaceIconSprite(Bitmap(player.getChildByName("worldidle01")).bitmapData);
this.playerBigFaceSprite = generateBigFaceMeezSprite(Bitmap(player.getChildByName("worldidle01")).bitmapData);
this.playerChargeLeftSprite = generateChargeLeftSprite(Bitmap(player.getChildByName("fgplatformer01")).bitmapData);
this.playerChargeRightSprite = generateChargeRightSprite(Bitmap(player.getChildByName("fgplatformer01")).bitmapData);
this.numFilmstripSpritesLoaded++;
if (this.numFilmstripSpritesLoaded >= NUM_FILMSTRIP_SPRITES_TO_LOAD1){
avatarLoad2Timer.start();
progressBarComp.setProgress(25, 100);
};
}
public function onPlayerLoaded(_arg1:Object):void{
trace((((("loaded '" + _arg1.name) + "' (avatarId=") + _arg1.avatarId) + ")"));
if (_arg1.attribs["avatar.gender"] == "m"){
trace("GENDER IS MALE");
BlinkDoc(root).AvatarGender_male = true;
} else {
if (_arg1.attribs["avatar.gender"] == "f"){
trace("GENDER IS FEMALE");
BlinkDoc(root).AvatarGender_male = false;
} else {
trace((("GENDER IS UNKNOWN (" + _arg1.attribs["avatar.gender"]) + ")...assume female"));
BlinkDoc(root).AvatarGender_male = false;
};
};
showStatus((("creating " + _arg1.name) + " sprite..."));
player = new AvatarSprite(_arg1, FILMSTRIP_FRAME);
player.setFrameRepeat(2);
showStatus("loading animations...");
sfsl.loadFilmstrips(player, [AnimationDefs.getFilmstrips().IDLE, AnimationDefs.getFilmstrips().HIRESIDLE, AnimationDefs.getFilmstrips().PLATFORMER]);
}
public function whenKeyPressed(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case Keyboard.RIGHT:
case 68:
currLevel.whenKeyPressed_RIGHT();
break;
case Keyboard.DOWN:
case 83:
currLevel.whenKeyPressed_DOWN();
break;
case Keyboard.LEFT:
case 65:
currLevel.whenKeyPressed_LEFT();
break;
case Keyboard.UP:
case 87:
currLevel.whenKeyPressed_UP();
break;
default:
break;
};
}
public function set GamePaused(_arg1:Boolean):void{
this.gamePaused = _arg1;
}
public function invalidPlayer(_arg1, _arg2){
importWindow.invalidUserMessage.gotoAndPlay("show");
}
function frame243(){
stop();
}
function frame132(){
stop();
stage.addEventListener(KeyboardEvent.KEY_DOWN, whenKeyPressed, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, whenKeyReleased, false, 0, true);
MovieClip(root).currScreenTypeNum = BlinkConsts.SCREEN_TYPE_NUM_GAMEPLAY;
currLevel = screen_Level_FireMC;
MovieClip(root).CurrLevelFrameLblStr = "level_fire";
currLevel.initLevel();
}
function frame253(){
stop();
}
public function get GamePaused():Boolean{
return (this.gamePaused);
}
public function generateBigFaceMeezSprite(_arg1:BitmapData):Sprite{
var _local2:BlurFilter;
var _local3:BlurFilter;
var _local4:Sprite;
var _local5:Matrix;
var _local6:Sprite;
var _local7:Sprite;
var _local8:Matrix;
var _local9:Sprite;
_local2 = new BlurFilter();
_local2.blurX = 5;
_local2.blurY = 5;
_local2.quality = BitmapFilterQuality.HIGH;
_local3 = new BlurFilter();
_local3.blurX = 1;
_local3.blurY = 1;
_local3.quality = BitmapFilterQuality.HIGH;
_local4 = new Sprite();
_local5 = new Matrix();
_local5.scale(5, 5);
_local4.graphics.beginBitmapFill(_arg1, _local5);
_local4.graphics.drawRect(300, 100, 320, 640);
_local4.graphics.endFill();
_local4.x = -300;
_local4.y = -100;
_local4.filters = [_local2];
_local6 = new Sprite();
_local6.graphics.beginBitmapFill(_arg1);
_local6.graphics.drawRect(0, 0, 180, 240);
_local6.graphics.endFill();
_local6.x = 0;
_local6.y = 0;
_local7 = new Sprite();
_local8 = new Matrix();
_local8.createGradientBox(250, 20, 0, 0, 0);
_local7.graphics.beginGradientFill(GradientType.LINEAR, [0xFFFFFF, 0], [1, 1], [0, 0xFF], _local8);
_local7.graphics.drawRect(0, 0, 320, 640);
_local7.graphics.endFill();
_local7.blendMode = BlendMode.MULTIPLY;
_local9 = new Sprite();
_local9.addChild(_local4);
_local6.y = 180;
_local9.addChild(_local6);
_local9.addChild(_local7);
_local9.x = 350;
_local9.y = 0;
return (_local9);
}
public function onReleaseGirl(_arg1:MouseEvent){
meezCfg.game_player_id = "baron@local";
gotoAndPlay("beginloadAvatars");
}
public function generateChargeRightSprite(_arg1:BitmapData):Sprite{
var _local2:Sprite;
_local2 = new Sprite();
_local2.graphics.beginBitmapFill(_arg1);
_local2.graphics.drawRect(1350, 840, 90, 120);
_local2.graphics.endFill();
_local2.x = -1350;
_local2.y = -840;
return (_local2);
}
public function set Ending1FirstTime(_arg1:Boolean):void{
this.ending1FirstTime = _arg1;
}
public function get AttemptedHighScoreSubmission():Boolean{
return (this.attemptedHighScoreSubmission);
}
function frame142(){
stop();
stage.addEventListener(KeyboardEvent.KEY_DOWN, whenKeyPressed, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, whenKeyReleased, false, 0, true);
MovieClip(root).currScreenTypeNum = BlinkConsts.SCREEN_TYPE_NUM_GAMEPLAY;
currLevel = screen_Level_ExplosionsMC;
MovieClip(root).CurrLevelFrameLblStr = "level_explosions";
currLevel.initLevel();
}
function frame262(){
stop();
}
function onCompleteHandler(_arg1:Event):void{
trace("LOADING COMPLETE");
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onUpdateLoaded);
this.loaderInfo.addEventListener(Event.COMPLETE, onCompleteHandler);
if (!meezCfg.game_player_id){
gotoAndStop("characterSelector");
} else {
gotoAndPlay("beginloadAvatars");
};
}
public function get Api():Games{
return (this.api);
}
public function validPlayer(_arg1){
trace("valid player");
gotoAndPlay("beginloadAvatars");
}
}
}//package
Section 113
//BlinkLevel (BlinkLevel)
package {
import flash.display.*;
import flash.events.*;
import meez.*;
import flash.utils.*;
public class BlinkLevel extends MovieClip {
var gameplayKR:Blink_KeyboardReceiver_Gameplay;
var prePausedCurrKR:Blink_KeyboardReceiver;
var levelName:String;
var numChancesBonus:uint;
var currMissionObjectiveStr:String;
var levelStarted:Boolean;
var pauseBtnShowing:Boolean;
var pausableMCArr:Array;
var blankKeyboardReceiver:Blink_KeyboardReceiver;
var levelFailed:Boolean;
var missionFailureMsgStr:String;
var rootDoc:BlinkDoc;
var currKR:Blink_KeyboardReceiver;
var civBonus:uint;
var usingLevelCompletionTimer:Boolean;
var gameplayNoAttackKR:Blink_KeyboardReceiver_GameplayNoAttack;
var levelNum:uint;
var numMSecsToCompleteLevel:uint;
var levelGroundY:Number;
var levelCleared:Boolean;
var timeScore:uint;
var difficultyNum:uint;
var lastRecordTime:uint;
public function BlinkLevel(){
rootDoc = BlinkDoc(root);
super();
this.blankKeyboardReceiver = new Blink_KeyboardReceiver();
this.gameplayKR = new Blink_KeyboardReceiver_Gameplay(this);
this.gameplayNoAttackKR = new Blink_KeyboardReceiver_GameplayNoAttack(this);
this.levelStarted = false;
this.levelCleared = false;
this.levelFailed = false;
this.currMissionObjectiveStr = "";
this.pausableMCArr = new Array();
this.levelGroundY = 245;
this.pauseBtnShowing = true;
this.numMSecsToCompleteLevel = 0;
this.usingLevelCompletionTimer = false;
this.missionFailureMsgStr = "";
}
public function whenKeyPressed_DOWN():void{
this.currKR.whenKeyPressed_DOWN();
}
public function canPause():Boolean{
return (((((((((!(rootDoc.GamePaused)) && (this.pauseBtnShowing))) && (this.levelStarted))) && (!(this.levelFailed)))) && (!(this.levelCleared))));
}
public function get PrePausedCurrKR():Blink_KeyboardReceiver{
return (this.prePausedCurrKR);
}
public function get LevelName():String{
return (this.levelName);
}
public function set PrePausedCurrKR(_arg1:Blink_KeyboardReceiver):void{
this.prePausedCurrKR = _arg1;
}
public function set MissionFailureMsgStr(_arg1:String):void{
this.missionFailureMsgStr = _arg1;
}
public function doDifficultyAdjustments(_arg1:uint):void{
}
public function whenMasterCharaHit():void{
}
public function get NumChancesBonus():uint{
return (this.numChancesBonus);
}
public function startLevelCompletionTimer():void{
this.usingLevelCompletionTimer = true;
this.lastRecordTime = getTimer();
}
public function whenNextLevel():void{
}
public function get PausableMCArr():Array{
return (this.pausableMCArr);
}
public function get CurrMissionObjectiveStr():String{
return (this.currMissionObjectiveStr);
}
public function set NumChancesBonus(_arg1:uint):void{
this.numChancesBonus = _arg1;
}
public function initLevel():void{
}
public function set CurrMissionObjectiveStr(_arg1:String):void{
this.currMissionObjectiveStr = _arg1;
}
public function pauseGameToggle():void{
}
public function get LevelStarted():Boolean{
return (this.levelStarted);
}
public function unpauseLevel():void{
var _local1:*;
_local1 = 0;
while (_local1 < this.pausableMCArr.length) {
MovieClip(this.pausableMCArr[_local1]).unpauseMC();
_local1++;
};
this.currKR = this.prePausedCurrKR;
this.currKR.doKeysPressedSweep();
tryStartLevelCompletionTimer();
rootDoc.getSndManager().changeMusicVolume_GameplayTo(1);
rootDoc.GamePaused = false;
}
public function set CurrKR(_arg1:Blink_KeyboardReceiver):void{
this.currKR = _arg1;
}
public function set NumMSecsToCompleteLevel(_arg1:uint):void{
this.numMSecsToCompleteLevel = _arg1;
}
public function whenKeyReleased_RIGHT():void{
this.currKR.whenKeyReleased_RIGHT();
}
public function set CivBonus(_arg1:uint):void{
this.civBonus = _arg1;
}
public function onMusicToggleOff():void{
MovieClip(root).getSndManager().stopMusic_GameplayMus();
}
public function tryStartLevelCompletionTimer():void{
if (this.usingLevelCompletionTimer){
startLevelCompletionTimer();
};
}
public function determineTimeScore():uint{
return (0);
}
public function api_postGameScore_CHECKPOINT(_arg1:int, _arg2):void{
var _local3:*;
_local3 = Games.O2S({l:this.levelNum, t:_arg1});
rootDoc.Api.postGameScore(_arg2, rootDoc.Score, _local3, Games.Event.CHECKPOINT);
}
public function get LevelFailed():Boolean{
return (this.levelFailed);
}
public function whenKeyPressed_UP():void{
this.currKR.whenKeyPressed_UP();
}
public function whenKeyPressed_RIGHT():void{
this.currKR.whenKeyPressed_RIGHT();
}
public function whenKeyReleased_UP():void{
this.currKR.whenKeyReleased_UP();
}
public function set LevelStarted(_arg1:Boolean):void{
this.levelStarted = _arg1;
}
public function whenKeyReleased_LEFT():void{
this.currKR.whenKeyReleased_LEFT();
}
public function exitLevel():void{
}
public function canUnpause():Boolean{
return (((((((rootDoc.GamePaused) && (this.levelStarted))) && (!(this.levelFailed)))) && (!(this.levelCleared))));
}
public function get MissionFailureMsgStr():String{
return (this.missionFailureMsgStr);
}
public function whenMainCharaHit():void{
}
public function levelStateToGameplay():void{
}
public function api_postScore_CHECKPOINT(_arg1:int):void{
var _local2:*;
_local2 = Games.O2S({l:this.levelNum, t:_arg1});
rootDoc.Api.postScore(rootDoc.Score, _local2, Games.Event.CHECKPOINT);
}
public function takeAwayAChance(_arg1:String=null):void{
MovieClip(root).NumChances--;
if (MovieClip(root).NumChances <= 0){
onLevelFailed(_arg1);
};
}
public function onLevelCleared():void{
}
public function pauseLevel():void{
var _local1:*;
MovieClip(root).GamePaused = true;
stopLevelCompletionTimer();
this.prePausedCurrKR = this.currKR;
this.currKR = this.blankKeyboardReceiver;
this.prePausedCurrKR.forceAllKeysReleased();
_local1 = 0;
while (_local1 < this.pausableMCArr.length) {
MovieClip(this.pausableMCArr[_local1]).pauseMC();
_local1++;
};
if (!this.levelCleared){
rootDoc.getSndManager().changeMusicVolume_GameplayTo(0.5);
};
}
public function get CurrKR():Blink_KeyboardReceiver{
return (this.currKR);
}
public function get NumMSecsToCompleteLevel():uint{
return (this.numMSecsToCompleteLevel);
}
public function get CivBonus():uint{
return (this.civBonus);
}
public function set LevelCleared(_arg1:Boolean):void{
this.levelCleared = _arg1;
}
public function levelStateToModalStoryDialogue():void{
}
public function set DifficultyNum(_arg1:uint):void{
this.difficultyNum = _arg1;
}
public function whenKeyPressed_LEFT():void{
this.currKR.whenKeyPressed_LEFT();
}
public function set TimeScore(_arg1:uint):void{
this.timeScore = _arg1;
}
public function get LevelNum():uint{
return (this.levelNum);
}
public function set LevelFailed(_arg1:Boolean):void{
this.levelFailed = _arg1;
}
public function onLevelFailed(_arg1:String=null):void{
exitLevel();
MovieClip(root).gotoAndStop("levelfailed");
}
public function whenKeyReleased_DOWN():void{
this.currKR.whenKeyReleased_DOWN();
}
public function tick(_arg1:TimerEvent):void{
this.numMSecsToCompleteLevel = (this.numMSecsToCompleteLevel + 500);
}
public function get LevelCleared():Boolean{
return (this.levelCleared);
}
public function get TimeScore():uint{
return (this.timeScore);
}
public function get DifficultyNum():uint{
return (this.difficultyNum);
}
public function onLevelStartMissionObjClosed():void{
}
public function get LevelGroundY():Number{
return (this.levelGroundY);
}
public function stopLevelCompletionTimer():void{
if (this.usingLevelCompletionTimer){
this.numMSecsToCompleteLevel = (this.numMSecsToCompleteLevel + (getTimer() - this.lastRecordTime));
};
}
public function api_postScore_GAMEOVER(_arg1:int):void{
var _local2:*;
_local2 = Games.O2S({l:this.levelNum, t:_arg1});
rootDoc.Api.postScore(rootDoc.Score, _local2, Games.Event.GAMEOVER);
}
public function api_postGameScore_GAMEOVER(_arg1:int, _arg2:String):void{
var _local3:*;
_local3 = Games.O2S({l:this.levelNum, t:_arg1});
rootDoc.Api.postGameScore(_arg2, rootDoc.Score, _local3, Games.Event.GAMEOVER);
}
public function onMusicToggleOn():void{
if (this.levelStarted){
MovieClip(root).getSndManager().playMusic_GameplayMus(false);
};
}
}
}//package
Section 114
//BlinkLevel_EveryoneFalling (BlinkLevel_EveryoneFalling)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
public class BlinkLevel_EveryoneFalling extends BlinkLevel {
const DEF_GOAL_NUM_CIVILIANS:uint = 20;
const TOTAL_NUM_BARRELS:uint = 120;
const LEVEL_MAX_TIME:uint = 120000;
public var destinationIconAnimMC2:MovieClip;
var civLaunchTimer2:Timer;
public var destinationIconAnimMC1:MovieClip;
var civLaunchTimer1:Timer;
var civLaunchTimer3:Timer;
public var hitAreaMC:MovieClip;
public var testBtn:SimpleButton;
public var pauseBtn:SimpleButton;
var civDropTimer:Timer;
public var mainCharaMC:MovieClip;
public var zoomMC:MovieClip;
var civLaunchableArr:Array;
var initNumCiviliansLeft:uint;
public var civilianMC1:Civilian;
public var civilianMC2:Civilian;
public var civilianMC3:Civilian;
public var screen_PauseMC:MovieClip;
public var civiliansLeftTxt:TextField;
public var blinkFacingLeft:Boolean;
public var civilianMC4:Civilian;
public var play4AllLogoGrphcMC:MovieClip;
public var blink_masterFacingLeft:Boolean;
var civSpawnedArr:Array;
var numCiviliansLeft:uint;
public var dialogueBoxMC:MovieClip;
public var mirageAnimMC:MovieClip;
var usingCLTimer1:Boolean;
var usingCLTimer2:Boolean;
var usingCLTimer3:Boolean;
public var hUD_MC:MovieClip;
public var numHits:uint;
public function BlinkLevel_EveryoneFalling(){
addFrameScript(0, frame1, 1, frame2);
super();
this.levelName = BlinkConsts.LEVEL5_NAME;
this.levelNum = 5;
this.levelGroundY = 600;
this.currMissionObjectiveStr = ((("Carry all civilians safely to the destination icon." + "\n\nDon’t stop Blinking or else you’ll fall to the bottom.") + " Everyone is falling.") + "\n\nTIP: There is NO GROUND on this level, so BLINK TO PREVENT FALLING.");
this.currKR = this.blankKeyboardReceiver;
this.prePausedCurrKR = this.gameplayKR;
this.civSpawnedArr = new Array();
this.civLaunchableArr = new Array();
}
public function whenCivFound(_arg1:Civilian):void{
var civ = _arg1;
civ.setEnterFrameFunc(function (){
});
civ.doExitAnimation(function (){
civLaunchableArr.push(civ);
doUpdateFoundCivs();
});
}
override public function doDifficultyAdjustments(_arg1:uint):void{
if (_arg1 == BlinkConsts.DIFFICULTY_NUM_EASY){
this.initNumCiviliansLeft = 10;
this.numCiviliansLeft = 10;
} else {
if (_arg1 == BlinkConsts.DIFFICULTY_NUM_NORMAL){
this.initNumCiviliansLeft = DEF_GOAL_NUM_CIVILIANS;
this.numCiviliansLeft = DEF_GOAL_NUM_CIVILIANS;
} else {
this.initNumCiviliansLeft = 30;
this.numCiviliansLeft = 30;
};
};
civiliansLeftTxt.text = String(this.numCiviliansLeft);
}
override public function whenNextLevel():void{
exitLevel();
if (MovieClip(root).PlayingThroughLevels){
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("level_notboth");
});
} else {
MovieClip(root).screenMCOverlayMC.fadeFromBlack();
MovieClip(root).gotoAndStop("levelselect");
};
}
private function disableTeleport():void{
hitAreaMC.removeEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp);
}
override public function initLevel():void{
trace(((this.levelName + ": ") + rootDoc.CurrDifficultyNum));
this.pausableMCArr.push(mainCharaMC);
this.pausableMCArr.push(dialogueBoxMC);
this.pausableMCArr.push(hUD_MC);
this.pausableMCArr.push(civilianMC1);
this.pausableMCArr.push(civilianMC2);
this.pausableMCArr.push(civilianMC3);
this.pausableMCArr.push(civilianMC4);
hUD_MC.initTimer(LEVEL_MAX_TIME, onTimeUp);
hUD_MC.setVisibleTimer(true);
hUD_MC.visible = true;
civilianMC1.DefGravDec = Civilian.SLOW_GRAV_DEC;
civilianMC2.DefGravDec = Civilian.SLOW_GRAV_DEC;
civilianMC3.DefGravDec = Civilian.SLOW_GRAV_DEC;
civilianMC4.DefGravDec = Civilian.SLOW_GRAV_DEC;
this.civLaunchableArr.push(civilianMC1);
this.civLaunchableArr.push(civilianMC2);
this.civLaunchableArr.push(civilianMC3);
this.civLaunchableArr.push(civilianMC4);
mainCharaMC.prePauseEnterFrame_xyUpdate = enterFrame_xyUpdate_NoGround;
mainCharaMC.currEnterFrame_xyUpdate = function (){
};
mainCharaMC.addEventListener(Event.ENTER_FRAME, mainCharaMC.enterFrame_xyUpdate, false, 0, true);
dialogueBoxMC.visible = false;
this.civDropTimer = new Timer(1000, 1);
this.civDropTimer.addEventListener("timer", tryDropNewCiv, false, 0, true);
this.usingCLTimer1 = (this.usingCLTimer2 = (this.usingCLTimer3 = false));
this.timeScore = (this.numChancesBonus = 0);
this.civBonus = 5000;
this.levelCleared = (this.levelFailed = false);
rootDoc.tryUpdateLevelsUnlockedNum(5);
doDifficultyAdjustments(rootDoc.CurrDifficultyNum);
screen_PauseMC.addEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy, false, 0, true);
}
public function endAllLevelTriggers():void{
mainCharaMC.removeAllEventListeners();
mainCharaMC.showAsNormal();
civilianMC1.stopExisting();
civilianMC2.stopExisting();
civilianMC3.stopExisting();
civilianMC4.stopExisting();
hUD_MC.removeAllEventListeners();
}
function frame1(){
pauseBtn.addEventListener(MouseEvent.MOUSE_UP, pauseGame_MOUSE, false, 0, true);
testBtn.addEventListener(MouseEvent.MOUSE_UP, testFunc_MOUSE, false, 0, true);
}
function frame2(){
stop();
}
override public function pauseGameToggle():void{
if (rootDoc.GamePaused){
if (canUnpause()){
screen_PauseMC.resumeGame();
};
} else {
if (canPause()){
pauseLevel();
};
};
}
override public function unpauseLevel():void{
var arrLen:uint;
var currCiv:Civilian;
var i:*;
super.unpauseLevel();
mainCharaMC.currKR = this.currKR;
arrLen = this.civSpawnedArr.length;
i = 0;
while (i < arrLen) {
currCiv = this.civSpawnedArr.pop();
currCiv.spawnAt(currCiv.x, currCiv.y, function (){
civEnterFrame_xyUpdate_NoGround(currCiv);
});
i = (i + 1);
};
pauseBtn.visible = this.pauseBtnShowing;
}
public function pauseGame_MOUSE(_arg1:MouseEvent):void{
pauseGame();
}
override public function determineTimeScore():uint{
var _local1:uint;
var _local2:uint;
_local1 = (this.initNumCiviliansLeft * 2000);
_local2 = LEVEL_MAX_TIME;
if (this.numMSecsToCompleteLevel <= _local1){
return (10000);
};
if (this.numMSecsToCompleteLevel <= _local2){
return ((((_local2 - (this.numMSecsToCompleteLevel - _local1)) / _local2) * 10000));
};
return (0);
}
public function showMissionObjectiveWhenPauseScreenRdy(_arg1:Event):void{
screen_PauseMC.removeEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy);
if (mainCharaMC.playerAvSprite != null){
mainCharaMC.playerAvSprite.playAnimation("chargecrouch-right");
};
screen_PauseMC.showMissionObjective();
}
public function canDropNewCiv():Boolean{
return (true);
}
public function civEnterFrame_xyUpdate_NoGround(_arg1:Civilian):void{
var civ = _arg1;
civ.defEnterFrameFunc_NoXYUpdate();
civ.YVel = (civ.YVel + civ.DefGravDec);
civ.y = (civ.y + civ.YVel);
if (civ.y > 400){
civ.setEnterFrameFunc(function (){
});
onLevelFailed((("Civilian Fell\n" + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
};
}
override public function whenMainCharaHit():void{
mainCharaMC.startShowAsDamaged();
takeAwayAChance((Math.max(0, this.numCiviliansLeft) + " civilians left"));
}
override public function exitLevel():void{
endAllLevelTriggers();
}
public function pauseGame():void{
pauseLevel();
}
private function disableGameplayKeyboardControls():void{
this.currKR = this.blankKeyboardReceiver;
mainCharaMC.currKR = this.currKR;
}
override public function onLevelCleared():void{
if (((!(this.levelCleared)) && (!(this.levelFailed)))){
this.levelCleared = true;
} else {
trace("recalling onLevelCleared()");
return;
};
super.pauseLevel();
endAllLevelTriggers();
mainCharaMC.currKR = this.blankKeyboardReceiver;
pauseBtn.visible = false;
hUD_MC.visible = false;
this.timeScore = determineTimeScore();
this.numChancesBonus = ((rootDoc.NumMissionFailures)==0) ? 5000 : 0;
rootDoc.Score = (rootDoc.Score + ((this.timeScore + this.numChancesBonus) + this.civBonus));
if (rootDoc.PlayingThroughLevels){
api_postGameScore_CHECKPOINT(this.numMSecsToCompleteLevel, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(this.numMSecsToCompleteLevel, "SingleLevels");
};
screen_PauseMC.showNextLevel();
}
override public function takeAwayAChance(_arg1:String=null):void{
super.takeAwayAChance(_arg1);
hUD_MC.updateNumChancesDisplay(MovieClip(root).NumChances);
}
private function onTimeUp():void{
onLevelFailed((((BlinkConsts.FAIL_MSG_TIME_UP + "\n") + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
}
override public function pauseLevel():void{
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
pauseBtn.visible = false;
screen_PauseMC.showPauseMenu();
}
public function tryTeleportTo(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
MovieClip(root).getSndManager().playSFX_Zoom();
mirageAnimMC.x = mainCharaMC.x;
mirageAnimMC.y = mainCharaMC.y;
if (_arg1 < 25){
_local3 = 25;
} else {
if (_arg1 > 495){
_local3 = 495;
} else {
_local3 = _arg1;
};
};
_local4 = _arg2;
if ((_local3 - mainCharaMC.x) <= 0){
this.blinkFacingLeft = true;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_LEFT);
mirageAnimMC.doFade_Left();
zoomMC.doZoomLeft(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
} else {
this.blinkFacingLeft = false;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_RIGHT);
mirageAnimMC.doFade_Right();
zoomMC.doZoomRight(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
};
mainCharaMC.visible = false;
mainCharaMC.setFrozen(true);
mainCharaMC.x = (_local3 - 45);
mainCharaMC.y = (_local4 - 60);
mainCharaMC.yVel = 0;
}
public function tryDropNewCiv(_arg1:TimerEvent):void{
if (canDropNewCiv()){
};
}
public function whenZoomFinish():void{
mainCharaMC.visible = true;
if (this.blinkFacingLeft){
mainCharaMC.animateLeftBlinkArrival();
} else {
mainCharaMC.animateRightBlinkArrival();
};
mainCharaMC.setFrozen(false);
}
public function hitAreaMouseUp(_arg1:MouseEvent):void{
tryTeleportTo(mouseX, mouseY);
}
public function prepareCivLaunch():void{
if (!this.usingCLTimer1){
this.usingCLTimer1 = true;
this.civLaunchTimer1 = new Timer(Math.round((Math.random() * 1000)), 1);
this.civLaunchTimer1.addEventListener("timer", launchCiv1, false, 0, true);
this.civLaunchTimer1.start();
} else {
if (!this.usingCLTimer2){
this.usingCLTimer2 = true;
this.civLaunchTimer2 = new Timer(Math.round((Math.random() * 1000)), 1);
this.civLaunchTimer2.addEventListener("timer", launchCiv2, false, 0, true);
this.civLaunchTimer2.start();
} else {
if (!this.usingCLTimer3){
this.usingCLTimer3 = true;
this.civLaunchTimer3 = new Timer(Math.round((Math.random() * 1000)), 1);
this.civLaunchTimer3.addEventListener("timer", launchCiv3, false, 0, true);
this.civLaunchTimer3.start();
} else {
trace("--in BlinkLevel_EveryoneFalling.prepareCivLaunch() all timers being used!?");
};
};
};
}
public function doUpdateFoundCivs():void{
this.numCiviliansLeft--;
civiliansLeftTxt.text = String(Math.max(0, this.numCiviliansLeft));
if (this.numCiviliansLeft <= 0){
if (rootDoc.NumChances <= 0){
onLevelFailed("You can do this, try again.");
return;
};
onLevelCleared();
return;
};
if (rootDoc.CurrDifficultyNum == BlinkConsts.DIFFICULTY_NUM_NORMAL){
if (this.numCiviliansLeft == 15){
prepareCivLaunch();
};
prepareCivLaunch();
} else {
if (rootDoc.CurrDifficultyNum == BlinkConsts.DIFFICULTY_NUM_HARD){
if (this.numCiviliansLeft == 25){
prepareCivLaunch();
} else {
if (this.numCiviliansLeft == 15){
prepareCivLaunch();
};
};
prepareCivLaunch();
} else {
prepareCivLaunch();
};
};
}
public function dropNewCivAt(_arg1:Civilian, _arg2:Number, _arg3:Number):void{
var civ = _arg1;
var xPos = _arg2;
var yPos = _arg3;
civ.initCivilian(mainCharaMC, Civilian.ANIM_NUM_FALLING, false, true, [destinationIconAnimMC1, destinationIconAnimMC2], function (){
}, function (){
whenCivFound(civ);
}, function (){
civ.startShowAsDamaged();
onCivilianAttacked();
}, function (){
}, function (){
});
civ.Falling = true;
civ.switchToAnim(Civilian.ANIM_NUM_FALLING);
civ.LatestDropHeight = (this.levelGroundY - yPos);
civ.YVel = 0;
civ.DefGravDec = Civilian.SLOW_GRAV_DEC;
civ.CurrPickedUpFunc = function (){
civ.DefGravDec = Civilian.DEF_GRAV_DEC;
};
if (rootDoc.GamePaused){
civ.x = xPos;
civ.y = yPos;
this.civSpawnedArr.push(civ);
} else {
if (((this.levelCleared) || (this.levelFailed))){
civ.stopExisting();
} else {
civ.spawnAt(xPos, yPos, function (){
civEnterFrame_xyUpdate_NoGround(civ);
});
civ.updateCivilianStatusDisplay();
};
};
}
public function testFunc_MOUSE(_arg1:MouseEvent):void{
mainCharaMC.tryAnimateCarryMotion();
}
private function onCivilianAttacked():void{
this.civBonus = 0;
takeAwayAChance((((BlinkConsts.FAIL_MSG_ATTACK_CIV + "\n") + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
}
override public function onLevelFailed(_arg1:String=null):void{
if (((!(this.levelFailed)) && (!(this.levelCleared)))){
this.levelFailed = true;
} else {
trace("recalling onLevelFailed()");
return;
};
endAllLevelTriggers();
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
rootDoc.NumChances = 3;
rootDoc.NumMissionFailures++;
pauseBtn.visible = false;
hUD_MC.visible = false;
if (rootDoc.PlayingThroughLevels){
api_postGameScore_GAMEOVER(-1, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(-1, "SingleLevels");
};
screen_PauseMC.showMissionFailed(_arg1);
}
override public function onLevelStartMissionObjClosed():void{
var _local1:Number;
MovieClip(root).getSndManager().tryPlayMusic_GameplayMus(true);
_local1 = (80 + Math.round((Math.random() * 300)));
dropNewCivAt(this.civLaunchableArr.shift(), _local1, -100);
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_RIGHT);
mainCharaMC.playerAvSprite.playAnimation("chargecrouch-right");
mainCharaMC.aerial = true;
enableTeleport();
startLevelCompletionTimer();
screen_PauseMC.resumeGame();
}
public function launchCiv3(_arg1:TimerEvent):void{
var _local2:Number;
this.civLaunchTimer3.removeEventListener("timer", launchCiv3);
if (this.civLaunchableArr.length == 0){
trace("in BlinkLevel_EveryoneFalling.launchCiv3(), launchable array is empty");
return;
};
_local2 = (80 + Math.round((Math.random() * 300)));
dropNewCivAt(this.civLaunchableArr.shift(), _local2, -100);
this.usingCLTimer3 = false;
}
public function launchCiv1(_arg1:TimerEvent):void{
var _local2:Number;
this.civLaunchTimer1.removeEventListener("timer", launchCiv1);
if (this.civLaunchableArr.length == 0){
trace("in BlinkLevel_EveryoneFalling.launchCiv1(), launchable array is empty");
return;
};
_local2 = (80 + Math.round((Math.random() * 300)));
dropNewCivAt(this.civLaunchableArr.shift(), _local2, -100);
this.usingCLTimer1 = false;
}
public function launchCiv2(_arg1:TimerEvent):void{
var _local2:Number;
this.civLaunchTimer2.removeEventListener("timer", launchCiv2);
if (this.civLaunchableArr.length == 0){
trace("in BlinkLevel_EveryoneFalling.launchCiv2(), launchable array is empty");
return;
};
_local2 = (80 + Math.round((Math.random() * 300)));
dropNewCivAt(this.civLaunchableArr.shift(), _local2, -100);
this.usingCLTimer2 = false;
}
private function enableTeleport():void{
hitAreaMC.addEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp, false, 0, true);
}
public function enterFrame_xyUpdate_NoGround():void{
if (mainCharaMC.frozen){
return;
};
if (mainCharaMC.currKR.KeyPressed_RIGHT){
if (mainCharaMC.currKR.KeyPressed_LEFT){
mainCharaMC.xVel = 0;
} else {
if ((((((mainCharaMC.currState == mainCharaMC.CHAR_STATE_ATTACK_LEFT)) || ((mainCharaMC.currState == mainCharaMC.CHAR_STATE_ATTACK_RIGHT)))) || ((mainCharaMC.currState == mainCharaMC.CHAR_STATE_CARRY_MOTION)))){
mainCharaMC.xVel = mainCharaMC.DEF_ATTACKING_WALK_SPD;
} else {
mainCharaMC.xVel = mainCharaMC.DEF_WALK_SPD;
};
};
} else {
if (mainCharaMC.currKR.KeyPressed_LEFT){
if ((((((mainCharaMC.currState == mainCharaMC.CHAR_STATE_ATTACK_LEFT)) || ((mainCharaMC.currState == mainCharaMC.CHAR_STATE_ATTACK_RIGHT)))) || ((mainCharaMC.currState == mainCharaMC.CHAR_STATE_CARRY_MOTION)))){
mainCharaMC.xVel = -(mainCharaMC.DEF_ATTACKING_WALK_SPD);
} else {
mainCharaMC.xVel = -(mainCharaMC.DEF_WALK_SPD);
};
} else {
mainCharaMC.xVel = 0;
};
};
if ((mainCharaMC.x + mainCharaMC.xVel) > 450){
mainCharaMC.x = 450;
} else {
if ((mainCharaMC.x + mainCharaMC.xVel) < -20){
mainCharaMC.x = -20;
} else {
mainCharaMC.x = (mainCharaMC.x + mainCharaMC.xVel);
};
};
if ((((((mainCharaMC.currState == mainCharaMC.CHAR_STATE_ATTACK_LEFT)) || ((mainCharaMC.currState == mainCharaMC.CHAR_STATE_ATTACK_RIGHT)))) || ((mainCharaMC.currState == mainCharaMC.CHAR_STATE_CARRY_MOTION)))){
mainCharaMC.yVel = (mainCharaMC.yVel + mainCharaMC.DEF_ATTACKING_GRAV_DEC);
} else {
mainCharaMC.yVel = (mainCharaMC.yVel + mainCharaMC.DEF_GRAV_DEC);
};
if (mainCharaMC.y > 400){
if (MovieClip(root).NumChances > 1){
tryTeleportTo(275, 50);
mainCharaMC.startShowAsDamaged();
};
takeAwayAChance((((("On this mission, you are high up in the air," + "so don't let yourself fall too far.") + "\n") + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
};
mainCharaMC.y = (mainCharaMC.y + mainCharaMC.yVel);
}
}
}//package
Section 115
//BlinkLevel_Explosions (BlinkLevel_Explosions)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.utils.*;
public class BlinkLevel_Explosions extends BlinkLevel {
const DEF_GOAL_NUM_CIVILIANS:uint = 20;
const TOTAL_NUM_BARRELS:uint = 120;
const LEVEL_MAX_TIME:uint = 120000;
var barrelsSpawnedArr:Array;
var numBarrelsPendingLaunch:uint;
var numBarrelsGone:uint;
public var hitAreaMC:MovieClip;
public var testBtn:SimpleButton;
public var pauseBtn:SimpleButton;
public var mainCharaMC:MovieClip;
public var zoomMC:MovieClip;
var initNumCiviliansLeft:uint;
var barrelsLaunchingArr:Array;
public var civilianMC1:Civilian;
public var civilianMC2:Civilian;
public var civilianMC3:Civilian;
var usingBLTimer3:Boolean;
public var screen_PauseMC:MovieClip;
var usingBLTimer1:Boolean;
var civArr:Array;
public var civiliansLeftTxt:TextField;
public var blinkFacingLeft:Boolean;
public var civilianMC4:Civilian;
public var play4AllLogoGrphcMC:MovieClip;
public var explosiveBarrelMC1:MovieClip;
public var explosiveBarrelMC3:MovieClip;
public var blink_masterFacingLeft:Boolean;
public var explosiveBarrelMC2:MovieClip;
public var explosiveBarrelMC4:MovieClip;
var numCiviliansLeft:uint;
public var dialogueBoxMC:MovieClip;
public var mirageAnimMC:MovieClip;
var usingBLTimer2:Boolean;
public var hUD_MC:MovieClip;
var barrelLaunchTimer1:Timer;
public var numHits:uint;
var barrelLaunchTimer2:Timer;
var barrelLaunchTimer3:Timer;
public function BlinkLevel_Explosions(){
addFrameScript(0, frame1, 1, frame2);
super();
this.levelName = BlinkConsts.LEVEL3_NAME;
this.levelNum = 3;
this.currKR = this.blankKeyboardReceiver;
this.prePausedCurrKR = this.gameplayKR;
this.civArr = new Array();
this.barrelsSpawnedArr = new Array();
this.barrelsLaunchingArr = new Array();
}
public function launchBarrel1(_arg1:TimerEvent):void{
respawnBarrelAt(barrelsLaunchingArr.shift(), Math.round((Math.random() * 500)), -96);
this.barrelLaunchTimer1.removeEventListener("timer", launchBarrel1);
this.usingBLTimer1 = false;
}
override public function doDifficultyAdjustments(_arg1:uint):void{
if (_arg1 == BlinkConsts.DIFFICULTY_NUM_EASY){
this.initNumCiviliansLeft = 10;
this.numCiviliansLeft = 10;
explosiveBarrelMC1.currFallRate = (explosiveBarrelMC2.currFallRate = explosiveBarrelMC1.FALL_RATE_EASY);
explosiveBarrelMC3.currFallRate = (explosiveBarrelMC4.currFallRate = explosiveBarrelMC1.FALL_RATE_EASY);
} else {
if (_arg1 == BlinkConsts.DIFFICULTY_NUM_NORMAL){
this.initNumCiviliansLeft = DEF_GOAL_NUM_CIVILIANS;
this.numCiviliansLeft = DEF_GOAL_NUM_CIVILIANS;
explosiveBarrelMC1.currFallRate = (explosiveBarrelMC2.currFallRate = explosiveBarrelMC1.FALL_RATE_NORMAL);
explosiveBarrelMC3.currFallRate = (explosiveBarrelMC4.currFallRate = explosiveBarrelMC1.FALL_RATE_NORMAL);
} else {
this.initNumCiviliansLeft = 30;
this.numCiviliansLeft = 30;
explosiveBarrelMC1.currFallRate = (explosiveBarrelMC2.currFallRate = explosiveBarrelMC1.FALL_RATE_HARD);
explosiveBarrelMC3.currFallRate = (explosiveBarrelMC4.currFallRate = explosiveBarrelMC1.FALL_RATE_HARD);
};
};
this.currMissionObjectiveStr = (((((("Help " + this.initNumCiviliansLeft) + " civilians get to the left side.") + "\n\nBarrels will explode when they hit the ground.") + " Attack barrels in the air to destroy them.") + " Be careful because the explosion can hurt you and the civilians.") + "\n\nTIP: Hitting barrels instead of letting them explode may cause more barrels to come.");
civiliansLeftTxt.text = String(this.numCiviliansLeft);
}
public function launchBarrel3(_arg1:TimerEvent):void{
respawnBarrelAt(barrelsLaunchingArr.shift(), Math.round((Math.random() * 500)), -96);
this.barrelLaunchTimer3.removeEventListener("timer", launchBarrel3);
this.usingBLTimer3 = false;
}
override public function whenNextLevel():void{
exitLevel();
if (MovieClip(root).PlayingThroughLevels){
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("level_peoplefalling");
});
} else {
MovieClip(root).screenMCOverlayMC.fadeFromBlack();
MovieClip(root).gotoAndStop("levelselect");
};
}
public function launchBarrel2(_arg1:TimerEvent):void{
respawnBarrelAt(barrelsLaunchingArr.shift(), Math.round((Math.random() * 500)), -96);
this.barrelLaunchTimer2.removeEventListener("timer", launchBarrel2);
this.usingBLTimer2 = false;
}
public function whenCivReachesScreenLeft(_arg1:Civilian):void{
this.numCiviliansLeft--;
civiliansLeftTxt.text = String(Math.max(0, this.numCiviliansLeft));
if (this.numCiviliansLeft <= 0){
if (rootDoc.NumChances <= 0){
onLevelFailed("You almost got it, try just 1 more time.");
} else {
onLevelCleared();
};
} else {
_arg1.x = (550 + Math.round((Math.random() * 200)));
};
}
private function disableTeleport():void{
hitAreaMC.removeEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp);
}
override public function initLevel():void{
trace(((this.levelName + ": ") + rootDoc.CurrDifficultyNum));
this.pausableMCArr.push(mainCharaMC);
this.pausableMCArr.push(dialogueBoxMC);
this.pausableMCArr.push(hUD_MC);
this.pausableMCArr.push(civilianMC1);
this.pausableMCArr.push(civilianMC2);
this.pausableMCArr.push(civilianMC3);
this.pausableMCArr.push(explosiveBarrelMC1);
this.pausableMCArr.push(explosiveBarrelMC2);
this.pausableMCArr.push(explosiveBarrelMC3);
this.pausableMCArr.push(explosiveBarrelMC4);
hUD_MC.initTimer(LEVEL_MAX_TIME, onTimeUp);
hUD_MC.setVisibleTimer(true);
hUD_MC.visible = true;
civilianMC1.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, false, false, [], function (){
}, function (){
}, function (){
civilianMC1.startShowAsDamaged();
onCivilianAttacked();
}, function (){
}, function (){
civilianMC1.startShowAsDamaged();
this.parent.civBonus = 0;
takeAwayAChance((((BlinkConsts.FAIL_MSG_DDROP_CIV + "\n") + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
});
civilianMC2.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, false, false, [], function (){
}, function (){
}, function (){
civilianMC2.startShowAsDamaged();
onCivilianAttacked();
}, function (){
}, function (){
civilianMC2.startShowAsDamaged();
this.parent.civBonus = 0;
takeAwayAChance((((BlinkConsts.FAIL_MSG_DDROP_CIV + "\n") + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
});
civilianMC3.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, false, false, [], function (){
}, function (){
}, function (){
civilianMC3.startShowAsDamaged();
onCivilianAttacked();
}, function (){
}, function (){
civilianMC3.startShowAsDamaged();
this.parent.civBonus = 0;
takeAwayAChance((((BlinkConsts.FAIL_MSG_DDROP_CIV + "\n") + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
});
this.civArr.push(civilianMC1);
this.civArr.push(civilianMC2);
this.civArr.push(civilianMC3);
mainCharaMC.prePauseEnterFrame_xyUpdate = mainCharaMC.defEnterFrame_xyUpdate;
mainCharaMC.currEnterFrame_xyUpdate = function (){
};
mainCharaMC.addEventListener(Event.ENTER_FRAME, mainCharaMC.enterFrame_xyUpdate, false, 0, true);
dialogueBoxMC.visible = false;
this.numBarrelsGone = 0;
this.numBarrelsPendingLaunch = 0;
this.usingBLTimer1 = (this.usingBLTimer2 = (this.usingBLTimer3 = false));
this.timeScore = (this.numChancesBonus = 0);
this.civBonus = 5000;
this.levelCleared = (this.levelFailed = false);
rootDoc.tryUpdateLevelsUnlockedNum(3);
doDifficultyAdjustments(rootDoc.CurrDifficultyNum);
screen_PauseMC.addEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy, false, 0, true);
}
public function doScreenRunLeft(_arg1:Civilian):void{
_arg1.endPanicRunLeftAndRightEFF();
_arg1.passedInEnterFrameFunc = _arg1.runToScreenLeftEnterFrameFunc;
_arg1.prePauseEnterFrameFunc = _arg1.runToScreenLeftEnterFrameFunc;
_arg1.switchToAnim(Civilian.ANIM_NUM_RUN_LEFT, Civilian.ANIM_NUM_RUN_LEFT);
if (((!(MovieClip(root).GamePaused)) && (!(_arg1.Carried)))){
_arg1.currEnterFrameFunc = _arg1.runToScreenLeftEnterFrameFunc;
};
_arg1.x = _arg1.DroppedX;
}
function frame2(){
stop();
}
override public function pauseGameToggle():void{
if (rootDoc.GamePaused){
if (canUnpause()){
screen_PauseMC.resumeGame();
};
} else {
if (canPause()){
pauseLevel();
};
};
}
public function endAllLevelTriggers():void{
mainCharaMC.removeAllEventListeners();
mainCharaMC.showAsNormal();
civilianMC1.stopExisting();
civilianMC2.stopExisting();
civilianMC3.stopExisting();
explosiveBarrelMC1.stopExisting();
explosiveBarrelMC2.stopExisting();
explosiveBarrelMC3.stopExisting();
explosiveBarrelMC4.stopExisting();
hUD_MC.removeAllEventListeners();
}
override public function unpauseLevel():void{
var _local1:uint;
var _local2:MovieClip;
var _local3:*;
super.unpauseLevel();
mainCharaMC.currKR = this.currKR;
_local1 = this.barrelsSpawnedArr.length;
_local3 = 0;
while (_local3 < _local1) {
_local2 = MovieClip(this.barrelsSpawnedArr.pop());
_local2.spawnAt(_local2.x, _local2.y);
_local3++;
};
pauseBtn.visible = this.pauseBtnShowing;
}
function frame1(){
pauseBtn.addEventListener(MouseEvent.MOUSE_UP, pauseGame_MOUSE, false, 0, true);
testBtn.addEventListener(MouseEvent.MOUSE_UP, testFunc_MOUSE, false, 0, true);
}
public function pauseGame_MOUSE(_arg1:MouseEvent):void{
pauseGame();
}
override public function determineTimeScore():uint{
var _local1:uint;
var _local2:uint;
_local1 = (this.initNumCiviliansLeft * 2000);
_local2 = LEVEL_MAX_TIME;
if (this.numMSecsToCompleteLevel <= _local1){
return (10000);
};
if (this.numMSecsToCompleteLevel <= _local2){
return ((((_local2 - (this.numMSecsToCompleteLevel - _local1)) / _local2) * 10000));
};
return (0);
}
public function showMissionObjectiveWhenPauseScreenRdy(_arg1:Event):void{
screen_PauseMC.removeEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy);
screen_PauseMC.showMissionObjective();
}
public function civEFF(_arg1:Civilian):void{
_arg1.defEnterFrameFunc();
if (_arg1.y == this.levelGroundY){
if (_arg1.x > -90){
_arg1.x = (_arg1.x - Civilian.DEF_RUN_SPD);
} else {
whenCivReachesScreenLeft(_arg1);
};
};
}
override public function whenMainCharaHit():void{
mainCharaMC.startShowAsDamaged();
takeAwayAChance(((("Stay away from the explosions." + "\n") + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
}
override public function exitLevel():void{
endAllLevelTriggers();
}
public function pauseGame():void{
pauseLevel();
}
override public function onLevelCleared():void{
if (((!(this.levelCleared)) && (!(this.levelFailed)))){
this.levelCleared = true;
} else {
trace("recalling onLevelCleared()");
return;
};
super.pauseLevel();
endAllLevelTriggers();
mainCharaMC.currKR = this.blankKeyboardReceiver;
pauseBtn.visible = false;
hUD_MC.visible = false;
this.timeScore = determineTimeScore();
this.numChancesBonus = ((rootDoc.NumMissionFailures)==0) ? 5000 : 0;
rootDoc.Score = (rootDoc.Score + ((this.timeScore + this.numChancesBonus) + this.civBonus));
if (rootDoc.PlayingThroughLevels){
api_postGameScore_CHECKPOINT(this.numMSecsToCompleteLevel, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(this.numMSecsToCompleteLevel, "SingleLevels");
};
screen_PauseMC.showNextLevel();
}
override public function takeAwayAChance(_arg1:String=null):void{
super.takeAwayAChance(_arg1);
hUD_MC.updateNumChancesDisplay(MovieClip(root).NumChances);
}
private function disableGameplayKeyboardControls():void{
this.currKR = this.blankKeyboardReceiver;
mainCharaMC.currKR = this.currKR;
}
override public function pauseLevel():void{
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
pauseBtn.visible = false;
screen_PauseMC.showPauseMenu();
}
public function tryTeleportTo(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
MovieClip(root).getSndManager().playSFX_Zoom();
mirageAnimMC.x = mainCharaMC.x;
mirageAnimMC.y = mainCharaMC.y;
if (_arg1 < 25){
_local3 = 25;
} else {
if (_arg1 > 495){
_local3 = 495;
} else {
_local3 = _arg1;
};
};
if (_arg2 > 305){
_local4 = 305;
} else {
_local4 = _arg2;
};
if ((_local3 - mainCharaMC.x) <= 0){
this.blinkFacingLeft = true;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_LEFT);
mirageAnimMC.doFade_Left();
zoomMC.doZoomLeft(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
} else {
this.blinkFacingLeft = false;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_RIGHT);
mirageAnimMC.doFade_Right();
zoomMC.doZoomRight(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
};
mainCharaMC.visible = false;
mainCharaMC.setFrozen(true);
mainCharaMC.x = (_local3 - 45);
mainCharaMC.y = (_local4 - 60);
mainCharaMC.yVel = 0;
}
public function whenZoomFinish():void{
mainCharaMC.visible = true;
if (this.blinkFacingLeft){
mainCharaMC.animateLeftBlinkArrival();
} else {
mainCharaMC.animateRightBlinkArrival();
};
mainCharaMC.aerial = !((mainCharaMC.y == 245));
mainCharaMC.setFrozen(false);
}
public function whenBarrelExploded(_arg1:MovieClip):void{
this.numBarrelsGone++;
prepareBarrelLaunch(_arg1);
}
private function onTimeUp():void{
onLevelFailed((((BlinkConsts.FAIL_MSG_TIME_UP + "\n") + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
}
public function hitAreaMouseUp(_arg1:MouseEvent):void{
tryTeleportTo(mouseX, mouseY);
}
public function whenBarrelBroken(_arg1:MovieClip):void{
this.numBarrelsGone++;
prepareBarrelLaunch(_arg1);
if (rootDoc.CurrDifficultyNum == BlinkConsts.DIFFICULTY_NUM_NORMAL){
if (numBarrelsGone == 5){
trace("DIFFC. NORMAL, barrels Doubled");
respawnBarrelAt(explosiveBarrelMC2, Math.round((Math.random() * 500)), -96);
};
} else {
if (rootDoc.CurrDifficultyNum == BlinkConsts.DIFFICULTY_NUM_HARD){
if (numBarrelsGone == 5){
trace("DIFFC. HARD, barrel added");
respawnBarrelAt(explosiveBarrelMC2, Math.round((Math.random() * 500)), -96);
} else {
if (numBarrelsGone == 10){
trace("DIFFC. HARD, another barrel added");
respawnBarrelAt(explosiveBarrelMC3, Math.round((Math.random() * 500)), -96);
};
};
};
};
}
public function testFunc_MOUSE(_arg1:MouseEvent):void{
mainCharaMC.tryAnimateCarryMotion();
}
public function whenCivBurned(_arg1:Civilian):void{
_arg1.startShowAsDamaged();
_arg1.Falling = true;
_arg1.switchToAnim(Civilian.ANIM_NUM_FALLING, Civilian.ANIM_NUM_RUN_LEFT);
this.civBonus = 0;
takeAwayAChance(((("Keep civilians away from the explosions." + "\n") + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
}
override public function onLevelFailed(_arg1:String=null):void{
if (((!(this.levelFailed)) && (!(this.levelCleared)))){
this.levelFailed = true;
} else {
trace("recalling onLevelFailed()");
return;
};
endAllLevelTriggers();
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
rootDoc.NumChances = 3;
rootDoc.NumMissionFailures++;
pauseBtn.visible = false;
hUD_MC.visible = false;
if (rootDoc.PlayingThroughLevels){
api_postGameScore_GAMEOVER(-1, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(-1, "SingleLevels");
};
screen_PauseMC.showMissionFailed(_arg1);
}
private function onCivilianAttacked():void{
this.civBonus = 0;
takeAwayAChance((((BlinkConsts.FAIL_MSG_ATTACK_CIV + "\n") + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
}
public function prepareBarrelLaunch(_arg1:MovieClip):void{
if (!this.usingBLTimer1){
this.usingBLTimer1 = true;
this.barrelsLaunchingArr.push(_arg1);
this.barrelLaunchTimer1 = new Timer((500 + Math.round((Math.random() * 500))), 1);
this.barrelLaunchTimer1.addEventListener("timer", launchBarrel1, false, 0, true);
this.barrelLaunchTimer1.start();
this.numBarrelsPendingLaunch++;
} else {
if (!this.usingBLTimer2){
this.usingBLTimer2 = true;
this.barrelsLaunchingArr.push(_arg1);
this.barrelLaunchTimer2 = new Timer((500 + Math.round((Math.random() * 500))), 1);
this.barrelLaunchTimer2.addEventListener("timer", launchBarrel2, false, 0, true);
this.barrelLaunchTimer2.start();
this.numBarrelsPendingLaunch++;
} else {
if (!this.usingBLTimer3){
this.usingBLTimer3 = true;
this.barrelsLaunchingArr.push(_arg1);
this.barrelLaunchTimer3 = new Timer((500 + Math.round((Math.random() * 500))), 1);
this.barrelLaunchTimer3.addEventListener("timer", launchBarrel3, false, 0, true);
this.numBarrelsPendingLaunch++;
this.barrelLaunchTimer3.start();
} else {
trace("--in BlinkLevel_Explosions.prepareBarrelLaunch() all timers being used!?");
};
};
};
}
public function get CivArr():Array{
return (this.civArr);
}
override public function onLevelStartMissionObjClosed():void{
MovieClip(root).getSndManager().tryPlayMusic_GameplayMus(true);
explosiveBarrelMC1.initBarrel(function (){
whenBarrelExploded(explosiveBarrelMC1);
}, function (){
whenBarrelBroken(explosiveBarrelMC1);
});
explosiveBarrelMC1.spawnAt(Math.round((Math.random() * 500)), -96);
civilianMC1.switchToAnim(Civilian.ANIM_NUM_RUN_LEFT, Civilian.ANIM_NUM_RUN_LEFT);
civilianMC1.spawnAt(550, 245, function (){
civEFF(civilianMC1);
});
civilianMC2.switchToAnim(Civilian.ANIM_NUM_RUN_LEFT, Civilian.ANIM_NUM_RUN_LEFT);
civilianMC2.spawnAt(700, 245, function (){
civEFF(this);
});
civilianMC3.switchToAnim(Civilian.ANIM_NUM_RUN_LEFT, Civilian.ANIM_NUM_RUN_LEFT);
civilianMC3.spawnAt(800, 245, function (){
civEFF(this);
});
civilianMC1.updateCivilianStatusDisplay();
civilianMC2.updateCivilianStatusDisplay();
civilianMC3.updateCivilianStatusDisplay();
enableTeleport();
startLevelCompletionTimer();
screen_PauseMC.resumeGame();
}
public function respawnBarrelAt(_arg1:MovieClip, _arg2:Number, _arg3:Number):void{
var barrel = _arg1;
var xPos = _arg2;
var yPos = _arg3;
barrel.initBarrel(function (){
whenBarrelExploded(barrel);
}, function (){
whenBarrelBroken(barrel);
});
if (rootDoc.GamePaused){
barrel.x = xPos;
barrel.y = yPos;
this.barrelsSpawnedArr.push(barrel);
} else {
if (((this.levelCleared) || (this.levelFailed))){
barrel.stopExisting();
} else {
barrel.spawnAt(xPos, yPos);
};
};
}
private function enableTeleport():void{
hitAreaMC.addEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp, false, 0, true);
}
}
}//package
Section 116
//BlinkLevel_Final (BlinkLevel_Final)
package {
import flash.display.*;
import flash.events.*;
public class BlinkLevel_Final extends BlinkLevel {
const PHASE_2_DURATN:uint = 30000;
const PHASE_3_DURATN:uint = 300000;
var ph2DialogueLineArr:Array;
public var hitAreaMC:MovieClip;
var currPh2DialogueLineIndx:uint;
public var testBtn:SimpleButton;
public var zoom_masterMC:MovieClip;
var ph1DialogueLineArr:Array;
var currPhaseNum:uint;
public var pauseBtn:SimpleButton;
public var mainCharaMC:MovieClip;
public var zoomMC:MovieClip;
var currPh1DialogueLineIndx:uint;
public var lastHitAnimMC:MovieClip;
public var screen_PauseMC:MovieClip;
var numLives_master:uint;
public var blinkFacingLeft:Boolean;
public var play4AllLogoGrphcMC:MovieClip;
public var blink_masterFacingLeft:Boolean;
public var dialogueBoxMC:MovieClip;
public var mirageAnimMC:MovieClip;
public var hUD_MC:MovieClip;
public var masterCharaMC:MovieClip;
public var numHits:uint;
public var mirage_masterAnimMC:MovieClip;
public function BlinkLevel_Final(){
addFrameScript(0, frame1, 1, frame2);
super();
this.levelName = BlinkConsts.LEVEL7_NAME;
this.levelNum = 7;
this.currMissionObjectiveStr = ((("It’s up to you.\n\nThere was a person you failed to rescue." + " Your master didn’t send out any ABLED members to help you.") + " Confronting your master has angered him. He challenges you to fight him.") + "\nWill you strike your teacher?");
this.currKR = this.blankKeyboardReceiver;
this.prePausedCurrKR = this.blankKeyboardReceiver;
initializeDialogueLines();
}
public function master_tryTeleportTo(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
MovieClip(root).getSndManager().playSFX_Zoom();
mirage_masterAnimMC.x = masterCharaMC.x;
mirage_masterAnimMC.y = masterCharaMC.y;
if (_arg1 < 25){
_local3 = 25;
} else {
if (_arg1 > 495){
_local3 = 495;
} else {
_local3 = _arg1;
};
};
if (_arg2 < 40){
_local4 = 40;
} else {
if (_arg2 > 305){
_local4 = 305;
} else {
_local4 = _arg2;
};
};
if ((_local3 - masterCharaMC.x) <= 0){
this.blink_masterFacingLeft = true;
masterCharaMC.switchToCharState(masterCharaMC.CHAR_STATE_BLINK_LEFT);
mirage_masterAnimMC.doFade_Left();
zoom_masterMC.doZoomLeft(masterCharaMC.x, masterCharaMC.y, (_local3 - 45), (_local4 - 60));
} else {
this.blink_masterFacingLeft = false;
masterCharaMC.switchToCharState(masterCharaMC.CHAR_STATE_BLINK_RIGHT);
mirage_masterAnimMC.doFade_Right();
zoom_masterMC.doZoomRight(masterCharaMC.x, masterCharaMC.y, (_local3 - 45), (_local4 - 60));
};
masterCharaMC.visible = false;
masterCharaMC.setFrozen(true);
masterCharaMC.x = (_local3 - 45);
masterCharaMC.y = (_local4 - 60);
masterCharaMC.yVel = 0;
}
override public function doDifficultyAdjustments(_arg1:uint):void{
if (_arg1 == BlinkConsts.DIFFICULTY_NUM_EASY){
this.numLives_master = 1;
} else {
if (_arg1 == BlinkConsts.DIFFICULTY_NUM_NORMAL){
this.numLives_master = 3;
} else {
this.numLives_master = 6;
};
};
}
override public function whenMasterCharaHit():void{
if (currPhaseNum == 2){
doPhase3();
} else {
this.numLives_master--;
if (this.numLives_master <= 0){
if (MovieClip(root).NumChances > 0){
lastHitAnimMC.doLastHitAnim((mainCharaMC.currState == mainCharaMC.CHAR_STATE_ATTACK_LEFT), mainCharaMC.x, mainCharaMC.y);
this.pauseBtnShowing = false;
pauseBtn.visible = false;
super.pauseLevel();
} else {
onLevelFailed("He was faster.");
};
};
};
}
public function displayNextPh1DialogueLine():void{
this.currPh1DialogueLineIndx++;
dialogueBoxMC.displayDialogueLine(this.ph1DialogueLineArr[this.currPh1DialogueLineIndx]);
}
override public function whenNextLevel():void{
exitLevel();
if (MovieClip(root).PlayingThroughLevels){
if (currPhaseNum == 2){
rootDoc.Ending2FirstTime = !(rootDoc.Ending2_achieved);
this.rootDoc.Ending2_achieved = true;
if (this.rootDoc.SharedObjWorks){
this.rootDoc.SharedObj.data.ending2_achieved = true;
try {
this.rootDoc.SharedObj.flush();
} catch(error:Error) {
trace("--in BlinkLevel_Final.onLevelCleared(), sharedObj.flush() failed.");
};
};
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
doEnding2();
});
} else {
rootDoc.Ending1FirstTime = !(rootDoc.Ending1_achieved);
this.rootDoc.Ending1_achieved = true;
if (this.rootDoc.SharedObjWorks){
this.rootDoc.SharedObj.data.ending1_achieved = true;
try {
this.rootDoc.SharedObj.flush();
} catch(error:Error) {
trace("--in BlinkLevel_Final.onLevelCleared(), sharedObj.flush() failed.");
};
};
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
doEnding1();
});
};
} else {
MovieClip(root).screenMCOverlayMC.fadeFromBlack();
MovieClip(root).gotoAndStop("levelselect");
};
}
public function initializeDialogueLines():void{
this.ph1DialogueLineArr = new Array();
this.ph2DialogueLineArr = new Array();
this.ph1DialogueLineArr.push(new DialogueLine(displayNextPh1DialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_S1, "I couldn’t save the last person."));
this.ph1DialogueLineArr.push(new DialogueLine(displayNextPh1DialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_MASTER, "It is a hard lesson to learn yet--"));
this.ph1DialogueLineArr.push(new DialogueLine(displayNextPh1DialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_S1, "But you said there were others to help me."));
this.ph1DialogueLineArr.push(new DialogueLine(displayNextPh1DialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_MASTER, "We all have our limits."));
this.ph1DialogueLineArr.push(new DialogueLine(displayNextPh1DialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_S1, "Why didn’t anyone Blink there to save the one I couldn’t."));
this.ph1DialogueLineArr.push(new DialogueLine(function (){
displayNextPh1DialogueLine();
mainCharaMC.playerAvSprite.playAnimation("idle-turn-fronttoleft", "hiidle-left");
}, true, 0, BlinkConsts.SPEAKER_NUM_MASTER, "We saved many people today--"));
this.ph1DialogueLineArr.push(new DialogueLine(displayNextPh1DialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_S1, "Why didn’t YOU come to help?"));
this.ph1DialogueLineArr.push(new DialogueLine(displayNextPh1DialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_MASTER, "I do not need to explain myself to you."));
this.ph1DialogueLineArr.push(new DialogueLine(function (){
displayNextPh1DialogueLine();
masterCharaMC.masterAvSprite.playAnimation("idle-turn-backtoright", "hiidle-right");
}, true, 0, BlinkConsts.SPEAKER_NUM_S1, "But master--"));
this.ph1DialogueLineArr.push(new DialogueLine(displayNextPh1DialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_MASTER, "I am your teacher, you will show me respect!"));
this.ph1DialogueLineArr.push(new DialogueLine(displayNextPh1DialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_S1, "I only meant..."));
this.ph1DialogueLineArr.push(new DialogueLine(doPhase2, true, 2000, BlinkConsts.SPEAKER_NUM_MASTER, "Enough talk! You wish to strike me, so do it!"));
this.ph2DialogueLineArr.push(new DialogueLine(tryDisplayNextPh2DialogueLine, false, 2000, BlinkConsts.SPEAKER_NUM_S1, "What!?"));
this.ph2DialogueLineArr.push(new DialogueLine(tryDisplayNextPh2DialogueLine, false, 2000, BlinkConsts.SPEAKER_NUM_MASTER, "Hit me."));
this.ph2DialogueLineArr.push(new DialogueLine(tryDisplayNextPh2DialogueLine, false, 2000, BlinkConsts.SPEAKER_NUM_S1, "Master, I refuse to hit you."));
this.ph2DialogueLineArr.push(new DialogueLine(tryDisplayNextPh2DialogueLine, false, 2000, BlinkConsts.SPEAKER_NUM_MASTER, "Come on attack me!"));
this.ph2DialogueLineArr.push(new DialogueLine(tryDisplayNextPh2DialogueLine, false, 2000, BlinkConsts.SPEAKER_NUM_S1, "This is madness."));
this.ph2DialogueLineArr.push(new DialogueLine(tryDisplayNextPh2DialogueLine, false, 2000, BlinkConsts.SPEAKER_NUM_MASTER, "You think you know better than me. Defeat me."));
this.ph2DialogueLineArr.push(new DialogueLine(tryDisplayNextPh2DialogueLine, false, 2000, BlinkConsts.SPEAKER_NUM_S1, "I won’t fight you."));
this.ph2DialogueLineArr.push(new DialogueLine(tryDisplayNextPh2DialogueLine, false, 2000, BlinkConsts.SPEAKER_NUM_MASTER, "Raise your weapon and fight!"));
this.ph2DialogueLineArr.push(new DialogueLine(tryDisplayNextPh2DialogueLine, false, 2000, BlinkConsts.SPEAKER_NUM_S1, "No."));
this.ph2DialogueLineArr.push(new DialogueLine(tryDisplayNextPh2DialogueLine, false, 2000, BlinkConsts.SPEAKER_NUM_MASTER, "Hit me."));
this.ph2DialogueLineArr.push(new DialogueLine(tryDisplayNextPh2DialogueLine, false, 2000, BlinkConsts.SPEAKER_NUM_S1, "No."));
this.ph2DialogueLineArr.push(new DialogueLine(tryDisplayNextPh2DialogueLine, false, 2000, BlinkConsts.SPEAKER_NUM_MASTER, "Do it!"));
this.ph2DialogueLineArr.push(new DialogueLine(function (){
}, false, 2000, BlinkConsts.SPEAKER_NUM_S1, "Stop it!"));
}
public function whenZoomFinish_master():void{
masterCharaMC.visible = true;
if (this.blink_masterFacingLeft){
masterCharaMC.animateLeftBlinkArrival();
} else {
masterCharaMC.animateRightBlinkArrival();
};
masterCharaMC.aerial = !((masterCharaMC.y == 245));
masterCharaMC.setFrozen(false);
}
override public function initLevel():void{
trace(((this.levelName + ": ") + rootDoc.CurrDifficultyNum));
this.pausableMCArr.push(mainCharaMC);
this.pausableMCArr.push(masterCharaMC);
this.pausableMCArr.push(dialogueBoxMC);
this.pausableMCArr.push(hUD_MC);
hUD_MC.visible = false;
mainCharaMC.prePauseEnterFrame_xyUpdate = function (){
};
mainCharaMC.currEnterFrame_xyUpdate = function (){
};
mainCharaMC.addEventListener(Event.ENTER_FRAME, mainCharaMC.enterFrame_xyUpdate, false, 0, true);
masterCharaMC.currEnterFrame_xyUpdate = function (){
};
masterCharaMC.prePauseEnterFrame_xyUpdate = function (){
};
masterCharaMC.aggressive = false;
masterCharaMC.currAIPhase = masterCharaMC.AI_PHASE_IDLE;
masterCharaMC.prePauseEnterFrame_AI = function (){
};
masterCharaMC.currEnterFrame_AI = function (){
};
masterCharaMC.addEventListener(Event.ENTER_FRAME, masterCharaMC.enterFrame_xyUpdate, false, 0, true);
masterCharaMC.addEventListener(Event.ENTER_FRAME, masterCharaMC.enterFrame_AI, false, 0, true);
this.timeScore = (this.numChancesBonus = 0);
this.civBonus = 5000;
this.levelCleared = (this.levelFailed = false);
this.currPh1DialogueLineIndx = 0;
this.currPh2DialogueLineIndx = 0;
this.currPhaseNum = 1;
dialogueBoxMC.visible = false;
rootDoc.tryUpdateLevelsUnlockedNum(7);
doDifficultyAdjustments(rootDoc.CurrDifficultyNum);
screen_PauseMC.addEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy, false, 0, true);
}
public function endAllLevelTriggers():void{
mainCharaMC.removeAllEventListeners();
mainCharaMC.showAsNormal();
masterCharaMC.removeAllEventListeners();
masterCharaMC.showAsNormal();
hUD_MC.removeAllEventListeners();
}
override public function pauseGameToggle():void{
if (rootDoc.GamePaused){
if (canUnpause()){
screen_PauseMC.resumeGame();
};
} else {
if (canPause()){
pauseLevel();
};
};
}
public function doPhase3():void{
this.currPhaseNum = 3;
hUD_MC.stopTimer();
hUD_MC.initTimer(PHASE_3_DURATN, function (){
onLevelFailed(BlinkConsts.FAIL_MSG_TIME_UP);
});
hUD_MC.startTimer();
hUD_MC.setVisibleTimer(true);
dialogueBoxMC.displayDialogueLine(new DialogueLine(function (){
dialogueBoxMC.visible = false;
}, false, 5000, BlinkConsts.SPEAKER_NUM_MASTER, "Impudent little--You would raise your weapon against me?"));
masterCharaMC.aggressive = true;
masterCharaMC.switchToAIPhase(masterCharaMC.AI_HARD_CHASE);
}
override public function unpauseLevel():void{
super.unpauseLevel();
mainCharaMC.currKR = this.currKR;
pauseBtn.visible = this.pauseBtnShowing;
}
public function doPhase2():void{
this.currPhaseNum = 2;
MovieClip(root).getSndManager().tryPlayMusic_GameplayMus(true);
hUD_MC.initTimer(PHASE_2_DURATN, onPhase2TimerUp);
hUD_MC.setVisibleTimer(false);
hUD_MC.visible = true;
hUD_MC.startTimer();
mainCharaMC.prePauseEnterFrame_xyUpdate = mainCharaMC.defEnterFrame_xyUpdate;
mainCharaMC.currEnterFrame_xyUpdate = mainCharaMC.defEnterFrame_xyUpdate;
enableTeleport();
this.currKR = this.gameplayKR;
mainCharaMC.currKR = this.currKR;
startLevelCompletionTimer();
masterCharaMC.prePauseEnterFrame_xyUpdate = masterCharaMC.defEnterFrame_xyUpdate;
masterCharaMC.currEnterFrame_xyUpdate = masterCharaMC.defEnterFrame_xyUpdate;
masterCharaMC.currAIPhase = masterCharaMC.AI_SOFT_CHASE;
masterCharaMC.prePauseEnterFrame_AI = masterCharaMC.enterFrame_AI_SoftChase;
masterCharaMC.currEnterFrame_AI = masterCharaMC.enterFrame_AI_SoftChase;
dialogueBoxMC.displayDialogueLine(this.ph2DialogueLineArr[0]);
}
public function pauseGame_MOUSE(_arg1:MouseEvent):void{
pauseGame();
}
function frame2(){
stop();
}
override public function onMusicToggleOff():void{
MovieClip(root).getSndManager().stopMusic_GameplayMus();
}
public function displayNextPh2DialogueLine():void{
this.currPh2DialogueLineIndx++;
dialogueBoxMC.displayDialogueLine(this.ph2DialogueLineArr[this.currPh2DialogueLineIndx]);
}
override public function determineTimeScore():uint{
var _local1:uint;
var _local2:uint;
_local1 = PHASE_3_DURATN;
_local2 = PHASE_3_DURATN;
if (this.numMSecsToCompleteLevel <= _local1){
return (10000);
};
if (this.numMSecsToCompleteLevel <= _local2){
return ((((_local2 - (this.numMSecsToCompleteLevel - _local1)) / _local2) * 10000));
};
return (0);
}
function frame1(){
pauseBtn.addEventListener(MouseEvent.MOUSE_UP, pauseGame_MOUSE, false, 0, true);
testBtn.addEventListener(MouseEvent.MOUSE_UP, testFunc_MOUSE, false, 0, true);
}
public function tryDisplayNextPh2DialogueLine():void{
if (currPhaseNum == 2){
displayNextPh2DialogueLine();
} else {
return;
};
}
public function showMissionObjectiveWhenPauseScreenRdy(_arg1:Event):void{
screen_PauseMC.removeEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy);
screen_PauseMC.showMissionObjective();
}
private function doEnding2():void{
MovieClip(root).gotoAndStop("ending2");
}
private function doEnding1():void{
MovieClip(root).gotoAndStop("ending1");
}
override public function whenMainCharaHit():void{
takeAwayAChance("The master is quick.");
}
override public function exitLevel():void{
endAllLevelTriggers();
}
public function pauseGame():void{
pauseLevel();
}
override public function onLevelCleared():void{
if (((!(this.levelCleared)) && (!(this.levelFailed)))){
this.levelCleared = true;
} else {
trace("recalling onLevelCleared()");
return;
};
super.pauseLevel();
exitLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
stopLevelCompletionTimer();
this.usingLevelCompletionTimer = false;
pauseBtn.visible = false;
hUD_MC.visible = false;
this.timeScore = determineTimeScore();
this.numChancesBonus = ((rootDoc.NumMissionFailures)==0) ? 5000 : 0;
rootDoc.Score = (rootDoc.Score + ((this.timeScore + this.numChancesBonus) + this.civBonus));
if (rootDoc.PlayingThroughLevels){
api_postGameScore_GAMEOVER(this.numMSecsToCompleteLevel, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(this.numMSecsToCompleteLevel, "SingleLevels");
};
screen_PauseMC.showNextLevel();
}
override public function takeAwayAChance(_arg1:String=null):void{
super.takeAwayAChance(_arg1);
hUD_MC.updateNumChancesDisplay(MovieClip(root).NumChances);
}
public function onPhase2TimerUp():void{
if (currPhaseNum == 2){
onLevelCleared();
};
}
override public function pauseLevel():void{
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
pauseBtn.visible = false;
screen_PauseMC.showPauseMenu();
}
public function tryTeleportTo(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
MovieClip(root).getSndManager().playSFX_Zoom();
mirageAnimMC.x = mainCharaMC.x;
mirageAnimMC.y = mainCharaMC.y;
if (_arg1 < 25){
_local3 = 25;
} else {
if (_arg1 > 495){
_local3 = 495;
} else {
_local3 = _arg1;
};
};
if (_arg2 > 305){
_local4 = 305;
} else {
_local4 = _arg2;
};
if ((_local3 - mainCharaMC.x) <= 0){
this.blinkFacingLeft = true;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_LEFT);
mirageAnimMC.doFade_Left();
zoomMC.doZoomLeft(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
} else {
this.blinkFacingLeft = false;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_RIGHT);
mirageAnimMC.doFade_Right();
zoomMC.doZoomRight(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
};
mainCharaMC.visible = false;
mainCharaMC.setFrozen(true);
mainCharaMC.x = (_local3 - 45);
mainCharaMC.y = (_local4 - 60);
mainCharaMC.yVel = 0;
}
public function whenZoomFinish():void{
mainCharaMC.visible = true;
if (this.blinkFacingLeft){
mainCharaMC.animateLeftBlinkArrival();
} else {
mainCharaMC.animateRightBlinkArrival();
};
mainCharaMC.aerial = !((mainCharaMC.y == 245));
mainCharaMC.setFrozen(false);
}
public function hitAreaMouseUp(_arg1:MouseEvent):void{
tryTeleportTo(mouseX, mouseY);
}
public function testFunc_MOUSE(_arg1:MouseEvent):void{
mainCharaMC.tryAnimateCarryMotion();
}
override public function onLevelFailed(_arg1:String=null):void{
if (((!(this.levelFailed)) && (!(this.levelCleared)))){
this.levelFailed = true;
} else {
trace("recalling onLevelFailed()");
return;
};
endAllLevelTriggers();
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
MovieClip(root).NumChances = 3;
rootDoc.NumMissionFailures++;
pauseBtn.visible = false;
hUD_MC.visible = false;
if (rootDoc.PlayingThroughLevels){
api_postGameScore_GAMEOVER(-1, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(-1, "SingleLevels");
};
screen_PauseMC.showMissionFailed(_arg1);
}
override public function onLevelStartMissionObjClosed():void{
screen_PauseMC.resumeGame();
dialogueBoxMC.visible = true;
dialogueBoxMC.displayDialogueLine(this.ph1DialogueLineArr[0]);
}
private function enableTeleport():void{
hitAreaMC.addEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp, false, 0, true);
}
override public function onMusicToggleOn():void{
if (this.currPhaseNum > 1){
MovieClip(root).getSndManager().tryPlayMusic_GameplayMus(false);
};
}
}
}//package
Section 117
//BlinkLevel_Fire (BlinkLevel_Fire)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class BlinkLevel_Fire extends BlinkLevel {
var civiliansRunning:Boolean;
public var hitAreaMC:MovieClip;
public var testBtn:SimpleButton;
public var zoom_masterMC:MovieClip;
public var mainCharaMC:MovieClip;
public var zoomMC:MovieClip;
public var fireMC:MovieClip;
public var pauseBtn:SimpleButton;
var civiliansRunTimer:Timer;
public var civilianMC2:Civilian;
public var civilianMC1:Civilian;
public var buildingCrumbleAnimMC:MovieClip;
public var civilianMC3:Civilian;
var numCiviliansLeftToRun:uint;
public var screen_PauseMC:MovieClip;
public var breakableWallMC:MovieClip;
var numCiviliansFound:uint;
public var panicHelperMC:MovieClip;
var LEVEL_MAX_TIME:uint;// = 100000
public var blinkFacingLeft:Boolean;
public var civilianMC4:Civilian;
public var play4AllLogoGrphcMC:MovieClip;
public var blink_masterFacingLeft:Boolean;
var NUM_CIVILIANS:uint;// = 4
public var dialogueBoxMC:MovieClip;
public var mirageAnimMC:MovieClip;
public var hUD_MC:MovieClip;
public var numHits:uint;
public var destinationIconAnimMC:MovieClip;
public var mirage_masterAnimMC:MovieClip;
public function BlinkLevel_Fire(){
LEVEL_MAX_TIME = 100000;
NUM_CIVILIANS = 4;
addFrameScript(0, frame1, 1, frame2);
super();
this.levelName = BlinkConsts.LEVEL2_NAME;
this.levelNum = 2;
this.currMissionObjectiveStr = ("Get all civilians out of the burning room." + "\n\nDon’t let the flames touch you or any of the civilians. Time is running out.");
this.currKR = this.blankKeyboardReceiver;
this.prePausedCurrKR = this.gameplayKR;
}
public function enterFrame_FireCreep(_arg1:Event):void{
var _local2:Civilian;
var _local3:*;
if (fireMC.x > 325){
fireMC.x = (fireMC.x - fireMC.creepDX);
panicHelperMC.x = (fireMC.x + 55);
} else {
fireMC.x = 325;
};
_local3 = 1;
while (_local3 <= NUM_CIVILIANS) {
_local2 = this[("civilianMC" + _local3)];
if (((((fireMC.hitBoxMC.hitTestObject(_local2.hitBoxMC)) && (_local2.Lost))) && (!(_local2.Carried)))){
if (this.civiliansRunning){
_local2.x = ((fireMC.x - _local2.width) - 10);
} else {
_local2.x = (breakableWallMC.x + breakableWallMC.width);
};
takeAwayAChance("Don't let the fire reach any civilian.");
};
_local3++;
};
if (MovieClip(root).NumChances > 0){
if (fireMC.hitBoxMC.hitTestObject(mainCharaMC)){
if (this.civiliansRunning){
mainCharaMC.x = ((fireMC.x - mainCharaMC.hitBoxMC.width) - 10);
} else {
mainCharaMC.x = (breakableWallMC.x + breakableWallMC.width);
};
whenMainCharaHit();
};
};
}
override public function doDifficultyAdjustments(_arg1:uint):void{
if (_arg1 == BlinkConsts.DIFFICULTY_NUM_EASY){
fireMC.currCreepDX = 0.04;
} else {
if (_arg1 == BlinkConsts.DIFFICULTY_NUM_NORMAL){
trace(("fireMC.DEF_CREEP_DX: " + fireMC.DEF_CREEP_DX));
fireMC.currCreepDX = fireMC.DEF_CREEP_DX;
} else {
fireMC.currCreepDX = 0.16;
};
};
fireMC.creepDX = fireMC.currCreepDX;
}
override public function whenNextLevel():void{
exitLevel();
if (MovieClip(root).PlayingThroughLevels){
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("level_explosions");
});
} else {
MovieClip(root).screenMCOverlayMC.fadeFromBlack();
MovieClip(root).gotoAndStop("levelselect");
};
}
private function disableTeleport():void{
hitAreaMC.removeEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp);
}
override public function initLevel():void{
trace(((this.levelName + ": ") + rootDoc.CurrDifficultyNum));
this.pausableMCArr.push(mainCharaMC);
this.pausableMCArr.push(dialogueBoxMC);
this.pausableMCArr.push(hUD_MC);
this.pausableMCArr.push(civilianMC1);
this.pausableMCArr.push(civilianMC2);
this.pausableMCArr.push(civilianMC3);
this.pausableMCArr.push(civilianMC4);
this.pausableMCArr.push(breakableWallMC);
this.pausableMCArr.push(fireMC);
hUD_MC.initTimer(LEVEL_MAX_TIME, onTimeUp);
hUD_MC.setVisibleTimer(true);
hUD_MC.visible = true;
civilianMC1.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, false, true, [destinationIconAnimMC], function (){
}, function (){
civilianMC1.Lost = false;
civilianMC1.currEnterFrameFunc = function (){
};
civilianMC1.doExitAnimation(whenCivilianFound);
}, function (){
civilianMC1.startShowAsDamaged();
onCivilianAttacked();
}, function (){
if (civilianMC1.x < 275){
doScreenRunLeft(civilianMC1);
} else {
if (breakableWallMC.x != 700){
civDoDefEnterFrameFunc(civilianMC1);
};
};
}, function (){
onCivilianDDropped(civilianMC1);
});
civilianMC1.spawnAt(310, 245, civilianMC1.defEnterFrameFunc);
civilianMC2.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, false, true, [destinationIconAnimMC], function (){
}, function (){
civilianMC2.Lost = false;
civilianMC2.currEnterFrameFunc = function (){
};
civilianMC2.doExitAnimation(whenCivilianFound);
}, function (){
civilianMC2.startShowAsDamaged();
onCivilianAttacked();
}, function (){
if (civilianMC2.x < 275){
doScreenRunLeft(civilianMC2);
} else {
if (breakableWallMC.x != 700){
civDoDefEnterFrameFunc(civilianMC2);
};
};
}, function (){
onCivilianDDropped(civilianMC2);
});
civilianMC2.spawnAt(320, 245, civilianMC2.defEnterFrameFunc);
civilianMC3.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, false, true, [destinationIconAnimMC], function (){
}, function (){
civilianMC3.Lost = false;
civilianMC3.currEnterFrameFunc = function (){
};
civilianMC3.doExitAnimation(whenCivilianFound);
}, function (){
civilianMC3.startShowAsDamaged();
onCivilianAttacked();
}, function (){
if (civilianMC3.x < 275){
doScreenRunLeft(civilianMC3);
} else {
if (breakableWallMC.x != 700){
civDoDefEnterFrameFunc(civilianMC3);
};
};
}, function (){
onCivilianDDropped(civilianMC3);
});
civilianMC3.spawnAt(330, 245, civilianMC3.defEnterFrameFunc);
civilianMC4.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, false, true, [destinationIconAnimMC], function (){
}, function (){
civilianMC4.Lost = false;
civilianMC4.currEnterFrameFunc = function (){
};
civilianMC4.doExitAnimation(whenCivilianFound);
}, function (){
civilianMC4.startShowAsDamaged();
onCivilianAttacked();
}, function (){
if (civilianMC4.x < 275){
doScreenRunLeft(civilianMC4);
} else {
if (breakableWallMC.x != 700){
civDoDefEnterFrameFunc(civilianMC4);
};
};
}, function (){
onCivilianDDropped(civilianMC4);
});
civilianMC4.spawnAt(340, 245, civilianMC4.defEnterFrameFunc);
breakableWallMC.initBreakableWall(function (){
breakableWallMC.x = 700;
allCiviliansRunToLeft();
});
breakableWallMC.prePauseHitTestFunc = breakableWallMC.defHitTestFunc;
breakableWallMC.currHitTestFunc = function (){
};
mainCharaMC.prePauseEnterFrame_xyUpdate = enterFrame_xyUpdate_WithWalls;
mainCharaMC.currEnterFrame_xyUpdate = function (){
};
mainCharaMC.addEventListener(Event.ENTER_FRAME, mainCharaMC.enterFrame_xyUpdate, false, 0, true);
dialogueBoxMC.visible = false;
this.numCiviliansFound = 0;
this.civiliansRunning = false;
this.numCiviliansLeftToRun = NUM_CIVILIANS;
this.civiliansRunTimer = new Timer(1000, (NUM_CIVILIANS - 1));
this.civiliansRunTimer.addEventListener("timer", nextCivilianRun_TIMER, false, 0, true);
this.timeScore = (this.numChancesBonus = 0);
this.civBonus = 5000;
this.levelCleared = (this.levelFailed = false);
rootDoc.tryUpdateLevelsUnlockedNum(2);
fireMC.x = 450;
doDifficultyAdjustments(rootDoc.CurrDifficultyNum);
screen_PauseMC.addEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy, false, 0, true);
}
public function endAllLevelTriggers():void{
mainCharaMC.removeAllEventListeners();
mainCharaMC.showAsNormal();
civilianMC1.stopExisting();
civilianMC2.stopExisting();
civilianMC3.stopExisting();
civilianMC4.stopExisting();
breakableWallMC.stopExisting();
hUD_MC.removeAllEventListeners();
if (this.civiliansRunTimer.willTrigger("timer")){
this.civiliansRunTimer.removeEventListener("timer", nextCivilianRun_TIMER);
};
this.removeEventListener(Event.ENTER_FRAME, enterFrame_FireCreep);
}
function frame2(){
stop();
}
override public function pauseGameToggle():void{
if (rootDoc.GamePaused){
if (canUnpause()){
screen_PauseMC.resumeGame();
};
} else {
if (canPause()){
pauseLevel();
};
};
}
override public function unpauseLevel():void{
super.unpauseLevel();
mainCharaMC.currKR = this.currKR;
if (this.civiliansRunning){
this.civiliansRunTimer.start();
};
pauseBtn.visible = this.pauseBtnShowing;
}
function frame1(){
pauseBtn.addEventListener(MouseEvent.MOUSE_UP, pauseGame_MOUSE, false, 0, true);
testBtn.addEventListener(MouseEvent.MOUSE_UP, testFunc_MOUSE, false, 0, true);
}
public function pauseGame_MOUSE(_arg1:MouseEvent):void{
pauseGame();
}
public function doScreenRunLeft(_arg1:Civilian):void{
_arg1.endPanicRunLeftAndRightEFF();
_arg1.passedInEnterFrameFunc = _arg1.runToScreenLeftEnterFrameFunc;
_arg1.prePauseEnterFrameFunc = _arg1.runToScreenLeftEnterFrameFunc;
_arg1.switchToAnim(Civilian.ANIM_NUM_RUN_LEFT, Civilian.ANIM_NUM_RUN_LEFT);
if (((!(MovieClip(root).GamePaused)) && (!(_arg1.Carried)))){
_arg1.currEnterFrameFunc = _arg1.runToScreenLeftEnterFrameFunc;
};
if (!_arg1.RunningLeft){
_arg1.x = _arg1.DroppedX;
_arg1.RunningLeft = true;
};
}
override public function determineTimeScore():uint{
var _local1:uint;
var _local2:uint;
_local1 = 5000;
_local2 = LEVEL_MAX_TIME;
if (this.numMSecsToCompleteLevel <= _local1){
return (10000);
};
if (this.numMSecsToCompleteLevel <= _local2){
return ((((_local2 - (this.numMSecsToCompleteLevel - _local1)) / _local2) * 10000));
};
return (0);
}
public function whenCivilianFound():void{
this.numCiviliansFound++;
if (this.numCiviliansFound >= NUM_CIVILIANS){
onLevelCleared();
};
}
public function showMissionObjectiveWhenPauseScreenRdy(_arg1:Event):void{
screen_PauseMC.removeEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy);
screen_PauseMC.showMissionObjective();
}
override public function whenMainCharaHit():void{
mainCharaMC.startShowAsDamaged();
takeAwayAChance("Stay away from the fire.");
}
public function enterFrame_xyUpdate_WithWalls():void{
mainCharaMC.defEnterFrame_xyUpdate();
if (breakableWallMC.x < 700){
if (mainCharaMC.xVel > 0){
if (((((mainCharaMC.x + 90) > 283)) && (((mainCharaMC.x + 90) < 301)))){
mainCharaMC.x = 193;
};
} else {
if (mainCharaMC.xVel < 0){
if ((((mainCharaMC.x > 283)) && ((mainCharaMC.x < 301)))){
mainCharaMC.x = 301;
};
};
};
} else {
if (mainCharaMC.yVel < 0){
if ((((((mainCharaMC.x < 301)) && (((mainCharaMC.x + 90) > 283)))) && ((mainCharaMC.y < 180)))){
mainCharaMC.y = 180;
};
} else {
if (mainCharaMC.y < 180){
if (mainCharaMC.xVel > 0){
if (((((mainCharaMC.x + 90) > 283)) && (((mainCharaMC.x + 90) < 301)))){
mainCharaMC.x = 193;
};
} else {
if (mainCharaMC.xVel < 0){
if ((((mainCharaMC.x > 283)) && ((mainCharaMC.x < 301)))){
mainCharaMC.x = 301;
};
};
};
};
};
};
}
override public function exitLevel():void{
endAllLevelTriggers();
}
public function pauseGame():void{
pauseLevel();
}
private function disableGameplayKeyboardControls():void{
this.currKR = this.blankKeyboardReceiver;
mainCharaMC.currKR = this.currKR;
}
override public function onLevelCleared():void{
if (((!(this.levelCleared)) && (!(this.levelFailed)))){
this.levelCleared = true;
} else {
trace("recalling onLevelCleared()");
return;
};
super.pauseLevel();
endAllLevelTriggers();
mainCharaMC.currKR = this.blankKeyboardReceiver;
if (this.civiliansRunning){
this.civiliansRunTimer.stop();
};
pauseBtn.visible = false;
hUD_MC.visible = false;
this.timeScore = determineTimeScore();
this.numChancesBonus = ((rootDoc.NumMissionFailures)==0) ? 5000 : 0;
rootDoc.Score = (rootDoc.Score + ((this.timeScore + this.numChancesBonus) + this.civBonus));
if (rootDoc.PlayingThroughLevels){
api_postGameScore_CHECKPOINT(this.numMSecsToCompleteLevel, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(this.numMSecsToCompleteLevel, "SingleLevels");
};
screen_PauseMC.showNextLevel();
}
override public function takeAwayAChance(_arg1:String=null):void{
super.takeAwayAChance(_arg1);
hUD_MC.updateNumChancesDisplay(MovieClip(root).NumChances);
}
private function onTimeUp():void{
onLevelFailed(BlinkConsts.FAIL_MSG_TIME_UP);
}
public function nextCivilianRun():void{
var _local1:Civilian;
var _local2:uint;
var _local3:*;
_local2 = this.numCiviliansLeftToRun;
_local3 = _local2;
while (_local3 > 0) {
_local1 = this[("civilianMC" + _local3)];
this.numCiviliansLeftToRun--;
if (this.numCiviliansLeftToRun <= 0){
this.civiliansRunTimer.removeEventListener("timer", nextCivilianRun_TIMER);
this.civiliansRunning = false;
};
if (_local1.Lost){
doScreenRunLeft(_local1);
break;
};
_local3--;
};
}
override public function pauseLevel():void{
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
if (this.civiliansRunning){
this.civiliansRunTimer.stop();
};
pauseBtn.visible = false;
screen_PauseMC.showPauseMenu();
}
public function tryTeleportTo(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
MovieClip(root).getSndManager().playSFX_Zoom();
mirageAnimMC.x = mainCharaMC.x;
mirageAnimMC.y = mainCharaMC.y;
if (_arg1 < 25){
_local3 = 25;
} else {
if (_arg1 > 495){
_local3 = 495;
} else {
_local3 = _arg1;
};
};
if (_arg2 > 305){
_local4 = 305;
} else {
_local4 = _arg2;
};
if (breakableWallMC.x < 700){
if ((((_local3 > 238)) && ((_local3 <= 292)))){
_local3 = 238;
} else {
if ((((_local3 > 292)) && ((_local3 <= 346)))){
_local3 = 346;
};
};
} else {
if ((((_local4 > 240)) && ((_local4 < 290)))){
if ((((_local3 > 238)) && ((_local3 <= 346)))){
_local4 = 240;
};
} else {
if (_local4 <= 240){
if ((((_local3 > 238)) && ((_local3 <= 292)))){
_local3 = 238;
} else {
if ((((_local3 > 292)) && ((_local3 <= 346)))){
_local3 = 346;
};
};
};
};
};
if ((_local3 - mainCharaMC.x) <= 0){
this.blinkFacingLeft = true;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_LEFT);
mirageAnimMC.doFade_Left();
zoomMC.doZoomLeft(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
} else {
this.blinkFacingLeft = false;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_RIGHT);
mirageAnimMC.doFade_Right();
zoomMC.doZoomRight(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
};
mainCharaMC.visible = false;
mainCharaMC.setFrozen(true);
mainCharaMC.x = (_local3 - 45);
mainCharaMC.y = (_local4 - 60);
mainCharaMC.yVel = 0;
}
public function whenZoomFinish():void{
mainCharaMC.visible = true;
if (this.blinkFacingLeft){
mainCharaMC.animateLeftBlinkArrival();
} else {
mainCharaMC.animateRightBlinkArrival();
};
mainCharaMC.aerial = !((mainCharaMC.y == 245));
mainCharaMC.setFrozen(false);
}
public function civDoDefEnterFrameFunc(_arg1:Civilian):void{
_arg1.passedInEnterFrameFunc = _arg1.defEnterFrameFunc;
_arg1.prePauseEnterFrameFunc = _arg1.defEnterFrameFunc;
_arg1.switchToAnim(Civilian.ANIM_NUM_IDLE);
if (((!(MovieClip(root).GamePaused)) && (!(_arg1.Carried)))){
_arg1.currEnterFrameFunc = _arg1.defEnterFrameFunc;
};
}
public function hitAreaMouseUp(_arg1:MouseEvent):void{
tryTeleportTo(mouseX, mouseY);
}
private function onCivilianDDropped(_arg1:Civilian):void{
_arg1.startShowAsDamaged();
civBonus = 0;
takeAwayAChance(BlinkConsts.FAIL_MSG_DDROP_CIV);
}
public function nextCivilianRun_TIMER(_arg1:TimerEvent){
nextCivilianRun();
}
public function testFunc_MOUSE(_arg1:MouseEvent):void{
mainCharaMC.tryAnimateCarryMotion();
}
private function onCivilianAttacked():void{
this.civBonus = 0;
takeAwayAChance(BlinkConsts.FAIL_MSG_ATTACK_CIV);
}
override public function onLevelFailed(_arg1:String=null):void{
if (((!(this.levelFailed)) && (!(this.levelCleared)))){
this.levelFailed = true;
} else {
trace("recalling onLevelFailed()");
return;
};
endAllLevelTriggers();
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
if (this.civiliansRunning){
this.civiliansRunTimer.stop();
};
MovieClip(root).NumChances = 3;
rootDoc.NumMissionFailures++;
pauseBtn.visible = false;
hUD_MC.visible = false;
if (rootDoc.PlayingThroughLevels){
api_postGameScore_GAMEOVER(-1, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(-1, "SingleLevels");
};
screen_PauseMC.showMissionFailed(_arg1);
}
public function allCiviliansRunToLeft():void{
this.civiliansRunning = true;
nextCivilianRun();
this.civiliansRunTimer.start();
}
override public function onLevelStartMissionObjClosed():void{
MovieClip(root).getSndManager().tryPlayMusic_GameplayMus(true);
civilianMC1.updateCivilianStatusDisplay();
civilianMC2.updateCivilianStatusDisplay();
civilianMC3.updateCivilianStatusDisplay();
civilianMC4.updateCivilianStatusDisplay();
if (Math.random() > 0.5){
civilianMC1.doPanicRunLeftAndRightEFF(panicHelperMC, (breakableWallMC.x + 30));
};
if (Math.random() > 0.5){
civilianMC2.doPanicRunLeftAndRightEFF(panicHelperMC, (breakableWallMC.x + 30));
};
if (Math.random() > 0.5){
civilianMC3.doPanicRunLeftAndRightEFF(panicHelperMC, (breakableWallMC.x + 30));
};
if (Math.random() > 0.5){
civilianMC4.doPanicRunLeftAndRightEFF(panicHelperMC, (breakableWallMC.x + 30));
};
this.addEventListener(Event.ENTER_FRAME, enterFrame_FireCreep, false, 0, true);
enableTeleport();
startLevelCompletionTimer();
screen_PauseMC.resumeGame();
}
private function enableTeleport():void{
hitAreaMC.addEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp, false, 0, true);
}
}
}//package
Section 118
//BlinkLevel_NotBoth (BlinkLevel_NotBoth)
package {
import flash.display.*;
import flash.events.*;
public class BlinkLevel_NotBoth extends BlinkLevel {
public var crumbleBuildingBGMC:MovieClip;
public var hitAreaMC:MovieClip;
public var testBtn:SimpleButton;
public var zoom_masterMC:MovieClip;
public var pauseBtn:SimpleButton;
public var mainCharaMC:MovieClip;
public var zoomMC:MovieClip;
var crumbleSideLeft:Boolean;
public var civilianMC2:Civilian;
public var civilianMC1:Civilian;
public var buildingCrumbleAnimMC:MovieClip;
public var screen_PauseMC:MovieClip;
var unrescuedCiv:Civilian;
var LEVEL_MAX_TIME:uint;// = 15000
public var blinkFacingLeft:Boolean;
public var play4AllLogoGrphcMC:MovieClip;
public var blink_masterFacingLeft:Boolean;
public var dialogueBoxMC:MovieClip;
public var mirageAnimMC:MovieClip;
public var hUD_MC:MovieClip;
public var numHits:uint;
public var destinationIconAnimMC:MovieClip;
public var mirage_masterAnimMC:MovieClip;
public function BlinkLevel_NotBoth(){
LEVEL_MAX_TIME = 15000;
addFrameScript(0, frame1, 1, frame2);
super();
this.levelName = BlinkConsts.LEVEL6_NAME;
this.levelNum = 6;
this.levelGroundY = 95;
this.currMissionObjectiveStr = "Rescue the people by bringing them to the destination icon.";
this.currKR = this.blankKeyboardReceiver;
this.prePausedCurrKR = this.gameplayKR;
}
public function whenBuildingShockwave():void{
this.unrescuedCiv.x = 700;
dialogueBoxMC.visible = true;
tryTeleportTo(0xFF, -200);
mainCharaMC.y = -200;
displayPh2DialogueLine_3();
if (crumbleSideLeft){
crumbleBuildingBGMC.showDestroyedLeft();
} else {
crumbleBuildingBGMC.showDestroyedRight();
};
}
override public function whenNextLevel():void{
exitLevel();
if (MovieClip(root).PlayingThroughLevels){
MovieClip(root).screenMCOverlayMC.fadeInLocationExposition(function (){
MovieClip(root).gotoAndStop("level_final");
}, "Location: A.B.L.E.D. Dojo");
} else {
MovieClip(root).screenMCOverlayMC.fadeFromBlack();
MovieClip(root).gotoAndStop("levelselect");
};
}
private function disableTeleport():void{
hitAreaMC.removeEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp);
}
override public function initLevel():void{
trace(((this.levelName + ": ") + rootDoc.CurrDifficultyNum));
this.pausableMCArr.push(mainCharaMC);
this.pausableMCArr.push(dialogueBoxMC);
this.pausableMCArr.push(civilianMC1);
this.pausableMCArr.push(civilianMC2);
this.pausableMCArr.push(hUD_MC);
hUD_MC.initTimer(LEVEL_MAX_TIME, onTimeUp);
hUD_MC.setVisibleTimer(true);
hUD_MC.visible = true;
civilianMC1.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, false, true, [destinationIconAnimMC], function (){
}, function (){
civilianMC1.Lost = false;
civilianMC1.currEnterFrameFunc = function (){
};
civilianMC1.doExitAnimation();
doCrumbleBuilding();
}, onCivilianAttacked, function (){
}, function (){
civilianMC1.startShowAsDamaged();
this.parent.civBonus = 0;
takeAwayAChance(BlinkConsts.FAIL_MSG_DDROP_CIV);
});
civilianMC1.spawnAt(5, 95, civilianMC1.defEnterFrameFunc);
civilianMC2.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, false, true, [destinationIconAnimMC], function (){
}, function (){
civilianMC2.Lost = false;
civilianMC2.currEnterFrameFunc = function (){
};
civilianMC2.doExitAnimation();
doCrumbleBuilding();
}, onCivilianAttacked, function (){
}, function (){
civilianMC2.startShowAsDamaged();
this.parent.civBonus = 0;
takeAwayAChance(BlinkConsts.FAIL_MSG_DDROP_CIV);
});
civilianMC2.spawnAt(445, 95, civilianMC2.defEnterFrameFunc);
mainCharaMC.prePauseEnterFrame_xyUpdate = mainCharaMC.defEnterFrame_xyUpdate;
mainCharaMC.currEnterFrame_xyUpdate = function (){
};
mainCharaMC.addEventListener(Event.ENTER_FRAME, mainCharaMC.enterFrame_xyUpdate, false, 0, true);
dialogueBoxMC.visible = false;
this.timeScore = (this.numChancesBonus = 0);
this.civBonus = 5000;
this.levelCleared = (this.levelFailed = false);
rootDoc.tryUpdateLevelsUnlockedNum(6);
screen_PauseMC.addEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy, false, 0, true);
}
public function endAllLevelTriggers():void{
mainCharaMC.removeAllEventListeners();
mainCharaMC.showAsNormal();
civilianMC1.stopExisting();
civilianMC2.stopExisting();
hUD_MC.removeAllEventListeners();
}
function frame2(){
stop();
}
override public function pauseGameToggle():void{
if (rootDoc.GamePaused){
if (canUnpause()){
screen_PauseMC.resumeGame();
};
} else {
if (canPause()){
pauseLevel();
};
};
}
override public function unpauseLevel():void{
super.unpauseLevel();
mainCharaMC.currKR = this.currKR;
pauseBtn.visible = this.pauseBtnShowing;
}
function frame1(){
pauseBtn.addEventListener(MouseEvent.MOUSE_UP, pauseGame_MOUSE, false, 0, true);
testBtn.addEventListener(MouseEvent.MOUSE_UP, testFunc_MOUSE, false, 0, true);
}
public function pauseGame_MOUSE(_arg1:MouseEvent):void{
pauseGame();
}
override public function determineTimeScore():uint{
var _local1:uint;
var _local2:uint;
_local1 = 1000;
_local2 = LEVEL_MAX_TIME;
if (this.numMSecsToCompleteLevel <= _local1){
return (10000);
};
if (this.numMSecsToCompleteLevel <= _local2){
return ((((_local2 - (this.numMSecsToCompleteLevel - _local1)) / _local2) * 10000));
};
return (0);
}
public function showMissionObjectiveWhenPauseScreenRdy(_arg1:Event):void{
screen_PauseMC.removeEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy);
screen_PauseMC.showMissionObjective();
}
override public function exitLevel():void{
endAllLevelTriggers();
}
public function pauseGame():void{
pauseLevel();
}
private function disableGameplayKeyboardControls():void{
this.currKR = this.blankKeyboardReceiver;
mainCharaMC.currKR = this.currKR;
}
override public function onLevelCleared():void{
if (((!(this.levelCleared)) && (!(this.levelFailed)))){
this.levelCleared = true;
} else {
trace("recalling onLevelCleared()");
return;
};
super.pauseLevel();
endAllLevelTriggers();
mainCharaMC.currKR = this.blankKeyboardReceiver;
pauseBtn.visible = false;
hUD_MC.visible = false;
this.timeScore = determineTimeScore();
this.numChancesBonus = ((rootDoc.NumMissionFailures)==0) ? 5000 : 0;
rootDoc.Score = (rootDoc.Score + ((this.timeScore + this.numChancesBonus) + this.civBonus));
if (rootDoc.PlayingThroughLevels){
api_postGameScore_CHECKPOINT(this.numMSecsToCompleteLevel, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(this.numMSecsToCompleteLevel, "SingleLevels");
};
screen_PauseMC.showNextLevel();
}
override public function takeAwayAChance(_arg1:String=null):void{
super.takeAwayAChance(_arg1);
hUD_MC.updateNumChancesDisplay(MovieClip(root).NumChances);
}
private function onTimeUp():void{
onLevelFailed(BlinkConsts.FAIL_MSG_TIME_UP);
}
private function doCrumbleAnimAt(_arg1:Number, _arg2:Number):void{
buildingCrumbleAnimMC.doCrumbleAnimAt(_arg1, _arg2);
}
override public function pauseLevel():void{
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
pauseBtn.visible = false;
screen_PauseMC.showPauseMenu();
}
public function tryTeleportTo(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
MovieClip(root).getSndManager().playSFX_Zoom();
mirageAnimMC.x = mainCharaMC.x;
mirageAnimMC.y = mainCharaMC.y;
if (_arg1 < 25){
_local3 = 25;
} else {
if (_arg1 > 495){
_local3 = 495;
} else {
_local3 = _arg1;
};
};
if (_arg2 > (this.levelGroundY + 60)){
_local4 = (this.levelGroundY + 60);
} else {
_local4 = _arg2;
};
if ((_local3 - mainCharaMC.x) <= 0){
this.blinkFacingLeft = true;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_LEFT);
mirageAnimMC.doFade_Left();
zoomMC.doZoomLeft(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
} else {
this.blinkFacingLeft = false;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_RIGHT);
mirageAnimMC.doFade_Right();
zoomMC.doZoomRight(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
};
mainCharaMC.visible = false;
mainCharaMC.setFrozen(true);
mainCharaMC.x = (_local3 - 45);
mainCharaMC.y = (_local4 - 60);
mainCharaMC.yVel = 0;
}
public function whenZoomFinish():void{
mainCharaMC.visible = true;
if (this.blinkFacingLeft){
mainCharaMC.animateLeftBlinkArrival();
} else {
mainCharaMC.animateRightBlinkArrival();
};
mainCharaMC.aerial = !((mainCharaMC.y == this.levelGroundY));
mainCharaMC.setFrozen(false);
}
public function hitAreaMouseUp(_arg1:MouseEvent):void{
tryTeleportTo(mouseX, mouseY);
}
public function testFunc_MOUSE(_arg1:MouseEvent):void{
mainCharaMC.tryAnimateCarryMotion();
}
private function doCrumbleBuilding():void{
trace("Building Crumble");
hUD_MC.killTimer();
disableTeleport();
stopLevelCompletionTimer();
this.usingLevelCompletionTimer = false;
mainCharaMC.currEnterFrame_xyUpdate = function (){
};
disableGameplayKeyboardControls();
pauseBtn.enabled = (pauseBtn.visible = (this.pauseBtnShowing = false));
hUD_MC.visible = false;
if (civilianMC1.Lost){
if (civilianMC1.x >= 270){
this.crumbleSideLeft = false;
} else {
this.crumbleSideLeft = true;
};
this.unrescuedCiv = civilianMC1;
} else {
if (civilianMC2.x >= 270){
this.crumbleSideLeft = false;
} else {
this.crumbleSideLeft = true;
};
this.unrescuedCiv = civilianMC2;
};
doCrumbleAnimAt(0, 0);
if (crumbleSideLeft){
trace("LEFT CRUMLE");
mainCharaMC.x = 450;
mainCharaMC.y = 20;
} else {
trace("RIGHT CRUMBLE");
mainCharaMC.x = 10;
mainCharaMC.y = 20;
};
}
private function onCivilianAttacked():void{
this.civBonus = 0;
takeAwayAChance(BlinkConsts.FAIL_MSG_ATTACK_CIV);
}
override public function onLevelFailed(_arg1:String=null):void{
if (((!(this.levelFailed)) && (!(this.levelCleared)))){
this.levelFailed = true;
} else {
trace("recalling onLevelFailed()");
return;
};
endAllLevelTriggers();
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
MovieClip(root).NumChances = 3;
rootDoc.NumMissionFailures++;
pauseBtn.visible = false;
hUD_MC.visible = false;
if (rootDoc.PlayingThroughLevels){
api_postGameScore_GAMEOVER(-1, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(-1, "SingleLevels");
};
screen_PauseMC.showMissionFailed(_arg1);
}
override public function onLevelStartMissionObjClosed():void{
MovieClip(root).getSndManager().tryPlayMusic_GameplayMus(true);
civilianMC1.updateCivilianStatusDisplay();
civilianMC2.updateCivilianStatusDisplay();
enableTeleport();
startLevelCompletionTimer();
screen_PauseMC.resumeGame();
}
private function displayPh2DialogueLine_1():void{
dialogueBoxMC.displayDialogueLine(new DialogueLine(displayPh2DialogueLine_2, false, 1000, BlinkConsts.SPEAKER_NUM_S1, "..."));
}
private function displayPh2DialogueLine_2():void{
dialogueBoxMC.displayDialogueLine(new DialogueLine(function (){
}, false, 2000, BlinkConsts.SPEAKER_NUM_S1, "HEY BE CAREFUL, IT'S GONNA--"));
}
private function enableTeleport():void{
hitAreaMC.addEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp, false, 0, true);
}
private function displayPh2DialogueLine_3():void{
dialogueBoxMC.displayDialogueLine(new DialogueLine(onLevelCleared, false, 3000, BlinkConsts.SPEAKER_NUM_S1, "nnnnNNOOOOOOOOOO!!!!!"));
}
}
}//package
Section 119
//BlinkLevel_PeopleFalling (BlinkLevel_PeopleFalling)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.text.*;
import flash.utils.*;
public class BlinkLevel_PeopleFalling extends BlinkLevel {
const DEF_GOAL_NUM_CIVILIANS:uint = 20;
const LEVEL_MAX_TIME:uint = 120000;
var civLaunchTimer2:Timer;
var civLaunchTimer1:Timer;
var civLaunchTimer3:Timer;
public var hitAreaMC:MovieClip;
public var testBtn:SimpleButton;
public var pauseBtn:SimpleButton;
var civDropTimer:Timer;
public var mainCharaMC:MovieClip;
public var zoomMC:MovieClip;
var civLaunchableArr:Array;
var initNumCiviliansLeft:uint;
public var civilianMC1:Civilian;
public var civilianMC2:Civilian;
public var civilianMC3:Civilian;
public var screen_PauseMC:MovieClip;
public var civiliansLeftTxt:TextField;
public var blinkFacingLeft:Boolean;
public var civilianMC4:Civilian;
public var play4AllLogoGrphcMC:MovieClip;
public var blink_masterFacingLeft:Boolean;
var civSpawnedArr:Array;
var numCiviliansLeft:uint;
public var dialogueBoxMC:MovieClip;
public var mirageAnimMC:MovieClip;
var usingCLTimer1:Boolean;
var usingCLTimer2:Boolean;
var usingCLTimer3:Boolean;
public var hUD_MC:MovieClip;
public var numHits:uint;
public var destinationIconAnimMC:MovieClip;
public function BlinkLevel_PeopleFalling(){
addFrameScript(0, frame1, 1, frame2);
super();
this.levelName = BlinkConsts.LEVEL4_NAME;
this.levelNum = 4;
this.currMissionObjectiveStr = "Carry all civilians safely to the ground.";
this.currKR = this.blankKeyboardReceiver;
this.prePausedCurrKR = this.gameplayKR;
this.civSpawnedArr = new Array();
this.civLaunchableArr = new Array();
}
override public function doDifficultyAdjustments(_arg1:uint):void{
if (_arg1 == BlinkConsts.DIFFICULTY_NUM_EASY){
this.initNumCiviliansLeft = 10;
this.numCiviliansLeft = 10;
} else {
if (_arg1 == BlinkConsts.DIFFICULTY_NUM_NORMAL){
this.initNumCiviliansLeft = DEF_GOAL_NUM_CIVILIANS;
this.numCiviliansLeft = DEF_GOAL_NUM_CIVILIANS;
} else {
this.initNumCiviliansLeft = 30;
this.numCiviliansLeft = 30;
};
};
civiliansLeftTxt.text = String(this.numCiviliansLeft);
}
override public function whenNextLevel():void{
exitLevel();
if (MovieClip(root).PlayingThroughLevels){
MovieClip(root).screenMCOverlayMC.fadeToAndFromBlack(function (){
MovieClip(root).gotoAndStop("level_everyonefalling");
});
} else {
MovieClip(root).screenMCOverlayMC.fadeFromBlack();
MovieClip(root).gotoAndStop("levelselect");
};
}
private function disableTeleport():void{
hitAreaMC.removeEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp);
}
override public function initLevel():void{
trace(((this.levelName + ": ") + rootDoc.CurrDifficultyNum));
this.pausableMCArr.push(mainCharaMC);
this.pausableMCArr.push(dialogueBoxMC);
this.pausableMCArr.push(hUD_MC);
this.pausableMCArr.push(civilianMC1);
this.pausableMCArr.push(civilianMC2);
this.pausableMCArr.push(civilianMC3);
this.pausableMCArr.push(civilianMC4);
hUD_MC.initTimer(LEVEL_MAX_TIME, onTimeUp);
hUD_MC.setVisibleTimer(true);
hUD_MC.visible = true;
civilianMC1.DefGravDec = Civilian.SLOW_GRAV_DEC;
civilianMC2.DefGravDec = Civilian.SLOW_GRAV_DEC;
civilianMC3.DefGravDec = Civilian.SLOW_GRAV_DEC;
civilianMC4.DefGravDec = Civilian.SLOW_GRAV_DEC;
this.civLaunchableArr.push(civilianMC1);
this.civLaunchableArr.push(civilianMC2);
this.civLaunchableArr.push(civilianMC3);
this.civLaunchableArr.push(civilianMC4);
mainCharaMC.prePauseEnterFrame_xyUpdate = mainCharaMC.defEnterFrame_xyUpdate;
mainCharaMC.currEnterFrame_xyUpdate = function (){
};
mainCharaMC.addEventListener(Event.ENTER_FRAME, mainCharaMC.enterFrame_xyUpdate, false, 0, true);
dialogueBoxMC.visible = false;
this.civDropTimer = new Timer(1000, 1);
this.civDropTimer.addEventListener("timer", tryDropNewCiv, false, 0, true);
this.usingCLTimer1 = (this.usingCLTimer2 = (this.usingCLTimer3 = false));
this.timeScore = (this.numChancesBonus = 0);
this.civBonus = 5000;
this.levelCleared = (this.levelFailed = false);
rootDoc.tryUpdateLevelsUnlockedNum(4);
doDifficultyAdjustments(rootDoc.CurrDifficultyNum);
screen_PauseMC.addEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy, false, 0, true);
}
public function endAllLevelTriggers():void{
mainCharaMC.removeAllEventListeners();
mainCharaMC.showAsNormal();
civilianMC1.stopExisting();
civilianMC2.stopExisting();
civilianMC3.stopExisting();
civilianMC4.stopExisting();
hUD_MC.removeAllEventListeners();
}
function frame1(){
pauseBtn.addEventListener(MouseEvent.MOUSE_UP, pauseGame_MOUSE, false, 0, true);
testBtn.addEventListener(MouseEvent.MOUSE_UP, testFunc_MOUSE, false, 0, true);
}
function frame2(){
stop();
}
public function whenCivSafeDropped(_arg1:Civilian):void{
var civ = _arg1;
civ.Uncarriable = true;
civ.stopInjured();
civ.setEnterFrameFunc(function (){
});
civ.setCivSpriteColorTransform(new ColorTransform(1, 1, 1, 1, 0xFF, 0xFF, 0xFF, 0xFF));
civ.switchToAnim(Civilian.ANIM_NUM_IDLE);
destinationIconAnimMC.x = civ.x;
civ.doExitAnimation(function (){
destinationIconAnimMC.x = 700;
civLaunchableArr.push(civ);
doUpdateSafeDroppedCivs();
});
}
override public function pauseGameToggle():void{
if (rootDoc.GamePaused){
if (canUnpause()){
screen_PauseMC.resumeGame();
};
} else {
if (canPause()){
pauseLevel();
};
};
}
override public function unpauseLevel():void{
var _local1:uint;
var _local2:Civilian;
var _local3:*;
super.unpauseLevel();
mainCharaMC.currKR = this.currKR;
_local1 = this.civSpawnedArr.length;
_local3 = 0;
while (_local3 < _local1) {
_local2 = this.civSpawnedArr.pop();
_local2.spawnAt(_local2.x, _local2.y, _local2.defEnterFrameFunc);
_local3++;
};
pauseBtn.visible = this.pauseBtnShowing;
}
public function pauseGame_MOUSE(_arg1:MouseEvent):void{
pauseGame();
}
override public function determineTimeScore():uint{
var _local1:uint;
var _local2:uint;
_local1 = (this.initNumCiviliansLeft * 2000);
_local2 = LEVEL_MAX_TIME;
if (this.numMSecsToCompleteLevel <= _local1){
return (10000);
};
if (this.numMSecsToCompleteLevel <= _local2){
return ((((_local2 - (this.numMSecsToCompleteLevel - _local1)) / _local2) * 10000));
};
return (0);
}
public function showMissionObjectiveWhenPauseScreenRdy(_arg1:Event):void{
screen_PauseMC.removeEventListener(Event.ENTER_FRAME, showMissionObjectiveWhenPauseScreenRdy);
screen_PauseMC.showMissionObjective();
}
public function canDropNewCiv():Boolean{
return (true);
}
override public function whenMainCharaHit():void{
mainCharaMC.startShowAsDamaged();
takeAwayAChance((Math.max(0, this.numCiviliansLeft) + " civilians left"));
}
override public function exitLevel():void{
endAllLevelTriggers();
}
public function pauseGame():void{
pauseLevel();
}
private function disableGameplayKeyboardControls():void{
this.currKR = this.blankKeyboardReceiver;
mainCharaMC.currKR = this.currKR;
}
override public function onLevelCleared():void{
if (((!(this.levelCleared)) && (!(this.levelFailed)))){
this.levelCleared = true;
} else {
trace("recalling onLevelCleared()");
return;
};
super.pauseLevel();
endAllLevelTriggers();
mainCharaMC.currKR = this.blankKeyboardReceiver;
pauseBtn.visible = false;
hUD_MC.visible = false;
this.timeScore = determineTimeScore();
this.numChancesBonus = ((rootDoc.NumMissionFailures)==0) ? 5000 : 0;
rootDoc.Score = (rootDoc.Score + ((this.timeScore + this.numChancesBonus) + this.civBonus));
if (rootDoc.PlayingThroughLevels){
api_postGameScore_CHECKPOINT(this.numMSecsToCompleteLevel, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(this.numMSecsToCompleteLevel, "SingleLevels");
};
screen_PauseMC.showNextLevel();
}
override public function takeAwayAChance(_arg1:String=null):void{
super.takeAwayAChance(_arg1);
hUD_MC.updateNumChancesDisplay(MovieClip(root).NumChances);
}
private function onTimeUp():void{
onLevelFailed((((BlinkConsts.FAIL_MSG_TIME_UP + "\n") + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
}
override public function pauseLevel():void{
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
pauseBtn.visible = false;
screen_PauseMC.showPauseMenu();
}
public function tryTeleportTo(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
MovieClip(root).getSndManager().playSFX_Zoom();
mirageAnimMC.x = mainCharaMC.x;
mirageAnimMC.y = mainCharaMC.y;
if (_arg1 < 25){
_local3 = 25;
} else {
if (_arg1 > 495){
_local3 = 495;
} else {
_local3 = _arg1;
};
};
if (_arg2 > 305){
_local4 = 305;
} else {
_local4 = _arg2;
};
if ((_local3 - mainCharaMC.x) <= 0){
this.blinkFacingLeft = true;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_LEFT);
mirageAnimMC.doFade_Left();
zoomMC.doZoomLeft(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
} else {
this.blinkFacingLeft = false;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_RIGHT);
mirageAnimMC.doFade_Right();
zoomMC.doZoomRight(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
};
mainCharaMC.visible = false;
mainCharaMC.setFrozen(true);
mainCharaMC.x = (_local3 - 45);
mainCharaMC.y = (_local4 - 60);
mainCharaMC.yVel = 0;
}
public function tryDropNewCiv(_arg1:TimerEvent):void{
if (canDropNewCiv()){
};
}
public function whenZoomFinish():void{
mainCharaMC.visible = true;
if (this.blinkFacingLeft){
mainCharaMC.animateLeftBlinkArrival();
} else {
mainCharaMC.animateRightBlinkArrival();
};
mainCharaMC.aerial = !((mainCharaMC.y == 245));
mainCharaMC.setFrozen(false);
}
public function hitAreaMouseUp(_arg1:MouseEvent):void{
tryTeleportTo(mouseX, mouseY);
}
public function prepareCivLaunch():void{
if (!this.usingCLTimer1){
this.usingCLTimer1 = true;
this.civLaunchTimer1 = new Timer(Math.round((Math.random() * 1000)), 1);
this.civLaunchTimer1.addEventListener("timer", launchCiv1, false, 0, true);
this.civLaunchTimer1.start();
} else {
if (!this.usingCLTimer2){
this.usingCLTimer2 = true;
this.civLaunchTimer2 = new Timer(Math.round((Math.random() * 1000)), 1);
this.civLaunchTimer2.addEventListener("timer", launchCiv2, false, 0, true);
this.civLaunchTimer2.start();
} else {
if (!this.usingCLTimer3){
this.usingCLTimer3 = true;
this.civLaunchTimer3 = new Timer(Math.round((Math.random() * 1000)), 1);
this.civLaunchTimer3.addEventListener("timer", launchCiv3, false, 0, true);
this.civLaunchTimer3.start();
} else {
trace("--in BlinkLevel_PeopleFalling.prepareCivLaunch() all timers being used!?");
};
};
};
}
public function dropNewCivAt(_arg1:Civilian, _arg2:Number, _arg3:Number):void{
var civ = _arg1;
var xPos = _arg2;
var yPos = _arg3;
civ.initCivilian(mainCharaMC, Civilian.ANIM_NUM_FALLING, false, false, [], function (){
}, function (){
}, function (){
civ.startShowAsDamaged();
onCivilianAttacked();
}, function (){
whenCivSafeDropped(civ);
}, function (){
civ.startShowAsDamaged();
this.parent.civBonus = 0;
takeAwayAChance((((BlinkConsts.FAIL_MSG_DDROP_CIV + "\n") + Math.max(0, numCiviliansLeft)) + " civilians left"));
civ.doInjured();
});
civ.CurrInjuredFunc = function (){
trace("in Injured Func");
takeAwayAChance((((("On this level, when a civilian hits the ground before you catch them," + " you still need to go and help the civilian up.") + "\n") + Math.max(0, numCiviliansLeft)) + " civilians left"));
};
civ.Falling = true;
civ.switchToAnim(Civilian.ANIM_NUM_FALLING);
civ.LatestDropHeight = (this.levelGroundY - yPos);
civ.YVel = 0;
civ.DefGravDec = Civilian.SLOW_GRAV_DEC;
civ.CurrPickedUpFunc = function (){
civ.DefGravDec = Civilian.DEF_GRAV_DEC;
};
if (rootDoc.GamePaused){
civ.x = xPos;
civ.y = yPos;
this.civSpawnedArr.push(civ);
} else {
if (((this.levelCleared) || (this.levelFailed))){
civ.stopExisting();
} else {
civ.spawnAt(Math.round((Math.random() * 500)), yPos, civ.defEnterFrameFunc);
civ.updateCivilianStatusDisplay();
};
};
}
public function testFunc_MOUSE(_arg1:MouseEvent):void{
mainCharaMC.tryAnimateCarryMotion();
}
private function onCivilianAttacked():void{
this.civBonus = 0;
takeAwayAChance((((BlinkConsts.FAIL_MSG_ATTACK_CIV + "\n") + Math.max(0, this.numCiviliansLeft)) + " civilians left"));
}
override public function onLevelFailed(_arg1:String=null):void{
if (((!(this.levelFailed)) && (!(this.levelCleared)))){
this.levelFailed = true;
} else {
trace("recalling onLevelFailed()");
return;
};
endAllLevelTriggers();
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
rootDoc.NumChances = 3;
rootDoc.NumMissionFailures++;
pauseBtn.visible = false;
hUD_MC.visible = false;
if (rootDoc.PlayingThroughLevels){
api_postGameScore_GAMEOVER(-1, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(-1, "SingleLevels");
};
screen_PauseMC.showMissionFailed(_arg1);
}
override public function onLevelStartMissionObjClosed():void{
MovieClip(root).getSndManager().tryPlayMusic_GameplayMus(true);
dropNewCivAt(this.civLaunchableArr.shift(), Math.round((Math.random() * 500)), -100);
enableTeleport();
startLevelCompletionTimer();
screen_PauseMC.resumeGame();
}
public function launchCiv3(_arg1:TimerEvent):void{
this.civLaunchTimer3.removeEventListener("timer", launchCiv3);
if (this.civLaunchableArr.length == 0){
trace("in BlinkLevel_PeopleFalling.launchCiv3(), launchable array is empty");
return;
};
dropNewCivAt(civLaunchableArr.shift(), Math.round((Math.random() * 500)), -100);
this.usingCLTimer3 = false;
}
public function launchCiv1(_arg1:TimerEvent):void{
this.civLaunchTimer1.removeEventListener("timer", launchCiv1);
if (this.civLaunchableArr.length == 0){
trace("in BlinkLevel_PeopleFalling.launchCiv1(), launchable array is empty");
return;
};
dropNewCivAt(civLaunchableArr.shift(), Math.round((Math.random() * 500)), -100);
this.usingCLTimer1 = false;
}
public function launchCiv2(_arg1:TimerEvent):void{
this.civLaunchTimer2.removeEventListener("timer", launchCiv2);
if (this.civLaunchableArr.length == 0){
trace("in BlinkLevel_PeopleFalling.launchCiv2(), launchable array is empty");
return;
};
dropNewCivAt(civLaunchableArr.shift(), Math.round((Math.random() * 500)), -100);
this.usingCLTimer2 = false;
}
private function enableTeleport():void{
hitAreaMC.addEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp, false, 0, true);
}
public function doUpdateSafeDroppedCivs():void{
this.numCiviliansLeft--;
civiliansLeftTxt.text = String(Math.max(0, this.numCiviliansLeft));
if (this.numCiviliansLeft <= 0){
if (rootDoc.NumChances <= 0){
onLevelFailed("You almost got it, don't give up.");
return;
};
onLevelCleared();
return;
};
if (rootDoc.CurrDifficultyNum == BlinkConsts.DIFFICULTY_NUM_NORMAL){
if (this.numCiviliansLeft == 15){
prepareCivLaunch();
};
prepareCivLaunch();
} else {
if (rootDoc.CurrDifficultyNum == BlinkConsts.DIFFICULTY_NUM_HARD){
if (this.numCiviliansLeft == 25){
prepareCivLaunch();
} else {
if (this.numCiviliansLeft == 15){
prepareCivLaunch();
};
};
prepareCivLaunch();
} else {
prepareCivLaunch();
};
};
}
}
}//package
Section 120
//BlinkLevel_Tutorial (BlinkLevel_Tutorial)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.filters.*;
public class BlinkLevel_Tutorial extends BlinkLevel {
public var tutorialControlsDisplayMC:MovieClip;
public var ballOfLightMC:MovieClip;
public var breakableWallMC1:MovieClip;
public var breakableWallMC4:MovieClip;
public var breakableWallMC5:MovieClip;
public var breakableWallMC2:MovieClip;
public var breakableWallMC3:MovieClip;
public var hitAreaMC:MovieClip;
public var testBtn:SimpleButton;
public var pauseBtn:SimpleButton;
public var materializeAnimMC:MovieClip;
var colorTransform_tutorialCiv:ColorTransform;
var glowFilter_ballOfLight:GlowFilter;
public var mainCharaMC:MovieClip;
public var zoomMC:MovieClip;
var dialogueLineArr:Array;
var currDialogueLineIndx:uint;
public var splashScreenFadeInAnimMC:MovieClip;
var reprimand_CivilianAttackDL1:DialogueLine;
var reprimand_CivilianAttackDL2:DialogueLine;
var reprimand_CivilianAttackDL3:DialogueLine;
public var civilianMC2:Civilian;
public var civilianMC1:Civilian;
public var civilianMC3:Civilian;
public var skipTutorialBtn:SimpleButton;
public var blackFadeoutMC:MovieClip;
var numFirstAttackTargetsDestroyed:uint;
public var screen_PauseMC:MovieClip;
public var blinkFacingLeft:Boolean;
public var play4AllLogoGrphcMC:MovieClip;
var numFirstCiviliansFound:uint;
public var dialogueBoxMC:MovieClip;
public var mirageAnimMC:MovieClip;
var reprimand_CivilianDropDL1:DialogueLine;
var reprimand_CivilianDropDL2:DialogueLine;
public var hUD_MC:MovieClip;
public var masterCharaMC:MovieClip;
public var destinationIconAnimMC:MovieClip;
var reprimand_CivilianDropDL3:DialogueLine;
public function BlinkLevel_Tutorial(){
colorTransform_tutorialCiv = new ColorTransform(1, 1, 1, 1, 0, 128, 128, 0xFF);
glowFilter_ballOfLight = new GlowFilter(0xFFFF, 1, 16, 16, 2, 1, false, false);
addFrameScript(0, frame1, 1, frame2);
super();
this.levelName = BlinkConsts.LEVEL1_NAME;
this.levelNum = 1;
this.currMissionObjectiveStr = ("Prove to your teacher that you are worthy of being on real missions." + " Demonstrate your abilities by following his commands.");
this.currKR = this.blankKeyboardReceiver;
this.dialogueLineArr = new Array();
populateDialogueLineArr();
this.reprimand_CivilianAttackDL1 = new DialogueLine(resumeRegularDialogue, false, 3000, BlinkConsts.SPEAKER_NUM_MASTER, "Be GENTLE with the civilians!!");
this.reprimand_CivilianAttackDL2 = new DialogueLine(resumeRegularDialogue, false, 3000, BlinkConsts.SPEAKER_NUM_MASTER, "NEVER attack a civilian!");
this.reprimand_CivilianAttackDL3 = new DialogueLine(resumeRegularDialogue, false, 4000, BlinkConsts.SPEAKER_NUM_MASTER, "During a real mission, you would be penalized for attacking the innocent!");
this.reprimand_CivilianDropDL1 = new DialogueLine(resumeRegularDialogue, false, 3000, BlinkConsts.SPEAKER_NUM_MASTER, "NEVER drop a civilian from too high!");
this.reprimand_CivilianDropDL2 = new DialogueLine(resumeRegularDialogue, false, 3000, BlinkConsts.SPEAKER_NUM_MASTER, "Civilians cannot Blink like you, so put them down NEAR the ground!");
this.reprimand_CivilianDropDL3 = new DialogueLine(resumeRegularDialogue, false, 4000, BlinkConsts.SPEAKER_NUM_MASTER, "During a real mission, you would be penalized for dropping the innocent!");
}
private function blackFadeoutAndDisplayNextDL():void{
blackFadeoutMC.gotoAndPlay("fadeout");
this.levelStarted = true;
pauseBtn.visible = (this.pauseBtnShowing = true);
displayNextDialogueLine();
}
public function doPhase11():void{
destinationIconAnimMC.x = 450;
destinationIconAnimMC.y = 0xFF;
civilianMC2.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, true, true, [destinationIconAnimMC], breakableWallMC1.doBreakAnim, function (){
civilianMC2.currEnterFrameFunc = function (){
};
MovieClip(root).getSndManager().playSFX_TutorialTaskSuccess();
civilianMC2.doExitAnimation(doPhase12);
}, function (){
civilianMC2.startShowAsDamaged();
reprimand_CivilianAttacking();
this.parent.civBonus = 0;
}, function (){
}, function (){
civilianMC2.startShowAsDamaged();
reprimand_CivilianDropping();
this.parent.civBonus = 0;
});
breakableWallMC1.initBreakableWall(function (){
breakableWallMC1.stopExisting();
});
breakableWallMC1.spawnAt(245, 230, function (){
});
civilianMC2.spawnAt(240, 245, civilianMC2.defEnterFrameFunc);
displayNextDialogueLine();
}
private function backToGameplay():void{
this.currDialogueLineIndx++;
dialogueBoxMC.visible = false;
}
public function whenTutorialComplete():void{
onLevelCleared();
}
public function reprimand_CivilianAttacking():void{
var _local1:Number;
_local1 = Math.random();
if (_local1 <= 0.25){
dialogueBoxMC.displayDialogueLine(this.reprimand_CivilianAttackDL1);
} else {
if (_local1 <= 0.5){
dialogueBoxMC.displayDialogueLine(this.reprimand_CivilianAttackDL2);
} else {
dialogueBoxMC.displayDialogueLine(this.reprimand_CivilianAttackDL3);
};
};
}
public function whenOneOfFirstCiviliansFound():void{
MovieClip(root).getSndManager().playSFX_TutorialTaskSuccess();
this.numFirstCiviliansFound++;
if (this.numFirstCiviliansFound == 3){
whenAllFirstCiviliansFound();
};
}
override public function whenNextLevel():void{
exitLevel();
if (MovieClip(root).PlayingThroughLevels){
MovieClip(root).screenMCOverlayMC.fadeInLocationExposition(function (){
MovieClip(root).gotoAndStop("level_fire");
}, "Crisis Location: Default Inc. building");
} else {
MovieClip(root).screenMCOverlayMC.fadeFromBlack();
MovieClip(root).gotoAndStop("levelselect");
};
}
private function disableTeleport():void{
hitAreaMC.removeEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp);
}
override public function initLevel():void{
trace(((this.levelName + ": ") + rootDoc.CurrDifficultyNum));
this.pausableMCArr.push(mainCharaMC);
this.pausableMCArr.push(dialogueBoxMC);
this.pausableMCArr.push(ballOfLightMC);
this.pausableMCArr.push(masterCharaMC);
this.pausableMCArr.push(civilianMC1);
this.pausableMCArr.push(civilianMC2);
this.pausableMCArr.push(civilianMC3);
this.pausableMCArr.push(breakableWallMC1);
this.pausableMCArr.push(breakableWallMC2);
this.pausableMCArr.push(breakableWallMC3);
this.pausableMCArr.push(breakableWallMC4);
this.pausableMCArr.push(breakableWallMC5);
hUD_MC.setVisibleTimer(false);
hUD_MC.visible = false;
masterCharaMC.currEnterFrame_xyUpdate = function (){
};
masterCharaMC.prePauseEnterFrame_xyUpdate = function (){
};
masterCharaMC.aggressive = false;
masterCharaMC.currAIPhase = masterCharaMC.AI_PHASE_IDLE;
masterCharaMC.prePauseEnterFrame_AI = function (){
};
masterCharaMC.currEnterFrame_AI = function (){
};
masterCharaMC.addEventListener(Event.ENTER_FRAME, masterCharaMC.enterFrame_xyUpdate, false, 0, true);
masterCharaMC.addEventListener(Event.ENTER_FRAME, masterCharaMC.enterFrame_AI, false, 0, true);
this.currDialogueLineIndx = 0;
mainCharaMC.currEnterFrame_xyUpdate = mainCharaMC.defEnterFrame_xyUpdate;
mainCharaMC.addEventListener(Event.ENTER_FRAME, mainCharaMC.enterFrame_xyUpdate, false, 0, true);
materializeAnimMC.initMaterializer(showSprite_Master, hideSprite_Master);
ballOfLightMC.initBallOfLight();
this.numFirstAttackTargetsDestroyed = 0;
this.numFirstCiviliansFound = 0;
civilianMC1.ColorTransform_normal = this.colorTransform_tutorialCiv;
civilianMC2.ColorTransform_normal = this.colorTransform_tutorialCiv;
civilianMC3.ColorTransform_normal = this.colorTransform_tutorialCiv;
civilianMC1.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, true, true, [destinationIconAnimMC], function (){
civilianMC1.Uncarriable = true;
civilianMC1.switchToAnim(Civilian.ANIM_NUM_RUN_LEFT, Civilian.ANIM_NUM_RUN_LEFT);
civilianMC1.passedInEnterFrameFunc = civilianMC1.runToScreenLeftEnterFrameFunc;
civilianMC1.currEnterFrameFunc = civilianMC1.runToScreenLeftEnterFrameFunc;
}, function (){
civilianMC1.currEnterFrameFunc = function (){
};
civilianMC1.doExitAnimation(whenOneOfFirstCiviliansFound);
}, function (){
civilianMC1.startShowAsDamaged();
reprimand_CivilianAttacking();
this.parent.civBonus = 0;
}, function (){
}, function (){
civilianMC1.startShowAsDamaged();
reprimand_CivilianDropping();
this.parent.civBonus = 0;
});
civilianMC2.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, true, true, [destinationIconAnimMC], function (){
civilianMC2.Uncarriable = true;
civilianMC2.switchToAnim(Civilian.ANIM_NUM_RUN_LEFT, Civilian.ANIM_NUM_RUN_LEFT);
civilianMC2.passedInEnterFrameFunc = civilianMC2.runToScreenLeftEnterFrameFunc;
civilianMC2.currEnterFrameFunc = civilianMC2.runToScreenLeftEnterFrameFunc;
}, function (){
civilianMC2.currEnterFrameFunc = function (){
};
civilianMC2.doExitAnimation(whenOneOfFirstCiviliansFound);
}, function (){
civilianMC2.startShowAsDamaged();
reprimand_CivilianAttacking();
this.parent.civBonus = 0;
}, function (){
}, function (){
civilianMC2.startShowAsDamaged();
reprimand_CivilianDropping();
this.parent.civBonus = 0;
});
civilianMC3.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, true, true, [destinationIconAnimMC], function (){
civilianMC3.Uncarriable = true;
civilianMC3.switchToAnim(Civilian.ANIM_NUM_RUN_LEFT, Civilian.ANIM_NUM_RUN_LEFT);
civilianMC3.passedInEnterFrameFunc = civilianMC3.runToScreenLeftEnterFrameFunc;
civilianMC3.currEnterFrameFunc = civilianMC3.runToScreenLeftEnterFrameFunc;
}, function (){
civilianMC3.currEnterFrameFunc = function (){
};
civilianMC3.doExitAnimation(whenOneOfFirstCiviliansFound);
}, function (){
civilianMC3.startShowAsDamaged();
reprimand_CivilianAttacking();
this.parent.civBonus = 0;
}, function (){
}, function (){
civilianMC3.startShowAsDamaged();
reprimand_CivilianDropping();
this.parent.civBonus = 0;
});
rootDoc.Score = 0;
rootDoc.NumMissionFailures = 0;
this.timeScore = (this.numChancesBonus = 0);
this.civBonus = 5000;
this.levelCleared = (this.levelFailed = false);
pauseBtn.visible = (this.pauseBtnShowing = false);
dialogueBoxMC.displayDialogueLine(this.dialogueLineArr[0]);
if ((((rootDoc.LevelsUnlockedNum > 0)) && (rootDoc.PlayingThroughLevels))){
skipTutorialBtn.x = 492;
};
}
private function enableGameplayKeyboardControlsNoAttack():void{
this.currKR = this.gameplayNoAttackKR;
mainCharaMC.currKR = this.currKR;
}
function frame1(){
pauseBtn.addEventListener(MouseEvent.CLICK, pauseGame_MOUSE, false, 0, true);
skipTutorialBtn.addEventListener(MouseEvent.CLICK, skipTutorial, false, 0, true);
testBtn.addEventListener(MouseEvent.CLICK, testFunc_MOUSE, false, 0, true);
}
private function materializeFirstAttackTargets():void{
breakableWallMC1.filters = [glowFilter_ballOfLight];
breakableWallMC2.filters = [glowFilter_ballOfLight];
breakableWallMC3.filters = [glowFilter_ballOfLight];
breakableWallMC4.filters = [glowFilter_ballOfLight];
breakableWallMC5.filters = [glowFilter_ballOfLight];
breakableWallMC1.initBreakableWall(whenOneOfFirstAttackTargetsDestroyed);
breakableWallMC2.initBreakableWall(whenOneOfFirstAttackTargetsDestroyed);
breakableWallMC3.initBreakableWall(whenOneOfFirstAttackTargetsDestroyed);
breakableWallMC4.initBreakableWall(whenOneOfFirstAttackTargetsDestroyed);
breakableWallMC5.initBreakableWall(whenOneOfFirstAttackTargetsDestroyed);
breakableWallMC1.spawnAt(225, 230, breakableWallMC1.defHitTestFunc);
breakableWallMC2.spawnAt(10, 260, breakableWallMC2.defHitTestFunc);
breakableWallMC3.spawnAt(510, 230, breakableWallMC3.defHitTestFunc);
breakableWallMC4.spawnAt(355, 150, breakableWallMC4.defHitTestFunc);
breakableWallMC5.spawnAt(0xFF, 10, breakableWallMC5.defHitTestFunc);
}
override public function pauseGameToggle():void{
if (rootDoc.GamePaused){
if (canUnpause()){
screen_PauseMC.resumeGame();
};
} else {
if (canPause()){
pauseLevel();
};
};
}
override public function unpauseLevel():void{
super.unpauseLevel();
mainCharaMC.currKR = this.currKR;
pauseBtn.visible = this.pauseBtnShowing;
}
private function masterDematerialize():void{
materializeAnimMC.dematerializeAt(235, 0xFF);
}
private function populateDialogueLineArr():void{
this.dialogueLineArr.push(new DialogueLine(blackFadeoutAndDisplayNextDL, true, 0, BlinkConsts.SPEAKER_NUM_S1, "Master, I want power..."));
this.dialogueLineArr.push(new DialogueLine(masterMaterialize, true, 0, BlinkConsts.SPEAKER_NUM_S1, "I want power to help the world."));
this.dialogueLineArr.push(new DialogueLine(displayNextDialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_MASTER, "First, you must prove yourself."));
this.dialogueLineArr.push(new DialogueLine(displayNextDialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_MASTER, "Show me what you have learned from your training."));
this.dialogueLineArr.push(new DialogueLine(whenFirstControl, true, 0, BlinkConsts.SPEAKER_NUM_MASTER, "From the beginning..."));
this.dialogueLineArr.push(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "Follow Right!"));
this.dialogueLineArr.push(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "Follow Left!"));
this.dialogueLineArr.push(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "Up here!"));
this.dialogueLineArr.push(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "Up again!"));
this.dialogueLineArr.push(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "Let's see your Blink technique."));
this.dialogueLineArr.push(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "BLINK!"));
this.dialogueLineArr.push(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "Break them all!"));
this.dialogueLineArr.push(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "Free them!"));
this.dialogueLineArr.push(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "Bring them!"));
this.dialogueLineArr.push(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "Save them!"));
this.dialogueLineArr.push(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "Help them!"));
this.dialogueLineArr.push(new DialogueLine(function (){
}, false, 100, BlinkConsts.SPEAKER_NUM_MASTER, "Rescue them!"));
this.dialogueLineArr.push(new DialogueLine(displayNextDialogueLine, false, 3000, BlinkConsts.SPEAKER_NUM_MASTER, "Good."));
this.dialogueLineArr.push(new DialogueLine(displayNextDialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_MASTER, "Well done."));
this.dialogueLineArr.push(new DialogueLine(displayNextDialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_MASTER, "I believe you are ready to prove yourself in some real missions."));
this.dialogueLineArr.push(new DialogueLine(displayNextDialogueLine, true, 0, BlinkConsts.SPEAKER_NUM_MASTER, "Even though there are other field agents to help you, do not be careless."));
this.dialogueLineArr.push(new DialogueLine(whenTutorialComplete, true, 0, BlinkConsts.SPEAKER_NUM_MASTER, "Show that you are worthy of the Allied Blink Leaders and Elite Disciples uniform."));
}
public function pauseGame_MOUSE(_arg1:MouseEvent):void{
pauseGame();
}
function frame2(){
stop();
}
private function enableGameplayKeyboardControls():void{
this.currKR = this.gameplayKR;
mainCharaMC.currKR = this.currKR;
}
override public function determineTimeScore():uint{
var _local1:uint;
var _local2:uint;
_local1 = 20000;
_local2 = 60000;
if (this.numMSecsToCompleteLevel <= _local1){
return (10000);
};
if (this.numMSecsToCompleteLevel <= _local2){
return ((((_local2 - (this.numMSecsToCompleteLevel - _local1)) / _local2) * 10000));
};
return (0);
}
public function endAllLevelTriggers():void{
mainCharaMC.removeAllEventListeners();
mainCharaMC.showAsNormal();
breakableWallMC1.stopExisting();
breakableWallMC2.stopExisting();
breakableWallMC3.stopExisting();
breakableWallMC4.stopExisting();
breakableWallMC5.stopExisting();
civilianMC1.stopExisting();
civilianMC2.stopExisting();
civilianMC3.stopExisting();
hUD_MC.removeAllEventListeners();
}
public function testEnterFrame_xyUpdate():void{
if (mainCharaMC.frozen){
return;
};
if (mainCharaMC.currKR.KeyPressed_RIGHT){
if (mainCharaMC.currKR.KeyPressed_LEFT){
mainCharaMC.xVel = 0;
} else {
mainCharaMC.xVel = 10;
};
} else {
if (mainCharaMC.currKR.KeyPressed_LEFT){
mainCharaMC.xVel = -10;
} else {
mainCharaMC.xVel = 0;
};
};
if ((mainCharaMC.x + mainCharaMC.xVel) > 450){
mainCharaMC.x = 450;
} else {
if ((mainCharaMC.x + mainCharaMC.xVel) < -20){
mainCharaMC.x = -20;
} else {
mainCharaMC.x = (mainCharaMC.x + mainCharaMC.xVel);
};
};
if (((mainCharaMC.jumping) || (mainCharaMC.aerial))){
mainCharaMC.yVel = (mainCharaMC.yVel + mainCharaMC.DEF_GRAV_DEC);
if (mainCharaMC.y > 245){
mainCharaMC.jumping = false;
mainCharaMC.aerial = false;
mainCharaMC.yVel = 0;
mainCharaMC.y = 245;
mainCharaMC.animateLandingMovement();
};
};
mainCharaMC.y = (mainCharaMC.y + mainCharaMC.yVel);
}
public function whenOneOfFirstAttackTargetsDestroyed():void{
MovieClip(root).getSndManager().playSFX_TutorialTaskSuccess();
this.numFirstAttackTargetsDestroyed++;
if (this.numFirstAttackTargetsDestroyed == 5){
whenAllFirstAttackTargetsDestroyed();
};
}
override public function exitLevel():void{
endAllLevelTriggers();
}
public function pauseGame():void{
pauseLevel();
}
private function masterMaterialize():void{
dialogueBoxMC.visible = false;
materializeAnimMC.materializeAt(235, 0xFF);
}
private function whenFirstControl():void{
startLevelCompletionTimer();
masterDematerialize();
ballOfLightMC.x = 235;
ballOfLightMC.y = 300;
ballOfLightMC.currEnterFrameFunc = ballOfLightMC.onEF_movement1;
enableGameplayKeyboardControlsNoAttack();
tutorialControlsDisplayMC.x = 0;
tutorialControlsDisplayMC.showControls_RunRight();
displayNextDialogueLine();
}
override public function onLevelCleared():void{
if (((!(this.levelCleared)) && (!(this.levelFailed)))){
this.levelCleared = true;
} else {
trace("recalling onLevelCleared()");
return;
};
super.pauseLevel();
endAllLevelTriggers();
mainCharaMC.currKR = this.blankKeyboardReceiver;
this.timeScore = determineTimeScore();
this.numChancesBonus = ((rootDoc.NumMissionFailures)==0) ? 5000 : 0;
rootDoc.Score = (rootDoc.Score + ((this.timeScore + this.numChancesBonus) + this.civBonus));
if (rootDoc.PlayingThroughLevels){
api_postGameScore_CHECKPOINT(this.numMSecsToCompleteLevel, rootDoc.difficultyNumToStr(rootDoc.CurrDifficultyNum));
} else {
api_postGameScore_GAMEOVER(this.numMSecsToCompleteLevel, "SingleLevels");
};
rootDoc.tryUpdateLevelsUnlockedNum(1);
screen_PauseMC.showNextLevel();
}
private function disableGameplayKeyboardControls():void{
this.currKR = this.blankKeyboardReceiver;
mainCharaMC.currKR = this.currKR;
}
override public function pauseLevel():void{
super.pauseLevel();
mainCharaMC.currKR = this.blankKeyboardReceiver;
pauseBtn.visible = false;
screen_PauseMC.showPauseMenu();
}
public function tryTeleportTo(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
MovieClip(root).getSndManager().playSFX_Zoom();
mirageAnimMC.x = mainCharaMC.x;
mirageAnimMC.y = mainCharaMC.y;
if (_arg1 < 25){
_local3 = 25;
} else {
if (_arg1 > 495){
_local3 = 495;
} else {
_local3 = _arg1;
};
};
if (_arg2 > 305){
_local4 = 305;
} else {
_local4 = _arg2;
};
if ((_local3 - mainCharaMC.x) <= 0){
this.blinkFacingLeft = true;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_LEFT);
mirageAnimMC.doFade_Left();
zoomMC.doZoomLeft(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
} else {
this.blinkFacingLeft = false;
mainCharaMC.switchToCharState(mainCharaMC.CHAR_STATE_BLINK_RIGHT);
mirageAnimMC.doFade_Right();
zoomMC.doZoomRight(mainCharaMC.x, mainCharaMC.y, (_local3 - 45), (_local4 - 60));
};
mainCharaMC.visible = false;
mainCharaMC.setFrozen(true);
mainCharaMC.x = (_local3 - 45);
mainCharaMC.y = (_local4 - 60);
mainCharaMC.yVel = 0;
}
private function hideSprite_Master():void{
masterCharaMC.x = 700;
masterCharaMC.visible = false;
}
private function whenSecondControl():void{
tutorialControlsDisplayMC.showControls_RunLeft();
displayNextDialogueLine();
}
public function whenZoomFinish():void{
mainCharaMC.visible = true;
if (this.blinkFacingLeft){
mainCharaMC.animateLeftBlinkArrival();
} else {
mainCharaMC.animateRightBlinkArrival();
};
mainCharaMC.aerial = !((mainCharaMC.y == 245));
mainCharaMC.setFrozen(false);
}
private function showSprite_Master():void{
masterCharaMC.x = materializeAnimMC.x;
masterCharaMC.y = 245;
masterFirstDLineAndDNDL();
}
public function whenAllFirstCiviliansFound():void{
civilianMC1.stopExisting();
civilianMC2.stopExisting();
civilianMC3.stopExisting();
doPhase10();
}
public function hitAreaMouseUp(_arg1:MouseEvent):void{
tryTeleportTo(mouseX, mouseY);
}
public function displayNextDialogueLine():void{
this.currDialogueLineIndx++;
dialogueBoxMC.displayDialogueLine(this.dialogueLineArr[this.currDialogueLineIndx]);
}
public function when2ndBlinkComplete():void{
stopLevelCompletionTimer();
afterSplashScreenFadePoint();
}
public function enableTeleportAndDisplayNextDL():void{
enableTeleport();
displayNextDialogueLine();
}
public function afterSplashScreenFadePoint():void{
tutorialControlsDisplayMC.showControls_Attack();
materializeFirstAttackTargets();
enableGameplayKeyboardControls();
enableTeleport();
startLevelCompletionTimer();
displayNextDialogueLine();
}
public function testFunc_MOUSE(_arg1:MouseEvent):void{
mainCharaMC.animateRightAttack();
}
public function resumeRegularDialogue():void{
dialogueBoxMC.displayDialogueLine(this.dialogueLineArr[this.currDialogueLineIndx]);
}
public function doPhase10():void{
tutorialControlsDisplayMC.showControls_Carry();
destinationIconAnimMC.x = 0;
destinationIconAnimMC.y = 0xFF;
civilianMC1.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, false, true, [destinationIconAnimMC], function (){
}, function (){
civilianMC1.currEnterFrameFunc = function (){
};
MovieClip(root).getSndManager().playSFX_TutorialTaskSuccess();
civilianMC1.doExitAnimation(doPhase11);
}, function (){
civilianMC1.startShowAsDamaged();
reprimand_CivilianAttacking();
this.parent.civBonus = 0;
}, function (){
}, function (){
civilianMC1.startShowAsDamaged();
reprimand_CivilianDropping();
this..parent.civBonus = 0;
});
civilianMC1.spawnAt(240, 245, civilianMC1.defEnterFrameFunc);
displayNextDialogueLine();
}
public function doPhase12():void{
destinationIconAnimMC.x = 450;
destinationIconAnimMC.y = 50;
civilianMC3.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, false, true, [destinationIconAnimMC], function (){
}, function (){
civilianMC3.currEnterFrameFunc = function (){
};
MovieClip(root).getSndManager().playSFX_TutorialTaskSuccess();
civilianMC3.doExitAnimation(doPhase13);
}, function (){
civilianMC3.startShowAsDamaged();
reprimand_CivilianAttacking();
this.parent.civBonus = 0;
}, function (){
}, function (){
civilianMC3.startShowAsDamaged();
reprimand_CivilianDropping();
this.parent.civBonus = 0;
});
civilianMC3.spawnAt(240, 245, civilianMC3.defEnterFrameFunc);
displayNextDialogueLine();
}
public function doPhase14():void{
hUD_MC.visible = false;
tutorialControlsDisplayMC.visible = false;
stopLevelCompletionTimer();
this.usingLevelCompletionTimer = false;
disableGameplayKeyboardControls();
disableTeleport();
destinationIconAnimMC.x = 700;
destinationIconAnimMC.visible = false;
displayNextDialogueLine();
}
private function enableTeleport():void{
hitAreaMC.addEventListener(MouseEvent.MOUSE_UP, hitAreaMouseUp, false, 0, true);
}
public function doPhase13():void{
destinationIconAnimMC.x = 0xFF;
destinationIconAnimMC.y = 0xFF;
civilianMC1.initCivilian(mainCharaMC, Civilian.ANIM_NUM_IDLE, false, true, [destinationIconAnimMC], function (){
}, function (){
civilianMC1.currEnterFrameFunc = function (){
};
MovieClip(root).getSndManager().playSFX_TutorialTaskSuccess();
civilianMC1.doExitAnimation();
doPhase14();
}, function (){
civilianMC1.startShowAsDamaged();
reprimand_CivilianAttacking();
this.parent.civBonus = 0;
}, function (){
}, function (){
civilianMC1.startShowAsDamaged();
reprimand_CivilianDropping();
this.parent.civBonus = 0;
});
civilianMC1.spawnAt(0xFF, 10, civilianMC1.aerialSuspendedEnterFrameFunc);
displayNextDialogueLine();
}
public function reprimand_CivilianDropping():void{
var _local1:Number;
_local1 = Math.random();
if (_local1 <= 0.25){
dialogueBoxMC.displayDialogueLine(this.reprimand_CivilianDropDL1);
} else {
if (_local1 <= 0.5){
dialogueBoxMC.displayDialogueLine(this.reprimand_CivilianDropDL2);
} else {
dialogueBoxMC.displayDialogueLine(this.reprimand_CivilianDropDL3);
};
};
}
public function whenAllFirstAttackTargetsDestroyed():void{
breakableWallMC1.stopExisting();
breakableWallMC2.stopExisting();
breakableWallMC3.stopExisting();
breakableWallMC4.stopExisting();
breakableWallMC5.stopExisting();
destinationIconAnimMC.x = 0;
destinationIconAnimMC.y = 280;
civilianMC1.updateCivilianStatusDisplay();
civilianMC2.updateCivilianStatusDisplay();
civilianMC3.updateCivilianStatusDisplay();
civilianMC1.spawnAt(75, 245, civilianMC1.defEnterFrameFunc);
civilianMC2.spawnAt(250, 245, civilianMC2.defEnterFrameFunc);
civilianMC3.spawnAt(385, 160, civilianMC3.aerialSuspendedEnterFrameFunc);
displayNextDialogueLine();
}
private function masterFirstDLineAndDNDL():void{
dialogueBoxMC.visible = true;
displayNextDialogueLine();
}
override public function onMusicToggleOn():void{
}
public function skipTutorial(_arg1:MouseEvent):void{
pauseBtn.visible = (this.pauseBtnShowing = false);
whenNextLevel();
}
}
}//package
Section 121
//BrickBreak (BrickBreak)
package {
import flash.media.*;
public dynamic class BrickBreak extends Sound {
}
}//package
Section 122
//BuildingCrumble (BuildingCrumble)
package {
import flash.media.*;
public dynamic class BuildingCrumble extends Sound {
}
}//package
Section 123
//CivExitAnim (CivExitAnim)
package {
import flash.media.*;
public dynamic class CivExitAnim extends Sound {
}
}//package
Section 124
//Civilian (Civilian)
package {
import flash.display.*;
import flash.events.*;
import example.*;
import flash.geom.*;
import flash.utils.*;
public class Civilian extends MovieClip {
public var attackTargetIconAnimMC:MovieClip;
var naturallyFalling:Boolean;
var currInjuredFunc:Function;
var currOnUntrappedFunc:Function;
var passedInAnimNum:uint;
var colorTransform_lost:ColorTransform;
var yVel:Number;// = 0
var runningLeft:Boolean;
var uncarriable:Boolean;
var injuredTimer:Timer;
var falling:Boolean;
public var postExitAnimFunc:Function;
var droppedX:Number;
var colorTransform_normal:ColorTransform;
var currOnAttackedFunc:Function;
var runningMinX:Number;
var panicking:Boolean;
var mainCharaMC:MovieClip;
var currEnterFrameFunc:Function;
var currOnFoundFunc:Function;
var trapped:Boolean;
public var hitBoxMC:MovieClip;
var currOnDangerDroppedFunc:Function;
var carried:Boolean;
var currOnSafeDroppedFunc:Function;
var passedInEnterFrameFunc:Function;
var dangerMC:MovieClip;
var usingInjuredTimer:Boolean;
var currAnimNum:uint;
public var passedInAFunction:Boolean;
var lost:Boolean;
var destinationIconArr:Array;
var damagedTimer:Timer;
var groundY:Number;
var defGravDec:Number;// = 1
var prePauseEnterFrameFunc:Function;
var latestDropHeight:Number;
var colorTransform_damaged:ColorTransform;
var currPickedUpFunc:Function;
var civilianAvSprite:AvatarSprite;
public static const ANIM_NUM_FALLING:uint = 3;
public static const ANIM_NUM_RUN_RIGHT:uint = 2;
public static const ANIM_NUM_RUN_LEFT:uint = 1;
public static const SLOW_GRAV_DEC:Number = 0.2;
public static const DANGER_DROP_HEIGHT:Number = 150;
public static const DEF_RUN_SPD:Number = 4;
public static const ANIM_NUM_IDLE:uint = 0;
public static const DEF_GRAV_DEC:Number = 1;
public function Civilian(){
defGravDec = DEF_GRAV_DEC;
yVel = 0;
colorTransform_lost = new ColorTransform(1, 1, 1, 1, 128, 128, 0, 0xFF);
colorTransform_damaged = new ColorTransform(1, 1, 1, 1, 128, 0, 0, 0xFF);
colorTransform_normal = new ColorTransform();
super();
addFrameScript(0, frame1, 1, frame2, 24, frame25);
this.destinationIconArr = new Array();
this.currEnterFrameFunc = function (){
};
this.prePauseEnterFrameFunc = this.currEnterFrameFunc;
this.damagedTimer = new Timer(500);
this.damagedTimer.addEventListener("timer", damagedDisplayComplete, false, 0, true);
this.currAnimNum = ANIM_NUM_IDLE;
this.passedInAnimNum = ANIM_NUM_IDLE;
this.panicking = false;
}
public function set LatestDropHeight(_arg1:Number):void{
this.latestDropHeight = _arg1;
}
public function get LatestDropHeight():Number{
return (this.latestDropHeight);
}
public function endPanicRunLeftAndRightEFF():void{
this.panicking = false;
}
public function pauseMC():void{
if (this.currEnterFrameFunc != null){
this.prePauseEnterFrameFunc = this.currEnterFrameFunc;
this.currEnterFrameFunc = function (){
};
} else {
trace("Civilian.pauseMC() enter frame must be NULL");
};
if (this.usingInjuredTimer){
this.injuredTimer.stop();
};
}
public function set CurrPickedUpFunc(_arg1:Function):void{
this.currPickedUpFunc = _arg1;
}
public function set CurrInjuredFunc(_arg1:Function):void{
this.currInjuredFunc = _arg1;
}
public function get Uncarriable():Boolean{
return (this.uncarriable);
}
public function doInjured():void{
if (this.injuredTimer == null){
this.injuredTimer = new Timer(2000);
} else {
if (this.injuredTimer.running){
trace((("in Civilian.doInjured(), " + this.name) + " already injured"));
return;
};
};
if (this.currInjuredFunc == null){
trace("in Civilian.doInjured(), currInjuredFunc is NULL");
} else {
this.usingInjuredTimer = true;
this.injuredTimer.addEventListener("timer", onInjured, false, 0, true);
this.injuredTimer.start();
};
}
function frame2(){
stop();
}
public function get Falling():Boolean{
return (this.falling);
}
public function get RunningLeft():Boolean{
return (this.runningLeft);
}
public function get NaturallyFalling():Boolean{
return (this.naturallyFalling);
}
public function whenFound():void{
switchToAnim(ANIM_NUM_IDLE);
this.currOnFoundFunc();
}
public function determineCivilianAvSprite():void{
if (Math.random() >= 0.5){
this.civilianAvSprite = MovieClip(root).maleCivilianAvSprite.duplicateAvSprite();
} else {
this.civilianAvSprite = MovieClip(root).femaleCivilianAvSprite.duplicateAvSprite();
};
this.civilianAvSprite.visible = true;
this.civilianAvSprite.x = (this.civilianAvSprite.y = 0);
this.civilianAvSprite.playAnimation("idle-right");
addChild(this.civilianAvSprite);
}
public function checkCanCarry():Boolean{
return (!(this.trapped));
}
function frame25(){
if (this.passedInAFunction){
postExitAnimFunc();
};
stopExisting();
gotoAndStop("idle");
}
public function get YVel():Number{
return (this.yVel);
}
public function set PassedInAnimNum(_arg1:uint):void{
this.passedInAnimNum = _arg1;
}
public function set RunningLeft(_arg1:Boolean):void{
this.runningLeft = _arg1;
}
public function set Lost(_arg1:Boolean):void{
this.lost = _arg1;
}
public function updateCivilianStatusDisplay():void{
if (this.trapped){
showAsTrapped(true);
showAsLost(false);
} else {
if (this.lost){
showAsTrapped(false);
showAsLost(true);
} else {
showAsTrapped(false);
showAsLost(false);
};
};
}
public function onInjured(_arg1:TimerEvent):void{
startShowAsDamaged();
currInjuredFunc();
}
public function set Uncarriable(_arg1:Boolean):void{
this.uncarriable = _arg1;
}
public function whenPickedUp():void{
this.carried = true;
this.currEnterFrameFunc = function (){
};
this.visible = false;
this.x = 700;
this.falling = false;
this.latestDropHeight = 0;
this.droppedX = this.x;
if (this.currPickedUpFunc != null){
this.currPickedUpFunc();
};
}
public function get Trapped():Boolean{
return (this.trapped);
}
public function doPanicRunLeftAndRightEFF(_arg1:MovieClip, _arg2:Number):void{
this.dangerMC = _arg1;
this.runningMinX = _arg2;
this.runningLeft = true;
this.panicking = true;
switchToAnim(ANIM_NUM_RUN_LEFT);
this.passedInEnterFrameFunc = panicRunLeftAndRightEFF;
this.prePauseEnterFrameFunc = panicRunLeftAndRightEFF;
if (((((!(MovieClip(root).GamePaused)) && (!(this.Carried)))) && ((this.y == this.groundY)))){
this.currEnterFrameFunc = panicRunLeftAndRightEFF;
};
}
public function set NaturallyFalling(_arg1:Boolean):void{
this.naturallyFalling = _arg1;
}
public function initCivilian(_arg1:MovieClip=null, _arg2:uint=0, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Array=null, _arg6:Function=null, _arg7:Function=null, _arg8:Function=null, _arg9:Function=null, _arg10:Function=null):void{
var mCharaMC = _arg1;
var firstAnimNum = _arg2;
var t = _arg3;
var l = _arg4;
var destIconArr = _arg5;
var oUntrapped = _arg6;
var oFound = _arg7;
var oAttacked = _arg8;
var oSDropped = _arg9;
var oDDropped = _arg10;
this.latestDropHeight = 0;
this.mainCharaMC = mCharaMC;
this.passedInAnimNum = firstAnimNum;
if (this.civilianAvSprite != null){
switchToAnim(this.passedInAnimNum);
} else {
this.currAnimNum = this.passedInAnimNum;
};
this.carried = false;
this.trapped = t;
this.lost = l;
this.destinationIconArr = destIconArr;
this.currEnterFrameFunc = function (){
};
this.prePauseEnterFrameFunc = this.currEnterFrameFunc;
this.currOnUntrappedFunc = oUntrapped;
this.currOnFoundFunc = oFound;
this.currOnAttackedFunc = oAttacked;
this.currOnDangerDroppedFunc = oDDropped;
this.currOnSafeDroppedFunc = oSDropped;
this.uncarriable = false;
this.falling = false;
this.naturallyFalling = false;
this.groundY = BlinkLevel(this.parent).LevelGroundY;
updateCivilianStatusDisplay();
if (this.civilianAvSprite != null){
this.civilianAvSprite.visible = true;
};
this.addEventListener(Event.ENTER_FRAME, onEnterFrameFunc, false, 0, true);
}
public function get DroppedX():Number{
return (this.droppedX);
}
public function startShowAsDamaged():void{
if (this.damagedTimer.running){
this.damagedTimer.reset();
};
this.damagedTimer.start();
showAsDamaged();
}
function damagedDisplayComplete(_arg1:TimerEvent):void{
updateCivilianStatusDisplay();
}
function frame1(){
determineCivilianAvSprite();
}
public function get Carried():Boolean{
return (this.carried);
}
public function hitTestFunc_Found():Boolean{
var _local1:Boolean;
var _local2:uint;
var _local3:*;
_local1 = false;
_local2 = this.destinationIconArr.length;
_local3 = 0;
while (_local3 < _local2) {
if (hitBoxMC.hitTestPoint((this.destinationIconArr[_local3].x + 35), (this.destinationIconArr[_local3].y + 35))){
_local1 = true;
break;
};
_local3++;
};
return (_local1);
}
public function set Falling(_arg1:Boolean):void{
this.falling = _arg1;
}
public function setEnterFrameFunc(_arg1:Function):void{
this.passedInEnterFrameFunc = _arg1;
this.prePauseEnterFrameFunc = _arg1;
if (!MovieClip(root).GamePaused){
this.currEnterFrameFunc = _arg1;
};
}
public function onUntrapped():void{
this.currOnUntrappedFunc();
}
public function aerialSuspendedEnterFrameFunc():void{
var _local1:Number;
if (hitTestFunc_Attacked()){
this.mainCharaMC.swooshAnimMC.lethal = false;
if (this.trapped){
doUntrapped();
} else {
if ((this.mainCharaMC.x - this.x) >= 0){
_local1 = this.x;
this.x = (this.x - Math.min(100, _local1));
this.mainCharaMC.x = (this.mainCharaMC.x + Math.max(0, (100 - _local1)));
} else {
_local1 = (460 - this.x);
this.x = (this.x + Math.min(100, _local1));
this.mainCharaMC.x = (this.mainCharaMC.x - Math.max(0, (100 - _local1)));
};
currOnAttackedFunc();
};
} else {
if (hitTestFunc_PickedUp()){
this.mainCharaMC.carryMotionMC.carryChecking = false;
this.mainCharaMC.whenPickingUpCivilian(this);
whenPickedUp();
} else {
if (((this.lost) && (hitTestFunc_Found()))){
whenFound();
};
};
};
}
public function stopInjured():void{
if (this.injuredTimer != null){
this.injuredTimer.stop();
this.injuredTimer.removeEventListener("timer", onInjured);
};
}
public function set ColorTransform_normal(_arg1:ColorTransform):void{
this.colorTransform_normal = _arg1;
}
public function spawnAt(_arg1:Number, _arg2:Number, _arg3:Function):void{
this.x = _arg1;
this.y = _arg2;
this.droppedX = _arg1;
this.visible = true;
this.passedInEnterFrameFunc = _arg3;
this.currEnterFrameFunc = this.passedInEnterFrameFunc;
this.prePauseEnterFrameFunc = _arg3;
}
public function set YVel(_arg1:Number):void{
this.yVel = _arg1;
}
public function whenDropped(_arg1:Number, _arg2:Number):void{
this.carried = false;
this.visible = true;
this.x = _arg1;
this.y = _arg2;
this.yVel = 0;
this.falling = true;
this.droppedX = this.x;
this.latestDropHeight = (this.groundY - this.y);
this.currEnterFrameFunc = this.passedInEnterFrameFunc;
switchToAnim(ANIM_NUM_FALLING);
}
public function xyUpdate():void{
if (this.y < this.groundY){
this.yVel = (this.yVel + this.defGravDec);
} else {
if (this.y > this.groundY){
this.yVel = 0;
this.y = this.groundY;
if (this.falling){
this.falling = false;
switchToAnim(this.passedInAnimNum);
if (this.latestDropHeight >= DANGER_DROP_HEIGHT){
this.latestDropHeight = 0;
this.currOnDangerDroppedFunc();
} else {
this.latestDropHeight = 0;
this.currOnSafeDroppedFunc();
};
};
} else {
if (this.falling){
this.falling = false;
switchToAnim(this.passedInAnimNum);
if (this.latestDropHeight >= DANGER_DROP_HEIGHT){
this.latestDropHeight = 0;
this.currOnDangerDroppedFunc();
} else {
this.latestDropHeight = 0;
this.currOnSafeDroppedFunc();
};
};
};
};
this.y = (this.y + this.yVel);
}
public function doExitAnimation(_arg1:Function=null):void{
if (_arg1 != null){
this.passedInAFunction = true;
this.postExitAnimFunc = _arg1;
} else {
this.passedInAFunction = false;
};
this.civilianAvSprite.visible = false;
BlinkDoc(root).getSndManager().playSFX_CivExitAnim();
gotoAndPlay("exitanimation");
}
public function defEnterFrameFunc():void{
var _local1:Number;
if (hitTestFunc_Attacked()){
this.mainCharaMC.swooshAnimMC.lethal = false;
if (this.trapped){
doUntrapped();
} else {
if ((this.mainCharaMC.x - this.x) >= 0){
_local1 = this.x;
this.x = (this.x - Math.min(100, _local1));
this.mainCharaMC.x = (this.mainCharaMC.x + Math.max(0, (100 - _local1)));
} else {
_local1 = (460 - this.x);
this.x = (this.x + Math.min(100, _local1));
this.mainCharaMC.x = (this.mainCharaMC.x - Math.max(0, (100 - _local1)));
};
currOnAttackedFunc();
};
} else {
if (hitTestFunc_PickedUp()){
this.mainCharaMC.carryMotionMC.carryChecking = false;
this.mainCharaMC.whenPickingUpCivilian(this);
whenPickedUp();
} else {
if (((this.lost) && (hitTestFunc_Found()))){
whenFound();
} else {
xyUpdate();
};
};
};
}
public function set Trapped(_arg1:Boolean):void{
this.trapped = _arg1;
}
public function defWhenFoundFunc():void{
stopExisting();
}
public function get Lost():Boolean{
return (this.lost);
}
public function unpauseMC():void{
if (this.currEnterFrameFunc != null){
this.currEnterFrameFunc = this.prePauseEnterFrameFunc;
} else {
trace("Civilian.unpauseMC() enter frame must be NULL");
};
if (this.usingInjuredTimer){
this.injuredTimer.start();
};
}
public function hitTestFunc_Attacked():Boolean{
return (((hitBoxMC.hitTestObject(this.mainCharaMC.swooshAnimMC)) && (this.mainCharaMC.swooshAnimMC.lethal)));
}
public function panicRunLeftAndRightEFF():void{
defEnterFrameFunc();
if (!this.panicking){
return;
};
if (this.y == this.groundY){
if (this.runningLeft){
if ((this.x - DEF_RUN_SPD) <= this.runningMinX){
this.runningLeft = false;
switchToAnim(ANIM_NUM_RUN_RIGHT);
this.x = this.runningMinX;
} else {
this.x = (this.x - DEF_RUN_SPD);
};
} else {
if (((this.x + 90) + DEF_RUN_SPD) >= this.dangerMC.x){
this.runningLeft = true;
switchToAnim(ANIM_NUM_RUN_LEFT);
this.x = (this.dangerMC.x - 95);
} else {
this.x = (this.x + DEF_RUN_SPD);
};
};
};
}
public function switchToAnim(_arg1:uint, _arg2:int=-1):void{
if (_arg2 != -1){
this.passedInAnimNum = _arg2;
};
if (this.civilianAvSprite == null){
return;
};
switch (_arg1){
case ANIM_NUM_IDLE:
this.currAnimNum = ANIM_NUM_IDLE;
this.civilianAvSprite.playAnimation("idle-right");
break;
case ANIM_NUM_RUN_LEFT:
this.currAnimNum = ANIM_NUM_RUN_LEFT;
this.civilianAvSprite.playAnimation("run-left");
break;
case ANIM_NUM_RUN_RIGHT:
this.currAnimNum = ANIM_NUM_RUN_RIGHT;
this.civilianAvSprite.playAnimation("run-right");
break;
case ANIM_NUM_FALLING:
this.currAnimNum = ANIM_NUM_FALLING;
this.civilianAvSprite.playAnimation("falling");
break;
default:
trace(("--in Civilian.switchToAnim(), invalid aNum: " + _arg1));
break;
};
}
public function set Carried(_arg1:Boolean):void{
this.carried = _arg1;
}
public function onEnterFrameFunc(_arg1:Event):void{
this.currEnterFrameFunc();
}
public function defEnterFrameFunc_NoXYUpdate():void{
var _local1:Number;
if (hitTestFunc_Attacked()){
this.mainCharaMC.swooshAnimMC.lethal = false;
if (this.trapped){
doUntrapped();
} else {
if ((this.mainCharaMC.x - this.x) >= 0){
_local1 = this.x;
this.x = (this.x - Math.min(100, _local1));
this.mainCharaMC.x = (this.mainCharaMC.x + Math.max(0, (100 - _local1)));
} else {
_local1 = (460 - this.x);
this.x = (this.x + Math.min(100, _local1));
this.mainCharaMC.x = (this.mainCharaMC.x - Math.max(0, (100 - _local1)));
};
currOnAttackedFunc();
};
} else {
if (hitTestFunc_PickedUp()){
this.mainCharaMC.carryMotionMC.carryChecking = false;
this.mainCharaMC.whenPickingUpCivilian(this);
whenPickedUp();
} else {
if (((this.lost) && (hitTestFunc_Found()))){
whenFound();
};
};
};
}
public function stopExisting():void{
this.currEnterFrameFunc = function (){
};
this.x = 700;
this.visible = false;
this.removeEventListener(Event.ENTER_FRAME, onEnterFrameFunc);
if (this.injuredTimer != null){
this.injuredTimer.removeEventListener("timer", onInjured);
if (this.injuredTimer.running){
this.injuredTimer.stop();
};
this.usingInjuredTimer = false;
};
}
public function hitTestFunc_PickedUp():Boolean{
return (((((((((!(this.uncarriable)) && (!(this.trapped)))) && (!(this.mainCharaMC.carrying)))) && (this.mainCharaMC.carryMotionMC.carryChecking))) && (this.hitBoxMC.hitTestObject(this.mainCharaMC.carryMotionMC))));
}
public function showAsTrapped(_arg1:Boolean):void{
attackTargetIconAnimMC.visible = _arg1;
if (this.civilianAvSprite != null){
this.civilianAvSprite.transform.colorTransform = colorTransform_normal;
};
}
public function setCivSpriteColorTransform(_arg1:ColorTransform):void{
this.civilianAvSprite.transform.colorTransform = _arg1;
}
public function set DefGravDec(_arg1:Number):void{
this.defGravDec = _arg1;
}
public function doUntrapped():void{
this.trapped = false;
updateCivilianStatusDisplay();
onUntrapped();
}
function showAsDamaged():void{
if (this.civilianAvSprite != null){
this.civilianAvSprite.transform.colorTransform = this.colorTransform_damaged;
};
}
public function runToScreenLeftEnterFrameFunc():void{
defEnterFrameFunc();
if (this.y == this.groundY){
if (this.x > -90){
this.x = (this.x - DEF_RUN_SPD);
} else {
stopExisting();
};
};
}
public function showAsLost(_arg1:Boolean):void{
if (_arg1){
if (this.civilianAvSprite != null){
this.civilianAvSprite.transform.colorTransform = colorTransform_lost;
};
} else {
if (this.civilianAvSprite != null){
this.civilianAvSprite.transform.colorTransform = colorTransform_normal;
};
};
}
public function get DefGravDec():Number{
return (this.defGravDec);
}
}
}//package
Section 125
//DialogueAdvance (DialogueAdvance)
package {
import flash.media.*;
public dynamic class DialogueAdvance extends Sound {
}
}//package
Section 126
//DialogueLine (DialogueLine)
package {
public class DialogueLine {
var postAdvanceFunc:Function;
var speakerNum:uint;
var manualAdvancing:Boolean;
var displayDuratn:int;
var theText:String;
public function DialogueLine(_arg1:Function, _arg2:Boolean, _arg3:int, _arg4:uint, _arg5:String){
this.postAdvanceFunc = _arg1;
this.manualAdvancing = _arg2;
this.displayDuratn = _arg3;
this.speakerNum = _arg4;
this.theText = _arg5;
}
public function get ManualAdvancing():Boolean{
return (this.manualAdvancing);
}
public function get TheText():String{
return (this.theText);
}
public function get DisplayDuratn():int{
return (this.displayDuratn);
}
public function get PostAdvanceFunc():Function{
return (this.postAdvanceFunc);
}
public function set TheText(_arg1:String):void{
this.theText = _arg1;
}
public function get SpeakerNum():uint{
return (this.speakerNum);
}
}
}//package
Section 127
//DingLing (DingLing)
package {
import flash.media.*;
public dynamic class DingLing extends Sound {
}
}//package
Section 128
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 129
//MochiAd (MochiAd)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("2.7");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package
Section 130
//Music_Gameplay (Music_Gameplay)
package {
import flash.media.*;
public dynamic class Music_Gameplay extends Sound {
}
}//package
Section 131
//Music_Menu (Music_Menu)
package {
import flash.media.*;
public dynamic class Music_Menu extends Sound {
}
}//package
Section 132
//ProgressBar_barSkin (ProgressBar_barSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_barSkin extends MovieClip {
}
}//package
Section 133
//ProgressBar_indeterminateSkin (ProgressBar_indeterminateSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_indeterminateSkin extends MovieClip {
}
}//package
Section 134
//ProgressBar_trackSkin (ProgressBar_trackSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_trackSkin extends MovieClip {
}
}//package
Section 135
//ScoreRack (ScoreRack)
package {
import flash.media.*;
public dynamic class ScoreRack extends Sound {
}
}//package
Section 136
//TextInput_disabledSkin (TextInput_disabledSkin)
package {
import flash.display.*;
public dynamic class TextInput_disabledSkin extends MovieClip {
}
}//package
Section 137
//TextInput_upSkin (TextInput_upSkin)
package {
import flash.display.*;
public dynamic class TextInput_upSkin extends MovieClip {
}
}//package
Section 138
//TutorialSuccess (TutorialSuccess)
package {
import flash.media.*;
public dynamic class TutorialSuccess extends Sound {
}
}//package