STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229456
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2574 · P5148

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/59255217?noj=FRM59255217-5DC" width="1" height="1"></div>

Ninja & Samurai - Ben 10 Samurai Warrior.swf

This is the info page for
Flash #233332

(Click the ID number above for more basic data on this flash file.)


Text
25

<p align="center"><font face="MorganBig-Extrabold" size="13" color="#ffffff" letterSpacing="0.000000" kerning="1">continuar</font></p>

Puntaje total

256687

enemigos eliminados

energía Restante

Vidas Restantes

Jefe

023654

659875

232156

456985

RESULTADOS

100 %

Leyendo ....

CREDITOS SECRETOS

<p align="center"><font face="HelveticaNeueLT Pro 67 MdCn" size="13" color="#333300" letterSpacing="0.000000" kerning="0">¡Has logrado encotrar el &nbsp;<b>CODIGO SECRETO!</b> Ingresa este código en el sitio de Cartoon Network &nbsp;para obtener créditos.</font></p>

CÓDIGO

h25j687

100 %

<p align="center"><font face="MorganBig-Extrabold" size="15" color="#ffffff" letterSpacing="1.000000" kerning="1">jugar</font></p>

CANNOBOLT

Transformate en Cannonbolt para poder pasar por
las multiples paredes.

MAS RÁPIDO

DESTRUYE PAREDES

TRANSFORMARSE

<p align="center"><font face="MorganBig-Extrabold" size="15" color="#ffffff" letterSpacing="1.000000" kerning="1">Volver a Jugar</font></p>

<p align="center"><font face="MorganBig-Extrabold" size="15" color="#ffffff" letterSpacing="1.000000" kerning="1">Menú</font></p>

¡FELICITACIONES!

Ben ha logrado escapar del juego transformandose en Ultra-T

Puntaje total

256687

<p align="left"><font face="MorganBig-Extrabold" size="13" color="#ffffff" letterSpacing="0.000000" kerning="0"><b>JEFE</b><font size="9"><b>UNO</b></font></font></p>

x

3

puntaje:

85585

<p align="center"><font face="MorganBig-Extrabold" size="21" color="#ffffff" letterSpacing="0.000000" kerning="0">eleccion de </font></p><p align="center"><font face="MorganBig-Extrabold" size="21" color="#ffffff" letterSpacing="0.000000" kerning="0">Alien</font></p>

NIVEL 1-1

<p align="center"><font face="MorganBig-Extrabold" size="15" color="#ffffff" letterSpacing="1.000000" kerning="1">Volver a Jugar</font></p>

<p align="center"><font face="MorganBig-Extrabold" size="15" color="#ffffff" letterSpacing="1.000000" kerning="1">Menú</font></p>

No has podido lograr que Ben consiga el icono de Ultra-T. ¡Inténtalo Nuevamente!

¡has perdido!

INSTRUCcIONeS

Ben a quedado atrapado en el video juego del Sumo Samurai, ayudalo a recuperar el item de Ultra-T que esta en manos del Malefico Kenko.

MOVERSE

ESPADA

ESTRELLA

TRANSFORMARSE

4 brazos

Transformate en 4 brazos para romper la pared.

DESTRUYE PAREDES

TRANSFORMARSE

cargando...

ActionScript [AS3]

Section 1
//AnimationPlatformAsset (assets.AnimationPlatformAsset) package assets { import flash.display.*; public class AnimationPlatformAsset extends MovieClip { } }//package assets
Section 2
//CoinMCAsset (assets.CoinMCAsset) package assets { import flash.display.*; public class CoinMCAsset extends MovieClip { public var puntajePowerUp_mc:MovieClip; public function CoinMCAsset(){ addFrameScript(24, frame25); } function frame25(){ stop(); } } }//package assets
Section 3
//CreditosAsset (assets.CreditosAsset) package assets { import flash.events.*; import flash.display.*; import com.gamesandweb.ui.*; public class CreditosAsset extends MovieClip { public var creditsTitle_mc:MovieClip; public var continue_btn:Continue1BtnAsset; public function CreditosAsset(){ addFrameScript(0, frame1, 15, frame16, 16, frame17, 26, frame27); } function frame16(){ stop(); dispatchEvent(new Event(UIWidget.FADE_IN_OVER)); } function frame1(){ dispatchEvent(new Event(UIWidget.FADE_IN)); stop(); } function frame17(){ dispatchEvent(new Event(UIWidget.FADE_OUT)); } function frame27(){ stop(); dispatchEvent(new Event(UIWidget.FADE_OUT_OVER)); } } }//package assets
Section 4
//DroideBlueAsset (assets.DroideBlueAsset) package assets { import flash.display.*; public class DroideBlueAsset extends MovieClip { } }//package assets
Section 5
//DroideGreenAsset (assets.DroideGreenAsset) package assets { import flash.display.*; public class DroideGreenAsset extends MovieClip { } }//package assets
Section 6
//DroideRedAsset (assets.DroideRedAsset) package assets { import flash.display.*; public class DroideRedAsset extends MovieClip { } }//package assets
Section 7
//Effect1Asset (assets.Effect1Asset) package assets { import flash.display.*; public class Effect1Asset extends MovieClip { } }//package assets
Section 8
//Effect2Asset (assets.Effect2Asset) package assets { import flash.display.*; public class Effect2Asset extends MovieClip { } }//package assets
Section 9
//Effect3Asset (assets.Effect3Asset) package assets { import flash.display.*; public class Effect3Asset extends MovieClip { } }//package assets
Section 10
//EffectAsset (assets.EffectAsset) package assets { import flash.display.*; public class EffectAsset extends MovieClip { } }//package assets
Section 11
//EnemiesIAMarksAsset (assets.EnemiesIAMarksAsset) package assets { import flash.display.*; public class EnemiesIAMarksAsset extends MovieClip { } }//package assets
Section 12
//FinalBossesOneAsset (assets.FinalBossesOneAsset) package assets { import flash.display.*; public class FinalBossesOneAsset extends MovieClip { } }//package assets
Section 13
//FinalBossesThreeAsset (assets.FinalBossesThreeAsset) package assets { import flash.display.*; public class FinalBossesThreeAsset extends MovieClip { } }//package assets
Section 14
//FinalBossesTwoAsset (assets.FinalBossesTwoAsset) package assets { import flash.display.*; public class FinalBossesTwoAsset extends MovieClip { public function FinalBossesOneAsset(){ } } }//package assets
Section 15
//GameLostAsset (assets.GameLostAsset) package assets { import flash.events.*; import flash.display.*; import com.gamesandweb.ui.*; public class GameLostAsset extends MovieClip { public var playAgain_btn:PlayAgain1BtnAsset; public var gameLostTitle_mc:MovieClip; public var score_mc:MovieClip; public var mainMenu_btn:MainMenu1BtnAsset; public function GameLostAsset(){ addFrameScript(0, frame1, 11, frame12, 12, frame13, 21, frame22); } function frame12(){ stop(); dispatchEvent(new Event(UIWidget.FADE_IN_OVER)); } function frame1(){ dispatchEvent(new Event(UIWidget.FADE_IN)); stop(); } function frame13(){ dispatchEvent(new Event(UIWidget.FADE_OUT)); } function frame22(){ stop(); dispatchEvent(new Event(UIWidget.FADE_OUT_OVER)); } } }//package assets
Section 16
//GameWonAsset (assets.GameWonAsset) package assets { import flash.events.*; import flash.display.*; import com.gamesandweb.ui.*; public class GameWonAsset extends MovieClip { public var scoreTxt_mc:MovieClip; public var playAgain_btn:PlayAgain2BtnAsset; public var gameWonTitle_mc:MovieClip; public var mainMenu_btn:MainMenu2BtnAsset; public function GameWonAsset(){ addFrameScript(0, frame1, 96, frame97, 97, frame98, 105, frame106); } function frame98(){ dispatchEvent(new Event(UIWidget.FADE_OUT)); } function frame97(){ stop(); dispatchEvent(new Event(UIWidget.FADE_IN_OVER)); } function frame1(){ dispatchEvent(new Event(UIWidget.FADE_IN)); stop(); } function frame106(){ stop(); dispatchEvent(new Event(UIWidget.FADE_OUT_OVER)); } } }//package assets
Section 17
//HUDAsset (assets.HUDAsset) package assets { import flash.display.*; public class HUDAsset extends MovieClip { public var numeroVida_mc:MovieClip; public var eleccion_mc:MovieClip; public var sound_btn:SndBtn; public var score_mc:MovieClip; public var help_btn:HelpBtn; public var barraDeVida_mc:MovieClip; public var personajeHud_mc:MovieClip; public var bossFinal_mc:MovieClip; public var barraTransformacion_mc:MovieClip; } }//package assets
Section 18
//InstructionsAsset (assets.InstructionsAsset) package assets { import flash.events.*; import flash.display.*; import com.gamesandweb.ui.*; public class InstructionsAsset extends MovieClip { public var instructionsTitle_mc:MovieClip; public var continue_btn:Continue1BtnAsset; public function InstructionsAsset(){ addFrameScript(0, frame1, 19, frame20, 20, frame21, 39, frame40); } function frame1(){ dispatchEvent(new Event(UIWidget.FADE_IN)); stop(); } function frame21(){ dispatchEvent(new Event(UIWidget.FADE_OUT)); } function frame20(){ stop(); dispatchEvent(new Event(UIWidget.FADE_IN_OVER)); } function frame40(){ stop(); dispatchEvent(new Event(UIWidget.FADE_OUT_OVER)); } } }//package assets
Section 19
//InstructionsCannonBoltAsset (assets.InstructionsCannonBoltAsset) package assets { import flash.events.*; import flash.display.*; import com.gamesandweb.ui.*; public class InstructionsCannonBoltAsset extends MovieClip { public var objectivesTitle_mc:MovieClip; public var continue_btn:Continue1BtnAsset; public function InstructionsCannonBoltAsset(){ addFrameScript(0, frame1, 11, frame12, 12, frame13, 21, frame22); } function frame12(){ stop(); dispatchEvent(new Event(UIWidget.FADE_IN_OVER)); } function frame1(){ dispatchEvent(new Event(UIWidget.FADE_IN)); stop(); } function frame22(){ stop(); dispatchEvent(new Event(UIWidget.FADE_OUT_OVER)); } function frame13(){ dispatchEvent(new Event(UIWidget.FADE_OUT)); } } }//package assets
Section 20
//InstructionsFourArmsAsset (assets.InstructionsFourArmsAsset) package assets { import flash.events.*; import flash.display.*; import com.gamesandweb.ui.*; public class InstructionsFourArmsAsset extends MovieClip { public var objectivesTitle_mc:MovieClip; public var continue_btn:Continue1BtnAsset; public function InstructionsFourArmsAsset(){ addFrameScript(0, frame1, 11, frame12, 12, frame13, 21, frame22); } function frame12(){ stop(); dispatchEvent(new Event(UIWidget.FADE_IN_OVER)); } function frame1(){ dispatchEvent(new Event(UIWidget.FADE_IN)); stop(); } function frame22(){ stop(); dispatchEvent(new Event(UIWidget.FADE_OUT_OVER)); } function frame13(){ dispatchEvent(new Event(UIWidget.FADE_OUT)); } } }//package assets
Section 21
//LevelIndicatorAsset (assets.LevelIndicatorAsset) package assets { import flash.events.*; import flash.display.*; import com.gamesandweb.ui.*; public class LevelIndicatorAsset extends MovieClip { public var levelIndicator2_mc:MovieClip; public var levelIndicator_mc:MovieClip; public function LevelIndicatorAsset(){ addFrameScript(0, frame1, 6, frame7, 21, frame22, 26, frame27); } function frame1(){ dispatchEvent(new Event(UIWidget.FADE_IN)); play(); } function frame22(){ dispatchEvent(new Event(UIWidget.FADE_OUT)); } function frame7(){ dispatchEvent(new Event(UIWidget.FADE_IN_OVER)); } function frame27(){ stop(); dispatchEvent(new Event(UIWidget.FADE_OUT_OVER)); } } }//package assets
Section 22
//LevelWonAsset (assets.LevelWonAsset) package assets { import flash.events.*; import flash.display.*; import com.gamesandweb.ui.*; public class LevelWonAsset extends MovieClip { public var scoreTxt_mc:MovieClip; public var objectivesTitle_mc:MovieClip; public var continue_btn:Continue1BtnAsset; public function LevelWonAsset(){ addFrameScript(0, frame1, 11, frame12, 12, frame13, 21, frame22); } function frame12(){ stop(); dispatchEvent(new Event(UIWidget.FADE_IN_OVER)); } function frame1(){ dispatchEvent(new Event(UIWidget.FADE_IN)); stop(); } function frame22(){ stop(); dispatchEvent(new Event(UIWidget.FADE_OUT_OVER)); } function frame13(){ dispatchEvent(new Event(UIWidget.FADE_OUT)); } } }//package assets
Section 23
//LoadSubLevelAsset (assets.LoadSubLevelAsset) package assets { import flash.display.*; import com.gamesandweb.game.*; public class LoadSubLevelAsset extends MovieClip { public function LoadSubLevelAsset(){ addFrameScript(24, frame25); } function frame25(){ stop(); Global.DispatchGameEvent("LoadSubLevelEnd"); } } }//package assets
Section 24
//MainMenuAsset (assets.MainMenuAsset) package assets { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; import com.gamesandweb.ui.*; public class MainMenuAsset extends MovieClip { public var logoContainer_mc:MovieClip; public var play_btn:PlayBtnAsset; public function MainMenuAsset(){ addFrameScript(0, frame1, 131, frame132, 132, frame133, 133, frame134); } function frame1(){ dispatchEvent(new Event(UIWidget.FADE_IN)); stop(); } function frame132(){ stop(); Global.DispatchGameEvent("EndMainMenu"); dispatchEvent(new Event(UIWidget.FADE_IN_OVER)); } function frame134(){ stop(); dispatchEvent(new Event(UIWidget.FADE_OUT_OVER)); Global.DispatchGameEvent("EndMainMenu"); } function frame133(){ dispatchEvent(new Event(UIWidget.FADE_OUT)); } } }//package assets
Section 25
//MovingPlatformAsset (assets.MovingPlatformAsset) package assets { public class MovingPlatformAsset extends PlatformAsset { } }//package assets
Section 26
//PlatformAsset (assets.PlatformAsset) package assets { import flash.display.*; public class PlatformAsset extends MovieClip { } }//package assets
Section 27
//PlatformContainerAsset (assets.PlatformContainerAsset) package assets { import flash.display.*; public class PlatformContainerAsset extends MovieClip { } }//package assets
Section 28
//PowerUpAsset (assets.PowerUpAsset) package assets { import flash.display.*; public class PowerUpAsset extends MovieClip { } }//package assets
Section 29
//PowerUpCannonBoltAsset (assets.PowerUpCannonBoltAsset) package assets { public class PowerUpCannonBoltAsset extends PowerUpAsset { } }//package assets
Section 30
//PowerUpCoinNotShadowAsset (assets.PowerUpCoinNotShadowAsset) package assets { public class PowerUpCoinNotShadowAsset extends PowerUpAsset { } }//package assets
Section 31
//PowerUpCoinShadowAsset (assets.PowerUpCoinShadowAsset) package assets { public class PowerUpCoinShadowAsset extends PowerUpAsset { } }//package assets
Section 32
//PowerUpFourArmsAsset (assets.PowerUpFourArmsAsset) package assets { public class PowerUpFourArmsAsset extends PowerUpAsset { } }//package assets
Section 33
//PowerUpLifeAsset (assets.PowerUpLifeAsset) package assets { public class PowerUpLifeAsset extends PowerUpAsset { } }//package assets
Section 34
//PowerUpOmnitrixAsset (assets.PowerUpOmnitrixAsset) package assets { public class PowerUpOmnitrixAsset extends PowerUpAsset { } }//package assets
Section 35
//PowerUpSurikenAsset (assets.PowerUpSurikenAsset) package assets { public class PowerUpSurikenAsset extends PowerUpAsset { } }//package assets
Section 36
//SpecialWallAsset (assets.SpecialWallAsset) package assets { import flash.display.*; public class SpecialWallAsset extends MovieClip { public var hitArea_mc:MovieClip; public var secuencia_mc:MovieClip; } }//package assets
Section 37
//TransitionAsset (assets.TransitionAsset) package assets { import flash.events.*; import flash.display.*; import com.gamesandweb.ui.*; public class TransitionAsset extends MovieClip { public function TransitionAsset(){ addFrameScript(0, frame1, 27, frame28, 28, frame29, 33, frame34); } function frame1(){ dispatchEvent(new Event(UIWidget.FADE_IN)); play(); } function frame29(){ dispatchEvent(new Event(UIWidget.FADE_OUT)); } function frame28(){ dispatchEvent(new Event(UIWidget.FADE_IN_OVER)); } function frame34(){ stop(); dispatchEvent(new Event(UIWidget.FADE_OUT_OVER)); } } }//package assets
Section 38
//WallBlockedAsset (assets.WallBlockedAsset) package assets { public class WallBlockedAsset extends PlatformAsset { } }//package assets
Section 39
//_Crouch_133 (BenSamurai_fla._Crouch_133) package BenSamurai_fla { import flash.display.*; public dynamic class _Crouch_133 extends MovieClip { public var ben2_mc:MovieClip; public function _Crouch_133(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 40
//_CrouchI_336 (BenSamurai_fla._CrouchI_336) package BenSamurai_fla { import flash.display.*; public dynamic class _CrouchI_336 extends MovieClip { public var ben2_mc:MovieClip; } }//package BenSamurai_fla
Section 41
//_Die_143 (BenSamurai_fla._Die_143) package BenSamurai_fla { import flash.display.*; public dynamic class _Die_143 extends MovieClip { public function _Die_143(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 42
//_Fall_201 (BenSamurai_fla._Fall_201) package BenSamurai_fla { import flash.display.*; public dynamic class _Fall_201 extends MovieClip { public function _Fall_201(){ addFrameScript(29, frame30); } function frame30(){ stop(); } } }//package BenSamurai_fla
Section 43
//_Hit_140 (BenSamurai_fla._Hit_140) package BenSamurai_fla { import flash.display.*; public dynamic class _Hit_140 extends MovieClip { public var ben1_mc:MovieClip; public function _Hit_140(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 44
//_Idle_149 (BenSamurai_fla._Idle_149) package BenSamurai_fla { import flash.display.*; public dynamic class _Idle_149 extends MovieClip { public var FourArms2_mc:MovieClip; } }//package BenSamurai_fla
Section 45
//_Idle_76 (BenSamurai_fla._Idle_76) package BenSamurai_fla { import flash.display.*; public dynamic class _Idle_76 extends MovieClip { public var BenSuriken_mc:MovieClip; public function _Idle_76(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 46
//_Jump_118 (BenSamurai_fla._Jump_118) package BenSamurai_fla { import flash.display.*; public dynamic class _Jump_118 extends MovieClip { public var ben2_mc:MovieClip; public function _Jump_118(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 47
//_JumpI_334 (BenSamurai_fla._JumpI_334) package BenSamurai_fla { import flash.display.*; public dynamic class _JumpI_334 extends MovieClip { public var ben2_mc:MovieClip; } }//package BenSamurai_fla
Section 48
//_puntajepowerups_428 (BenSamurai_fla._puntajepowerups_428) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class _puntajepowerups_428 extends MovieClip { public var puntajePowerUp_txt:TextField; } }//package BenSamurai_fla
Section 49
//_Resources_1 (BenSamurai_fla._Resources_1) package BenSamurai_fla { import flash.display.*; public dynamic class _Resources_1 extends MovieClip { public function _Resources_1(){ addFrameScript(1, frame2); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 50
//_Run_183 (BenSamurai_fla._Run_183) package BenSamurai_fla { import flash.display.*; public dynamic class _Run_183 extends MovieClip { public var FourArms2_mc:MovieClip; } }//package BenSamurai_fla
Section 51
//_Run_93 (BenSamurai_fla._Run_93) package BenSamurai_fla { import flash.display.*; public dynamic class _Run_93 extends MovieClip { public var ben2_mc:MovieClip; public function _Run_93(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 52
//_Runcopy_338 (BenSamurai_fla._Runcopy_338) package BenSamurai_fla { import flash.display.*; public dynamic class _Runcopy_338 extends MovieClip { public var ben2_mc:MovieClip; public function _Runcopy_338(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 53
//_RunInstr_325 (BenSamurai_fla._RunInstr_325) package BenSamurai_fla { import flash.display.*; public dynamic class _RunInstr_325 extends MovieClip { public var ben2_mc:MovieClip; } }//package BenSamurai_fla
Section 54
//_SquareGeneral_19 (BenSamurai_fla._SquareGeneral_19) package BenSamurai_fla { import flash.display.*; public dynamic class _SquareGeneral_19 extends MovieClip { public function _SquareGeneral_19(){ addFrameScript(7, frame8); } function frame8(){ stop(); } } }//package BenSamurai_fla
Section 55
//_SquareGeneral_70 (BenSamurai_fla._SquareGeneral_70) package BenSamurai_fla { import flash.display.*; public dynamic class _SquareGeneral_70 extends MovieClip { public function _SquareGeneral_70(){ addFrameScript(7, frame8); } function frame8(){ stop(); } } }//package BenSamurai_fla
Section 56
//_SquareGeneralidle_60 (BenSamurai_fla._SquareGeneralidle_60) package BenSamurai_fla { import flash.display.*; public dynamic class _SquareGeneralidle_60 extends MovieClip { public function _SquareGeneralidle_60(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 57
//_SquareGeneralidle_9 (BenSamurai_fla._SquareGeneralidle_9) package BenSamurai_fla { import flash.display.*; public dynamic class _SquareGeneralidle_9 extends MovieClip { public function _SquareGeneralidle_9(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 58
//_Superataque_46 (BenSamurai_fla._Superataque_46) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class _Superataque_46 extends MovieClip { public function _Superataque_46(){ addFrameScript(5, frame6); } function frame6(){ stop(); Global.DispatchGameEvent("CharacterAnimationAttackEnd"); } } }//package BenSamurai_fla
Section 59
//barradecarga_241 (BenSamurai_fla.barradecarga_241) package BenSamurai_fla { import flash.display.*; public dynamic class barradecarga_241 extends MovieClip { public function barradecarga_241(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 60
//barradedescarga_235 (BenSamurai_fla.barradedescarga_235) package BenSamurai_fla { import flash.display.*; public dynamic class barradedescarga_235 extends MovieClip { public function barradedescarga_235(){ addFrameScript(0, frame1, 99, frame100); } function frame1(){ stop(); } function frame100(){ stop(); } } }//package BenSamurai_fla
Section 61
//BarradeTransformacion_234 (BenSamurai_fla.BarradeTransformacion_234) package BenSamurai_fla { import flash.display.*; public dynamic class BarradeTransformacion_234 extends MovieClip { public var barra_mc:MovieClip; public function BarradeTransformacion_234(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 62
//barradevida_230 (BenSamurai_fla.barradevida_230) package BenSamurai_fla { import flash.display.*; public dynamic class barradevida_230 extends MovieClip { public var barra_mc:MovieClip; } }//package BenSamurai_fla
Section 63
//barradevida_231 (BenSamurai_fla.barradevida_231) package BenSamurai_fla { import flash.display.*; public dynamic class barradevida_231 extends MovieClip { public function barradevida_231(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 64
//barradevidabos_256 (BenSamurai_fla.barradevidabos_256) package BenSamurai_fla { import flash.display.*; public dynamic class barradevidabos_256 extends MovieClip { public function barradevidabos_256(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 65
//Ben_agachau_134 (BenSamurai_fla.Ben_agachau_134) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_agachau_134 extends MovieClip { public var ben3_mc:MovieClip; } }//package BenSamurai_fla
Section 66
//Ben_agachauI_337 (BenSamurai_fla.Ben_agachauI_337) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_agachauI_337 extends MovieClip { public var ben3_mc:MovieClip; } }//package BenSamurai_fla
Section 67
//Ben_corre_B_94 (BenSamurai_fla.Ben_corre_B_94) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_corre_B_94 extends MovieClip { public var ben3_mc:MovieClip; } }//package BenSamurai_fla
Section 68
//Ben_corre_Bcopy_339 (BenSamurai_fla.Ben_corre_Bcopy_339) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_corre_Bcopy_339 extends MovieClip { public var ben3_mc:MovieClip; } }//package BenSamurai_fla
Section 69
//Ben_corre_Inst_326 (BenSamurai_fla.Ben_corre_Inst_326) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_corre_Inst_326 extends MovieClip { public var ben3_mc:MovieClip; } }//package BenSamurai_fla
Section 70
//Ben_Corre_Transform_Cannon_181 (BenSamurai_fla.Ben_Corre_Transform_Cannon_181) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Ben_Corre_Transform_Cannon_181 extends MovieClip { public function Ben_Corre_Transform_Cannon_181(){ addFrameScript(24, frame25); } function frame25(){ stop(); Global.DispatchGameEvent("EndTransformations"); } } }//package BenSamurai_fla
Section 71
//Ben_Corre_Transform_Four_175 (BenSamurai_fla.Ben_Corre_Transform_Four_175) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Ben_Corre_Transform_Four_175 extends MovieClip { public function Ben_Corre_Transform_Four_175(){ addFrameScript(24, frame25); } function frame25(){ stop(); Global.DispatchGameEvent("EndTransformations"); } } }//package BenSamurai_fla
Section 72
//Ben_espadazo_77 (BenSamurai_fla.Ben_espadazo_77) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Ben_espadazo_77 extends MovieClip { public function Ben_espadazo_77(){ addFrameScript(8, frame9); } function frame9(){ stop(); Global.DispatchGameEvent("CharacterAnimationSwordEnd"); } } }//package BenSamurai_fla
Section 73
//Ben_Espadol_mc_95 (BenSamurai_fla.Ben_Espadol_mc_95) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_Espadol_mc_95 extends MovieClip { public function Ben_Espadol_mc_95(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 74
//Ben_Espadol_mcI_327 (BenSamurai_fla.Ben_Espadol_mcI_327) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_Espadol_mcI_327 extends MovieClip { public function Ben_Espadol_mcI_327(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 75
//Ben_hit_141 (BenSamurai_fla.Ben_hit_141) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Ben_hit_141 extends MovieClip { public function Ben_hit_141(){ addFrameScript(4, frame5); } function frame5(){ stop(); Global.DispatchGameEvent("CharacterAnimationEnd"); } } }//package BenSamurai_fla
Section 76
//Ben_Idle_Transform_Cannon_176 (BenSamurai_fla.Ben_Idle_Transform_Cannon_176) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Ben_Idle_Transform_Cannon_176 extends MovieClip { public function Ben_Idle_Transform_Cannon_176(){ addFrameScript(24, frame25); } function frame25(){ stop(); Global.DispatchGameEvent("EndTransformations"); } } }//package BenSamurai_fla
Section 77
//Ben_Idle_Transform_Four_148 (BenSamurai_fla.Ben_Idle_Transform_Four_148) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Ben_Idle_Transform_Four_148 extends MovieClip { public function Ben_Idle_Transform_Four_148(){ addFrameScript(24, frame25); } function frame25(){ stop(); Global.DispatchGameEvent("EndTransformations"); } } }//package BenSamurai_fla
Section 78
//Ben_muere_144 (BenSamurai_fla.Ben_muere_144) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Ben_muere_144 extends MovieClip { public function Ben_muere_144(){ addFrameScript(19, frame20); } function frame20(){ stop(); Global.DispatchGameEvent("CharacterAnimationDieEnd"); } } }//package BenSamurai_fla
Section 79
//Ben_salta_119 (BenSamurai_fla.Ben_salta_119) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_salta_119 extends MovieClip { public var ben3_mc:MovieClip; } }//package BenSamurai_fla
Section 80
//Ben_saltaI_335 (BenSamurai_fla.Ben_saltaI_335) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_saltaI_335 extends MovieClip { public var ben3_mc:MovieClip; } }//package BenSamurai_fla
Section 81
//Ben_Shurikenea_88 (BenSamurai_fla.Ben_Shurikenea_88) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Ben_Shurikenea_88 extends MovieClip { public function Ben_Shurikenea_88(){ addFrameScript(1, frame2, 3, frame4); } function frame4(){ stop(); Global.DispatchGameEvent("CharacterAnimationShurikenEnd"); } function frame2(){ Global.DispatchGameEvent("CharacterShurikenBegin"); } } }//package BenSamurai_fla
Section 82
//Ben_Torso_02_mc3_136 (BenSamurai_fla.Ben_Torso_02_mc3_136) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_Torso_02_mc3_136 extends MovieClip { public var BenSuriken_mc:MovieClip; public function Ben_Torso_02_mc3_136(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 83
//Ben_Torso_Ani_02_105 (BenSamurai_fla.Ben_Torso_Ani_02_105) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Ben_Torso_Ani_02_105 extends MovieClip { public function Ben_Torso_Ani_02_105(){ addFrameScript(8, frame9); } function frame9(){ stop(); Global.DispatchGameEvent("CharacterAnimationSwordEnd"); } } }//package BenSamurai_fla
Section 84
//Ben_Torso_Ani_02salto_126 (BenSamurai_fla.Ben_Torso_Ani_02salto_126) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Ben_Torso_Ani_02salto_126 extends MovieClip { public function Ben_Torso_Ani_02salto_126(){ addFrameScript(8, frame9); } function frame9(){ stop(); Global.DispatchGameEvent("CharacterAnimationSwordEnd"); } } }//package BenSamurai_fla
Section 85
//Ben_Torso_Ani_03_107 (BenSamurai_fla.Ben_Torso_Ani_03_107) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Ben_Torso_Ani_03_107 extends MovieClip { public function Ben_Torso_Ani_03_107(){ addFrameScript(2, frame3, 6, frame7); } function frame3(){ Global.DispatchGameEvent("CharacterShurikenBegin"); } function frame7(){ stop(); Global.DispatchGameEvent("CharacterAnimationShurikenEnd"); } } }//package BenSamurai_fla
Section 86
//Ben_Torso_Ani_05_139 (BenSamurai_fla.Ben_Torso_Ani_05_139) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Ben_Torso_Ani_05_139 extends MovieClip { public function Ben_Torso_Ani_05_139(){ addFrameScript(8, frame9); } function frame9(){ stop(); Global.DispatchGameEvent("CharacterAnimationSwordEnd"); } } }//package BenSamurai_fla
Section 87
//Ben_Torso_mc_98 (BenSamurai_fla.Ben_Torso_mc_98) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_Torso_mc_98 extends MovieClip { public var BenSuriken_mc:MovieClip; public function Ben_Torso_mc_98(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 88
//Ben_Torso_mc2_125 (BenSamurai_fla.Ben_Torso_mc2_125) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_Torso_mc2_125 extends MovieClip { public var BenSuriken_mc:MovieClip; public function Ben_Torso_mc2_125(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 89
//Ben_Torso_mccopy_340 (BenSamurai_fla.Ben_Torso_mccopy_340) package BenSamurai_fla { import flash.display.*; public dynamic class Ben_Torso_mccopy_340 extends MovieClip { public function Ben_Torso_mccopy_340(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 90
//bosslife_255 (BenSamurai_fla.bosslife_255) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class bosslife_255 extends MovieClip { public var bossName_txt:TextField; public var barra_mc:MovieClip; public function bosslife_255(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 91
//BtnDown_228 (BenSamurai_fla.BtnDown_228) package BenSamurai_fla { import flash.display.*; public dynamic class BtnDown_228 extends MovieClip { public function BtnDown_228(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 92
//BtnOut_229 (BenSamurai_fla.BtnOut_229) package BenSamurai_fla { import flash.display.*; public dynamic class BtnOut_229 extends MovieClip { public function BtnOut_229(){ addFrameScript(5, frame6); } function frame6(){ stop(); } } }//package BenSamurai_fla
Section 93
//BtnOver_226 (BenSamurai_fla.BtnOver_226) package BenSamurai_fla { import flash.display.*; public dynamic class BtnOver_226 extends MovieClip { public function BtnOver_226(){ addFrameScript(5, frame6); } function frame6(){ stop(); } } }//package BenSamurai_fla
Section 94
//Cannonbolt_Bola_Hit_212 (BenSamurai_fla.Cannonbolt_Bola_Hit_212) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Cannonbolt_Bola_Hit_212 extends MovieClip { public function Cannonbolt_Bola_Hit_212(){ addFrameScript(4, frame5); } function frame5(){ stop(); Global.DispatchGameEvent("CharacterAnimationEnd"); } } }//package BenSamurai_fla
Section 95
//Cannonbolt_Corre_Transform_Ben_207 (BenSamurai_fla.Cannonbolt_Corre_Transform_Ben_207) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Cannonbolt_Corre_Transform_Ben_207 extends MovieClip { public function Cannonbolt_Corre_Transform_Ben_207(){ addFrameScript(24, frame25); } function frame25(){ stop(); Global.DispatchGameEvent("EndTransformations"); } } }//package BenSamurai_fla
Section 96
//Cannonbolt_Hited_209 (BenSamurai_fla.Cannonbolt_Hited_209) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Cannonbolt_Hited_209 extends MovieClip { public function Cannonbolt_Hited_209(){ addFrameScript(4, frame5); } function frame5(){ stop(); Global.DispatchGameEvent("CharacterAnimationEnd"); } } }//package BenSamurai_fla
Section 97
//Cannonbolt_Idle_Transform_Ben_206 (BenSamurai_fla.Cannonbolt_Idle_Transform_Ben_206) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Cannonbolt_Idle_Transform_Ben_206 extends MovieClip { public function Cannonbolt_Idle_Transform_Ben_206(){ addFrameScript(24, frame25); } function frame25(){ stop(); Global.DispatchGameEvent("EndTransformations"); } } }//package BenSamurai_fla
Section 98
//cara4brazos_247 (BenSamurai_fla.cara4brazos_247) package BenSamurai_fla { import flash.display.*; public dynamic class cara4brazos_247 extends MovieClip { public function cara4brazos_247(){ addFrameScript(7, frame8); } function frame8(){ stop(); } } }//package BenSamurai_fla
Section 99
//caracannonbolt_252 (BenSamurai_fla.caracannonbolt_252) package BenSamurai_fla { import flash.display.*; public dynamic class caracannonbolt_252 extends MovieClip { public function caracannonbolt_252(){ addFrameScript(5, frame6); } function frame6(){ stop(); } } }//package BenSamurai_fla
Section 100
//conenedorpopup_304 (BenSamurai_fla.conenedorpopup_304) package BenSamurai_fla { import flash.display.*; public dynamic class conenedorpopup_304 extends MovieClip { public function conenedorpopup_304(){ addFrameScript(23, frame24); } function frame24(){ stop(); } } }//package BenSamurai_fla
Section 101
//conenedorpopupcopy_342 (BenSamurai_fla.conenedorpopupcopy_342) package BenSamurai_fla { import flash.display.*; public dynamic class conenedorpopupcopy_342 extends MovieClip { public function conenedorpopupcopy_342(){ addFrameScript(16, frame17); } function frame17(){ stop(); } } }//package BenSamurai_fla
Section 102
//ContinueBtnTxt_24 (BenSamurai_fla.ContinueBtnTxt_24) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class ContinueBtnTxt_24 extends MovieClip { public var text_txt:TextField; } }//package BenSamurai_fla
Section 103
//CREDITSTitleTxt_401 (BenSamurai_fla.CREDITSTitleTxt_401) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class CREDITSTitleTxt_401 extends MovieClip { public var scoreLabel_txt:TextField; public var score_txt:TextField; public var text1_txt:TextField; public var text_txt:TextField; } }//package BenSamurai_fla
Section 104
//elecciondepersonaje_260 (BenSamurai_fla.elecciondepersonaje_260) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class elecciondepersonaje_260 extends MovieClip { public var alienSelection_txt:TextField; public function elecciondepersonaje_260(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 105
//espadagolpea_279 (BenSamurai_fla.espadagolpea_279) package BenSamurai_fla { import flash.events.*; import flash.display.*; public dynamic class espadagolpea_279 extends MovieClip { public function espadagolpea_279(){ addFrameScript(10, frame11); } function frame11(){ stop(); parent.dispatchEvent(new Event("AnimationEnd")); } } }//package BenSamurai_fla
Section 106
//Fourarms_brazos_izq_mc_151 (BenSamurai_fla.Fourarms_brazos_izq_mc_151) package BenSamurai_fla { import flash.display.*; public dynamic class Fourarms_brazos_izq_mc_151 extends MovieClip { public function Fourarms_brazos_izq_mc_151(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 107
//Fourarms_Brazos_Izq_mccopy_185 (BenSamurai_fla.Fourarms_Brazos_Izq_mccopy_185) package BenSamurai_fla { import flash.display.*; public dynamic class Fourarms_Brazos_Izq_mccopy_185 extends MovieClip { public function Fourarms_Brazos_Izq_mccopy_185(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 108
//Fourarms_brazos_izq_pega_157 (BenSamurai_fla.Fourarms_brazos_izq_pega_157) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Fourarms_brazos_izq_pega_157 extends MovieClip { public function Fourarms_brazos_izq_pega_157(){ addFrameScript(6, frame7); } function frame7(){ stop(); Global.DispatchGameEvent("ArmsLeftAnimationEnd"); } } }//package BenSamurai_fla
Section 109
//Fourarms_camina_184 (BenSamurai_fla.Fourarms_camina_184) package BenSamurai_fla { import flash.display.*; public dynamic class Fourarms_camina_184 extends MovieClip { public var ArmsLeft_mc:MovieClip; public var ArmsRight_mc:MovieClip; } }//package BenSamurai_fla
Section 110
//Fourarms_hit_196 (BenSamurai_fla.Fourarms_hit_196) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Fourarms_hit_196 extends MovieClip { public function Fourarms_hit_196(){ addFrameScript(4, frame5); } function frame5(){ stop(); Global.DispatchGameEvent("CharacterAnimationEnd"); } } }//package BenSamurai_fla
Section 111
//Fourarms_Idle_150 (BenSamurai_fla.Fourarms_Idle_150) package BenSamurai_fla { import flash.display.*; public dynamic class Fourarms_Idle_150 extends MovieClip { public var ArmsLeft_mc:MovieClip; public var ArmsRight_mc:MovieClip; } }//package BenSamurai_fla
Section 112
//Fourarms_Idle_Transform_Ben_198 (BenSamurai_fla.Fourarms_Idle_Transform_Ben_198) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Fourarms_Idle_Transform_Ben_198 extends MovieClip { public function Fourarms_Idle_Transform_Ben_198(){ addFrameScript(24, frame25); } function frame25(){ stop(); Global.DispatchGameEvent("EndTransformations"); } } }//package BenSamurai_fla
Section 113
//Fourarms_Pega_der_169 (BenSamurai_fla.Fourarms_Pega_der_169) package BenSamurai_fla { import flash.display.*; import com.gamesandweb.game.*; public dynamic class Fourarms_Pega_der_169 extends MovieClip { public function Fourarms_Pega_der_169(){ addFrameScript(7, frame8); } function frame8(){ stop(); Global.DispatchGameEvent("ArmsRightAnimationEnd"); } } }//package BenSamurai_fla
Section 114
//Fourarms_Torso_mc_160 (BenSamurai_fla.Fourarms_Torso_mc_160) package BenSamurai_fla { import flash.display.*; public dynamic class Fourarms_Torso_mc_160 extends MovieClip { public function Fourarms_Torso_mc_160(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 115
//fuegonaranja_389 (BenSamurai_fla.fuegonaranja_389) package BenSamurai_fla { import flash.events.*; import flash.display.*; public dynamic class fuegonaranja_389 extends MovieClip { public function fuegonaranja_389(){ addFrameScript(14, frame15); } function frame15(){ stop(); parent.dispatchEvent(new Event("ShotEnemyAnimationDestroyedEnd")); } } }//package BenSamurai_fla
Section 116
//fx_minipower_pluf_01_281 (BenSamurai_fla.fx_minipower_pluf_01_281) package BenSamurai_fla { import flash.events.*; import flash.display.*; public dynamic class fx_minipower_pluf_01_281 extends MovieClip { public function fx_minipower_pluf_01_281(){ addFrameScript(10, frame11); } function frame11(){ stop(); parent.dispatchEvent(new Event("AnimationEnd")); } } }//package BenSamurai_fla
Section 117
//GameLostTitleTxt_300 (BenSamurai_fla.GameLostTitleTxt_300) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class GameLostTitleTxt_300 extends MovieClip { public var titles_txt:TextField; public var text_txt:TextField; } }//package BenSamurai_fla
Section 118
//GameWonTitleTxt_73 (BenSamurai_fla.GameWonTitleTxt_73) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class GameWonTitleTxt_73 extends MovieClip { public var titles_txt:TextField; public var text_txt:TextField; } }//package BenSamurai_fla
Section 119
//gradientpopup_309 (BenSamurai_fla.gradientpopup_309) package BenSamurai_fla { import flash.display.*; public dynamic class gradientpopup_309 extends MovieClip { public function gradientpopup_309(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package BenSamurai_fla
Section 120
//gradientpopupcopy_317 (BenSamurai_fla.gradientpopupcopy_317) package BenSamurai_fla { import flash.display.*; public dynamic class gradientpopupcopy_317 extends MovieClip { public function gradientpopupcopy_317(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package BenSamurai_fla
Section 121
//gradientpopupcopy3_348 (BenSamurai_fla.gradientpopupcopy3_348) package BenSamurai_fla { import flash.display.*; public dynamic class gradientpopupcopy3_348 extends MovieClip { public function gradientpopupcopy3_348(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package BenSamurai_fla
Section 122
//gradientpopupcopy4_345 (BenSamurai_fla.gradientpopupcopy4_345) package BenSamurai_fla { import flash.display.*; public dynamic class gradientpopupcopy4_345 extends MovieClip { public function gradientpopupcopy4_345(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package BenSamurai_fla
Section 123
//gradientpopupcopy5_346 (BenSamurai_fla.gradientpopupcopy5_346) package BenSamurai_fla { import flash.display.*; public dynamic class gradientpopupcopy5_346 extends MovieClip { public function gradientpopupcopy5_346(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package BenSamurai_fla
Section 124
//HelpBtnDown_220 (BenSamurai_fla.HelpBtnDown_220) package BenSamurai_fla { import flash.display.*; public dynamic class HelpBtnDown_220 extends MovieClip { public function HelpBtnDown_220(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 125
//HelpBtnOut_221 (BenSamurai_fla.HelpBtnOut_221) package BenSamurai_fla { import flash.events.*; import flash.display.*; public dynamic class HelpBtnOut_221 extends MovieClip { public function HelpBtnOut_221(){ addFrameScript(5, frame6); } function frame6(){ stop(); parent.dispatchEvent(new Event("OutAnimationFinished")); } } }//package BenSamurai_fla
Section 126
//HelpBtnOver_218 (BenSamurai_fla.HelpBtnOver_218) package BenSamurai_fla { import flash.display.*; public dynamic class HelpBtnOver_218 extends MovieClip { public function HelpBtnOver_218(){ addFrameScript(5, frame6); } function frame6(){ stop(); } } }//package BenSamurai_fla
Section 127
//Humito_corrida_277 (BenSamurai_fla.Humito_corrida_277) package BenSamurai_fla { import flash.events.*; import flash.display.*; public dynamic class Humito_corrida_277 extends MovieClip { public function Humito_corrida_277(){ addFrameScript(12, frame13); } function frame13(){ stop(); parent.dispatchEvent(new Event("AnimationEnd")); } } }//package BenSamurai_fla
Section 128
//Humito_corridacopy_213 (BenSamurai_fla.Humito_corridacopy_213) package BenSamurai_fla { import flash.events.*; import flash.display.*; public dynamic class Humito_corridacopy_213 extends MovieClip { public function Humito_corridacopy_213(){ addFrameScript(12, frame13); } function frame13(){ stop(); parent.dispatchEvent(new Event("AnimationEnd")); } } }//package BenSamurai_fla
Section 129
//InstructionsTitleTxt_303 (BenSamurai_fla.InstructionsTitleTxt_303) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class InstructionsTitleTxt_303 extends MovieClip { public var txt_2:TextField; public var text1_txt:TextField; public var text_txt:TextField; public var txt_2b:TextField; public var txt_2c:TextField; public var txt_2a:TextField; } }//package BenSamurai_fla
Section 130
//levelindicatormove_275 (BenSamurai_fla.levelindicatormove_275) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class levelindicatormove_275 extends MovieClip { public var levelindicator_txt:TextField; } }//package BenSamurai_fla
Section 131
//MainMenuBtnTxt_298 (BenSamurai_fla.MainMenuBtnTxt_298) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class MainMenuBtnTxt_298 extends MovieClip { public var text_txt:TextField; } }//package BenSamurai_fla
Section 132
//MainMenuBtnTxt_72 (BenSamurai_fla.MainMenuBtnTxt_72) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class MainMenuBtnTxt_72 extends MovieClip { public var text_txt:TextField; } }//package BenSamurai_fla
Section 133
//mascarapopup_315 (BenSamurai_fla.mascarapopup_315) package BenSamurai_fla { import flash.display.*; public dynamic class mascarapopup_315 extends MovieClip { public function mascarapopup_315(){ addFrameScript(4, frame5); } function frame5(){ stop(); } } }//package BenSamurai_fla
Section 134
//mascarapopupcopy_344 (BenSamurai_fla.mascarapopupcopy_344) package BenSamurai_fla { import flash.display.*; public dynamic class mascarapopupcopy_344 extends MovieClip { public function mascarapopupcopy_344(){ addFrameScript(5, frame6); } function frame6(){ stop(); } } }//package BenSamurai_fla
Section 135
//maskpopupfinale_311 (BenSamurai_fla.maskpopupfinale_311) package BenSamurai_fla { import flash.display.*; public dynamic class maskpopupfinale_311 extends MovieClip { public function maskpopupfinale_311(){ addFrameScript(7, frame8); } function frame8(){ stop(); } } }//package BenSamurai_fla
Section 136
//maskpopupfinalecopy_313 (BenSamurai_fla.maskpopupfinalecopy_313) package BenSamurai_fla { import flash.display.*; public dynamic class maskpopupfinalecopy_313 extends MovieClip { public function maskpopupfinalecopy_313(){ addFrameScript(7, frame8); } function frame8(){ stop(); } } }//package BenSamurai_fla
Section 137
//maskpopupfinalecopy2_343 (BenSamurai_fla.maskpopupfinalecopy2_343) package BenSamurai_fla { import flash.display.*; public dynamic class maskpopupfinalecopy2_343 extends MovieClip { public function maskpopupfinalecopy2_343(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package BenSamurai_fla
Section 138
//maskpopupfinalecopy3_347 (BenSamurai_fla.maskpopupfinalecopy3_347) package BenSamurai_fla { import flash.display.*; public dynamic class maskpopupfinalecopy3_347 extends MovieClip { public function maskpopupfinalecopy3_347(){ addFrameScript(8, frame9); } function frame9(){ stop(); } } }//package BenSamurai_fla
Section 139
//ObjectivesTitleTxt_419 (BenSamurai_fla.ObjectivesTitleTxt_419) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class ObjectivesTitleTxt_419 extends MovieClip { public var titles_txt:TextField; } }//package BenSamurai_fla
Section 140
//pared4brazosdestruida_434 (BenSamurai_fla.pared4brazosdestruida_434) package BenSamurai_fla { import flash.events.*; import flash.display.*; public dynamic class pared4brazosdestruida_434 extends MovieClip { public function pared4brazosdestruida_434(){ addFrameScript(19, frame20); } function frame20(){ stop(); parent.dispatchEvent(new Event("SpecialWallAnimationDestroyedEnd")); } } }//package BenSamurai_fla
Section 141
//personajeshud_242 (BenSamurai_fla.personajeshud_242) package BenSamurai_fla { import flash.display.*; public dynamic class personajeshud_242 extends MovieClip { public function personajeshud_242(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 142
//Piedritas_rotor_366 (BenSamurai_fla.Piedritas_rotor_366) package BenSamurai_fla { import flash.events.*; import flash.display.*; public dynamic class Piedritas_rotor_366 extends MovieClip { public function Piedritas_rotor_366(){ addFrameScript(16, frame17); } function frame17(){ stop(); parent.parent.dispatchEvent(new Event("SpecialWallAnimationHitEnd")); } } }//package BenSamurai_fla
Section 143
//PlayAgainBtnTxt_296 (BenSamurai_fla.PlayAgainBtnTxt_296) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class PlayAgainBtnTxt_296 extends MovieClip { public var text_txt:TextField; } }//package BenSamurai_fla
Section 144
//PlayAgainBtnTxt_68 (BenSamurai_fla.PlayAgainBtnTxt_68) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class PlayAgainBtnTxt_68 extends MovieClip { public var text_txt:TextField; } }//package BenSamurai_fla
Section 145
//PlayBtnTxt_17 (BenSamurai_fla.PlayBtnTxt_17) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class PlayBtnTxt_17 extends MovieClip { public var text_txt:TextField; } }//package BenSamurai_fla
Section 146
//ProgressText_410 (BenSamurai_fla.ProgressText_410) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class ProgressText_410 extends MovieClip { public var progress_txt:TextField; public function ProgressText_410(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 147
//ProgressTextcopy_6 (BenSamurai_fla.ProgressTextcopy_6) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class ProgressTextcopy_6 extends MovieClip { public var progress_txt:TextField; public function ProgressTextcopy_6(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package BenSamurai_fla
Section 148
//puntaje_259 (BenSamurai_fla.puntaje_259) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class puntaje_259 extends MovieClip { public var score_txt:TextField; public var scoreLbl_txt:TextField; } }//package BenSamurai_fla
Section 149
//ScoreText_299 (BenSamurai_fla.ScoreText_299) package BenSamurai_fla { import flash.display.*; public dynamic class ScoreText_299 extends MovieClip { public var scoreTxt_mc:MovieClip; } }//package BenSamurai_fla
Section 150
//ScoreWonRText_418 (BenSamurai_fla.ScoreWonRText_418) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class ScoreWonRText_418 extends MovieClip { public var txt1_txt:TextField; public var txt3_txt:TextField; public var scoreLabel_txt:TextField; public var score_txt:TextField; public var t3_txt:TextField; public var t1_txt:TextField; public var txt4_txt:TextField; public var txt2_txt:TextField; public var t2_txt:TextField; public var t4_txt:TextField; } }//package BenSamurai_fla
Section 151
//ScoreWonText_74 (BenSamurai_fla.ScoreWonText_74) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class ScoreWonText_74 extends MovieClip { public var scoreLabel_txt:TextField; public var score_txt:TextField; } }//package BenSamurai_fla
Section 152
//secuenciaXXZZ_431 (BenSamurai_fla.secuenciaXXZZ_431) package BenSamurai_fla { import flash.display.*; public dynamic class secuenciaXXZZ_431 extends MovieClip { public function secuenciaXXZZ_431(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame2(){ stop(); } } }//package BenSamurai_fla
Section 153
//teclas_mc_319 (BenSamurai_fla.teclas_mc_319) package BenSamurai_fla { import flash.display.*; public dynamic class teclas_mc_319 extends MovieClip { public var ben_mc:MovieClip; } }//package BenSamurai_fla
Section 154
//TutorialTitle2Txt_350 (BenSamurai_fla.TutorialTitle2Txt_350) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class TutorialTitle2Txt_350 extends MovieClip { public var titles_txt:TextField; public var text1_txt:TextField; public var txt_2b:TextField; public var txt_2c:TextField; } }//package BenSamurai_fla
Section 155
//TutorialTitleTxt_25 (BenSamurai_fla.TutorialTitleTxt_25) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class TutorialTitleTxt_25 extends MovieClip { public var txt_2:TextField; public var titles_txt:TextField; public var text1_txt:TextField; public var txt_2b:TextField; public var txt_2c:TextField; } }//package BenSamurai_fla
Section 156
//Vidas_258 (BenSamurai_fla.Vidas_258) package BenSamurai_fla { import flash.display.*; import flash.text.*; public dynamic class Vidas_258 extends MovieClip { public var numeroVida_txt:TextField; } }//package BenSamurai_fla
Section 157
//BaseButtonMovieClip (buttons.BaseButtonMovieClip) package buttons { import flash.events.*; import flash.display.*; public class BaseButtonMovieClip extends MovieClip { protected var _hitArea:MovieClip;// = null private var _isPlayingAnimation:Boolean; public function BaseButtonMovieClip(){ _hitArea = null; super(); enabled = false; mouseEnabled = false; _hitArea = (getChildByName("hitArea_mc") as MovieClip); if (_hitArea == null){ _hitArea = this; } else { _hitArea.alpha = 0; }; _hitArea.buttonMode = true; _hitArea.mouseChildren = false; _hitArea.enabled = true; _isPlayingAnimation = false; _hitArea.addEventListener(MouseEvent.MOUSE_DOWN, OnMouseDown); _hitArea.addEventListener(MouseEvent.MOUSE_UP, OnMouseUp); _hitArea.addEventListener(MouseEvent.ROLL_OVER, OnRollOver); _hitArea.addEventListener(MouseEvent.ROLL_OUT, OnRollOut); _hitArea.addEventListener("AnimationStarted", OnAnimationStarted); _hitArea.addEventListener("AnimationFinished", OnAnimationFinished); gotoAndStop("up"); } protected function OnRollOver(_arg1:MouseEvent):void{ if (currentLabel == "_up"){ gotoAndPlay("_over"); Sfx.PlaySound(Sfx.SFX_OTHERS_ROLLOVER); }; } protected function OnMouseUp(_arg1:MouseEvent):void{ if (!_isPlayingAnimation){ gotoAndPlay("_over"); }; } protected function OnAnimationStarted(_arg1:Event):void{ _isPlayingAnimation = true; } protected function OnRollOut(_arg1:MouseEvent):void{ if (!_isPlayingAnimation){ gotoAndPlay("_up"); }; } public function get HitArea():MovieClip{ return (_hitArea); } protected function OnMouseDown(_arg1:MouseEvent):void{ if (currentLabel != "_down"){ gotoAndPlay("_down"); }; } protected function OnAnimationFinished(_arg1:Event):void{ _isPlayingAnimation = false; gotoAndPlay("_up"); } } }//package buttons
Section 158
//RollOutBtn (buttons.RollOutBtn) package buttons { import flash.events.*; import flash.display.*; public class RollOutBtn extends BaseButtonMovieClip { public var hitArea_mc:MovieClip; public var anim_mc:MovieClip; private var _overFrame:int;// = 1 public var muted_mc:MovieClip; public function RollOutBtn():void{ _overFrame = 1; super(); this.addEventListener("OutAnimationFinished", OnOutAnimationFinished); } private function OnOutAnimationFinished(_arg1:Event):void{ this.addEventListener(Event.RENDER, AdjustUpState); GameTemplateMainApp.MyStage.invalidate(); this.gotoAndStop("_up"); } private function AdjustUpState(_arg1:Event):void{ var _local2:MovieClip; this.removeEventListener(Event.RENDER, AdjustUpState); _local2 = (this.getChildByName("anim_mc") as MovieClip); if (_local2 != null){ _local2.gotoAndStop(_local2.totalFrames); }; } override protected function OnRollOut(_arg1:MouseEvent):void{ var _local2:MovieClip; _overFrame = 1; if (this.currentLabel == "_over"){ _local2 = (this.getChildByName("anim_mc") as MovieClip); if (_local2 != null){ _overFrame = _local2.currentFrame; this.addEventListener(Event.RENDER, AdjustRollOut); GameTemplateMainApp.MyStage.invalidate(); this.gotoAndStop("_out"); return; }; }; this.gotoAndStop("_out"); } private function AdjustRollOut(_arg1:Event):void{ var _local2:MovieClip; this.removeEventListener(Event.RENDER, AdjustRollOut); _local2 = (this.getChildByName("anim_mc") as MovieClip); if (_local2 != null){ _local2.gotoAndPlay(((_local2.totalFrames - _overFrame) + 1)); }; } } }//package buttons
Section 159
//TextContainerButtonMovieClip (buttons.TextContainerButtonMovieClip) package buttons { import flash.display.*; import flash.text.*; public class TextContainerButtonMovieClip extends BaseButtonMovieClip { protected var _container:MovieClip;// = null public var container_mc:MovieClip; protected var _text:TextField;// = null public var hitArea_mc:MovieClip; public function TextContainerButtonMovieClip(){ _container = null; _text = null; super(); CreateChildren(); } protected function CreateChildren():void{ _container = (getChildByName("container_mc") as MovieClip); if (_container == null){ _text = new TextField(); return; }; _text = (_container.getChildByName("text_txt") as TextField); if (_text == null){ _text = new TextField(); return; }; } public function set Text(_arg1:String){ _text.text = _arg1; } public function set HTMLText(_arg1:String){ _text.htmlText = _arg1; } } }//package buttons
Section 160
//CharactersCollisionExecutor (collision.CharactersCollisionExecutor) package collision { import flash.display.*; import model.*; import flash.geom.*; import enemies.*; import view.*; public class CharactersCollisionExecutor implements ICollisionExecutor { private var _hitAreaAttack:MovieClip; private var _collisionManager:CollisionManager; private var _effectGlobalPosition:Point; public function ObjectCollisionEnemies(_arg1:Enemy):void{ var _local2:Number; var _local3:Number; var _local4:Point; _local2 = 0; _local3 = 0; _local4 = null; if ((((Character(_collisionManager.Ben).CurrentTransformationId == Character.TRANSFORMATION_CANNONBOLT)) && ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_ATTACK)))){ Enemy(_arg1).EnergySubtract(Character(_collisionManager.Ben).CurrentTransformation.EnergyToSubtractEnemySuperAttack); } else { Enemy(_arg1).EnergySubtract(Character(_collisionManager.Ben).CurrentTransformation.EnergyToSubtractEnemyAttack); }; _hitAreaAttack = Character(_collisionManager.Ben).HitAreaAttack; if (Character(_collisionManager.Ben).CurrentTransformationId == Character.TRANSFORMATION_FOUR_ARMS){ _effectGlobalPosition = _hitAreaAttack.localToGlobal(new Point()); _effectGlobalPosition.x = (_effectGlobalPosition.x + ((Character(_collisionManager.Ben).View.scaleX)<0) ? -(_hitAreaAttack.width) : _hitAreaAttack.width); _effectGlobalPosition.y = (_effectGlobalPosition.y + (_hitAreaAttack.height / 2)); _local4 = LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).globalToLocal(_effectGlobalPosition); EffectManager.Instance.PlayEffect(EffectManager.EFFECT_ATTACK, _local4); if (FourArms._attackingArmsLeft){ Sfx.PlaySound(Sfx.SFX_BEN_ARMS_LEFT); } else { Sfx.PlaySound(Sfx.SFX_BEN_ARMS_RIGHT); }; }; if (Character(_collisionManager.Ben).CurrentTransformationId == Character.TRANSFORMATION_BEN_SAMURAI){ _effectGlobalPosition = _hitAreaAttack.localToGlobal(new Point()); _effectGlobalPosition.x = (_effectGlobalPosition.x + ((Character(_collisionManager.Ben).View.scaleX)<0) ? -(_hitAreaAttack.width) : _hitAreaAttack.width); _effectGlobalPosition.y = (_effectGlobalPosition.y + (_hitAreaAttack.height / 2)); _local4 = LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).globalToLocal(_effectGlobalPosition); EffectManager.Instance.PlayEffect(EffectManager.EFFECT_SWORD, _local4); }; if (Enemy(_arg1).Energy > 0){ Enemy(_arg1).TryNewPrimaryState(Enemy.PRI_ST_HIT); Sfx.PlaySound(Sfx.SFX_ENEMY_HIT); }; Character(_collisionManager.Ben).AttackCollision = false; } public function BenToBossesFinal(_arg1:FinalBossesThree):void{ Enemy(_arg1).EnergySubtract(Character(_collisionManager.Ben).CurrentTransformation.EnergyToSubtractEnemyAttack); if (Enemy(_arg1).Energy > 0){ Enemy(_arg1).TryNewPrimaryState(Enemy.PRI_ST_HIT); }; Character(_collisionManager.Ben).AttackCollision = false; } public function ObjectCollisionBen(_arg1:Enemy):void{ Enemy(_arg1).TryNewSecondaryState(Enemy.SEC_ST_ATTACK); Character(_collisionManager.Ben).EnergySubtract(Enemy(_arg1).EnergyToSubtractBenAttack); if (Character(_collisionManager.Ben).Energy > 0){ Sfx.PlaySound(Sfx.SFX_ENEMY_ATTACK_ONE); Character(_collisionManager.Ben).CurrentTransformation.TryNewPrimaryState(Character.PRI_ST_HIT); Character(_collisionManager.Ben).Invincible = ((Character(_collisionManager.Ben).Invincible == false)) ? true : false; }; } public function CheckCollisions(_arg1:int, _arg2:int):void{ var _local3:Array; var _local4:Array; var _local5:int; var _local6:Enemy; if (((Character(_collisionManager.Ben).Transforming) || (Character(_collisionManager.Ben).Dead))){ return; }; _hitAreaAttack = Character(_collisionManager.Ben).HitAreaAttack; _local5 = (_arg1 - 1); while (_local5 < _arg2) { _local3 = (_collisionManager.Enemies[_local5] as Array); _local4 = (_collisionManager.Enemies[_local5] as Array); for each (_local6 in _local3) { if ((((((((((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_SWINGING_SWORD)) || ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_ARMSLEFT)))) || ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_ARMSRIGHT)))) || ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_FAST)))) || ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_ATTACK)))){ if (((((((!(Enemy(_local6).Dead)) && (!((Enemy(_local6).Type == 5))))) && (Character(_collisionManager.Ben).AttackCollision))) && (CollisionDetector.AreCollidingOfSprite(Enemy(_local6).GetCollisionSprite(), _hitAreaAttack)))){ this.ObjectCollisionEnemies(_local6); }; }; if (((((((!(Character(_collisionManager.Ben).Invincible)) && (!(Enemy(_local6).Dead)))) && ((((Enemy(_local6).Type == 2)) || ((Enemy(_local6).Type == 4)))))) && (!(Character(_collisionManager.Ben).Transforming)))){ if (CollisionDetector.AreCollidingOfSprite(Character(_collisionManager.Ben).CurrentTransformation.GetCollisionSprite(), Enemy(_local6).HitAreaAttack)){ this.ObjectCollisionBen(_local6); }; }; if (((((((((((!(Character(_collisionManager.Ben).Invincible)) && (!(Character(_collisionManager.Ben).Transforming)))) && (!(Enemy(_local6).Dead)))) && (!((Enemy(_local6).Type == 4))))) && (!((Enemy(_local6).Type == 5))))) && (CollisionDetector.AreColliding(_local6, _collisionManager.Ben)))){ this.BenCollisionEnemies(_local6); }; if (Enemy(_local6).Type == 5){ if (((FinalBossesThree.ATTACKING) && (!(Character(_collisionManager.Ben).Invincible)))){ if (Enemy(_local6).SecondaryState == Enemy.SEC_ST_SUPERATTACK){ if (CollisionDetector.AreCollidingOfSprite(Character(_collisionManager.Ben).CurrentTransformation.GetCollisionSprite(), FinalBossesThree.LEFT_MC)){ BossesFinalToBen((_local6 as FinalBossesThree)); }; if (CollisionDetector.AreCollidingOfSprite(Character(_collisionManager.Ben).CurrentTransformation.GetCollisionSprite(), FinalBossesThree.RIGHT_MC)){ BossesFinalToBen(FinalBossesThree(_local6)); }; } else { if (FinalBossesThree(_local6).ArmsAttack == 1){ if (CollisionDetector.AreCollidingOfSprite(Character(_collisionManager.Ben).CurrentTransformation.GetCollisionSprite(), FinalBossesThree.LEFT_MC)){ BossesFinalToBen((_local6 as FinalBossesThree)); }; } else { if (FinalBossesThree(_local6).ArmsAttack == 2){ if (CollisionDetector.AreCollidingOfSprite(Character(_collisionManager.Ben).CurrentTransformation.GetCollisionSprite(), FinalBossesThree.RIGHT_MC)){ BossesFinalToBen(FinalBossesThree(_local6)); }; }; }; }; }; if (((FinalBossesThree.ATTACKING) && (FinalBossesThree.HITENABLE))){ if (Enemy(_local6).SecondaryState == Enemy.SEC_ST_SUPERATTACK){ } else { if (FinalBossesThree(_local6).ArmsAttack == 1){ if ((((((((((((((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_SWINGING_SWORD)) || ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_ARMSLEFT)))) || ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_ARMSRIGHT)))) || ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_FAST)))) || ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_ATTACK)))) && (Character(_collisionManager.Ben).AttackCollision))) && (CollisionDetector.AreCollidingOfSprite(_hitAreaAttack, FinalBossesThree.HIT_AREA)))){ BenToBossesFinal(FinalBossesThree(_local6)); }; } else { if ((((((((((((((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_SWINGING_SWORD)) || ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_ARMSLEFT)))) || ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_ARMSRIGHT)))) || ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_FAST)))) || ((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_ATTACK)))) && (Character(_collisionManager.Ben).AttackCollision))) && (CollisionDetector.AreCollidingOfSprite(_hitAreaAttack, FinalBossesThree.HIT_AREA)))){ BenToBossesFinal(FinalBossesThree(_local6)); }; }; }; }; }; }; _local5++; }; } public function Initialize(_arg1:CollisionManager):void{ _collisionManager = _arg1; } public function BossesFinalToBen(_arg1:FinalBossesThree):void{ Character(_collisionManager.Ben).EnergySubtract(Enemy(_arg1).EnergyToSubtractBenAttack); if (Character(_collisionManager.Ben).Energy > 0){ Character(_collisionManager.Ben).CurrentTransformation.TryNewPrimaryState(Character.PRI_ST_HIT); Character(_collisionManager.Ben).Invincible = ((Character(_collisionManager.Ben).Invincible == false)) ? true : false; }; } public function BenCollisionEnemies(_arg1:Enemy):void{ Character(_collisionManager.Ben).EnergySubtract(Enemy(_arg1).EnergyToSubtractBenHit); if (Character(_collisionManager.Ben).Energy > 0){ Character(_collisionManager.Ben).CurrentTransformation.TryNewPrimaryState(Character.PRI_ST_HIT); Character(_collisionManager.Ben).Invincible = ((Character(_collisionManager.Ben).Invincible == false)) ? true : false; Sfx.PlaySound(Sfx.SFX_BEN_HIT); }; } } }//package collision
Section 161
//CollisionDetection (collision.CollisionDetection) package collision { import flash.display.*; import flash.geom.*; public class CollisionDetection { public static function checkForCollision(_arg1:Sprite, _arg2:Sprite, _arg3:Number=0xFF):Rectangle{ var bounds1:Object; var bounds2:Object; var bounds:Object; var intersection:Rectangle; var img:BitmapData; var mat:Matrix; var p_clip1 = _arg1; var p_clip2 = _arg2; var p_alphaTolerance = _arg3; bounds1 = p_clip1.getBounds(p_clip1.stage); bounds2 = p_clip2.getBounds(p_clip1.stage); if (((((((bounds1.x + bounds1.width) < bounds2.x)) || (((bounds2.x + bounds2.width) < bounds1.x)))) || (((((bounds1.y + bounds1.height) < bounds2.y)) || (((bounds2.y + bounds2.height) < bounds1.y)))))){ return (null); }; bounds = {}; bounds.xMin = Math.max(bounds1.x, bounds2.x); bounds.xMax = Math.min((bounds1.x + bounds1.width), (bounds2.x + bounds2.width)); bounds.yMin = Math.max(bounds1.y, bounds2.y); bounds.yMax = Math.min((bounds1.y + bounds1.height), (bounds2.y + bounds2.height)); if ((((bounds.xMin >= bounds.xMax)) || ((bounds.yMin >= bounds.yMax)))){ return (null); }; try { img = new BitmapData((bounds.xMax - bounds.xMin), (bounds.yMax - bounds.yMin), false); mat = p_clip1.transform.concatenatedMatrix; mat.tx = (mat.tx - bounds.xMin); mat.ty = (mat.ty - bounds.yMin); img.draw(p_clip1, mat, new ColorTransform(1, 1, 1, 1, 0xFF, -255, -255, p_alphaTolerance)); mat = p_clip2.transform.concatenatedMatrix; mat.tx = (mat.tx - bounds.xMin); mat.ty = (mat.ty - bounds.yMin); img.draw(p_clip2, mat, new ColorTransform(1, 1, 1, 1, 0xFF, 0xFF, 0xFF, p_alphaTolerance), "difference"); intersection = img.getColorBoundsRect(4294967295, 4278255615); if (intersection.width == 0){ return (null); }; intersection.x = (intersection.x + bounds.xMin); intersection.y = (intersection.y + bounds.yMin); } catch(e:Error) { intersection = null; }; return (intersection); } } }//package collision
Section 162
//CollisionDetector (collision.CollisionDetector) package collision { import flash.display.*; import flash.geom.*; public class CollisionDetector { public static function AreCollidingOfSprite(_arg1:Sprite, _arg2:Sprite):Boolean{ if ((((_arg1 == null)) || ((_arg2 == null)))){ return (false); }; return (_arg1.hitTestObject(_arg2)); } public static function GetCollisionRectangle(_arg1:ICollidable, _arg2:ICollidable):Rectangle{ return (CollisionDetection.checkForCollision(_arg1.GetCollisionSprite(), _arg2.GetCollisionSprite())); } public static function AreColliding(_arg1:ICollidable, _arg2:ICollidable):Boolean{ if ((((_arg1.GetCollisionSprite() == null)) || ((_arg2.GetCollisionSprite() == null)))){ return (false); }; return (_arg1.GetCollisionSprite().hitTestObject(_arg2.GetCollisionSprite())); } } }//package collision
Section 163
//CollisionManager (collision.CollisionManager) package collision { import game.*; public class CollisionManager { protected var _wallBlocked:Array; protected var _ben:ICollidable; protected var _enemiesIAMarks:Array; protected var _friendlyShots:Array; protected var _enemiesShots:Array; protected var _powerUps:Array; protected var _iCollisionExecutor:Array; protected var _platforms:Array; protected var _enemies:Array; protected var _specialWall:Array; public function get Platforms():Array{ return (_platforms); } private function RemoveICollidableOfArray(_arg1:ICollidable, _arg2:Array):Boolean{ var _local3:Array; var _local4:int; var _local5:int; var _local6:int; var _local7:int; _local4 = _arg2.length; _local5 = 0; while (_local5 < _local4) { if ((((_arg1.GetType() == 3)) || ((_arg1.GetType() == 4)))){ if (ICollidable(_arg2[_local5]) == _arg1){ _arg2.splice(_local5, 1); return (true); }; } else { _local3 = (_arg2[_local5] as Array); _local6 = _local3.length; while (_local7 < _local6) { if (ICollidable(_local3[_local7]) == _arg1){ _local3.splice(_local7, 1); return (true); }; _local7++; }; }; _local5++; }; return (false); } public function get Enemies():Array{ return (_enemies); } public function get SpecialWalls():Array{ return (_specialWall); } public function get EnemiesShots():Array{ return (_enemiesShots); } public function get PowerUps():Array{ return (_powerUps); } public function AddICollidableOfArray(_arg1:Array, _arg2:int):Boolean{ var _local3:*; if (_arg1.length == 0){ return (false); }; for each (_local3 in _arg1) { this.AddICollidable(ICollidable(_local3), _arg2); }; return (true); } public function get WallsBlocked():Array{ return (_wallBlocked); } public function RemoveICollidable(_arg1:ICollidable):Boolean{ if (_arg1 != null){ switch (_arg1.GetType()){ case 1: _ben = null; return (true); case 2: return (this.RemoveICollidableOfArray(_arg1, _enemies)); case 3: return (this.RemoveICollidableOfArray(_arg1, _enemiesShots)); case 4: return (this.RemoveICollidableOfArray(_arg1, _friendlyShots)); case 5: return (this.RemoveICollidableOfArray(_arg1, _platforms)); case 6: return (this.RemoveICollidableOfArray(_arg1, _specialWall)); case 7: return (this.RemoveICollidableOfArray(_arg1, _powerUps)); case 8: return (this.RemoveICollidableOfArray(_arg1, _enemiesIAMarks)); case 9: return (this.RemoveICollidableOfArray(_arg1, _wallBlocked)); default: return (false); }; }; return (false); } private function RemoveCollisionExecutor(_arg1:ICollisionExecutor):Boolean{ var _local2:int; var _local3:int; _local2 = _iCollisionExecutor.length; if (((!((_local2 == 0))) && (!((_arg1 == null))))){ _local3 = 0; while (_local3 < _local2) { if (ICollisionExecutor(_iCollisionExecutor[_local3]) == _arg1){ _iCollisionExecutor.splice(_local3, 1); return (true); }; _local3++; }; return (false); }; return (false); } public function Update(_arg1:int, _arg2:int):void{ var _local3:*; for each (_local3 in _iCollisionExecutor) { ICollisionExecutor(_local3).CheckCollisions(_arg1, _arg2); }; } public function get FriendlyShots():Array{ return (_friendlyShots); } public function Reset():void{ var _local1:int; var _local2:*; _iCollisionExecutor = new Array(); _enemies = new Array(); _enemiesShots = new Array(); _friendlyShots = new Array(); _platforms = new Array(); _specialWall = new Array(); _powerUps = new Array(); _enemiesIAMarks = new Array(); _wallBlocked = new Array(); _local1 = 0; while (_local1 < GameManager.Instance.MaxSublevels) { _enemies.push(new Array()); _platforms.push(new Array()); _specialWall.push(new Array()); _powerUps.push(new Array()); _enemiesIAMarks.push(new Array()); _wallBlocked.push(new Array()); _local1++; }; this.AddCollisionExecutor(new CharactersCollisionExecutor()); this.AddCollisionExecutor(new EnvironmentsCollisionExecutor()); this.AddCollisionExecutor(new ShotsCollisionExecutor()); this.AddCollisionExecutor(new SpecialWallCollisionExecutor()); this.AddCollisionExecutor(new PowerUpsCollisionExecutor()); this.AddCollisionExecutor(new EnemyIAMarksCollisionExecutor()); this.AddCollisionExecutor(new WallBlockedCollisionExecutor()); for each (_local2 in _iCollisionExecutor) { ICollisionExecutor(_local2).Initialize(this); }; } public function Initialize():void{ Reset(); } public function get EnemiesIAMarksArray():Array{ return (_enemiesIAMarks); } public function get Ben():ICollidable{ return (_ben); } public function AddICollidable(_arg1:ICollidable, _arg2:int):Boolean{ if (_arg1 != null){ switch (_arg1.GetType()){ case 1: _ben = _arg1; return (true); case 2: _enemies[(_arg2 - 1)].push(_arg1); return (true); case 3: _enemiesShots.push(_arg1); return (true); case 4: _friendlyShots.push(_arg1); return (true); case 5: _platforms[(_arg2 - 1)].push(_arg1); return (true); case 6: _specialWall[(_arg2 - 1)].push(_arg1); return (true); case 7: _powerUps[(_arg2 - 1)].push(_arg1); return (true); case 8: _enemiesIAMarks[(_arg2 - 1)].push(_arg1); return (true); case 9: _wallBlocked[(_arg2 - 1)].push(_arg1); return (true); default: return (false); }; }; return (false); } private function AddCollisionExecutor(_arg1:ICollisionExecutor):Boolean{ var _local2:*; if (_arg1 != null){ for each (_local2 in _iCollisionExecutor) { if (ICollisionExecutor(_local2) == _arg1){ return (false); }; }; _iCollisionExecutor.push(_arg1); return (true); }; return (false); } public function AddCollisionExecutorOfArray(_arg1:Array):Boolean{ var _local2:*; if (_arg1.length == 0){ return (false); }; for each (_local2 in _arg1) { this.AddCollisionExecutor(ICollisionExecutor(_local2)); }; return (true); } } }//package collision
Section 164
//EnemyIAMarksCollisionExecutor (collision.EnemyIAMarksCollisionExecutor) package collision { import enemies.*; public class EnemyIAMarksCollisionExecutor implements ICollisionExecutor { private var _collisionManager:CollisionManager; public function Initialize(_arg1:CollisionManager):void{ _collisionManager = _arg1; } public function CheckCollisions(_arg1:int, _arg2:int):void{ var _local3:Array; var _local4:Array; var _local5:int; var _local6:int; var _local7:Enemy; var _local8:EnemiesIAMarks; _local5 = _collisionManager.Enemies.length; _local6 = 0; while (_local6 < _local5) { _local3 = (_collisionManager.Enemies[_local6] as Array); _local4 = (_collisionManager.EnemiesIAMarksArray[_local6] as Array); for each (_local7 in _local3) { for each (_local8 in _local4) { if (((((!(_local7.Dead)) && (_local7.Active))) && (!((_local7.Type == 1))))){ if (CollisionDetector.AreColliding(_local7, _local8)){ if ((((_local7.Type == 2)) || ((_local7.Type == 4)))){ switch (_local8.Action){ case "upObligatory": _local7.UpObligatory(); break; case "downObligatory": if (_local7.MarkIAEnable != _local8.Action){ _local7.DownObligatory(); }; break; case "leftObligatory": _local7.LeftObligatory(); break; case "rightObligatory": _local7.RightObligatory(); break; case "upConditional": if (_local7.MarkIAEnable != _local8.Action){ _local7.UpConditional(); }; break; case "downConditional": if (_local7.MarkIAEnable != _local8.Action){ _local7.DownConditional(); }; break; case "leftConditional": if (_local7.MarkIAEnable != _local8.Action){ _local7.LeftConditional(); }; break; case "rightConditional": if (_local7.MarkIAEnable != _local8.Action){ _local7.RightConditional(); }; break; default: trace(" NADA_RED "); }; if (((!((_local8.Action == null))) && (!((_local8.Action == _local7.MarkIAEnable))))){ _local7.MarkIAEnable = _local8.Action; }; } else { if (_local7.Type == 3){ switch (_local8.Action){ case "flechaIzq": _local7.Flecha(_local8.View.rotation, -1); break; case "flechaDer": _local7.Flecha(_local8.View.rotation, 1); break; }; }; }; }; }; }; }; _local6++; }; } } }//package collision
Section 165
//EnvironmentsCollisionExecutor (collision.EnvironmentsCollisionExecutor) package collision { import model.*; import flash.geom.*; import enemies.*; import config.*; import assets.*; public class EnvironmentsCollisionExecutor implements ICollisionExecutor { private var _deltaCorrectionFactor:Number;// = 2 private var _collisionManager:CollisionManager; public function EnvironmentsCollisionExecutor(){ _deltaCorrectionFactor = 2; super(); } private function CollideEnemyAndPlatform(_arg1:Enemy, _arg2:Platform, _arg3:Rectangle=null):Boolean{ var _local4:Boolean; var _local5:Boolean; var _local6:Boolean; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local4 = false; _local5 = false; _local6 = false; _local7 = 0; _local8 = 0; if (_arg2 == _arg1.CurrentPlatform){ return (true); }; if (_arg1.CurrentPlatform == null){ _local11 = (_arg1.CurrentAbsoluteY - _arg1.PreviousAbsoluteY); _local12 = 0; if (_local11 > 0){ if (_arg2.StopsUpDown){ _local7 = (_arg1.BottomGlobalY - _arg2.TopGlobalY); if (((((_arg1.BottomGlobalY - (_local11 * 2)) < _arg2.TopGlobalY)) || ((_arg2.Type == Platform.FLOOR)))){ AdjustEnemyY(_arg1, ((_arg2.TopGlobalY - _arg1.BottomGlobalY) + 3)); _local4 = true; _local6 = true; _arg1.CurrentPlatform = _arg2; _local5 = true; if (_arg1.CurrentPlatform.Type == 1){ _arg1.TryNewPrimaryState(Enemy.PRI_ST_FALL); }; }; }; } else { if (_arg2.StopsDownUp){ _local7 = (_arg2.BottomGlobalY - _arg1.TopGlobalY); if ((_arg1.TopGlobalY - _local11) > _arg2.BottomGlobalY){ AdjustEnemyY(_arg1, ((_arg2.BottomGlobalY - _arg1.TopGlobalY) - 1)); _local4 = true; _local6 = true; }; }; }; }; _local9 = (_arg1.CurrentAbsoluteX - _arg1.PreviousAbsoluteX); _local10 = 0; if (_local9 > 0){ if (_arg2.StopsLeftRight){ _local8 = (_arg1.RightGlobalX - _arg2.LeftGlobalX); if ((_arg1.RightGlobalX - _local9) < _arg2.LeftGlobalX){ AdjustEnemyX(_arg1, ((_arg2.LeftGlobalX - _arg1.RightGlobalX) - 1)); _local4 = true; _local6 = true; }; }; } else { if (_arg2.StopsRightLeft){ _local8 = (_arg2.RightGlobalX - _arg1.LeftGlobalX); if ((_arg1.LeftGlobalX - _local9) > _arg2.RightGlobalX){ AdjustEnemyX(_arg1, ((_arg2.RightGlobalX - _arg1.LeftGlobalX) + 1)); _local4 = true; _local6 = true; }; }; }; if (((!(_local6)) && (((Math.abs(_local7) + Math.abs(_local8)) > 0)))){ _local13 = 0; if ((((Math.abs(_local7) <= Math.abs(_local8))) || (((_arg1.BottomGlobalY - _local11) < _arg2.TopGlobalY)))){ if ((((_local11 > 0)) && (_arg2.StopsUpDown))){ _local13 = ((_arg2.TopGlobalY - _arg1.BottomGlobalY) + 1); _arg1.CurrentPlatform = _arg2; _local5 = true; AdjustEnemyY(_arg1, _local13); } else { if (_arg2.StopsUpDown){ _local13 = ((_arg2.BottomGlobalY - _arg1.TopGlobalY) - 1); AdjustEnemyY(_arg1, _local13); }; }; } else { if ((((_local9 > 0)) && (_arg2.StopsLeftRight))){ _local13 = ((_arg2.LeftGlobalX - _arg1.RightGlobalX) - 1); AdjustEnemyX(_arg1, _local13); } else { if (_arg2.StopsRightLeft){ _local13 = ((_arg2.RightGlobalX - _arg1.LeftGlobalX) + 1); AdjustEnemyX(_arg1, _local13); }; }; }; _local4 = true; _local6 = true; }; return (_local5); } private function AdjustEnemyY(_arg1:Enemy, _arg2:Number):void{ _arg1.CurrentAbsoluteY = _arg1.PreviousAbsoluteY; _arg1.SpeedY = 0; _arg1.Y = (_arg1.Y + _arg2); } private function AdjustBenY(_arg1:Character, _arg2:Number):void{ _arg1.CurrentAbsoluteY = _arg1.PreviousAbsoluteY; _arg1.SpeedY = 0; _arg1.Y = (_arg1.Y + _arg2); } public function CheckCollisions(_arg1:int, _arg2:int):void{ this.BenAgainstPlatform(_arg1, _arg2); this.EnemyAgainstPlatform(_arg1, _arg2); this.BenAgainstSpecialWall(_arg1, _arg2); } public function BenAgainstPlatform(_arg1:int, _arg2:int):void{ var _local3:Boolean; var _local4:Boolean; var _local5:Rectangle; var _local6:Array; var _local7:int; var _local8:Platform; _local3 = false; _local4 = false; _local7 = (_arg1 - 1); while (_local7 < _arg2) { _local6 = (_collisionManager.Platforms[_local7] as Array); for each (_local8 in _local6) { _local5 = CollisionDetection.checkForCollision(_collisionManager.Ben.GetCollisionSprite(), _local8.GetCollisionSprite()); if (_local5 != null){ _local4 = CollideBenAndPlatform(Character(_collisionManager.Ben), _local8, _local5); }; if (_local4){ _local3 = true; }; }; _local7++; }; if (!_local3){ Character(_collisionManager.Ben).CurrentPlatform = null; }; } public function BenAgainstSpecialWall(_arg1:int, _arg2:int):void{ var _local3:Boolean; var _local4:Rectangle; var _local5:Array; var _local6:int; var _local7:SpecialWall; _local3 = false; _local6 = (_arg1 - 1); while (_local6 < _arg2) { _local5 = (_collisionManager.SpecialWalls[_local6] as Array); for each (_local7 in _local5) { if (((((_local7.Active) && (!(_local7.Destroyed)))) && (CollisionDetector.AreColliding(_collisionManager.Ben, ICollidable(_local7))))){ _local3 = CollideBenAndSpecialWall(Character(_collisionManager.Ben), _local7); }; }; _local6++; }; } public function Initialize(_arg1:CollisionManager):void{ _collisionManager = _arg1; _deltaCorrectionFactor = ConfigLoader.Instance.Config["CollisionDeltaCorrectionFactor"]; } private function CollideBenAndSpecialWall(_arg1:Character, _arg2:SpecialWall, _arg3:Rectangle=null):Boolean{ var _local4:Boolean; var _local5:Boolean; var _local6:Number; var _local7:Number; var _local8:Number; if ((((_arg1.CurrentTransformationId == Character.TRANSFORMATION_CANNONBOLT)) && ((_arg1.SecondaryState == Character.SEC_STATE_ATTACK)))){ return (false); }; _local4 = false; _local5 = false; _local6 = 0; _local7 = (_arg1.CurrentAbsoluteX - _arg1.PreviousAbsoluteX); _local8 = 0; if (_local7 > 0){ _local6 = (_arg1.RightGlobalX - _arg2.LeftGlobalX); if ((_arg1.RightGlobalX - _local7) < _arg2.LeftGlobalX){ AdjustBenX(_arg1, ((_arg2.LeftGlobalX - _arg1.RightGlobalX) - 1)); _local4 = true; _local5 = true; }; } else { if (_local7 < 0){ _local6 = (_arg2.RightGlobalX - _arg1.LeftGlobalX); if ((_arg1.LeftGlobalX - _local7) > _arg2.RightGlobalX){ AdjustBenX(_arg1, ((_arg2.RightGlobalX - _arg1.LeftGlobalX) + 1)); _local4 = true; _local5 = true; }; }; }; if (((!(_local5)) && (!((_local6 == 0))))){ if (_local7 > 0){ _local8 = ((_arg2.LeftGlobalX - _arg1.RightGlobalX) - 1); } else { _local8 = ((_arg2.RightGlobalX - _arg1.LeftGlobalX) + 1); }; AdjustBenX(_arg1, _local8); _local4 = true; _local5 = true; }; return (false); } public function EnemyAgainstPlatform(_arg1:int, _arg2:int):void{ var _local3:Boolean; var _local4:Boolean; var _local5:Rectangle; var _local6:Array; var _local7:Array; var _local8:int; var _local9:int; var _local10:Enemy; var _local11:Platform; _local3 = false; _local4 = false; _local8 = _collisionManager.Enemies.length; _local9 = 0; while (_local9 < _local8) { _local6 = (_collisionManager.Enemies[_local9] as Array); _local7 = (_collisionManager.Platforms[_local9] as Array); for each (_local10 in _local6) { for each (_local11 in _local7) { if (((((!(_local10.Dead)) && (_local10.Active))) && ((((_local10.Type == 2)) || ((_local10.Type == 4)))))){ if (CollisionDetector.AreColliding(_local10, ICollidable(_local11))){ _local4 = CollideEnemyAndPlatform(_local10, _local11); }; if (_local4){ _local3 = true; }; }; if (Enemy(_local10).Type == 1){ if (((_local11.Moves) && ((Enemy(_local10).CurrentPlatform == null)))){ if (CollisionDetector.AreColliding(_local10, ICollidable(_local11))){ Enemy(_local10).CurrentPlatform = _local11; AdjustEnemyY(Enemy(_local10), ((_local11.TopGlobalY - Enemy(_local10).BottomGlobalY) + 3)); }; }; }; }; if ((((((Enemy(_local10).Type == 2)) || ((Enemy(_local10).Type == 4)))) && (!(Enemy(_local10).Dead)))){ if (!_local3){ Enemy(_local10).CurrentPlatform = null; }; }; }; _local9++; }; } private function AdjustBenX(_arg1:Character, _arg2:Number):void{ _arg1.CurrentAbsoluteX = _arg1.PreviousAbsoluteX; _arg1.SpeedX = 0; _arg1.X = (_arg1.X + _arg2); } private function CollideBenAndPlatform(_arg1:Character, _arg2:Platform, _arg3:Rectangle=null):Boolean{ var _local4:Boolean; var _local5:Boolean; var _local6:Boolean; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; var _local12:Number; var _local13:Number; _local4 = false; _local5 = false; _local6 = false; _local7 = 0; _local8 = 0; _local9 = 0; if (_arg2 == _arg1.CurrentPlatform){ return (true); }; if (_arg1.CurrentPlatform == null){ _local12 = (_arg1.CurrentAbsoluteY - _arg1.PreviousAbsoluteY); if (_local12 > 0){ _local12 = (Math.ceil(_local12) * _deltaCorrectionFactor); } else { _local12 = (Math.floor(_local12) * _deltaCorrectionFactor); }; _local13 = 0; if (_local12 > 0){ if (_arg2.StopsUpDown){ _local7 = (_arg1.BottomGlobalY - _arg2.TopGlobalY); if ((_arg2.View is MovingPlatformAsset)){ }; if ((_arg1.BottomGlobalY - _local12) < _arg2.TopGlobalY){ AdjustBenY(_arg1, ((_arg2.TopGlobalY - _arg1.BottomGlobalY) + 3)); _local4 = true; _local6 = true; _arg1.CurrentPlatform = _arg2; _local5 = true; }; }; } else { if (_local12 < 0){ if (_arg2.StopsDownUp){ _local7 = (_arg2.BottomGlobalY - _arg1.TopGlobalY); if ((_arg1.TopGlobalY - _local12) > _arg2.BottomGlobalY){ AdjustBenY(_arg1, ((_arg2.BottomGlobalY - _arg1.TopGlobalY) - 1)); _local4 = true; _local6 = true; }; }; }; }; }; _local10 = (_arg1.CurrentAbsoluteX - _arg1.PreviousAbsoluteX); if (_local10 > 0){ _local12 = (Math.ceil(_local10) * _deltaCorrectionFactor); } else { _local10 = (Math.floor(_local10) * _deltaCorrectionFactor); }; _local11 = 0; if (_local10 > 0){ if (_arg2.StopsLeftRight){ _local8 = (_arg1.RightGlobalX - _arg2.LeftGlobalX); if (((_arg1.RightGlobalX - _local10) < _arg2.LeftGlobalX)){ AdjustBenX(_arg1, ((_arg2.LeftGlobalX - _arg1.RightGlobalX) - 1)); _local4 = true; _local6 = true; }; }; } else { if (_local10 < 0){ if (_arg2.StopsRightLeft){ _local8 = (_arg2.RightGlobalX - _arg1.LeftGlobalX); if ((_arg1.LeftGlobalX - _local10) > _arg2.RightGlobalX){ AdjustBenX(_arg1, ((_arg2.RightGlobalX - _arg1.LeftGlobalX) + 1)); _local4 = true; _local6 = true; }; }; }; }; if (((!(_local6)) && (((Math.abs(_local7) + Math.abs(_local8)) > 0)))){ _local9 = 0; if ((((Math.abs(_local7) <= Math.abs(_local8))) && (!((_local7 == 0))))){ if ((((_local12 > 0)) && (_arg2.StopsUpDown))){ _local9 = ((_arg2.TopGlobalY - _arg1.BottomGlobalY) + 3); _arg1.CurrentPlatform = _arg2; _local5 = true; AdjustBenY(_arg1, _local9); } else { if ((((_local12 < 0)) && (_arg2.StopsUpDown))){ _local9 = ((_arg2.BottomGlobalY - _arg1.TopGlobalY) - 1); AdjustBenY(_arg1, _local9); }; }; } else { if ((((_local10 > 0)) && (_arg2.StopsLeftRight))){ _local9 = ((_arg2.LeftGlobalX - _arg1.RightGlobalX) - 1); AdjustBenX(_arg1, _local9); } else { if ((((_local10 < 0)) && (_arg2.StopsRightLeft))){ _local9 = ((_arg2.RightGlobalX - _arg1.LeftGlobalX) + 1); AdjustBenX(_arg1, _local9); }; }; }; _local4 = true; _local6 = true; }; return (_local5); } private function AdjustEnemyX(_arg1:Enemy, _arg2:Number):void{ _arg1.CurrentAbsoluteX = _arg1.PreviousAbsoluteX; _arg1.SpeedX = 0; _arg1.X = (_arg1.X + _arg2); } } }//package collision
Section 166
//ICollidable (collision.ICollidable) package collision { import flash.display.*; import flash.geom.*; public interface ICollidable { function GetGlobalCenterPoint():Point; function get TopGlobalY():Number; function GetRadio():int; function GetCollisionSprite():Sprite; function get OffsetFromLevelLayer():Point; function get BottomGlobalY():Number; function get LeftGlobalX():Number; function GetType():int; function get RightGlobalX():Number; function SetType(_arg1:int):void; } }//package collision
Section 167
//ICollisionExecutor (collision.ICollisionExecutor) package collision { public interface ICollisionExecutor { function Initialize(_arg1:CollisionManager):void; function CheckCollisions(_arg1:int, _arg2:int):void; } }//package collision
Section 168
//PowerUpsCollisionExecutor (collision.PowerUpsCollisionExecutor) package collision { import model.*; public class PowerUpsCollisionExecutor implements ICollisionExecutor { private var _collisionManager:CollisionManager; public function Initialize(_arg1:CollisionManager):void{ _collisionManager = _arg1; } public function BenWithPowerUp(_arg1:PowerUp):void{ if (_arg1.Type != 0){ _arg1.Active = false; }; if (!_arg1.ActiveInstruccion){ _arg1.TryNewPrimaryState(PowerUp.PRI_ST_DESTROYED); if (_arg1.Type == 1){ Sfx.PlaySound(Sfx.SFX_OTHERS_ONE_LIFE); } else { Sfx.PlaySound(Sfx.SFX_OTHERS_POWER_UP); }; } else { if (Character(_collisionManager.Ben).PrimaryState == Character.PRI_ST_IDLE){ Character(_collisionManager.Ben).AddPowerUpType(_arg1.Type, 0, true); } else { _arg1.Active = true; }; }; } public function CheckCollisions(_arg1:int, _arg2:int):void{ var _local3:Array; var _local4:PowerUp; for each (_local3 in _collisionManager.PowerUps) { for each (_local4 in _local3) { if ((((((((_local4.View.alpha == 1)) || (_local4.ActiveInstruccion))) && (_local4.Active))) && (CollisionDetector.AreColliding(_local4, _collisionManager.Ben)))){ BenWithPowerUp(_local4); }; }; }; } } }//package collision
Section 169
//ShotsCollisionExecutor (collision.ShotsCollisionExecutor) package collision { import model.*; import enemies.*; public class ShotsCollisionExecutor implements ICollisionExecutor { private var _collisionManager:CollisionManager; public function ShotsCollisionExecutor():void{ } public function BenCollisionWithPlatform(_arg1:ShotFriendly, _arg2:Platform):void{ if (((_arg2.StopsLeftRight) && (_arg2.StopsRightLeft))){ _arg1.TryNewPrimaryState(ShotFriendly.PRI_ST_DESTROYED); }; } public function EnemyCollisionWithBen(_arg1:ShotEnemy):void{ _arg1.TryNewPrimaryState(ShotEnemy.PRI_ST_DESTROYED); Character(_collisionManager.Ben).EnergySubtract(_arg1.Energy); if (Character(_collisionManager.Ben).Energy > 0){ Character(_collisionManager.Ben).CurrentTransformation.TryNewPrimaryState(Character.PRI_ST_HIT); }; } public function EnemyCollisionWithPlatform(_arg1:ShotEnemy, _arg2:Platform):void{ if (((_arg2.StopsLeftRight) && (_arg2.StopsRightLeft))){ _arg1.TryNewPrimaryState(ShotEnemy.PRI_ST_DESTROYED); }; } public function CheckCollisions(_arg1:int, _arg2:int):void{ var _local3:*; var _local4:*; var _local5:*; var _local6:Array; var _local7:Array; var _local8:*; var _local9:*; var _local10:*; var _local11:Array; var _local12:Array; var _local13:*; var _local14:*; for each (_local3 in _collisionManager.FriendlyShots) { for each (_local5 in _collisionManager.Enemies) { for each (_local8 in _local5) { if (((((ShotFriendly(_local3).Active) && (!(Enemy(_local8).Dead)))) && (CollisionDetector.AreColliding(_local3, _local8)))){ if (Enemy(_local8).Type != 5){ BenCollisionWithEnemy(_local3, _local8); }; }; }; }; for each (_local6 in _collisionManager.Platforms) { for each (_local9 in _local6) { if (((ShotFriendly(_local3).Active) && (CollisionDetector.AreColliding(_local3, _local9)))){ BenCollisionWithPlatform(_local3, _local9); }; }; }; for each (_local7 in _collisionManager.SpecialWalls) { for each (_local10 in _local7) { if (((((ShotFriendly(_local3).Active) && (SpecialWall(_local10).Active))) && (CollisionDetector.AreColliding(_local3, _local10)))){ BenCollisionWithSpecialWall(_local3, _local10); }; }; }; }; for each (_local4 in _collisionManager.EnemiesShots) { if (((((!(Character(_collisionManager.Ben).Transforming)) && (ShotEnemy(_local4).Active))) && (CollisionDetector.AreColliding(_local4, _collisionManager.Ben)))){ EnemyCollisionWithBen(_local4); }; for each (_local11 in _collisionManager.Platforms) { for each (_local13 in _local11) { if (((ShotEnemy(_local4).Active) && (CollisionDetector.AreColliding(_local4, _local13)))){ EnemyCollisionWithPlatform(_local4, _local13); }; }; }; for each (_local12 in _collisionManager.SpecialWalls) { for each (_local14 in _local12) { if (((((ShotEnemy(_local4).Active) && (SpecialWall(_local14).Active))) && (CollisionDetector.AreColliding(_local4, _local14)))){ EnemyCollisionWithSpecialWall(_local4, _local14); }; }; }; }; } public function EnemyCollisionWithSpecialWall(_arg1:ShotEnemy, _arg2:SpecialWall):void{ _arg1.TryNewPrimaryState(ShotEnemy.PRI_ST_DESTROYED); } public function Initialize(_arg1:CollisionManager):void{ _collisionManager = _arg1; } public function BenCollisionWithSpecialWall(_arg1:ShotFriendly, _arg2:SpecialWall):void{ _arg1.TryNewPrimaryState(ShotFriendly.PRI_ST_DESTROYED); } public function BenCollisionWithEnemy(_arg1:ShotFriendly, _arg2:Enemy):void{ _arg1.TryNewPrimaryState(ShotFriendly.PRI_ST_DESTROYED); Enemy(_arg2).EnergySubtract(Character(_collisionManager.Ben).CurrentTransformation.EnergyToSubtractEnemyShot); if (Enemy(_arg2).Energy > 0){ Enemy(_arg2).TryNewPrimaryState(Enemy.PRI_ST_HIT); }; } } }//package collision
Section 170
//SpecialWallCollisionExecutor (collision.SpecialWallCollisionExecutor) package collision { import model.*; public class SpecialWallCollisionExecutor implements ICollisionExecutor { private var _collisionManager:CollisionManager; public function Initialize(_arg1:CollisionManager):void{ _collisionManager = _arg1; } public function FourArmsWithSpecialWall(_arg1:ICollidable):void{ FourArms._attacking = true; SpecialWall(_arg1).NumberCombo++; if (FourArms._attackingArmsLeft){ if (SpecialWall(_arg1).Combo[SpecialWall(_arg1).NumberCombo] == "Z"){ if (SpecialWall(_arg1).NumberCombo <= 3){ SpecialWall(_arg1).TryNewPrimaryState(SpecialWall.PRI_ST_HIT); Sfx.PlaySound(Sfx.SFX_OTHERS_WALL_HIT); } else { SpecialWall(_arg1).TryNewPrimaryState(SpecialWall.PRI_ST_DESTROYED); SpecialWall(_arg1).Destroyed = true; Sfx.PlaySound(Sfx.SFX_OTHERS_BROKEN_WALL); }; SpecialWall(_arg1).StateCombo(SpecialWall(_arg1).NumberCombo); SpecialWall(_arg1).Accountant = 0; } else { SpecialWall(_arg1).NumberCombo = 0; SpecialWall(_arg1).TryNewPrimaryState(SpecialWall.PRI_ST_HIT); SpecialWall(_arg1).StateCombo(SpecialWall(_arg1).NumberCombo); }; } else { if (FourArms._attackingArmsRight){ if (SpecialWall(_arg1).Combo[SpecialWall(_arg1).NumberCombo] == "X"){ if (SpecialWall(_arg1).NumberCombo <= 3){ SpecialWall(_arg1).TryNewPrimaryState(SpecialWall.PRI_ST_HIT); Sfx.PlaySound(Sfx.SFX_OTHERS_WALL_HIT); } else { SpecialWall(_arg1).TryNewPrimaryState(SpecialWall.PRI_ST_DESTROYED); SpecialWall(_arg1).Destroyed = true; Sfx.PlaySound(Sfx.SFX_OTHERS_BROKEN_WALL); }; SpecialWall(_arg1).StateCombo(SpecialWall(_arg1).NumberCombo); SpecialWall(_arg1).Accountant = 0; } else { SpecialWall(_arg1).NumberCombo = 0; SpecialWall(_arg1).TryNewPrimaryState(SpecialWall.PRI_ST_HIT); SpecialWall(_arg1).StateCombo(SpecialWall(_arg1).NumberCombo); }; }; }; } public function CheckCollisions(_arg1:int, _arg2:int):void{ var _local3:Array; var _local4:SpecialWall; if (Character(_collisionManager.Ben).CurrentTransformationId == Character.TRANSFORMATION_BEN_SAMURAI){ return; }; for each (_local3 in _collisionManager.SpecialWalls) { for each (_local4 in _local3) { if (Character(_collisionManager.Ben).CurrentTransformationId == Character.TRANSFORMATION_FOUR_ARMS){ if (((((((((((((FourArms._attackingArmsLeft) || (FourArms._attackingArmsRight))) && (!(FourArms._attacking)))) && (_local4.Active))) && (!(_local4.Destroyed)))) && ((_local4.EnabledTransformation == 1)))) && (CollisionDetector.AreCollidingOfSprite(_local4.GetCollisionSprite(), Character(_collisionManager.Ben).HitAreaAttack)))){ FourArmsWithSpecialWall(_local4); }; } else { if (Character(_collisionManager.Ben).CurrentTransformationId == Character.TRANSFORMATION_CANNONBOLT){ if ((((((((((Character(_collisionManager.Ben).SecondaryState == Character.SEC_STATE_ATTACK)) && (_local4.Active))) && (!(_local4.Destroyed)))) && ((_local4.EnabledTransformation == 2)))) && (CollisionDetector.AreCollidingOfSprite(_local4.GetCollisionSprite(), Character(_collisionManager.Ben).HitAreaAttack)))){ CannonBoltWithSpecialWall(_local4); }; }; }; }; }; } public function CannonBoltWithSpecialWall(_arg1:ICollidable):void{ SpecialWall(_arg1).TryNewPrimaryState(SpecialWall.PRI_ST_DESTROYED); SpecialWall(_arg1).Destroyed = true; Sfx.PlaySound(Sfx.SFX_OTHERS_BROKEN_WALL); } } }//package collision
Section 171
//WallBlockedCollisionExecutor (collision.WallBlockedCollisionExecutor) package collision { import model.*; public class WallBlockedCollisionExecutor implements ICollisionExecutor { private var _collisionManager:CollisionManager; public function CheckCollisions(_arg1:int, _arg2:int):void{ var _local3:Array; var _local4:WallBlocked; for each (_local3 in _collisionManager.WallsBlocked) { for each (_local4 in _local3) { if (((_local4.Active) && (CollisionDetector.AreColliding(_collisionManager.Ben, _local4)))){ CollideBenAndWallBlocked(Character(_collisionManager.Ben), _local4); }; }; }; } public function Initialize(_arg1:CollisionManager):void{ _collisionManager = _arg1; } private function CollideBenAndWallBlocked(_arg1:Character, _arg2:WallBlocked):void{ var _local3:Boolean; var _local4:Boolean; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Number; var _local10:Number; _local3 = false; _local4 = false; _local5 = 0; _local6 = 0; _local7 = (_arg1.CurrentAbsoluteY - _arg1.PreviousAbsoluteY); _local8 = 0; if (_local7 > 0){ _local5 = (_arg1.BottomGlobalY - _arg2.TopGlobalY); if ((_arg1.BottomGlobalY - _local7) < _arg2.TopGlobalY){ AdjustBenY(_arg1, ((_arg2.TopGlobalY - _arg1.BottomGlobalY) + 1)); _local3 = true; _local4 = true; }; } else { _local5 = (_arg2.BottomGlobalY - _arg1.TopGlobalY); if ((_arg1.TopGlobalY - _local7) > _arg2.BottomGlobalY){ AdjustBenY(_arg1, ((_arg2.BottomGlobalY - _arg1.TopGlobalY) - 1)); _local3 = true; _local4 = true; }; }; _local9 = (_arg1.CurrentAbsoluteX - _arg1.PreviousAbsoluteX); _local10 = 0; if (_local9 > 0){ _local6 = (_arg1.RightGlobalX - _arg2.LeftGlobalX); if ((_arg1.RightGlobalX - _local9) < _arg2.LeftGlobalX){ AdjustBenX(_arg1, ((_arg2.LeftGlobalX - _arg1.RightGlobalX) - 1)); _local3 = true; _local4 = true; }; } else { _local6 = (_arg2.RightGlobalX - _arg1.LeftGlobalX); if ((_arg1.LeftGlobalX - _local9) > _arg2.RightGlobalX){ AdjustBenX(_arg1, ((_arg2.RightGlobalX - _arg1.LeftGlobalX) + 1)); _local3 = true; _local4 = true; }; }; } private function AdjustBenX(_arg1:Character, _arg2:Number):void{ _arg1.CurrentAbsoluteX = _arg1.PreviousAbsoluteX; _arg1.SpeedX = 0; _arg1.X = (_arg1.X + _arg2); } private function AdjustBenY(_arg1:Character, _arg2:Number):void{ _arg1.CurrentAbsoluteY = _arg1.PreviousAbsoluteY; _arg1.SpeedY = 0; _arg1.Y = (_arg1.Y + _arg2); } } }//package collision
Section 172
//ArrayIterator (com.bourre.collection.ArrayIterator) package com.bourre.collection { import com.bourre.error.*; public class ArrayIterator implements ListIterator { private var _nSize:Number; private var _aArray:Array; private var _bAdded:Boolean; private var _nIndex:Number; private var _bRemoved:Boolean; public function ArrayIterator(_arg1:Array, _arg2:uint=0){ if (_arg1 == null){ throw (new NullPointerException((("The target array of " + this) + "can't be null"))); }; if (_arg2 > _arg1.length){ throw (new IndexOutOfBoundsException(((("The passed-in index " + _arg2) + " is not a valid for an array of length ") + _arg1.length))); }; _aArray = _arg1; _nSize = _arg1.length; _nIndex = (_arg2 - 1); _bRemoved = false; _bAdded = false; } public function remove():void{ if (_bRemoved){ _aArray.splice(_nIndex--, 1); _nSize--; _bRemoved = true; } else { throw (new IllegalStateException((this + ".remove() have been already called for this iteration"))); }; } public function previousIndex():uint{ return (_nIndex); } public function nextIndex():uint{ return ((_nIndex + 1)); } public function add(_arg1:Object):void{ if (!_bAdded){ _aArray.splice((_nIndex + 1), 0, _arg1); _nSize++; _bAdded = true; } else { throw (new IllegalStateException((this + ".add() have been already called for this iteration"))); }; } public function set(_arg1:Object):void{ if (((!(_bRemoved)) && (!(_bAdded)))){ _aArray[_nIndex] = _arg1; } else { throw (new IllegalStateException(((((this + ".add() or ") + this) + ".remove() have been ") + "already called for this iteration, the set() operation cannot be done"))); }; } public function hasNext():Boolean{ return (((_nIndex + 1) < _nSize)); } public function hasPrevious():Boolean{ return ((_nIndex >= 0)); } public function next(){ if (!hasNext()){ throw (new NoSuchElementException(((this + " has no more elements at ") + (_nIndex + 1)))); }; _bRemoved = false; _bAdded = false; return (_aArray[++_nIndex]); } public function previous(){ if (!hasPrevious()){ throw (new NoSuchElementException(((this + " has no more elements at ") + _nIndex))); }; _bRemoved = false; _bAdded = false; return (_aArray[_nIndex--]); } } }//package com.bourre.collection
Section 173
//Collection (com.bourre.collection.Collection) package com.bourre.collection { public interface Collection extends Iterable { function addAll(_arg1:Collection):Boolean; function add(_arg1:Object):Boolean; function containsAll(_arg1:Collection):Boolean; function isEmpty():Boolean; function remove(_arg1:Object):Boolean; function size():uint; function clear():void; function retainAll(_arg1:Collection):Boolean; function removeAll(_arg1:Collection):Boolean; function toArray():Array; function contains(_arg1:Object):Boolean; } }//package com.bourre.collection
Section 174
//HashMap (com.bourre.collection.HashMap) package com.bourre.collection { import flash.utils.*; import com.bourre.log.*; import com.bourre.error.*; public class HashMap { protected var _oKeyDico:Dictionary; protected var _n:uint; protected var _oValueDico:Dictionary; public function HashMap(){ _init(); } public function containsKey(_arg1):Boolean{ if (_arg1 == null){ PixlibDebug.ERROR((this + ".containsKey() failed. key can't be null")); throw (new NullPointerException((this + ".containsKey() failed. key can't be null"))); }; return (!((_oKeyDico[_arg1] == null))); } public function isEmpty():Boolean{ return ((_n == 0)); } public function size():Number{ return (_n); } public function getKeys():Array{ var _local1:Array; var _local2:*; _local1 = new Array(); for (_local2 in _oKeyDico) { _local1.push(_local2); }; return (_local1); } public function remove(_arg1){ var _local2:*; var _local3:uint; if (containsKey(_arg1)){ _n--; _local2 = _oKeyDico[_arg1]; _local3 = _oValueDico[_local2]; if (_local3 > 1){ _oValueDico[_local2] = (_local3 - 1); } else { delete _oValueDico[_local2]; }; delete _oKeyDico[_arg1]; }; return (_local2); } public function toString():String{ return (PixlibStringifier.stringify(this)); } public function clear():void{ _init(); } protected function _init():void{ _n = 0; _oKeyDico = new Dictionary(true); _oValueDico = new Dictionary(true); } public function containsValue(_arg1):Boolean{ return (!((_oValueDico[_arg1] == null))); } public function put(_arg1, _arg2){ var _local3:*; var _local4:uint; if (_arg1 != null){ _local3 = null; if (containsKey(_arg1)){ _local3 = remove(_arg1); }; _n++; _local4 = _oValueDico[_arg2]; _oValueDico[_arg2] = ((_local4)>0) ? (_local4 + 1) : 1; _oKeyDico[_arg1] = _arg2; return (_local3); //unresolved jump }; PixlibDebug.ERROR((this + ".put() failed. key can't be null")); throw (new NullPointerException((this + ".put() failed. key can't be null"))); } public function get(_arg1){ if (_arg1 == null){ PixlibDebug.ERROR((this + ".get() failed. key can't be null")); throw (new NullPointerException((this + ".get() failed. key can't be null"))); }; return (_oKeyDico[_arg1]); } public function getValues():Array{ var _local1:Array; var _local2:*; _local1 = new Array(); for each (_local2 in _oKeyDico) { _local1.push(_local2); }; return (_local1); } } }//package com.bourre.collection
Section 175
//Iterable (com.bourre.collection.Iterable) package com.bourre.collection { public interface Iterable { function iterator():Iterator; } }//package com.bourre.collection
Section 176
//Iterator (com.bourre.collection.Iterator) package com.bourre.collection { public interface Iterator { function next(); function remove():void; function hasNext():Boolean; } }//package com.bourre.collection
Section 177
//ListIterator (com.bourre.collection.ListIterator) package com.bourre.collection { public interface ListIterator extends Iterator { function set(_arg1:Object):void; function add(_arg1:Object):void; function hasPrevious():Boolean; function previous(); function previousIndex():uint; function nextIndex():uint; } }//package com.bourre.collection
Section 178
//TypedContainer (com.bourre.collection.TypedContainer) package com.bourre.collection { public interface TypedContainer { function getType():Class; function isTyped():Boolean; function matchType(_arg1):Boolean; } }//package com.bourre.collection
Section 179
//WeakCollection (com.bourre.collection.WeakCollection) package com.bourre.collection { import flash.utils.*; import com.bourre.log.*; import com.bourre.error.*; public class WeakCollection implements Collection { private var _d:Dictionary; public function WeakCollection(_arg1:Array=null){ var _local2:int; super(); clear(); if (_arg1 != null){ _local2 = _arg1.length; if (_local2 > 0){ while (--_local2 > -1) { add(_arg1[_local2]); }; }; }; } public function addAll(_arg1:Collection):Boolean{ var _local2:Boolean; var _local3:Iterator; _local2 = false; _local3 = _arg1.iterator(); while (_local3.hasNext()) { _local2 = ((add(_local3.next())) || (_local2)); }; return (_local2); } public function containsAll(_arg1:Collection):Boolean{ var _local2:Iterator; if (_arg1 == null){ PixlibDebug.ERROR(("The passed-in collection is null in " + this)); throw (new NullPointerException(("The passed-in collection is null in " + this))); }; _local2 = _arg1.iterator(); while (_local2.hasNext()) { if (_d[_local2.next()] != true){ return (false); }; }; return (true); } public function isEmpty():Boolean{ return ((size() == 0)); } public function remove(_arg1:Object):Boolean{ if (_d[_arg1]){ _d[_arg1] = null; delete _d[_arg1]; return (true); }; return (false); } public function size():uint{ return (Math.max(toArray().length, 0)); } public function removeAll(_arg1:Collection):Boolean{ var _local2:Boolean; var _local3:Iterator; if (_arg1 == null){ PixlibDebug.ERROR(("The passed-in collection is null in " + this)); throw (new NullPointerException(("The passed-in collection is null in " + this))); }; _local2 = false; _local3 = _arg1.iterator(); while (_local3.hasNext()) { _local2 = ((remove(_local3.next())) || (_local2)); }; return (_local2); } public function clear():void{ _d = new Dictionary(true); } public function retainAll(_arg1:Collection):Boolean{ var _local2:Boolean; var _local3:Iterator; var _local4:Object; if (_arg1 == null){ PixlibDebug.ERROR(("The passed-in collection is null in " + this)); throw (new NullPointerException(("The passed-in collection is null in " + this))); }; _local2 = false; _local3 = iterator(); while (_local3.hasNext()) { _local4 = _local3.next(); if (!_arg1.contains(_local4)){ _local2 = ((remove(_local4)) || (_local2)); }; }; return (_local2); } public function toArray():Array{ var _local1:Array; var _local2:Object; _local1 = new Array(); for (_local2 in _d) { if (_d[_local2]){ _local1.push(_local2); }; }; return (_local1); } public function contains(_arg1:Object):Boolean{ return (_d[_arg1]); } public function add(_arg1:Object):Boolean{ if (!contains(_arg1)){ return ((_d[_arg1] = true)); }; return (false); } public function toString():String{ return (PixlibStringifier.stringify(this)); } public function iterator():Iterator{ return (new ConcretIterator(this)); } } }//package com.bourre.collection import com.bourre.error.*; class ConcretIterator implements Iterator { private var _a:Array; private var _nIndex:int; private var _c:WeakCollection; private var _nLastIndex:int; private var _bRemoved:Boolean; private function ConcretIterator(_arg1:WeakCollection){ _c = _arg1; _nIndex = -1; _a = _c.toArray(); _nLastIndex = (_a.length - 1); _bRemoved = false; } public function remove():void{ if (!_bRemoved){ _c.remove(_a[_nIndex]); _a = _c.toArray(); _nLastIndex--; _bRemoved = true; } else { throw (new IllegalStateException((this + ".remove() have been already called for this iteration"))); }; } public function hasNext():Boolean{ return ((_nLastIndex > _nIndex)); } public function next(){ if (!hasNext()){ throw (new NoSuchElementException(((this + " has no more elements at ") + _nIndex))); }; _bRemoved = false; return (_a[++_nIndex]); } }
Section 180
//AbstractCommand (com.bourre.commands.AbstractCommand) package com.bourre.commands { import flash.events.*; import com.bourre.log.*; import com.bourre.plugin.*; import com.bourre.model.*; import com.bourre.view.*; import com.bourre.error.*; public class AbstractCommand implements Command { protected var _owner:Plugin; public function getModelLocator():ModelLocator{ return (getOwner().getModelLocator()); } protected function _firePrivateEvent(_arg1:Event):void{ getOwner().firePrivateEvent(_arg1); } public function getLogger():PluginDebug{ return (PluginDebug.getInstance(getOwner())); } public function toString():String{ return (PixlibStringifier.stringify(this)); } public function setOwner(_arg1:Plugin):void{ _owner = _arg1; } public function execute(_arg1:Event=null):void{ var _local2:String; _local2 = (this + ".execute() must be implemented in concrete class."); getLogger().error(_local2); throw (new UnimplementedVirtualMethodException(_local2)); } public function getViewLocator():ViewLocator{ return (getOwner().getViewLocator()); } public function getOwner():Plugin{ return (_owner); } } }//package com.bourre.commands
Section 181
//AbstractSyncCommand (com.bourre.commands.AbstractSyncCommand) package com.bourre.commands { import flash.events.*; import com.bourre.log.*; import com.bourre.events.*; public class AbstractSyncCommand extends AbstractCommand implements ASyncCommand { protected var _oEB:EventBroadcaster; protected var _bIsRunning:Boolean; protected var _eOnCommandEnd:BasicEvent; public static const onCommandEndEVENT:String = "onCommandEnd"; public function AbstractSyncCommand(){ _bIsRunning = false; _oEB = new EventBroadcaster(this); _eOnCommandEnd = new BasicEvent(onCommandEndEVENT, this); } public function run():void{ execute(); } public function removeASyncCommandListener(_arg1:ASyncCommandListener):Boolean{ return (_oEB.removeEventListener(onCommandEndEVENT, _arg1)); } public function fireCommandEndEvent():void{ _oEB.broadcastEvent(_eOnCommandEnd); } public function isRunning():Boolean{ return (_bIsRunning); } override public function toString():String{ return (PixlibStringifier.stringify(this)); } override public function execute(_arg1:Event=null):void{ fireCommandEndEvent(); } public function addASyncCommandListener(_arg1:ASyncCommandListener, ... _args):Boolean{ return (_oEB.addEventListener.apply(_oEB, ((_args.length > 0)) ? [onCommandEndEVENT, _arg1].concat(_args) : [onCommandEndEVENT, _arg1])); } } }//package com.bourre.commands
Section 182
//ASyncCommand (com.bourre.commands.ASyncCommand) package com.bourre.commands { public interface ASyncCommand extends Command, Runnable { function fireCommandEndEvent():void; function addASyncCommandListener(_arg1:ASyncCommandListener, ... _args):Boolean; function removeASyncCommandListener(_arg1:ASyncCommandListener):Boolean; } }//package com.bourre.commands
Section 183
//ASyncCommandListener (com.bourre.commands.ASyncCommandListener) package com.bourre.commands { import flash.events.*; public interface ASyncCommandListener { function onCommandEnd(_arg1:Event):void; } }//package com.bourre.commands
Section 184
//Command (com.bourre.commands.Command) package com.bourre.commands { import flash.events.*; public interface Command { function execute(_arg1:Event=null):void; } }//package com.bourre.commands
Section 185
//Delegate (com.bourre.commands.Delegate) package com.bourre.commands { import flash.events.*; import com.bourre.log.*; import com.bourre.transitions.*; import com.bourre.error.*; public class Delegate implements Command, TickListener { protected var _a:Array; protected var _bHasEventCallback:Boolean; protected var _f:Function; public function Delegate(_arg1:Function, ... _args){ _f = _arg1; _a = _args; _bHasEventCallback = true; } public function getArguments():Array{ return (_a); } public function onTick(_arg1:Event=null):void{ execute(_arg1); } public function setArgumentsArray(_arg1:Array):void{ if (_arg1.length > 0){ _a = _arg1; }; } public function addArgumentsArray(_arg1:Array):void{ if (_arg1.length > 0){ _a = _a.concat(_arg1); }; } public function toString():String{ return (PixlibStringifier.stringify(this)); } public function execute(_arg1:Event=null):void{ var a:Array; var msg:String; var event = _arg1; a = new Array(); if (((!((event == null))) && (_bHasEventCallback))){ a.push(event); }; try { _f.apply(null, ((_a.length)>0) ? a.concat(_a) : ((a.length)>0) ? a : null); } catch(error:ArgumentError) { msg = (this + ".execute() failed, you passed incorrect number of arguments or wrong type"); PixlibDebug.FATAL(msg); throw (new IllegalArgumentException(msg)); }; } public function handleEvent(_arg1:Event):void{ this.execute(_arg1); } public function setArguments(... _args):void{ if (_args.length > 0){ _a = _args; }; } public function callFunction(){ return (_f.apply(null, _a)); } public function bypassEventCallback(_arg1:Boolean):void{ _bHasEventCallback = !(_arg1); } public function addArguments(... _args):void{ if (_args.length > 0){ _a = _a.concat(_args); }; } public static function create(_arg1:Function, ... _args):Function{ var method = _arg1; var args = _args; return (function (... _args){ var msg:*; var rest = _args; try { return (method.apply(null, ((rest.length > 0)) ? ((args.length > 0)) ? args.concat(rest) : rest : ((args.length > 0)) ? args : null)); } catch(e:ArgumentError) { msg = (this + " execution failed, you passed incorrect number of arguments or wrong type"); PixlibDebug.FATAL(msg); throw (new ArgumentError(msg)); }; }); } } }//package com.bourre.commands
Section 186
//Runnable (com.bourre.commands.Runnable) package com.bourre.commands { public interface Runnable { function isRunning():Boolean; function run():void; } }//package com.bourre.commands
Section 187
//AbstractLocator (com.bourre.core.AbstractLocator) package com.bourre.core { import flash.events.*; import flash.utils.*; import com.bourre.log.*; import com.bourre.events.*; import com.bourre.collection.*; import com.bourre.error.*; public class AbstractLocator implements Locator, TypedContainer { private var _oEB:Broadcaster; protected var _m:HashMap; private var _logger:Log; private var _cType:Class; public function AbstractLocator(_arg1:Class=null, _arg2:Class=null, _arg3:Log=null){ _cType = ((_arg1)!=null) ? _arg1 : Object; _m = new HashMap(); _oEB = new EventBroadcaster(this, _arg2); _logger = ((_arg3)==null) ? PixlibDebug.getInstance() : _arg3; } public function getLogger():Log{ return (_logger); } public function removeEventListener(_arg1:String, _arg2:Object):Boolean{ return (_oEB.removeEventListener(_arg1, _arg2)); } public function release():void{ _m.clear(); } public function locate(_arg1:String):Object{ var _local2:String; if (isRegistered(_arg1)){ return (_m.get(_arg1)); }; _local2 = ((((("Can't find '" + getType().toString()) + "' item with '") + _arg1) + "' name in ") + this); getLogger().fatal(_local2); throw (new NoSuchElementException(_local2)); } public function isRegistered(_arg1:String):Boolean{ return (_m.containsKey(_arg1)); } public function addEventListener(_arg1:String, _arg2:Object, ... _args):Boolean{ return (_oEB.addEventListener.apply(_oEB, ((_args.length > 0)) ? [_arg1, _arg2].concat(_args) : [_arg1, _arg2])); } public function getValues():Array{ return (_m.getValues()); } public function matchType(_arg1):Boolean{ return ((((_arg1 is _cType)) || ((_arg1 == null)))); } protected function broadcastEvent(_arg1:Event):void{ _oEB.broadcastEvent(_arg1); } public function add(_arg1:Dictionary):void{ var key:*; var d = _arg1; for (key in d) { try { register(key, d[key]); } catch(e:IllegalArgumentException) { e.message = ((this + ".add() fails. ") + e.message); _logger.error(e.message); throw (e); }; }; } protected function onRegister(_arg1:String=null, _arg2:Object=null):void{ } public function register(_arg1:String, _arg2:Object):Boolean{ var _local3:String; if (((isTyped()) && (!((_arg2 is getType()))))){ _local3 = (((this + ".register() failed. Item must be '") + getType().toString()) + "' typed."); getLogger().error(_local3); throw (new IllegalArgumentException(_local3)); }; if (_m.containsKey(_arg1)){ _local3 = (((" item is already registered with '" + _arg1) + "' name in ") + this); getLogger().error(_local3); throw (new IllegalArgumentException(_local3)); }; _m.put(_arg1, _arg2); onRegister(_arg1, _arg2); return (true); } public function isTyped():Boolean{ return (!((_cType == null))); } public function getKeys():Array{ return (_m.getKeys()); } public function toString():String{ var _local1:Boolean; var _local2:String; _local1 = !((getType() == null)); _local2 = ""; if (_local1){ _local2 = getType().toString(); _local2 = (("<" + _local2.substr(7, (_local2.length - 8))) + ">"); }; return ((PixlibStringifier.stringify(this) + _local2)); } public function getType():Class{ return (_cType); } protected function getBroadcaster():Broadcaster{ return (_oEB); } protected function onUnregister(_arg1:String=null):void{ } public function unregister(_arg1:String):Boolean{ if (isRegistered(_arg1)){ _m.remove(_arg1); onUnregister(_arg1); return (true); }; return (false); } } }//package com.bourre.core
Section 188
//Locator (com.bourre.core.Locator) package com.bourre.core { import flash.utils.*; public interface Locator { function getValues():Array; function add(_arg1:Dictionary):void; function locate(_arg1:String):Object; function getKeys():Array; function isRegistered(_arg1:String):Boolean; } }//package com.bourre.core
Section 189
//IllegalArgumentException (com.bourre.error.IllegalArgumentException) package com.bourre.error { public class IllegalArgumentException extends Error { public function IllegalArgumentException(_arg1:String=""){ super(_arg1); } } }//package com.bourre.error
Section 190
//IllegalStateException (com.bourre.error.IllegalStateException) package com.bourre.error { public class IllegalStateException extends Error { public function IllegalStateException(_arg1:String=""){ super(_arg1); } } }//package com.bourre.error
Section 191
//IndexOutOfBoundsException (com.bourre.error.IndexOutOfBoundsException) package com.bourre.error { public class IndexOutOfBoundsException extends Error { public function IndexOutOfBoundsException(_arg1:String=""){ super(_arg1); } } }//package com.bourre.error
Section 192
//NoSuchElementException (com.bourre.error.NoSuchElementException) package com.bourre.error { public class NoSuchElementException extends Error { public function NoSuchElementException(_arg1:String=""){ super(_arg1); } } }//package com.bourre.error
Section 193
//NullPointerException (com.bourre.error.NullPointerException) package com.bourre.error { public class NullPointerException extends Error { public function NullPointerException(_arg1:String=""){ super(_arg1); } } }//package com.bourre.error
Section 194
//UnimplementedVirtualMethodException (com.bourre.error.UnimplementedVirtualMethodException) package com.bourre.error { public class UnimplementedVirtualMethodException extends Error { public function UnimplementedVirtualMethodException(_arg1:String=""){ super(_arg1); } } }//package com.bourre.error
Section 195
//UnsupportedOperationException (com.bourre.error.UnsupportedOperationException) package com.bourre.error { public class UnsupportedOperationException extends Error { public function UnsupportedOperationException(_arg1:String=""){ super(_arg1); } } }//package com.bourre.error
Section 196
//BasicEvent (com.bourre.events.BasicEvent) package com.bourre.events { import flash.events.*; import com.bourre.log.*; public class BasicEvent extends Event { protected var _sType:String; protected var _oTarget:Object; public function BasicEvent(_arg1:String, _arg2:Object=null){ super(_arg1); _sType = _arg1; _oTarget = _arg2; } override public function get target():Object{ return (_oTarget); } public function setTarget(_arg1:Object):void{ _oTarget = _arg1; } public function getTarget():Object{ return (_oTarget); } public function set target(_arg1:Object):void{ _oTarget = _arg1; } override public function toString():String{ return (PixlibStringifier.stringify(this)); } public function getType():String{ return (_sType); } public function set type(_arg1:String):void{ _sType = _arg1; } override public function get type():String{ return (_sType); } public function setType(_arg1:String):void{ _sType = _arg1; } } }//package com.bourre.events
Section 197
//Broadcaster (com.bourre.events.Broadcaster) package com.bourre.events { import flash.events.*; public interface Broadcaster { function removeAllListeners():void; function removeEventListener(_arg1:String, _arg2:Object):Boolean; function isRegistered(_arg1:Object, _arg2:String=null):Boolean; function addEventListener(_arg1:String, _arg2:Object, ... _args):Boolean; function addListener(_arg1:Object):Boolean; function removeListener(_arg1:Object):Boolean; function broadcastEvent(_arg1:Event):void; function hasListenerCollection(_arg1:String):Boolean; } }//package com.bourre.events
Section 198
//ChannelBroadcaster (com.bourre.events.ChannelBroadcaster) package com.bourre.events { import flash.events.*; import com.bourre.log.*; import com.bourre.collection.*; import com.bourre.utils.*; import com.bourre.error.*; public class ChannelBroadcaster { protected var _broadcasterClass:Class; protected var _oDefaultChannel:EventChannel; protected var _mChannel:HashMap; public function ChannelBroadcaster(_arg1:Class=null, _arg2:EventChannel=null){ var _local3:String; super(); if (_arg1 != null){ if (!ClassUtils.inherit(_arg1, Broadcaster)){ _local3 = ((("The class '" + _arg1) + "' doesn't implement Broadcaster interface in ") + this); PixlibDebug.FATAL(_local3); throw (new IllegalArgumentException(_local3)); }; _broadcasterClass = _arg1; } else { _broadcasterClass = EventBroadcaster; }; empty(); setDefaultChannel(_arg2); } public function broadcastEvent(_arg1:Event, _arg2:EventChannel=null):void{ getChannelDispatcher(_arg2).broadcastEvent(_arg1); if (_arg2){ getChannelDispatcher().broadcastEvent(_arg1); }; } public function releaseChannelDispatcher(_arg1:EventChannel):Boolean{ var _local2:Broadcaster; if (hasChannelDispatcher(_arg1)){ _local2 = (_mChannel.get(_arg1) as Broadcaster); _local2.removeAllListeners(); _mChannel.remove(_arg1); return (true); }; return (false); } public function addEventListener(_arg1:String, _arg2:Object, _arg3:EventChannel=null):Boolean{ return (getChannelDispatcher(_arg3).addEventListener(_arg1, _arg2)); } public function setDefaultChannel(_arg1:EventChannel=null):void{ _oDefaultChannel = ((_arg1)==null) ? DefaultChannel.CHANNEL : _arg1; getChannelDispatcher(getDefaultChannel()); } public function isRegistered(_arg1:Object, _arg2:String, _arg3:EventChannel):Boolean{ if (hasChannelDispatcher(_arg3)){ return (getChannelDispatcher(_arg3).isRegistered(_arg1, _arg2)); }; return (false); } public function empty():void{ var _local1:EventChannel; _mChannel = new HashMap(); _local1 = getDefaultChannel(); if (_local1 != null){ getChannelDispatcher(_local1); }; } public function toString():String{ return (PixlibStringifier.stringify(this)); } public function hasChannelDispatcher(_arg1:EventChannel):Boolean{ return (((_arg1 == null)) ? _mChannel.containsKey(_oDefaultChannel) : _mChannel.containsKey(_arg1)); } public function removeEventListener(_arg1:String, _arg2:Object, _arg3:EventChannel=null):Boolean{ return (getChannelDispatcher(_arg3).removeEventListener(_arg1, _arg2)); } public function getDefaultChannel():EventChannel{ return (_oDefaultChannel); } public function getDefaultDispatcher():Broadcaster{ return (_mChannel.get(_oDefaultChannel)); } public function getChannelDispatcher(_arg1:EventChannel=null, _arg2:Object=null):Broadcaster{ var _local3:Broadcaster; if (hasChannelDispatcher(_arg1)){ return (((_arg1 == null)) ? _mChannel.get(_oDefaultChannel) : _mChannel.get(_arg1)); //unresolved jump }; _local3 = new (_broadcasterClass as Class)(_arg2); _mChannel.put(_arg1, _local3); return (_local3); } public function addListener(_arg1:Object, _arg2:EventChannel=null):Boolean{ return (getChannelDispatcher(_arg2).addListener(_arg1)); } public function hasChannelListener(_arg1:String, _arg2:EventChannel=null):Boolean{ if (hasChannelDispatcher(_arg2)){ return (getChannelDispatcher(_arg2).hasListenerCollection(_arg1)); }; return (false); } public function removeListener(_arg1:Object, _arg2:EventChannel=null):Boolean{ return (getChannelDispatcher(_arg2).removeListener(_arg1)); } } }//package com.bourre.events class DefaultChannel extends EventChannel { public static const CHANNEL:DefaultChannel = new (DefaultChannel); ; private function DefaultChannel(){ } }
Section 199
//DynBasicEvent (com.bourre.events.DynBasicEvent) package com.bourre.events { import com.bourre.log.*; public dynamic class DynBasicEvent extends BasicEvent { public function DynBasicEvent(_arg1:String, _arg2:Object=null){ super(_arg1, _arg2); } override public function toString():String{ return (PixlibStringifier.stringify(this)); } } }//package com.bourre.events
Section 200
//EventBroadcaster (com.bourre.events.EventBroadcaster) package com.bourre.events { import flash.events.*; import flash.utils.*; import com.bourre.log.*; import com.bourre.collection.*; import com.bourre.commands.*; import com.bourre.error.*; public class EventBroadcaster implements Broadcaster { protected var _mType:HashMap; protected var _mAll:Collection; protected var _mEventListener:HashMap; protected var _mDelegate:HashMap; protected var _oSource:Object; protected var _cType:Class; private static var _oI:EventBroadcaster = null; public function EventBroadcaster(_arg1:Object=null, _arg2:Class=null){ _oSource = ((_arg1)==null) ? this : _arg1; _mAll = new WeakCollection(); _mType = new HashMap(); _mEventListener = new HashMap(); _mDelegate = new HashMap(); setListenerType(_arg2); } public function removeAllListeners():void{ _mAll.clear(); _mType.clear(); _mEventListener.clear(); _mDelegate.clear(); } public function toString():String{ var _local1:Boolean; var _local2:String; _local1 = !((_cType == null)); _local2 = ""; if (_local1){ _local2 = _cType.toString(); _local2 = (("<" + _local2.substr(7, (_local2.length - 8))) + ">"); }; return ((PixlibStringifier.stringify(this) + _local2)); } public function removeEventListener(_arg1:String, _arg2:Object):Boolean{ var _local3:Collection; if (hasListenerCollection(_arg1)){ _local3 = getListenerCollection(_arg1); if ((_arg2 is Function)){ _arg2 = _mDelegate.remove(_arg2); }; if (_local3.remove(_arg2)){ _removeRef(_arg1, _arg2); if (_local3.isEmpty()){ removeListenerCollection(_arg1); }; return (true); } else { return (false); }; //unresolved jump }; return (false); } public function isRegistered(_arg1:Object, _arg2:String=null):Boolean{ if (_arg2 == null){ if ((_arg1 is Function)){ if (_mDelegate.containsKey(_arg1)){ return (_mAll.contains(_mDelegate.get(_arg1))); }; return (false); } else { return (_mAll.contains(_arg1)); }; } else { //unresolved if if ((_arg1 is Function)){ if (_mDelegate.containsKey(_arg1)){ return (getListenerCollection(_arg2).contains(_mDelegate.get(_arg1))); }; return (false); } else { return (getListenerCollection(_arg2).contains(_arg1)); }; }; //unresolved jump return (false); } public function addEventListener(_arg1:String, _arg2:Object, ... _args):Boolean{ var _local4:Delegate; var _local5:String; if (!isRegistered(_arg2)){ if ((_arg2 is Function)){ if (_mDelegate.containsKey(_arg2)){ return (false); }; _local4 = new Delegate((_arg2 as Function)); if (_args){ _local4.setArgumentsArray(_args); }; _mDelegate.put(_arg2, _local4); _arg2 = _local4; } else { if (((_arg2.hasOwnProperty(_arg1)) && ((_arg2[_arg1] is Function)))){ } else { if (((_arg2.hasOwnProperty("handleEvent")) && ((_arg2.handleEvent is Function)))){ } else { _local5 = (((((this + ".addEventListener() failed, you must implement '") + _arg1) + "' method or 'handleEvent' method in '") + getQualifiedClassName(_arg2)) + "' class"); PixlibDebug.ERROR(_local5); throw (new UnsupportedOperationException(_local5)); }; }; }; if (!hasListenerCollection(_arg1)){ _mType.put(_arg1, new WeakCollection()); }; if (getListenerCollection(_arg1).add(_arg2)){ _storeRef(_arg1, _arg2); return (true); }; return (false); //unresolved jump }; return (false); } private function _flushRef(_arg1:Object):Boolean{ var _local2:Boolean; var _local3:HashMap; var _local4:Array; var _local5:Number; _local2 = false; _local3 = _mEventListener.get(_arg1); if (_local3 != null){ _local4 = _local3.getKeys(); _local5 = _local4.length; while (--_local5 > -1) { _local2 = ((removeEventListener(_local4[_local5], _arg1)) || (_local2)); }; _mEventListener.remove(_arg1); }; return (_local2); } public function isEmpty():Boolean{ return (((_mAll.isEmpty()) && (_mType.isEmpty()))); } public function setListenerType(_arg1:Class):void{ var _local2:Iterator; var _local3:String; _local2 = _mAll.iterator(); while (_local2.hasNext()) { if (!(_local2.next() is _arg1)){ _local3 = (((((this + ".setListenerType( ") + _arg1) + " ) failed, your listener must be '") + _cType) + "' typed"); PixlibDebug.ERROR(_local3); throw (new IllegalArgumentException(_local3)); }; }; _cType = _arg1; } public function removeListener(_arg1:Object):Boolean{ var _local2:String; var _local3:Boolean; if ((_arg1 is Function)){ _local2 = (((this + ".removeListener( ") + _arg1) + " ) failed, your listener can't be Function typed"); PixlibDebug.ERROR(_local2); throw (new IllegalArgumentException(_local2)); }; _local3 = _flushRef(_arg1); _local3 = ((_local3) || (_mAll.contains(_arg1))); _mAll.remove(_arg1); return (_local3); } public function broadcastEvent(_arg1:Event):void{ if ((((_arg1.target == null)) && ((_arg1 is BasicEvent)))){ (_arg1 as BasicEvent).target = _oSource; }; if (hasListenerCollection(_arg1.type)){ _broadcastEvent(getListenerCollection(_arg1.type), _arg1); }; if (!_mAll.isEmpty()){ _broadcastEvent(_mAll, _arg1); }; } public function removeListenerCollection(_arg1:String):void{ _mType.remove(_arg1); } public function getListenerCollection(_arg1:String=null):Collection{ return (((_arg1)!=null) ? _mType.get(_arg1) : _mAll); } private function _storeRef(_arg1:String, _arg2:Object):void{ if (!_mEventListener.containsKey(_arg2)){ _mEventListener.put(_arg2, new HashMap()); }; _mEventListener.get(_arg2).put(_arg1, _arg2); } public function hasListenerCollection(_arg1:String):Boolean{ return (_mType.containsKey(_arg1)); } private function _removeRef(_arg1:String, _arg2:Object):void{ var _local3:HashMap; _local3 = _mEventListener.get(_arg2); _local3.remove(_arg1); if (_local3.isEmpty()){ _mEventListener.remove(_arg2); }; } protected function _broadcastEvent(_arg1:Collection, _arg2:Event):void{ var _local3:String; var _local4:Array; var _local5:Number; var _local6:Object; var _local7:String; _local3 = _arg2.type; _local4 = _arg1.toArray(); _local5 = _local4.length; while (--_local5 > -1) { _local6 = _local4[_local5]; if (((_local6.hasOwnProperty(_local3)) && ((_local6[_local3] is Function)))){ var _local8 = _local6; _local8[_local3](_arg2); } else { if (((_local6.hasOwnProperty("handleEvent")) && ((_local6.handleEvent is Function)))){ _local6.handleEvent(_arg2); } else { _local7 = (((((this + ".broadcastEvent() failed, you must implement '") + _local3) + "' method or 'handleEvent' method in '") + getQualifiedClassName(_local6)) + "' class"); PixlibDebug.ERROR(_local7); throw (new UnsupportedOperationException(_local7)); }; }; }; } public function dispatchEvent(_arg1:Object):void{ var _local2:DynBasicEvent; var _local3:String; if (_arg1["type"] == null){ PixlibDebug.WARN(("You attempt to broadcast an event which has no type, in " + this)); }; _local2 = new DynBasicEvent(_arg1["type"]); for (_local3 in _arg1) { if (_local3 != "type"){ _local2[_local3] = _arg1[_local3]; }; }; broadcastEvent(_local2); } public function addListener(_arg1:Object):Boolean{ var _local2:String; var _local3:String; if (((!((_cType == null))) && (!((_arg1 is _cType))))){ _local2 = (((((this + ".addListener( ") + _arg1) + " ) failed, your listener must be '") + _cType) + "' typed"); PixlibDebug.ERROR(_local2); throw (new IllegalArgumentException(_local2)); }; if ((_arg1 is Function)){ _local3 = (((this + ".addListener( ") + _arg1) + " ) failed, your listener can't be Function typed"); PixlibDebug.ERROR(_local3); throw (new IllegalArgumentException(_local3)); }; if (_mAll.add(_arg1)){ _flushRef(_arg1); return (true); }; return (false); } public static function getInstance():EventBroadcaster{ if (!(EventBroadcaster._oI is EventBroadcaster)){ EventBroadcaster._oI = new (EventBroadcaster); }; return (EventBroadcaster._oI); } } }//package com.bourre.events
Section 201
//EventChannel (com.bourre.events.EventChannel) package com.bourre.events { import flash.utils.*; import com.bourre.log.*; import com.bourre.error.*; public class EventChannel { private var _sChannelName:String; public function EventChannel(_arg1:String=null){ var _local2:String; super(); _sChannelName = (_arg1) ? _arg1 : getQualifiedClassName(this); if (_sChannelName == "EventChannel"){ _local2 = "EventChannel must have a name, or be extended by another class"; PixlibDebug.ERROR(_local2); throw (new IllegalArgumentException(_local2)); }; } public function toString():String{ return (_sChannelName); } } }//package com.bourre.events
Section 202
//StringEvent (com.bourre.events.StringEvent) package com.bourre.events { public class StringEvent extends BasicEvent { private var _s:String; public function StringEvent(_arg1:String, _arg2:Object=null, _arg3:String=""){ super(_arg1, _arg2); _s = _arg3; } public function getString():String{ return (_s); } } }//package com.bourre.events
Section 203
//LoaderStrategy (com.bourre.load.strategy.LoaderStrategy) package com.bourre.load.strategy { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; import flash.net.*; import com.bourre.load.*; import com.bourre.log.*; public class LoaderStrategy implements LoadStrategy { private var _bytesLoaded:uint; private var _loader:Loader; private var _owner:Loader; private var _bytesTotal:uint; public function LoaderStrategy(){ _bytesLoaded = 0; _bytesTotal = 0; } public function getContentLoaderInfo():LoaderInfo{ return (_loader.contentLoaderInfo); } protected function _onSecurityError(_arg1:SecurityErrorEvent):void{ release(); if (_owner){ _owner.fireOnLoadErrorEvent(_arg1.text); }; } protected function _onProgress(_arg1:ProgressEvent):void{ _bytesLoaded = _arg1.bytesLoaded; _bytesTotal = _arg1.bytesTotal; if (_owner){ _owner.fireOnLoadProgressEvent(); }; } public function release():void{ if (_loader){ _loader.contentLoaderInfo.removeEventListener(ProgressEvent.PROGRESS, _onProgress); _loader.contentLoaderInfo.removeEventListener(Event.COMPLETE, _onComplete); _loader.contentLoaderInfo.removeEventListener(Event.OPEN, _onOpen); _loader.contentLoaderInfo.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, _onSecurityError); _loader.contentLoaderInfo.removeEventListener(HTTPStatusEvent.HTTP_STATUS, _onHttpStatus); _loader.contentLoaderInfo.removeEventListener(IOErrorEvent.IO_ERROR, _onIOError); _loader.contentLoaderInfo.removeEventListener(Event.INIT, _onInit); _loader.contentLoaderInfo.removeEventListener(Event.UNLOAD, _onUnLoad); try { _loader.close(); } catch(error:Error) { }; }; } protected function _onHttpStatus(_arg1:HTTPStatusEvent):void{ } protected function _onIOError(_arg1:IOErrorEvent):void{ release(); if (_owner){ _owner.fireOnLoadErrorEvent(_arg1.text); }; } public function getBytesTotal():uint{ return (_bytesTotal); } protected function _onComplete(_arg1:Event):void{ } public function getBytesLoaded():uint{ return (_bytesLoaded); } public function loadBytes(_arg1:ByteArray, _arg2:LoaderContext=null):void{ _initLoaderStrategy(); _loader.loadBytes(_arg1, _arg2); } public function load(_arg1:URLRequest=null, _arg2:LoaderContext=null):void{ _initLoaderStrategy(); _loader.load(_arg1, _arg2); } public function toString():String{ return (PixlibStringifier.stringify(this)); } protected function _onInit(_arg1:Event):void{ if (_owner){ _owner.setContent(_loader.content); _owner.fireOnLoadInitEvent(); }; } protected function _onOpen(_arg1:Event):void{ if (_owner){ _owner.fireOnLoadStartEvent(); }; } public function setOwner(_arg1:Loader):void{ _owner = _arg1; } protected function _initLoaderStrategy():void{ _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, _onProgress); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE, _onComplete); _loader.contentLoaderInfo.addEventListener(Event.OPEN, _onOpen); _loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, _onSecurityError); _loader.contentLoaderInfo.addEventListener(HTTPStatusEvent.HTTP_STATUS, _onHttpStatus); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, _onIOError); _loader.contentLoaderInfo.addEventListener(Event.INIT, _onInit); _loader.contentLoaderInfo.addEventListener(Event.UNLOAD, _onUnLoad); } protected function _onUnLoad(_arg1:Event):void{ } } }//package com.bourre.load.strategy
Section 204
//LoadStrategy (com.bourre.load.strategy.LoadStrategy) package com.bourre.load.strategy { import flash.system.*; import flash.net.*; import com.bourre.load.*; public interface LoadStrategy { function load(_arg1:URLRequest=null, _arg2:LoaderContext=null):void; function setOwner(_arg1:Loader):void; function release():void; function getBytesLoaded():uint; function getBytesTotal():uint; } }//package com.bourre.load.strategy
Section 205
//URLLoaderStrategy (com.bourre.load.strategy.URLLoaderStrategy) package com.bourre.load.strategy { import flash.events.*; import flash.system.*; import flash.net.*; import com.bourre.load.*; import com.bourre.log.*; public class URLLoaderStrategy implements LoadStrategy { private var _bytesLoaded:uint; private var _sDataFormat:String; private var _loader:URLLoader; private var _owner:Loader; private var _bytesTotal:uint; public static const BINARY:String = "binary"; public static const VARIABLES:String = "variables"; public static const TEXT:String = "text"; public function URLLoaderStrategy(_arg1:String=null){ _bytesLoaded = 0; _bytesTotal = 0; setDataFormat(_arg1); } public function setDataFormat(_arg1:String):void{ _sDataFormat = _arg1; } protected function _onIOError(_arg1:IOErrorEvent):void{ if (_owner){ _owner.fireOnLoadErrorEvent(_arg1.text); }; } protected function _onSecurityError(_arg1:SecurityErrorEvent):void{ if (_owner){ _owner.fireOnLoadErrorEvent(_arg1.text); }; } protected function _onProgress(_arg1:ProgressEvent):void{ _bytesLoaded = _arg1.bytesLoaded; _bytesTotal = _arg1.bytesTotal; if (_owner){ _owner.fireOnLoadProgressEvent(); }; } public function release():void{ if (_loader){ _loader.removeEventListener(ProgressEvent.PROGRESS, _onProgress); _loader.removeEventListener(Event.COMPLETE, _onComplete); _loader.removeEventListener(Event.OPEN, _onOpen); _loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, _onSecurityError); _loader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, _onHttpStatus); _loader.removeEventListener(IOErrorEvent.IO_ERROR, _onIOError); try { _loader.close(); } catch(error:Error) { }; }; } protected function _onHttpStatus(_arg1:HTTPStatusEvent):void{ } public function getBytesTotal():uint{ return (_bytesTotal); } protected function _onComplete(_arg1:Event):void{ if (_owner){ _owner.setContent(_loader.data); _owner.fireOnLoadInitEvent(); }; } public function getBytesLoaded():uint{ return (_bytesLoaded); } public function load(_arg1:URLRequest=null, _arg2:LoaderContext=null):void{ _loader = new URLLoader(); _loader.dataFormat = (URLLoaderStrategy.isValidDataFormat(_sDataFormat)) ? URLLoaderStrategy.TEXT : _sDataFormat; _loader.addEventListener(ProgressEvent.PROGRESS, _onProgress); _loader.addEventListener(Event.COMPLETE, _onComplete); _loader.addEventListener(Event.OPEN, _onOpen); _loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, _onSecurityError); _loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, _onHttpStatus); _loader.addEventListener(IOErrorEvent.IO_ERROR, _onIOError); if (_arg2 != null){ PixlibDebug.WARN((this + ".load() doesn't support LoaderContext argument.")); }; _loader.load(_arg1); } public function toString():String{ return (PixlibStringifier.stringify(this)); } protected function _onOpen(_arg1:Event):void{ if (_owner){ _owner.fireOnLoadStartEvent(); }; } public function setOwner(_arg1:Loader):void{ _owner = _arg1; } public static function isValidDataFormat(_arg1:String):Boolean{ return ((((((_arg1 == URLLoaderStrategy.TEXT)) || ((_arg1 == URLLoaderStrategy.BINARY)))) || ((_arg1 == URLLoaderStrategy.VARIABLES)))); } } }//package com.bourre.load.strategy
Section 206
//AbstractLoader (com.bourre.load.AbstractLoader) package com.bourre.load { import flash.events.*; import flash.utils.*; import flash.system.*; import flash.net.*; import com.bourre.log.*; import com.bourre.events.*; import com.bourre.commands.*; import com.bourre.load.strategy.*; import com.bourre.error.*; public class AbstractLoader implements Loader, ASyncCommand { protected var _sPrefixURL:String; private var _oEB:EventBroadcaster; private var _bIsRunning:Boolean; private var _bAntiCache:Boolean; private var _sName:String; private var _loadStrategy:LoadStrategy; private var _nTimeOut:Number; private var _nTime:int; private var _oURL:URLRequest; private var _nLastBytesLoaded:Number; private var _oContent:Object; private static var _oPool:Dictionary = new Dictionary(); public function AbstractLoader(_arg1:LoadStrategy=null){ _loadStrategy = ((_arg1)!=null) ? _arg1 : new NullLoadStrategy(); _loadStrategy.setOwner(this); _oEB = new EventBroadcaster(this, LoaderListener); _nTimeOut = 10000; _bAntiCache = false; _sPrefixURL = ""; _bIsRunning = false; } public function execute(_arg1:Event=null):void{ load(); } public function fireOnLoadTimeOut():void{ unregisterLoaderFromPool(this); fireEventType(LoaderEvent.onLoadTimeOutEVENT); } public function getName():String{ return (_sName); } final public function removeASyncCommandListener(_arg1:ASyncCommandListener):Boolean{ return (_oEB.removeEventListener(AbstractSyncCommand.onCommandEndEVENT, _arg1)); } final protected function setListenerType(_arg1:Class):void{ _oEB.setListenerType(_arg1); } protected function getLoaderEvent(_arg1:String, _arg2:String=""):LoaderEvent{ return (new LoaderEvent(_arg1, this, _arg2)); } protected function fireEvent(_arg1:Event):void{ _oEB.broadcastEvent(_arg1); } public function setName(_arg1:String):void{ _sName = _arg1; } public function getBytesTotal():uint{ return (_loadStrategy.getBytesTotal()); } public function getBytesLoaded():uint{ return (_loadStrategy.getBytesLoaded()); } final public function getTimeOut():Number{ return (_nTimeOut); } final public function addASyncCommandListener(_arg1:ASyncCommandListener, ... _args):Boolean{ return (_oEB.addEventListener(AbstractSyncCommand.onCommandEndEVENT, _arg1)); } public function fireOnLoadErrorEvent(_arg1:String=""):void{ fireEventType(LoaderEvent.onLoadErrorEVENT, _arg1); } public function release():void{ _loadStrategy.release(); _oEB.removeAllListeners(); } final public function getPerCent():Number{ var _local1:Number; _local1 = Math.min(100, Math.ceil((getBytesLoaded() / (getBytesTotal() / 100)))); return ((isNaN(_local1)) ? 0 : _local1); } public function setURL(_arg1:URLRequest):void{ _oURL = _arg1; } public function isRunning():Boolean{ return (_bIsRunning); } public function setContent(_arg1:Object):void{ _oContent = _arg1; } public function isAntiCache():Boolean{ return (_bAntiCache); } public function getURL():URLRequest{ return ((_bAntiCache) ? new URLRequest((((_sPrefixURL + _oURL.url) + "?nocache=") + _getStringTimeStamp())) : new URLRequest((_sPrefixURL + _oURL.url))); } public function getContent():Object{ return (_oContent); } public function run():void{ var _local1:String; if (!isRunning()){ _bIsRunning = true; execute(); } else { _local1 = (this + ".run() called wheras an operation is currently running"); PixlibDebug.ERROR(_local1); throw (new IllegalStateException(_local1)); }; } public function removeEventListener(_arg1:String, _arg2:Object):Boolean{ return (_oEB.removeEventListener(_arg1, _arg2)); } public function addEventListener(_arg1:String, _arg2:Object, ... _args):Boolean{ return (_oEB.addEventListener.apply(_oEB, ((_args.length > 0)) ? [_arg1, _arg2].concat(_args) : [_arg1, _arg2])); } private function _getStringTimeStamp():String{ var _local1:Date; _local1 = new Date(); return (String(_local1.getTime())); } protected function onInitialize():void{ fireEventType(LoaderEvent.onLoadProgressEVENT); fireEventType(LoaderEvent.onLoadInitEVENT); } final public function fireCommandEndEvent():void{ fireEventType(AbstractSyncCommand.onCommandEndEVENT); } protected function fireEventType(_arg1:String, _arg2:String=""):void{ fireEvent(getLoaderEvent(_arg1, _arg2)); } public function removeListener(_arg1:LoaderListener):Boolean{ return (_oEB.removeListener(_arg1)); } public function getStrategy():LoadStrategy{ return (_loadStrategy); } public function toString():String{ return (PixlibStringifier.stringify(this)); } public function load(_arg1:URLRequest=null, _arg2:LoaderContext=null):void{ var _local3:String; if (_arg1){ setURL(_arg1); }; if (getURL().url.length > 0){ _nLastBytesLoaded = 0; _nTime = getTimer(); registerLoaderToPool(this); _loadStrategy.load(getURL(), _arg2); } else { _local3 = (this + ".load() can't retrieve file url."); PixlibDebug.ERROR(_local3); throw (new NullPointerException(_local3)); }; } final public function fireOnLoadInitEvent():void{ _bIsRunning = false; onInitialize(); unregisterLoaderFromPool(this); } public function fireOnLoadProgressEvent():void{ fireEventType(LoaderEvent.onLoadProgressEVENT); } public function fireOnLoadStartEvent():void{ fireEventType(LoaderEvent.onLoadStartEVENT); } public function addListener(_arg1:LoaderListener):Boolean{ return (_oEB.addListener(_arg1)); } public function prefixURL(_arg1:String):void{ _sPrefixURL = _arg1; } public function setAntiCache(_arg1:Boolean):void{ _bAntiCache = _arg1; } final public function setTimeOut(_arg1:Number):void{ _nTimeOut = Math.max(1000, _arg1); } protected static function registerLoaderToPool(_arg1:Loader):void{ if (_oPool[_arg1] == null){ _oPool[_arg1] = true; } else { PixlibDebug.WARN((_arg1 + " is already registered in the loading pool")); }; } protected static function unregisterLoaderFromPool(_arg1:Loader):void{ if (_oPool[_arg1] != null){ delete _oPool[_arg1]; } else { PixlibDebug.WARN((_arg1 + " is not registered in the loading pool")); }; } } }//package com.bourre.load import flash.system.*; import flash.net.*; import com.bourre.load.strategy.*; class NullLoadStrategy implements LoadStrategy { private function NullLoadStrategy(){ } public function release():void{ } public function getBytesLoaded():uint{ return (0); } public function load(_arg1:URLRequest=null, _arg2:LoaderContext=null):void{ } public function getBytesTotal():uint{ return (0); } public function setOwner(_arg1:Loader):void{ } }
Section 207
//FileLoader (com.bourre.load.FileLoader) package com.bourre.load { import com.bourre.load.strategy.*; public class FileLoader extends AbstractLoader { public static const BINARY:String = "binary"; public static const VARIABLES:String = "variables"; public static const TEXT:String = "text"; public function FileLoader(_arg1:String=null){ super(new URLLoaderStrategy(_arg1)); } override protected function getLoaderEvent(_arg1:String, _arg2:String=""):LoaderEvent{ return (new FileLoaderEvent(_arg1, this, _arg2)); } public function setDataFormat(_arg1:String):void{ (getStrategy() as URLLoaderStrategy).setDataFormat(_arg1); } } }//package com.bourre.load
Section 208
//FileLoaderEvent (com.bourre.load.FileLoaderEvent) package com.bourre.load { public class FileLoaderEvent extends LoaderEvent { public static const onLoadInitEVENT:String = "onLoadInit"; public static const onLoadErrorEVENT:String = "onLoadError"; public static const onLoadProgressEVENT:String = "onLoadProgress"; public static const onLoadStartEVENT:String = "onLoadStart"; public static const onLoadTimeOutEVENT:String = "onLoadTimeOut"; public function FileLoaderEvent(_arg1:String, _arg2:FileLoader, _arg3:String=""){ super(_arg1, _arg2, _arg3); } public function getFileLoader():FileLoader{ return ((getLoader() as FileLoader)); } public function getFileContent():Object{ return (getFileLoader().getContent()); } } }//package com.bourre.load
Section 209
//GraphicLoader (com.bourre.load.GraphicLoader) package com.bourre.load { import flash.display.*; import flash.system.*; import flash.net.*; import com.bourre.log.*; import com.bourre.load.strategy.*; import com.bourre.error.*; public class GraphicLoader extends AbstractLoader { private var _oBitmapContainer:Sprite; private var _oContext:LoaderContext; private var _target:DisplayObjectContainer; private var _index:int; private var _bAutoShow:Boolean; private var _bMustUnregister:Boolean; public function GraphicLoader(_arg1:DisplayObjectContainer=null, _arg2:int=-1, _arg3:Boolean=true){ super(new LoaderStrategy()); _target = _arg1; _index = _arg2; _bAutoShow = _arg3; _bMustUnregister = false; } final public function getContext():LoaderContext{ return (_oContext); } override protected function getLoaderEvent(_arg1:String, _arg2:String=""):LoaderEvent{ return (new GraphicLoaderEvent(_arg1, this, _arg2)); } public function show():void{ getView().visible = true; } public function getView():DisplayObjectContainer{ return ((_oBitmapContainer) ? _oBitmapContainer : (getContent() as DisplayObjectContainer)); } public function getApplicationDomain():ApplicationDomain{ return ((getStrategy() as LoaderStrategy).getContentLoaderInfo().applicationDomain); } override public function release():void{ if (((getContent()) && (_target.contains(getView())))){ _target.removeChild(getView()); }; if (_bMustUnregister){ GraphicLoaderLocator.getInstance().unregister(getName()); _bMustUnregister = false; }; super.release(); } public function hide():void{ getView().visible = false; } override public function setContent(_arg1:Object):void{ if ((_arg1 is Bitmap)){ _oBitmapContainer = new Sprite(); _oBitmapContainer.addChild((_arg1 as Bitmap)); } else { _oBitmapContainer = null; }; super.setContent(_arg1); } public function setTarget(_arg1:DisplayObjectContainer):void{ _target = _arg1; if (_target != null){ if (_index != -1){ _target.addChildAt(getView(), _index); } else { _target.addChild(getView()); }; }; } public function setAutoShow(_arg1:Boolean):void{ _bAutoShow = _arg1; } override protected function onInitialize():void{ var _local1:String; if (getName() != null){ if (!GraphicLoaderLocator.getInstance().isRegistered(getName())){ _bMustUnregister = true; GraphicLoaderLocator.getInstance().register(getName(), this); } else { _bMustUnregister = false; _local1 = (((((this + " can't be registered to ") + GraphicLoaderLocator.getInstance()) + " with '") + getName()) + "' name. This name already exists."); PixlibDebug.ERROR(_local1); fireOnLoadErrorEvent(_local1); throw (new IllegalArgumentException(_local1)); }; }; if (_target){ setTarget(_target); }; if (_bAutoShow){ show(); } else { hide(); }; super.onInitialize(); } public function getTarget():DisplayObjectContainer{ return (_target); } override public function load(_arg1:URLRequest=null, _arg2:LoaderContext=null):void{ if (_arg2){ setContext(_arg2); }; super.load(_arg1, getContext()); } final public function setContext(_arg1:LoaderContext):void{ _oContext = _arg1; } public function isVisible():Boolean{ return (getView().visible); } } }//package com.bourre.load
Section 210
//GraphicLoaderEvent (com.bourre.load.GraphicLoaderEvent) package com.bourre.load { import flash.display.*; import flash.system.*; public class GraphicLoaderEvent extends LoaderEvent { public static const onLoadInitEVENT:String = "onLoadInit"; public static const onLoadErrorEVENT:String = "onLoadError"; public static const onLoadProgressEVENT:String = "onLoadProgress"; public static const onLoadStartEVENT:String = "onLoadStart"; public static const onLoadTimeOutEVENT:String = "onLoadTimeOut"; public function GraphicLoaderEvent(_arg1:String, _arg2:GraphicLoader, _arg3:String=""){ super(_arg1, _arg2, _arg3); } public function getView():DisplayObjectContainer{ return (getGraphicLoader().getView()); } public function getGraphicLoader():GraphicLoader{ return ((getLoader() as GraphicLoader)); } public function getApplicationDomain():ApplicationDomain{ return (getGraphicLoader().getApplicationDomain()); } } }//package com.bourre.load
Section 211
//GraphicLoaderLocator (com.bourre.load.GraphicLoaderLocator) package com.bourre.load { import flash.system.*; import com.bourre.core.*; public class GraphicLoaderLocator extends AbstractLocator { private static var _oI:GraphicLoaderLocator = null; public function GraphicLoaderLocator(_arg1:ConstructorAccess){ super(GraphicLoader, GraphicLoaderLocatorListener); } public function removeListener(_arg1:GraphicLoaderLocatorListener):Boolean{ return (getBroadcaster().removeListener(_arg1)); } override protected function onRegister(_arg1:String=null, _arg2:Object=null):void{ broadcastEvent(new GraphicLoaderLocatorEvent(GraphicLoaderLocatorEvent.onRegisterGraphicLoaderEVENT, _arg1, (_arg2 as GraphicLoader))); } public function getGraphicLoader(_arg1:String):GraphicLoader{ var gl:GraphicLoader; var name = _arg1; try { gl = (locate(name) as GraphicLoader); return (gl); } catch(e:Error) { throw (e); }; return (null); } public function addListener(_arg1:GraphicLoaderLocatorListener):Boolean{ return (getBroadcaster().addListener(_arg1)); } override protected function onUnregister(_arg1:String=null):void{ broadcastEvent(new GraphicLoaderLocatorEvent(GraphicLoaderLocatorEvent.onUnregisterGraphicLoaderEVENT, _arg1, null)); } public function getApplicationDomain(_arg1:String):ApplicationDomain{ return (getGraphicLoader(_arg1).getApplicationDomain()); } public static function getInstance():GraphicLoaderLocator{ if (!(GraphicLoaderLocator._oI is GraphicLoaderLocator)){ GraphicLoaderLocator._oI = new GraphicLoaderLocator(new ConstructorAccess()); }; return (GraphicLoaderLocator._oI); } public static function release():void{ if ((GraphicLoaderLocator._oI is GraphicLoaderLocator)){ GraphicLoaderLocator._oI = null; }; } } }//package com.bourre.load class ConstructorAccess { private function ConstructorAccess(){ } }
Section 212
//GraphicLoaderLocatorEvent (com.bourre.load.GraphicLoaderLocatorEvent) package com.bourre.load { import flash.events.*; public class GraphicLoaderLocatorEvent extends Event { protected var _gl:GraphicLoader; protected var _sName:String; public static var onRegisterGraphicLoaderEVENT:String = "onRegisterGraphicLoader"; public static var onUnregisterGraphicLoaderEVENT:String = "onUnregisterGraphicLoader"; public function GraphicLoaderLocatorEvent(_arg1:String, _arg2:String, _arg3:GraphicLoader){ super(_arg1); _sName = _arg2; _gl = _arg3; } public function getGraphicLib():GraphicLoader{ return (_gl); } public function getName():String{ return (_sName); } } }//package com.bourre.load
Section 213
//GraphicLoaderLocatorListener (com.bourre.load.GraphicLoaderLocatorListener) package com.bourre.load { public interface GraphicLoaderLocatorListener { function onUnregisterGraphicLoader(_arg1:GraphicLoaderLocatorEvent):void; function onRegisterGraphicLoader(_arg1:GraphicLoaderLocatorEvent):void; } }//package com.bourre.load
Section 214
//Loader (com.bourre.load.Loader) package com.bourre.load { import flash.system.*; import flash.net.*; import com.bourre.commands.*; import com.bourre.load.strategy.*; public interface Loader extends ASyncCommand { function getName():String; function removeEventListener(_arg1:String, _arg2:Object):Boolean; function setName(_arg1:String):void; function removeListener(_arg1:LoaderListener):Boolean; function addEventListener(_arg1:String, _arg2:Object, ... _args):Boolean; function fireOnLoadErrorEvent(_arg1:String=null):void; function load(_arg1:URLRequest=null, _arg2:LoaderContext=null):void; function getStrategy():LoadStrategy; function setURL(_arg1:URLRequest):void; function fireOnLoadInitEvent():void; function fireOnLoadProgressEvent():void; function fireOnLoadStartEvent():void; function getPerCent():Number; function setContent(_arg1:Object):void; function getURL():URLRequest; function addListener(_arg1:LoaderListener):Boolean; function prefixURL(_arg1:String):void; function setAntiCache(_arg1:Boolean):void; } }//package com.bourre.load
Section 215
//LoaderEvent (com.bourre.load.LoaderEvent) package com.bourre.load { import com.bourre.events.*; public class LoaderEvent extends BasicEvent { protected var _loader:Loader; protected var _sErrorMessage:String; public static const onLoadInitEVENT:String = "onLoadInit"; public static const onLoadErrorEVENT:String = "onLoadError"; public static const onLoadProgressEVENT:String = "onLoadProgress"; public static const onLoadStartEVENT:String = "onLoadStart"; public static const onLoadTimeOutEVENT:String = "onLoadTimeOut"; public function LoaderEvent(_arg1:String, _arg2:Loader, _arg3:String=""){ super(_arg1, _arg2); _loader = _arg2; _sErrorMessage = _arg3; } public function getLoader():Loader{ return (_loader); } public function getErrorMessage():String{ return (_sErrorMessage); } public function getName():String{ return (getLoader().getName()); } public function setErrorMessage(_arg1:String=""):void{ _sErrorMessage = ((_arg1.length > 0)) ? _arg1 : (((getLoader() + " loading fails with '") + getLoader().getURL().url) + "'"); } public function getPerCent():Number{ return (getLoader().getPerCent()); } } }//package com.bourre.load
Section 216
//LoaderListener (com.bourre.load.LoaderListener) package com.bourre.load { public interface LoaderListener { function onLoadProgress(_arg1:LoaderEvent):void; function onLoadError(_arg1:LoaderEvent):void; function onLoadInit(_arg1:LoaderEvent):void; function onLoadTimeOut(_arg1:LoaderEvent):void; function onLoadStart(_arg1:LoaderEvent):void; } }//package com.bourre.load
Section 217
//XMLLoader (com.bourre.load.XMLLoader) package com.bourre.load { public class XMLLoader extends FileLoader { public function XMLLoader(){ super(FileLoader.TEXT); } override protected function getLoaderEvent(_arg1:String, _arg2:String=""):LoaderEvent{ return (new XMLLoaderEvent(_arg1, this, _arg2)); } public function getXML():XML{ return (XML(getContent())); } } }//package com.bourre.load
Section 218
//XMLLoaderEvent (com.bourre.load.XMLLoaderEvent) package com.bourre.load { public class XMLLoaderEvent extends LoaderEvent { public static const onLoadInitEVENT:String = "onLoadInit"; public static const onLoadErrorEVENT:String = "onLoadError"; public static const onLoadProgressEVENT:String = "onLoadProgress"; public static const onLoadStartEVENT:String = "onLoadStart"; public static const onLoadTimeOutEVENT:String = "onLoadTimeOut"; public function XMLLoaderEvent(_arg1:String, _arg2:XMLLoader, _arg3:String=""){ super(_arg1, _arg2, _arg3); } public function getXMLLoader():XMLLoader{ return ((getLoader() as XMLLoader)); } public function getXML():XML{ return (getXMLLoader().getXML()); } } }//package com.bourre.load
Section 219
//BasicStringifier (com.bourre.log.BasicStringifier) package com.bourre.log { import flash.utils.*; public class BasicStringifier implements Stringifier { public function stringify(_arg1):String{ return (getQualifiedClassName(_arg1)); } public function toString():String{ return (PixlibStringifier.stringify(this)); } } }//package com.bourre.log
Section 220
//Log (com.bourre.log.Log) package com.bourre.log { import com.bourre.events.*; public interface Log { function fatal(_arg1):void; function warn(_arg1):void; function error(_arg1):void; function isOn():Boolean; function getChannel():EventChannel; function info(_arg1):void; function off():void; function debug(_arg1):void; function on():void; } }//package com.bourre.log
Section 221
//LogEvent (com.bourre.log.LogEvent) package com.bourre.log { import flash.events.*; public class LogEvent extends Event { public var level:LogLevel; public var message; public static const onLogEVENT:String = "onLog"; public function LogEvent(_arg1:LogLevel, _arg2=undefined){ super(LogEvent.onLogEVENT, false, false); this.level = _arg1; this.message = _arg2; } override public function toString():String{ return (PixlibStringifier.stringify(this)); } override public function clone():Event{ return (new LogEvent(level, message)); } } }//package com.bourre.log
Section 222
//Logger (com.bourre.log.Logger) package com.bourre.log { import com.bourre.events.*; public class Logger { private var _oLevel:LogLevel; private var _oCB:ChannelBroadcaster; private static var _oI:Logger = null; public function Logger(_arg1:ConstructorAccess){ setLevel(LogLevel.ALL); _oCB = new ChannelBroadcaster(); } public function setLevel(_arg1:LogLevel):void{ _oLevel = _arg1; } public function log(_arg1:LogEvent, _arg2:EventChannel=null):Boolean{ if (_arg1.level.getLevel() >= _oLevel.getLevel()){ _oCB.broadcastEvent(_arg1, _arg2); return (true); }; return (false); } public function removeAllListeners():void{ _oCB.empty(); } public function isRegistered(_arg1:LogListener, _arg2:EventChannel):Boolean{ return (_oCB.isRegistered(_arg1, LogEvent.onLogEVENT, _arg2)); } public function getLevel():LogLevel{ return (_oLevel); } public function hasListener(_arg1:EventChannel=null):Boolean{ return (_oCB.hasChannelListener(LogEvent.onLogEVENT, _arg1)); } public function addLogListener(_arg1:LogListener, _arg2:EventChannel=null):void{ _oCB.addEventListener(LogEvent.onLogEVENT, _arg1, _arg2); } public function toString():String{ return (PixlibStringifier.stringify(this)); } public function removeLogListener(_arg1:LogListener, _arg2:EventChannel=null):void{ _oCB.removeEventListener(LogEvent.onLogEVENT, _arg1, _arg2); } public static function DEBUG(_arg1, _arg2:EventChannel=null):Boolean{ return (Logger.LOG(_arg1, LogLevel.DEBUG, _arg2)); } public static function LOG(_arg1, _arg2:LogLevel, _arg3:EventChannel=null):Boolean{ return (Logger.getInstance().log(new LogEvent(_arg2, _arg1), _arg3)); } public static function WARN(_arg1, _arg2:EventChannel=null):Boolean{ return (Logger.LOG(_arg1, LogLevel.WARN, _arg2)); } public static function ERROR(_arg1, _arg2:EventChannel=null):Boolean{ return (Logger.LOG(_arg1, LogLevel.ERROR, _arg2)); } public static function getInstance():Logger{ if (!(Logger._oI is Logger)){ Logger._oI = new Logger(new ConstructorAccess()); }; return (Logger._oI); } public static function FATAL(_arg1, _arg2:EventChannel=null):Boolean{ return (Logger.LOG(_arg1, LogLevel.FATAL, _arg2)); } public static function INFO(_arg1, _arg2:EventChannel=null):Boolean{ return (Logger.LOG(_arg1, LogLevel.INFO, _arg2)); } } }//package com.bourre.log class ConstructorAccess { private function ConstructorAccess(){ } }
Section 223
//LogLevel (com.bourre.log.LogLevel) package com.bourre.log { public class LogLevel { private var _nLevel:Number; private var _sName:String; public static const ALL:LogLevel = new LogLevel(uint.MIN_VALUE, "ALL"); ; public static const FATAL:LogLevel = new LogLevel(50000, "FATAL"); ; public static const ERROR:LogLevel = new LogLevel(40000, "ERROR"); ; public static const WARN:LogLevel = new LogLevel(30000, "WARN"); ; public static const INFO:LogLevel = new LogLevel(20000, "INFO"); ; public static const DEBUG:LogLevel = new LogLevel(10000, "DEBUG"); ; public static const OFF:LogLevel = new LogLevel(uint.MAX_VALUE, "OFF"); ; public function LogLevel(_arg1:uint=0, _arg2:String=""){ _sName = _arg2; _nLevel = _arg1; } public function getName():String{ return (_sName); } public function toString():String{ return (PixlibStringifier.stringify(this)); } public function getLevel():uint{ return (_nLevel); } } }//package com.bourre.log
Section 224
//LogListener (com.bourre.log.LogListener) package com.bourre.log { public interface LogListener { function onLog(_arg1:LogEvent):void; } }//package com.bourre.log
Section 225
//PixlibDebug (com.bourre.log.PixlibDebug) package com.bourre.log { import com.bourre.events.*; public class PixlibDebug implements Log { protected var _channel:EventChannel; protected var _bIsOn:Boolean; private static var _oI:PixlibDebug; public function PixlibDebug(_arg1:PrivateConstructorAccess){ _channel = new PixlibDebugChannel(); on(); } public function warn(_arg1):void{ if (isOn()){ Logger.WARN(_arg1, _channel); }; } public function fatal(_arg1):void{ if (isOn()){ Logger.FATAL(_arg1, _channel); }; } public function debug(_arg1):void{ if (isOn()){ Logger.DEBUG(_arg1, _channel); }; } public function getChannel():EventChannel{ return (_channel); } public function error(_arg1):void{ if (isOn()){ Logger.ERROR(_arg1, _channel); }; } public function on():void{ _bIsOn = true; } public function isOn():Boolean{ return (_bIsOn); } public function off():void{ _bIsOn = false; } public function info(_arg1):void{ if (isOn()){ Logger.INFO(_arg1, _channel); }; } public static function set isOn(_arg1:Boolean):void{ if (_arg1){ PixlibDebug.getInstance().on(); } else { PixlibDebug.getInstance().off(); }; } public static function get CHANNEL():EventChannel{ return (PixlibDebug.getInstance().getChannel()); } public static function FATAL(_arg1):void{ PixlibDebug.getInstance().fatal(_arg1); } public static function WARN(_arg1):void{ PixlibDebug.getInstance().warn(_arg1); } public static function ERROR(_arg1):void{ PixlibDebug.getInstance().error(_arg1); } public static function getInstance():Log{ if (!(PixlibDebug._oI is PixlibDebug)){ PixlibDebug._oI = new PixlibDebug(new PrivateConstructorAccess()); }; return (PixlibDebug._oI); } public static function INFO(_arg1):void{ PixlibDebug.getInstance().info(_arg1); } public static function get isOn():Boolean{ return (PixlibDebug.getInstance().isOn()); } public static function DEBUG(_arg1):void{ PixlibDebug.getInstance().debug(_arg1); } } }//package com.bourre.log import com.bourre.events.*; class PrivateConstructorAccess { private function PrivateConstructorAccess(){ } } class PixlibDebugChannel extends EventChannel { private function PixlibDebugChannel(){ } }
Section 226
//PixlibStringifier (com.bourre.log.PixlibStringifier) package com.bourre.log { public class PixlibStringifier { private static var _STRINGIFIER:Stringifier = new BasicStringifier(); public function PixlibStringifier(_arg1:ConstructorAccess){ } public static function stringify(_arg1):String{ return (PixlibStringifier._STRINGIFIER.stringify(_arg1)); } public static function setStringifier(_arg1:Stringifier):void{ PixlibStringifier._STRINGIFIER = _arg1; } public static function getStringifier():Stringifier{ return (PixlibStringifier._STRINGIFIER); } } }//package com.bourre.log class ConstructorAccess { private function ConstructorAccess(){ } }
Section 227
//Stringifier (com.bourre.log.Stringifier) package com.bourre.log { public interface Stringifier { function stringify(_arg1):String; } }//package com.bourre.log
Section 228
//AbstractModel (com.bourre.model.AbstractModel) package com.bourre.model { import flash.events.*; import com.bourre.log.*; import com.bourre.events.*; import com.bourre.plugin.*; public class AbstractModel { private var _oEB:EventBroadcaster; private var _sName:String; private var _owner:Plugin; public static const onReleaseEVENT:String = "onRelease"; public static const onInitEVENT:String = "onInit"; public function AbstractModel(_arg1:Plugin=null, _arg2:String=null){ _oEB = new EventBroadcaster(this); setOwner(_arg1); if (_arg2){ setName(_arg2); }; } public function getLogger():PluginDebug{ return (PluginDebug.getInstance(getOwner())); } public function getName():String{ return (_sName); } public function removeEventListener(_arg1:String, _arg2:Object):Boolean{ return (_oEB.removeEventListener(_arg1, _arg2)); } protected function _firePrivateEvent(_arg1:Event):void{ getOwner().firePrivateEvent(_arg1); } public function addEventListener(_arg1:String, _arg2:Object, ... _args):Boolean{ return (_oEB.addEventListener.apply(_oEB, ((_args.length > 0)) ? [_arg1, _arg2].concat(_args) : [_arg1, _arg2])); } public function release():void{ _getBroadcaster().removeAllListeners(); ModelLocator.getInstance(getOwner()).unregister(getName()); onRelease(); _sName = null; } public function setListenerType(_arg1:Class):void{ _oEB.setListenerType(_arg1); } public function handleEvent(_arg1:Event):void{ } protected function onInit():void{ notifyChanged(new StringEvent(AbstractModel.onInitEVENT, this, getName())); } protected function _getBroadcaster():EventBroadcaster{ return (_oEB); } public function removeListener(_arg1:Object):Boolean{ return (_oEB.removeListener(_arg1)); } public function setName(_arg1:String):void{ var _local2:ModelLocator; _local2 = ModelLocator.getInstance(getOwner()); if (!_local2.isRegistered(_arg1)){ if (((!((getName() == null))) && (_local2.isRegistered(getName())))){ _local2.unregister(getName()); }; if (_local2.register(_arg1, this)){ _sName = _arg1; }; } else { getLogger().error((((this + ".setName() failed. '") + _arg1) + "' is already registered in ModelLocator.")); }; } public function notifyChanged(_arg1:Event):void{ _getBroadcaster().broadcastEvent(_arg1); } public function toString():String{ return (PixlibStringifier.stringify(this)); } protected function onRelease():void{ notifyChanged(new StringEvent(AbstractModel.onReleaseEVENT, this, getName())); } public function setOwner(_arg1:Plugin):void{ _owner = (_arg1) ? _arg1 : NullPlugin.getInstance(); } public function addListener(_arg1:Object):Boolean{ return (_oEB.addListener(_arg1)); } public function getOwner():Plugin{ return (_owner); } } }//package com.bourre.model
Section 229
//ModelLocator (com.bourre.model.ModelLocator) package com.bourre.model { import com.bourre.plugin.*; import com.bourre.collection.*; import com.bourre.core.*; public final class ModelLocator extends AbstractLocator { protected var _owner:Plugin; protected static var _M:HashMap = new HashMap(); public function ModelLocator(_arg1:PrivateConstructorAccess, _arg2:Plugin=null){ _owner = _arg2; super(AbstractModel, null, PluginDebug.getInstance(getOwner())); } public function getModel(_arg1:String):AbstractModel{ return ((locate(_arg1) as AbstractModel)); } override public function release():void{ var _local1:Iterator; _local1 = new ArrayIterator(_m.getValues()); while (_local1.hasNext()) { _local1.next().release(); }; super.release(); } override public function toString():String{ return ((super.toString() + (_owner) ? (", owner: " + _owner) : "No owner.")); } public function getOwner():Plugin{ return (_owner); } public static function getInstance(_arg1:Plugin=null):ModelLocator{ if (_arg1 == null){ _arg1 = NullPlugin.getInstance(); }; if (!ModelLocator._M.containsKey(_arg1)){ ModelLocator._M.put(_arg1, new ModelLocator(new PrivateConstructorAccess(), _arg1)); }; return (ModelLocator._M.get(_arg1)); } } }//package com.bourre.model class PrivateConstructorAccess { private function PrivateConstructorAccess(){ } }
Section 230
//NullPlugin (com.bourre.plugin.NullPlugin) package com.bourre.plugin { import flash.events.*; import com.bourre.log.*; import com.bourre.events.*; import com.bourre.model.*; import com.bourre.view.*; public final class NullPlugin implements Plugin { private var _channel:NullPluginChannel; private static var _oI:NullPlugin = null; public function NullPlugin(_arg1:PrivateConstructorAccess){ _channel = new NullPluginChannel(); } public function getModelLocator():ModelLocator{ return (ModelLocator.getInstance(this)); } public function fireOnReleasePlugin():void{ } public function getLogger():PluginDebug{ return (PluginDebug.getInstance(this)); } public function toString():String{ return (PixlibStringifier.stringify(this)); } public function firePrivateEvent(_arg1:Event):void{ } public function fireOnInitPlugin():void{ } public function fireExternalEvent(_arg1:Event, _arg2:EventChannel):void{ } public function firePublicEvent(_arg1:Event):void{ } public function getChannel():EventChannel{ return (_channel); } public function getViewLocator():ViewLocator{ return (ViewLocator.getInstance(this)); } public static function getInstance():NullPlugin{ if (!(NullPlugin._oI is NullPlugin)){ NullPlugin._oI = new NullPlugin(new PrivateConstructorAccess()); }; return (NullPlugin._oI); } } }//package com.bourre.plugin import com.bourre.events.*; class PrivateConstructorAccess { private function PrivateConstructorAccess(){ } } class NullPluginChannel extends EventChannel { private function NullPluginChannel(){ } }
Section 231
//Plugin (com.bourre.plugin.Plugin) package com.bourre.plugin { import flash.events.*; import com.bourre.events.*; import com.bourre.model.*; import com.bourre.view.*; public interface Plugin { function getViewLocator():ViewLocator; function getModelLocator():ModelLocator; function getChannel():EventChannel; function getLogger():PluginDebug; function fireExternalEvent(_arg1:Event, _arg2:EventChannel):void; function firePublicEvent(_arg1:Event):void; function firePrivateEvent(_arg1:Event):void; } }//package com.bourre.plugin
Section 232
//PluginDebug (com.bourre.plugin.PluginDebug) package com.bourre.plugin { import com.bourre.log.*; import com.bourre.events.*; import com.bourre.collection.*; public class PluginDebug implements Log { protected var _channel:EventChannel; protected var _bIsOn:Boolean; protected var _owner:Plugin; private static const _M:HashMap = new HashMap(); public static var isOn:Boolean = true; public function PluginDebug(_arg1:PrivateConstructorAccess, _arg2:Plugin=null){ _owner = _arg2; _channel = _arg2.getChannel(); on(); } public function fatal(_arg1):void{ if (((PluginDebug.isOn) && (_bIsOn))){ Logger.FATAL(_arg1, _channel); }; } public function getChannel():EventChannel{ return (_channel); } public function warn(_arg1):void{ if (((PluginDebug.isOn) && (_bIsOn))){ Logger.WARN(_arg1, _channel); }; } public function error(_arg1):void{ if (((PluginDebug.isOn) && (_bIsOn))){ Logger.ERROR(_arg1, _channel); }; } public function debug(_arg1):void{ if (((PluginDebug.isOn) && (_bIsOn))){ Logger.DEBUG(_arg1, _channel); }; } public function on():void{ _bIsOn = true; } public function isOn():Boolean{ return (_bIsOn); } public function info(_arg1):void{ if (((PluginDebug.isOn) && (_bIsOn))){ Logger.INFO(_arg1, _channel); }; } public function off():void{ _bIsOn = false; } public function toString():String{ return (PixlibStringifier.stringify(this)); } public function getOwner():Plugin{ return (_owner); } public static function release(_arg1:Plugin):Boolean{ if (PluginDebug._M.containsKey(_arg1)){ PluginDebug._M.remove(_arg1); return (true); }; return (false); } public static function getInstance(_arg1:Plugin=null):PluginDebug{ if (_arg1 == null){ _arg1 = NullPlugin.getInstance(); }; if (!PluginDebug._M.containsKey(_arg1)){ PluginDebug._M.put(_arg1, new PluginDebug(new PrivateConstructorAccess(), _arg1)); }; return (PluginDebug._M.get(_arg1)); } } }//package com.bourre.plugin class PrivateConstructorAccess { private function PrivateConstructorAccess(){ } }
Section 233
//Dimension (com.bourre.structures.Dimension) package com.bourre.structures { import flash.geom.*; import com.bourre.log.*; public class Dimension { public var width:Number; public var height:Number; public function Dimension(_arg1:Number=0, _arg2:Number=0){ this.width = _arg1; this.height = _arg2; } public function setSize(_arg1:Dimension):void{ width = _arg1.width; height = _arg1.height; } public function scale(_arg1:Number):Dimension{ return (new Dimension((width * _arg1), (height * _arg1))); } public function setSizeWH(_arg1:Number, _arg2:Number):void{ this.width = _arg1; this.height = _arg2; } public function toPoint():Point{ return (new Point(width, height)); } public function toString():String{ return ((((((PixlibStringifier.stringify(this) + "[") + width) + ", ") + height) + "]")); } public function clone():Dimension{ return (new Dimension(width, height)); } public function equals(_arg1:Dimension):Boolean{ return ((((width == _arg1.width)) && ((height == _arg1.height)))); } } }//package com.bourre.structures
Section 234
//TickListener (com.bourre.transitions.TickListener) package com.bourre.transitions { import flash.events.*; public interface TickListener { function onTick(_arg1:Event=null):void; } }//package com.bourre.transitions
Section 235
//ClassUtils (com.bourre.utils.ClassUtils) package com.bourre.utils { import flash.utils.*; public class ClassUtils { public static function isImplemented(_arg1:Object, _arg2:String, _arg3:String):Boolean{ var x:XML; var declaredBy:String; var o = _arg1; var classPath = _arg2; var f = _arg3; x = describeType(o); declaredBy = x..method.(@name == f).@declaredBy; return (!((declaredBy == classPath))); } public static function isImplementedAll(_arg1:Object, _arg2:String, ... _args):Boolean{ var i:Number; var x:XML; var declaredBy:String; var o = _arg1; var classPath = _arg2; var rest = _args; i = (rest.length - 1); x = describeType(o); while ((i = (i - 1)), ((i - 1) - -1)) { declaredBy = x..method.(@name == rest[i]).@declaredBy; if (declaredBy == classPath){ return (false); }; }; return (true); } public static function inherit(_arg1:Class, _arg2:Class):Boolean{ var xml:XML; var parent:String; var childClass = _arg1; var parentClass = _arg2; xml = describeType(childClass); parent = getQualifiedClassName(parentClass); return ((((xml.factory.extendsClass.(@type == parent).length() > 0)) || ((xml.factory.implementsInterface.(@type == parent).length() > 0)))); } } }//package com.bourre.utils
Section 236
//AbstractView (com.bourre.view.AbstractView) package com.bourre.view { import flash.events.*; import flash.display.*; import flash.geom.*; import com.bourre.load.*; import com.bourre.log.*; import com.bourre.events.*; import com.bourre.plugin.*; import com.bourre.structures.*; import com.bourre.error.*; public class AbstractView { protected var _gl:GraphicLoader; protected var _oEB:EventBroadcaster; protected var _sName:String; public var view:DisplayObject; protected var _owner:Plugin; public static const onReleaseEVENT:String = "onRelease"; public static const onInitEVENT:String = "onInit"; public function AbstractView(_arg1:Plugin=null, _arg2:String=null, _arg3:DisplayObject=null){ _oEB = new EventBroadcaster(this); setOwner(_arg1); if (_arg2 != null){ _initAbstractView(_arg2, _arg3, null); }; } public function resolveUI(_arg1:String):DisplayObject{ var _local2:DisplayObject; var _local3:Array; var _local4:int; var _local5:int; var _local6:String; _local2 = this.view; _local3 = _arg1.split("."); _local4 = _local3.length; _local5 = 0; while (_local5 < _local4) { _local6 = _local3[_local5]; if ((((_local2 is DisplayObjectContainer)) && (!(((_local2 as DisplayObjectContainer).getChildByName(_local6) == null))))){ _local2 = (_local2 as DisplayObjectContainer).getChildByName(_local6); } else { getLogger().error((((this + ".resolveUI(") + _arg1) + ") failed.")); return (null); }; _local5++; }; return (_local2); } public function hide():void{ view.visible = false; } public function setSize(_arg1:Dimension):void{ view.width = _arg1.width; view.height = _arg1.height; } public function getLogger():PluginDebug{ return (PluginDebug.getInstance(getOwner())); } public function getOwner():Plugin{ return (_owner); } public function release():void{ _getBroadcaster().removeAllListeners(); ViewLocator.getInstance(getOwner()).unregister(getName()); if (view != null){ if (view.parent != null){ view.parent.removeChild(view); }; view = null; }; if (_gl != null){ _gl.release(); }; onRelease(); _sName = null; } public function getName():String{ return (_sName); } public function move(_arg1:Number, _arg2:Number):void{ view.x = _arg1; view.y = _arg2; } public function handleEvent(_arg1:Event):void{ } protected function _firePrivateEvent(_arg1:Event):void{ getOwner().firePrivateEvent(_arg1); } public function setSizeWH(_arg1:Number, _arg2:Number):void{ view.width = _arg1; view.height = _arg2; } public function isVisible():Boolean{ return (view.visible); } protected function onInit():void{ notifyChanged(new StringEvent(AbstractView.onInitEVENT, this, getName())); } public function canResolveUI(_arg1:String):Boolean{ var label = _arg1; try { return ((resolveUI(label) is DisplayObject)); } catch(e:Error) { return (false); }; return (false); } public function removeListener(_arg1:Object):Boolean{ return (_oEB.removeListener(_arg1)); } public function getSize():Dimension{ return (new Dimension(view.width, view.height)); } public function addEventListener(_arg1:String, _arg2:Object, ... _args):Boolean{ return (_oEB.addEventListener.apply(_oEB, ((_args.length > 0)) ? [_arg1, _arg2].concat(_args) : [_arg1, _arg2])); } protected function _getBroadcaster():EventBroadcaster{ return (_oEB); } public function removeEventListener(_arg1:String, _arg2:Object):Boolean{ return (_oEB.removeEventListener(_arg1, _arg2)); } public function resolveFunction(_arg1:String):Function{ var _local2:Array; var _local3:String; var _local4:DisplayObjectContainer; _local2 = _arg1.split("."); _local3 = _local2.pop(); _local4 = (resolveUI(_local2.join(".")) as DisplayObjectContainer); if (((_local4.hasOwnProperty(_local3)) && ((_local4[_local3] is Function)))){ return (_local4[_local3]); }; getLogger().error((((this + ".resolveFunction(") + _arg1) + ") failed.")); return (null); } public function getPosition():Point{ return (new Point(view.x, view.y)); } protected function onRelease():void{ notifyChanged(new StringEvent(AbstractView.onReleaseEVENT, this, getName())); } public function notifyChanged(_arg1:Event):void{ _getBroadcaster().broadcastEvent(_arg1); } public function toString():String{ return (PixlibStringifier.stringify(this)); } public function registerView(_arg1:DisplayObject, _arg2:String=null):void{ _initAbstractView(getName(), _arg1, (((_arg2) && (!((_arg2 == getName()))))) ? _arg2 : null); } public function setVisible(_arg1:Boolean):void{ if (_arg1){ show(); } else { hide(); }; } public function setOwner(_arg1:Plugin):void{ _owner = (_arg1) ? _arg1 : NullPlugin.getInstance(); } public function addListener(_arg1:Object):Boolean{ return (_oEB.addListener(_arg1)); } private function _initAbstractView(_arg1:String, _arg2:DisplayObject, _arg3:String):void{ if (_arg2 != null){ this.view = _arg2; } else { if (GraphicLoaderLocator.getInstance().isRegistered(_arg1)){ _gl = GraphicLoaderLocator.getInstance().getGraphicLoader(_arg1); if (_gl != null){ this.view = _gl.getView(); } else { getLogger().error((("Invalid arguments for " + this) + " constructor.")); return; }; }; }; setName((_arg3) ? _arg3 : _arg1); onInit(); } public function registerGraphicLoader(_arg1:String, _arg2:String=null):void{ _initAbstractView(_arg1, null, (((_arg2) && (!((_arg2 == getName()))))) ? _arg2 : null); } public function setName(_arg1:String):void{ var _local2:ViewLocator; var _local3:String; _local2 = ViewLocator.getInstance(getOwner()); if (((!((_arg1 == null))) && (!(_local2.isRegistered(_arg1))))){ if (((!((getName() == null))) && (_local2.isRegistered(getName())))){ _local2.unregister(getName()); }; if (_local2.register(_arg1, this)){ _sName = _arg1; }; } else { _local3 = (((this + ".setName() failed. '") + _arg1) + "' is already registered in MovieClipHelperLocator."); getLogger().error(_local3); throw (new IllegalArgumentException(_local3)); }; } public function canResolveFunction(_arg1:String):Boolean{ var label = _arg1; try { return ((resolveFunction(label) is Function)); } catch(e:Error) { return (false); }; return (false); } public function show():void{ view.visible = true; } } }//package com.bourre.view
Section 237
//ViewLocator (com.bourre.view.ViewLocator) package com.bourre.view { import com.bourre.plugin.*; import com.bourre.collection.*; import com.bourre.core.*; import com.bourre.error.*; public final class ViewLocator extends AbstractLocator { protected var _owner:Plugin; protected static var _M:HashMap = new HashMap(); public function ViewLocator(_arg1:PrivateConstructorAccess, _arg2:Plugin=null){ _owner = _arg2; super(AbstractView, null, PluginDebug.getInstance(getOwner())); } override public function release():void{ var _local1:Iterator; _local1 = new ArrayIterator(_m.getValues()); while (_local1.hasNext()) { _local1.next().release(); }; super.release(); } public function getView(_arg1:String):AbstractView{ return ((locate(_arg1) as AbstractView)); } override public function register(_arg1:String, _arg2:Object):Boolean{ if (_arg1 == null){ throw (new NullPointerException("Cannot register a view with a null name")); }; if (_arg2 == null){ throw (new NullPointerException("Cannot register a null view")); }; return (super.register(_arg1, _arg2)); } override public function toString():String{ return ((super.toString() + (_owner) ? (", owner: " + _owner) : "No owner.")); } public function getOwner():Plugin{ return (_owner); } public static function getInstance(_arg1:Plugin=null):ViewLocator{ if (_arg1 == null){ _arg1 = NullPlugin.getInstance(); }; if (!ViewLocator._M.containsKey(_arg1)){ ViewLocator._M.put(_arg1, new ViewLocator(new PrivateConstructorAccess(), _arg1)); }; return (ViewLocator._M.get(_arg1)); } } }//package com.bourre.view class PrivateConstructorAccess { private function PrivateConstructorAccess(){ } }
Section 238
//GameEvent (com.gamesandweb.game.events.GameEvent) package com.gamesandweb.game.events { import flash.events.*; public class GameEvent extends Event { public var name:String; public static const MILESTONE_REACH:String = "milestoneReach"; public function GameEvent(_arg1:String, _arg2:String=null, _arg3:Boolean=false, _arg4:Boolean=false){ super(_arg1, _arg3, _arg4); this.name = _arg2; } } }//package com.gamesandweb.game.events
Section 239
//GameContext (com.gamesandweb.game.GameContext) package com.gamesandweb.game { import flash.display.*; import flash.geom.*; public class GameContext { private var _globalScreenPos:Point;// = null private var _lang:String;// = "" private var _basePath:String;// = "" private var _gameSprite:Sprite;// = null private var _stage:Stage;// = null private static var _instance:GameContext = null; public function GameContext(_arg1:SingletonBlocker){ _basePath = ""; _lang = ""; _stage = null; _gameSprite = null; _globalScreenPos = null; super(); if (_arg1 == null){ throw (new Error(("Public construction not allowed." + "Use Instance"))); }; } public function set GlobalStage(_arg1:Stage):void{ _stage = _arg1; } public function get GlobalStage():Stage{ return (_stage); } public function get Lang():String{ return (_lang); } public function set GameSprite(_arg1:Sprite):void{ _gameSprite = _arg1; _globalScreenPos = _gameSprite.localToGlobal(new Point(0, 0)); } public function get GlobalScreenPos():Point{ return (_globalScreenPos); } public function get GameSprite():Sprite{ return (_gameSprite); } public function set BasePath(_arg1:String):void{ _basePath = _arg1; } public function set Lang(_arg1:String):void{ _lang = _arg1; } public function get BasePath():String{ return (_basePath); } public static function get Instance():GameContext{ if (!(GameContext._instance is GameContext)){ GameContext._instance = new GameContext(new SingletonBlocker()); }; return (_instance); } } }//package com.gamesandweb.game class SingletonBlocker { private function SingletonBlocker(){ } }
Section 240
//Global (com.gamesandweb.game.Global) package com.gamesandweb.game { import flash.events.*; import flash.display.*; import com.luminicbox.log.*; import com.gamesandweb.game.events.*; import com.gamesandweb.graphics.*; public class Global { private static var _dispatcher:EventDispatcher = null; private static var _logger:Logger; public static function Initialize(_arg1):void{ _dispatcher = new EventDispatcher(); _logger = new Logger("GlobalLogger"); _logger.addPublisher(new ConsolePublisher()); } public static function DispatchAnimationEnd(_arg1:MovieClip):void{ _arg1.dispatchEvent(new Event(MovieClipContainer.ANIMATION_END)); } public static function Log(_arg1:Object):void{ _logger.log(_arg1); } public static function DispatchGameEvent(_arg1:String):void{ _dispatcher.dispatchEvent(new GameEvent(GameEvent.MILESTONE_REACH, _arg1)); } public static function DispatchEvent(_arg1:Event):void{ _dispatcher.dispatchEvent(_arg1); } public static function AddEventListener(_arg1:String, _arg2:Function):void{ _dispatcher.addEventListener(_arg1, _arg2); } } }//package com.gamesandweb.game
Section 241
//MovieClipContainer (com.gamesandweb.graphics.MovieClipContainer) package com.gamesandweb.graphics { import flash.events.*; import flash.display.*; import flash.utils.*; public class MovieClipContainer extends Sprite { protected var _activeSkin:MovieClip;// = null protected var _frames:Dictionary;// = null public static const ANIMATION_END:String = "AnimationEndEvent"; public function MovieClipContainer(){ _frames = null; _activeSkin = null; super(); _frames = new Dictionary(); } public function RemoveSkin(_arg1:String):void{ delete _frames[_arg1]; } protected function OnAnimationEnd(_arg1:Event):void{ this.dispatchEvent(new Event(ANIMATION_END)); } public function GetActiveSkin():MovieClip{ return (_activeSkin); } public function AddSkin(_arg1:String, _arg2:MovieClip):void{ _frames[_arg1] = _arg2; } public function GetSkin(_arg1:String):MovieClip{ if (_frames[_arg1]){ return (_frames[_arg1]); }; return (null); } public function SetSkin(_arg1:String, _arg2:Boolean=true):void{ var name = _arg1; var propagates = _arg2; if (_activeSkin != _frames[name]){ if (_frames[name]){ if (_activeSkin){ try { _activeSkin.removeEventListener(ANIMATION_END, OnAnimationEnd); } catch(e:Error) { }; }; if (this.numChildren){ this.removeChildAt(0); }; this.addChild(_frames[name]); _activeSkin = _frames[name]; if (propagates){ _activeSkin.addEventListener(ANIMATION_END, OnAnimationEnd); }; }; }; } public function Release():void{ var _local1:Object; _activeSkin.removeEventListener(ANIMATION_END, OnAnimationEnd); this.removeChildAt(0); for (_local1 in _frames) { (_frames[_local1] as MovieClip).stop(); delete _frames[_local1]; }; _activeSkin = null; } } }//package com.gamesandweb.graphics
Section 242
//UIWidget (com.gamesandweb.ui.UIWidget) package com.gamesandweb.ui { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; public class UIWidget extends EventDispatcher { protected var _view:MovieClip;// = null protected var _depth:int;// = -1 protected var _hasFadeOut:Boolean;// = false protected var _hasFadeIn:Boolean;// = false public static const SECOND_ACTION:String = "OnSecondAction"; public static const BACK:String = "OnBack"; public static const FADE_IN:String = "OnFadeIn"; public static const FADE_OUT:String = "OnFadeOut"; public static const FADE_OUT_OVER:String = "OnFadeOutOver"; public static const FADE_IN_OVER:String = "OnFadeInOver"; public static const ACTION:String = "OnAction"; public static const FORTH:String = "OnForth"; public function UIWidget(_arg1:MovieClip, _arg2:int=-1){ _view = null; _depth = -1; _hasFadeIn = false; _hasFadeOut = false; super(); _view = _arg1; _depth = _arg2; Validate(); _view.addEventListener(UIWidget.FADE_IN, OnFadeIn); _view.addEventListener(UIWidget.FADE_IN_OVER, OnFadeInOver); _view.addEventListener(UIWidget.FADE_OUT, OnFadeOut); _view.addEventListener(UIWidget.FADE_OUT_OVER, OnFadeOutOver); _view.addEventListener(UIWidget.FORTH, OnForth); _view.addEventListener(UIWidget.BACK, OnBack); _view.addEventListener(UIWidget.ACTION, OnAction); _view.addEventListener(UIWidget.SECOND_ACTION, OnSecondAction); Init(); } public function get View():MovieClip{ return (_view); } public function ShowFadedIn():void{ if (_view.currentLabel != "FadedIn"){ _view.gotoAndStop("FadedIn"); _view.visible = true; }; } public function FadeOut():void{ if (_hasFadeOut){ _view.gotoAndPlay("End"); } else { Global.Log((_view + " is not ready for fading out")); _view.gotoAndStop(_view.totalFrames); OnFadeOut(null); }; } public function OnSecondAction(_arg1:Event):void{ dispatchEvent(_arg1); } public function OnFadeInOver(_arg1:Event):void{ dispatchEvent(_arg1); } public function get HasFadeIn():Boolean{ return (_hasFadeIn); } public function OnAction(_arg1:Event):void{ dispatchEvent(_arg1); } public function Show():void{ _view.visible = true; } public function get HasFadeOut():Boolean{ return (_hasFadeOut); } public function OnFadeIn(_arg1:Event):void{ dispatchEvent(_arg1); } public function FadeIn():void{ _view.visible = true; if (_hasFadeIn){ _view.gotoAndPlay("Start"); } else { Global.Log((_view + " is not ready for fading in")); _view.gotoAndStop(1); OnFadeIn(null); }; } public function Stop():void{ _view.stop(); } public function get Depth():int{ return (_depth); } public function OnFadeOutOver(_arg1:Event):void{ dispatchEvent(_arg1); _view.visible = false; } public function OnBack(_arg1:Event):void{ dispatchEvent(_arg1); } public function Hide():void{ _view.visible = false; } public function Init():void{ Validate(); } public function Play():void{ _view.play(); } public function OnFadeOut(_arg1:Event):void{ dispatchEvent(_arg1); } public function Validate():void{ var _local1:int; _local1 = 0; while (_local1 < _view.currentLabels.length) { if (_view.currentLabels[_local1].name == "Start"){ _hasFadeIn = true; }; if (_view.currentLabels[_local1].name == "End"){ _hasFadeOut = true; }; _local1++; }; } public function OnForth(_arg1:Event):void{ dispatchEvent(_arg1); } } }//package com.gamesandweb.ui
Section 243
//Key (com.gamesandweb.utils.Key) package com.gamesandweb.utils { import flash.events.*; import flash.display.*; public class Key { public static const Left:int = 37; public static const A:int = 65; public static const B:int = 66; public static const C:int = 67; public static const D:int = 68; public static const E:int = 69; public static const F:int = 70; public static const G:int = 71; public static const H:int = 72; public static const I:int = 73; public static const J:int = 74; public static const K:int = 75; public static const L:int = 76; public static const M:int = 77; public static const N:int = 78; public static const O:int = 79; public static const P:int = 80; public static const Q:int = 81; public static const R:int = 82; public static const S:int = 83; public static const T:int = 84; public static const U:int = 85; public static const V:int = 86; public static const W:int = 87; public static const X:int = 88; public static const Y:int = 89; public static const Z:int = 90; public static const Multiply:int = 106; public static const Backspace:int = 8; public static const a:int = 65; public static const b:int = 66; public static const c:int = 67; public static const d:int = 68; public static const e:int = 69; public static const f:int = 70; public static const g:int = 71; public static const h:int = 72; public static const i:int = 73; public static const j:int = 74; public static const k:int = 75; public static const l:int = 76; public static const m:int = 77; public static const n:int = 78; public static const o:int = 79; public static const p:int = 80; public static const q:int = 81; public static const r:int = 82; public static const s:int = 83; public static const t:int = 84; public static const u:int = 85; public static const v:int = 86; public static const w:int = 87; public static const x:int = 88; public static const y:int = 89; public static const z:int = 90; public static const Add:int = 107; public static const Divide:int = 111; public static const RightMouseButton:int = 2; public static const F1:int = 112; public static const F3:int = 114; public static const np1:int = 97; public static const np3:int = 99; public static const np5:int = 101; public static const np0:int = 96; public static const np2:int = 98; public static const Enter:int = 13; public static const np4:int = 100; public static const F9:int = 120; public static const np6:int = 102; public static const np8:int = 104; public static const F5:int = 116; public static const F6:int = 117; public static const F7:int = 118; public static const F8:int = 119; public static const Down:int = 40; public static const np7:int = 103; public static const np9:int = 105; public static const End:int = 35; public static const Shift:int = 16; public static const F2:int = 113; public static const Up:int = 38; public static const F4:int = 115; public static const F14:int = 125; public static const F11:int = 122; public static const F13:int = 124; public static const F15:int = 126; public static const F12:int = 123; public static const Insert:int = 45; public static const Home:int = 36; public static const ScrLk:int = 145; public static const Decimal:int = 110; public static const Subtract:int = 109; public static const Control:int = 17; public static const Esc:int = 27; public static const Spacebar:int = 32; public static const Tab:int = 9; public static const n0:int = 48; public static const n1:int = 49; public static const n2:int = 50; public static const n3:int = 51; public static const n4:int = 52; public static const n5:int = 53; public static const n6:int = 54; public static const n7:int = 55; public static const n8:int = 56; public static const n9:int = 57; public static const LeftMouseButton:int = 1; public static const PageUp:int = 33; public static const NumLock:int = 144; public static const Delete:int = 46; public static const CapsLock:int = 20; public static const PageDown:int = 34; public static const Right:int = 39; private static var keysDown:Object = new Object(); private static var initialized:Boolean = false; private static var _stage:Stage = null; public static function finalize():void{ _stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyPressed); _stage.removeEventListener(KeyboardEvent.KEY_UP, keyReleased); _stage.removeEventListener(Event.DEACTIVATE, clearKeys); _stage = null; } private static function keyReleased(_arg1:KeyboardEvent):void{ if ((_arg1.keyCode in keysDown)){ delete keysDown[_arg1.keyCode]; }; } private static function keyPressed(_arg1:KeyboardEvent):void{ keysDown[_arg1.keyCode] = true; } public static function isDown(_arg1:uint):Boolean{ if (!initialized){ throw (new Error("Key class has already been initialized.")); }; return (Boolean((_arg1 in keysDown))); } public static function initialize(_arg1:Stage):void{ if (!initialized){ _arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed); _arg1.addEventListener(KeyboardEvent.KEY_UP, keyReleased); _arg1.addEventListener(Event.DEACTIVATE, clearKeys); _stage = _arg1; initialized = true; }; } private static function clearKeys(_arg1:Event):void{ keysDown = new Object(); } } }//package com.gamesandweb.utils
Section 244
//ConsolePublisher (com.luminicbox.log.ConsolePublisher) package com.luminicbox.log { import flash.events.*; import flash.display.*; import flash.media.*; import flash.text.*; import flash.net.*; public class ConsolePublisher implements IPublisher { private var _maxDepth:Number; private var _version:Number;// = 0.1 public function ConsolePublisher(){ _version = 0.1; super(); _maxDepth = 4; } public function toString():String{ return ("ConsolePublisher"); } private function getType(_arg1:Object):Object{ var _local2:String; var _local3:Object; _local2 = typeof(_arg1); _local3 = new Object(); _local3.inspectable = true; _local3.name = _local2; if ((((((((((_local2 == "boolean")) || ((_local2 == "function")))) || ((_local2 == "number")))) || ((_local2 == "string")))) || ((_local2 == "undefined")))){ _local3.inspectable = false; } else { if ((_arg1 is Array)){ _local3.name = "array"; } else { if ((_arg1 is Date)){ _local3.inspectable = false; _local3.name = "date"; } else { if ((_arg1 is MovieClip)){ _local3.name = "movieclip"; } else { if ((_arg1 is Loader)){ _local3.name = "loader"; } else { if ((_arg1 is Sprite)){ _local3.name = "sprite"; } else { if ((_arg1 is Stage)){ _local3.name = "stage"; } else { if ((_arg1 is DisplayObjectContainer)){ _local3.name = "displayobjectcontainer"; } else { if ((_arg1 is SimpleButton)){ _local3.name = "simplebutton"; } else { if ((_arg1 is TextField)){ _local3.name = "textfield"; } else { if ((_arg1 is AVM1Movie)){ _local3.name = "avm1movie"; } else { if ((_arg1 is Bitmap)){ _local3.name = "bitmap"; } else { if ((_arg1 is InteractiveObject)){ _local3.name = "interactiveobject"; } else { if ((_arg1 is MorphShape)){ _local3.name = "morphshape"; } else { if ((_arg1 is Shape)){ _local3.name = "shape"; } else { if ((_arg1 is StaticText)){ _local3.name = "statictext"; } else { if ((_arg1 is Video)){ _local3.name = "video"; } else { if ((_arg1 is DisplayObject)){ _local3.name = "displayobject"; } else { if ((_arg1 is XMLList)){ _local3.name = "xmllist"; _local3.stringify = true; } else { if ((_arg1 is XML)){ _local3.name = "xml"; _local3.stringify = true; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; }; return (_local3); } public function publish(_arg1:LogEvent):void{ var _local2:Object; var _local3:LocalConnection; _local2 = LogEvent.serialize(_arg1); _local2.argument = serializeObj(_local2.argument, 1); _local3 = new LocalConnection(); _local3.addEventListener(StatusEvent.STATUS, onStatus); _local3.send("_luminicbox_log_console", "log", _local2); } private function serializeObj(_arg1:Object, _arg2:Number):Object{ var _local3:Object; var _local4:Object; var _local5:Array; var _local6:Number; var _local7:String; _local3 = getType(_arg1); _local4 = new Object(); if (!_local3.inspectable){ _local4.value = _arg1; } else { if (_local3.stringify){ _local4.value = (_arg1 + ""); } else { if (_arg2 <= _maxDepth){ if ((((((((((((((((((((((((((((((_local3.name == "movieclip")) || ((_local3.name == "loader")))) || ((_local3.name == "sprite")))) || ((_local3.name == "stage")))) || ((_local3.name == "displayobjectcontainer")))) || ((_local3.name == "simplebutton")))) || ((_local3.name == "textfield")))) || ((_local3.name == "avm1movie")))) || ((_local3.name == "bitmap")))) || ((_local3.name == "interactiveobject")))) || ((_local3.name == "morphshape")))) || ((_local3.name == "shape")))) || ((_local3.name == "statictext")))) || ((_local3.name == "video")))) || ((_local3.name == "displayobject")))){ _local4.id = (_arg1 + ""); }; _local5 = new Array(); if ((_arg1 is Array)){ _local6 = 0; while (_local6 < _arg1.length) { _local5.push({property:_local6, value:serializeObj(_arg1[_local6], (_arg2 + 1))}); _local6++; }; } else { for (_local7 in _arg1) { _local5.push({property:_local7, value:serializeObj(_arg1[_local7], (_arg2 + 1))}); }; }; _local4.value = _local5; } else { _local4.reachLimit = true; }; }; }; _local4.type = _local3.name; return (_local4); } private function onStatus(_arg1:StatusEvent):void{ if (_arg1.level == "error"){ trace("LocalConnection.send() failed\nMake sure the FlashInspector is running\n"); }; } public function set maxDepth(_arg1:Number):void{ _maxDepth = ((_maxDepth)>0xFF) ? 0xFF : _arg1; } public function get maxDepth():Number{ return (_maxDepth); } } }//package com.luminicbox.log
Section 245
//IPublisher (com.luminicbox.log.IPublisher) package com.luminicbox.log { public interface IPublisher { function toString():String; function publish(_arg1:LogEvent):void; } }//package com.luminicbox.log
Section 246
//Level (com.luminicbox.log.Level) package com.luminicbox.log { public class Level { private var _value:Number; private var _name:String; public static var ALL:Level = new Level("ALL", 1); ; public static var LOG:Level = new Level("LOG", 1); ; public static var FATAL:Level = new Level("FATAL", 32); ; public static var WARN:Level = new Level("WARN", 8); ; public static var INFO:Level = new Level("INFO", 4); ; public static var ERROR:Level = new Level("ERROR", 16); ; public static var DEBUG:Level = new Level("DEBUG", 2); ; public static var NONE:Level = new Level("NONE", 0x0400); ; public function Level(_arg1:String, _arg2:Number){ this._name = _arg1; this._value = _arg2; } public function getName():String{ return (_name); } public function toString():String{ return (getName()); } public function getValue():Number{ return (_value); } } }//package com.luminicbox.log
Section 247
//LogEvent (com.luminicbox.log.LogEvent) package com.luminicbox.log { public class LogEvent { public var level:Level; public var loggerId:String; public var time:Date; public var argument:Object; public function LogEvent(_arg1:String, _arg2:Object, _arg3:Level){ this.loggerId = _arg1; this.argument = _arg2; this.level = _arg3; time = new Date(); } public static function serialize(_arg1:LogEvent):Object{ var _local2:Object; _local2 = new Object(); _local2.loggerId = _arg1.loggerId; _local2.time = _arg1.time; _local2.levelName = _arg1.level.getName(); _local2.argument = _arg1.argument; return (_local2); } public static function deserialize(_arg1:Object):LogEvent{ var _local2:Level; var _local3:LogEvent; _local2 = Level[("" + _arg1.levelName)]; _local3 = new LogEvent(_arg1.loggerId, _arg1.argument, _local2); _local3.time = _arg1.time; return (_local3); } } }//package com.luminicbox.log
Section 248
//Logger (com.luminicbox.log.Logger) package com.luminicbox.log { public class Logger { private var _level:Level; private var _loggerId:String; private var _publishers:Array; private var _filters:Array; public function Logger(_arg1:String=""){ if (_arg1.length > 0){ this._loggerId = _arg1; }; this._level = Level.LOG; _publishers = new Array(); _filters = new Array(); } public function setLevel(_arg1:Level):void{ _level = _arg1; } public function log(_arg1:Object):void{ publish(_arg1, Level.LOG); } public function warn(_arg1:Object):void{ publish(_arg1, Level.WARN); } public function error(_arg1:Object):void{ publish(_arg1, Level.ERROR); } public function fatal(_arg1:Object):void{ publish(_arg1, Level.FATAL); } public function getPublishers():Array{ return (_publishers); } public function info(_arg1:Object):void{ publish(_arg1, Level.INFO); } public function debug(_arg1:Object):void{ publish(_arg1, Level.DEBUG); } public function addPublisher(_arg1:IPublisher):void{ if (!_publishers[_arg1.toString()]){ _publishers[_arg1.toString()] = _arg1; }; } private function publish(_arg1:Object, _arg2:Level):void{ var _local3:LogEvent; var _local4:String; if (_arg2.getValue() >= _level.getValue()){ _local3 = new LogEvent(this._loggerId, _arg1, _arg2); for (_local4 in _publishers) { IPublisher(_publishers[_local4]).publish(_local3); }; }; } public function removePublisher(_arg1:IPublisher):void{ delete _publishers[_arg1.toString()]; } } }//package com.luminicbox.log
Section 249
//SoundManager (com.reintroducing.sound.SoundManager) package com.reintroducing.sound { import flash.events.*; import flash.utils.*; import flash.system.*; import flash.media.*; import flash.net.*; import gs.*; public class SoundManager { private var _soundsDict:Dictionary; private var _sounds:Array; private var _applicationDomain:ApplicationDomain;// = null private static var _instance:SoundManager; private static var _allowInstance:Boolean; public function SoundManager(){ _applicationDomain = null; super(); this._soundsDict = new Dictionary(true); this._sounds = new Array(); if (!SoundManager._allowInstance){ throw (new Error("Error: Use SoundManager.getInstance() instead of the new keyword.")); }; } public function fadeSound(_arg1:String, _arg2:Number=0, _arg3:Number=1):void{ var _local4:SoundChannel; _local4 = this._soundsDict[_arg1].channel; TweenLite.to(_local4, _arg3, {volume:_arg2}); } public function get sounds():Array{ return (this._sounds); } public function addExternalSound(_arg1:String, _arg2:String, _arg3:Number=1000, _arg4:Boolean=false):Boolean{ var _local5:int; var _local6:int; var _local7:Object; var _local8:Sound; _local5 = this._sounds.length; _local6 = 0; while (_local6 < _local5) { if (this._sounds[_local6].name == _arg2){ return (false); }; _local6++; }; _local7 = new Object(); _local8 = new Sound(new URLRequest(_arg1), new SoundLoaderContext(_arg3, _arg4)); _local7.name = _arg2; _local7.sound = _local8; _local7.channel = new SoundChannel(); _local7.position = 0; _local7.played = false; _local7.paused = true; _local7.volume = 1; _local7.startTime = 0; _local7.loops = 0; _local7.pausedByAll = false; this._soundsDict[_arg2] = _local7; this._sounds.push(_local7); return (true); } public function getSoundDuration(_arg1:String):Number{ return (this._soundsDict[_arg1].sound.length); } public function setSoundVolume(_arg1:String, _arg2:Number):void{ var _local3:Object; var _local4:SoundTransform; _local3 = this._soundsDict[_arg1]; _local4 = _local3.channel.soundTransform; _local4.volume = _arg2; _local3.channel.soundTransform = _local4; } public function set MyApplicationDomain(_arg1:ApplicationDomain):void{ _applicationDomain = _arg1; } public function getSoundVolume(_arg1:String):Number{ return (this._soundsDict[_arg1].channel.soundTransform.volume); } public function addLibrarySound(_arg1, _arg2:String, _arg3:Number=1):Boolean{ var _local4:int; var _local5:int; var _local6:Object; var _local7:Class; var _local8:Sound; _local4 = this._sounds.length; _local5 = 0; while (_local5 < _local4) { if (this._sounds[_local5].name == _arg2){ return (false); }; _local5++; }; _local6 = new Object(); if (_applicationDomain == null){ _applicationDomain = ApplicationDomain.currentDomain; }; _local7 = (_applicationDomain.getDefinition(_arg1) as Class); _local8 = new (_local7); _local6.name = _arg2; _local6.sound = _local8; _local6.channel = new SoundChannel(); _local6.position = 0; _local6.played = false; _local6.paused = true; _local6.volume = _arg3; _local6.startTime = 0; _local6.loops = 0; _local6.pausedByAll = false; this._soundsDict[_arg2] = _local6; this._sounds.push(_local6); return (true); } public function toString():String{ return (getQualifiedClassName(this)); } public function isSoundPaused(_arg1:String):Boolean{ return (this._soundsDict[_arg1].paused); } public function removeAllSounds():void{ var _local1:int; var _local2:int; _local1 = this._sounds.length; _local2 = 0; while (_local2 < _local1) { this._sounds[_local2] = null; _local2++; }; this._sounds = new Array(); this._soundsDict = new Dictionary(true); } public function getSoundPosition(_arg1:String):Number{ return (this._soundsDict[_arg1].channel.position); } private function OnSoundComplete(_arg1:String):Function{ var $name = _arg1; return (function (_arg1:Event):void{ stopSound($name); }); } public function stopAllSounds(_arg1:Boolean=true):void{ var _local2:int; var _local3:int; var _local4:String; _local2 = this._sounds.length; _local3 = 0; while (_local3 < _local2) { _local4 = this._sounds[_local3].name; if (_arg1){ if (!this._soundsDict[_local4].paused){ this._soundsDict[_local4].pausedByAll = true; this.stopSound(_local4); }; } else { this.stopSound(_local4); }; _local3++; }; } public function removeSound(_arg1:String):void{ var _local2:int; var _local3:int; _local2 = this._sounds.length; _local3 = 0; while (_local3 < _local2) { if (this._sounds[_local3].name == _arg1){ this._sounds[_local3] = null; this._sounds.splice(_local3, 1); }; _local3++; }; delete this._soundsDict[_arg1]; } public function muteAllSounds():void{ var _local1:int; var _local2:int; var _local3:String; _local1 = this._sounds.length; _local2 = 0; while (_local2 < _local1) { _local3 = this._sounds[_local2].name; this.setSoundVolume(_local3, 0); _local2++; }; } public function stopSound(_arg1:String):void{ var snd:Object; var $name = _arg1; try { snd = this._soundsDict[$name]; if (((!((snd == null))) || ((snd.channel == null)))){ snd.paused = false; snd.played = false; snd.channel.stop(); snd.position = snd.channel.position; } else { trace(("Couldn't find sound " + $name)); }; } catch(e:Error) { }; } public function pauseAllSounds(_arg1:Boolean=true):void{ var _local2:int; var _local3:int; var _local4:String; _local2 = this._sounds.length; _local3 = 0; while (_local3 < _local2) { _local4 = this._sounds[_local3].name; if (_arg1){ if (!this._soundsDict[_local4].paused){ this._soundsDict[_local4].pausedByAll = true; this.pauseSound(_local4); }; } else { this.pauseSound(_local4); }; _local3++; }; } public function isSoundPausedByAll(_arg1:String):Boolean{ return (this._soundsDict[_arg1].pausedByAll); } public function playAllSounds(_arg1:Boolean=false):void{ var _local2:int; var _local3:int; var _local4:String; _local2 = this._sounds.length; _local3 = 0; while (_local3 < _local2) { _local4 = this._sounds[_local3].name; if (_arg1){ if (this._soundsDict[_local4].pausedByAll){ this._soundsDict[_local4].pausedByAll = false; this.playSound(_local4); }; } else { this.playSound(_local4); }; _local3++; }; } public function pauseSound(_arg1:String):void{ var _local2:Object; _local2 = this._soundsDict[_arg1]; _local2.paused = true; _local2.played = false; _local2.position = _local2.channel.position; _local2.channel.stop(); } public function unmuteAllSounds():void{ var _local1:int; var _local2:int; var _local3:String; var _local4:Object; var _local5:SoundTransform; _local1 = this._sounds.length; _local2 = 0; while (_local2 < _local1) { _local3 = this._sounds[_local2].name; _local4 = this._soundsDict[_local3]; _local5 = _local4.channel.soundTransform; _local5.volume = ((_local4.volume == 0)) ? Sfx.VolumeIDXML(_local3) : _local4.volume; _local4.channel.soundTransform = _local5; _local2++; }; } public function playSound(_arg1:String, _arg2:Number=1, _arg3:Number=0, _arg4:int=0):void{ var _local5:Object; _local5 = this._soundsDict[_arg1]; _local5.volume = _arg2; _local5.startTime = _arg3; _local5.loops = _arg4; if (_local5.paused){ _local5.channel = _local5.sound.play(_local5.position, _local5.loops, new SoundTransform(_local5.volume)); _local5.channel.addEventListener(Event.SOUND_COMPLETE, OnSoundComplete(_arg1)); } else { _local5.channel = _local5.sound.play(_arg3, _local5.loops, new SoundTransform(_local5.volume)); _local5.channel.addEventListener(Event.SOUND_COMPLETE, OnSoundComplete(_arg1)); }; _local5.paused = false; _local5.played = true; } public function IsPlayed(_arg1:String):Boolean{ var snd:Object; var $name = _arg1; try { snd = this._soundsDict[$name]; return (snd.played); } catch(e:Error) { trace(" Sound NULL "); return (true); }; return (true); } public function getSoundObject(_arg1:String):Sound{ return (this._soundsDict[_arg1].sound); } public static function getInstance():SoundManager{ if (SoundManager._instance == null){ SoundManager._allowInstance = true; SoundManager._instance = new (SoundManager); SoundManager._allowInstance = false; }; return (SoundManager._instance); } } }//package com.reintroducing.sound
Section 250
//ConfigLoader (config.ConfigLoader) package config { import flash.events.*; import flash.utils.*; import flash.net.*; import com.bourre.load.*; public class ConfigLoader extends EventDispatcher { private var _config:Dictionary;// = null private var _loader:XMLLoader;// = null public static const LOAD_COMPLETE:String = "LoadComplete"; private static var _instance:ConfigLoader = null; public function ConfigLoader(_arg1:SingletonBlocker){ _loader = null; _config = null; super(); if (_arg1 == null){ return; }; _config = new Dictionary(); } public function get Config():Dictionary{ return (_config); } private function ParseConfig(_arg1:Dictionary, _arg2:XML):void{ var _local3:XML; for each (_local3 in _arg2.term) { _arg1[_local3.@key.toString()] = _local3.toString(); }; } private function OnLoadInit(_arg1:LoaderEvent):void{ _loader.removeEventListener(LoaderEvent.onLoadInitEVENT, OnLoadInit); ParseConfig(_config, _loader.getXML()); dispatchEvent(new Event(LOAD_COMPLETE)); } public function LoadConfig(_arg1:String):void{ _loader = new XMLLoader(); _loader.addEventListener(LoaderEvent.onLoadInitEVENT, OnLoadInit); _loader.load(new URLRequest(_arg1)); } public static function get Instance():ConfigLoader{ if (!(ConfigLoader._instance is ConfigLoader)){ ConfigLoader._instance = new ConfigLoader(new SingletonBlocker()); }; return (_instance); } } }//package config class SingletonBlocker { private function SingletonBlocker(){ } }
Section 251
//DroideBlue (enemies.DroideBlue) package enemies { import flash.events.*; import flash.display.*; import ui.*; import model.*; import flash.geom.*; import flash.text.*; import utils.*; import config.*; import view.*; import assets.*; public class DroideBlue extends Enemy { private var _posXShot:int; private var _globalShotPosition:Point; private var _accountant:int;// = 0 private var MAX_ACCOUNTANT:int; private var _posYShot:int; private var MIN_DISTANCE_OF_BEN:int; public function DroideBlue(_arg1:MovieClip, _arg2:Character, _arg3:ShotsEnemyManager, _arg4:int, _arg5:Point){ _accountant = 0; super(_arg1, _arg2, _arg3, _arg4, _arg5); Type = 1; Direction = -1; View.scaleX = -(Direction); SpeedX = 0; SpeedY = 0; GoOnBen = true; _accountant = Math.ceil(((Math.random() * MAX_ACCOUNTANT) / 0.8)); LoadMyConfig(); View.addEventListener("EnemyAnimationDieEnd", DispatchEvent); View.addEventListener("EnemyAnimationHitEnd", DispatchEvent); View.addEventListener("EnemyAnimationEnd", DispatchEvent); View.addEventListener("EnemyAnimationAttackEnd", DispatchEvent); View.addEventListener("EnemyAnimationAttackBegin", DispatchEvent); } private function ResetSecondStateMc(_arg1:Event):void{ var _local2:MovieClip; var _local3:TextField; GameTemplateMainApp.MyStage.removeEventListener(Event.RENDER, ResetSecondStateMc); switch (PrimaryState){ case Enemy.PRI_ST_IDLE: _secondaryStateMc = _primaryStateMc; break; case Enemy.PRI_ST_RUNNING: _secondaryStateMc = ((View.getChildByName("droide_mc") as MovieClip).getChildByName("brazo_mc") as MovieClip); break; case Enemy.PRI_ST_HIT: _secondaryStateMc = _primaryStateMc; break; case Enemy.PRI_ST_DIE: _secondaryStateMc = _primaryStateMc; _local2 = new CoinMCAsset(); _local3 = ((_local2.getChildByName("puntajePowerUp_mc") as MovieClip).getChildByName("puntajePowerUp_txt") as TextField); _local2.x = (View.x + OffsetFromLevelLayer.x); _local2.y = (View.y + OffsetFromLevelLayer.y); _local3.text = String(ScoreForDeath); LayerFactory.Instance.GetLayer(LayerFactory.LAYER_GAME_LAYER).addChild(_local2); break; }; if (PrimaryState != Enemy.PRI_ST_DIE){ TryNewSecondaryState(Enemy.SEC_ST_IDLE); }; } public function DispatchEvent(_arg1:Event):void{ switch (_arg1.type){ case "EnemyAnimationHitEnd": TryNewPrimaryState(Enemy.PRI_ST_IDLE); break; case "EnemyAnimationEnd": TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "EnemyAnimationDieEnd": View.visible = false; HUDManager.Instance.AddScore(ScoreForDeath); break; case "EnemyAnimationAttackEnd": TryNewPrimaryState(Enemy.SEC_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "EnemyAnimationAttackBegin": _globalShotPosition = View.localToGlobal(new Point()); _globalShotPosition.y = (_globalShotPosition.y + _posYShot); _globalShotPosition.x = (_globalShotPosition.x + ((Direction)==1) ? _posXShot : -(_posXShot)); ManagerShotsEnemy.AddShot(_globalShotPosition, View.scaleX, View.rotation, EnergyToSubtractBenShot); Sfx.PlaySound(Sfx.SFX_ENEMY_SHOT); break; }; } public function LoadMyConfig():void{ Fragility = ConfigLoader.Instance.Config["DroideBlueFragility"]; EnergyToSubtractBenAttack = ConfigLoader.Instance.Config["DroideBlueEnergySubtractsForAttack"]; EnergyToSubtractBenShot = ConfigLoader.Instance.Config["DroideBlueEnergySubtractsForShot"]; EnergyToSubtractBenHit = ConfigLoader.Instance.Config["DroideBlueEnergySubtractsForHit"]; MAX_ACCOUNTANT = ConfigLoader.Instance.Config["DroideBlueMaxAccountant"]; ScoreForDeath = ConfigLoader.Instance.Config["DroideBlueScoreForDeath"]; MIN_DISTANCE_OF_BEN = ConfigLoader.Instance.Config["DroideBlueMinDistanceOfBen"]; _posXShot = ConfigLoader.Instance.Config["DroideBluePositionShotX"]; _posYShot = ConfigLoader.Instance.Config["DroideBluePositionShotY"]; } private function CurrentPlatformIsMoves():void{ if (CurrentPlatform != null){ if (CurrentPlatform.Moves){ PreviousAbsoluteY = CurrentAbsoluteY; PreviousAbsoluteX = CurrentAbsoluteX; CurrentAbsoluteX = (CurrentAbsoluteX + (CurrentPlatform.X - CurrentPlatformPreviousX)); CurrentAbsoluteY = (CurrentAbsoluteY + (CurrentPlatform.Y - CurrentPlatformPreviousY)); CurrentPlatformPreviousX = CurrentPlatform.X; CurrentPlatformPreviousY = CurrentPlatform.Y; }; }; } override public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case Enemy.PRI_ST_IDLE: PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_HIT: PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_DIE: PrimaryState = _arg1; _local2 = true; Dead = true; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } public function ShotsEnemy():void{ TryNewSecondaryState(Enemy.SEC_ST_ATTACK); } override public function GotoSecondaryStateAnimation(_arg1:int):void{ if (_secondaryStateMc == null){ return; }; _secondaryStateMc.gotoAndStop(_secondaryStateLabels[_arg1]); } override public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMc == null){ return; }; GameTemplateMainApp.MyStage.addEventListener(Event.RENDER, ResetSecondStateMc); GameTemplateMainApp.MyStage.invalidate(); _primaryStateMc.gotoAndStop(_primaryStateLabels[_arg1]); } override public function TryNewSecondaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == SecondaryState){ return (false); }; _local2 = false; switch (_arg1){ case Enemy.SEC_ST_IDLE: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_RUN: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_ATTACK: if (SecondaryState == Enemy.SEC_ST_IDLE){ SecondaryState = _arg1; _local2 = true; }; break; }; if (_local2){ GotoSecondaryStateAnimation(_arg1); }; return (_local2); } override public function Update(_arg1:Number):void{ var _local2:int; var _local3:Number; if (((Dead) || (BenTen.Dead))){ if (BenTen.Dead){ if (Dead){ View.visible = false; }; TryNewPrimaryState(Enemy.PRI_ST_IDLE); }; this.CurrentPlatformIsMoves(); return; }; if (PrimaryState == Enemy.PRI_ST_HIT){ this.CurrentPlatformIsMoves(); return; }; TryNewPrimaryState(Enemy.PRI_ST_IDLE); _local2 = (BenTen.X - (View.x + OffsetFromLevelLayer.x)); _local3 = MovieClipUtils.Instance.GetScreenPosition(View).x; if ((((((_local2 < MIN_DISTANCE_OF_BEN)) && ((_local3 > 0)))) && ((_local3 < 600)))){ Active = true; } else { Active = false; }; if (((Active) && (GoOnBen))){ if (_local2 < View.width){ Direction = -1; View.scaleX = -(Direction); } else { if (_local2 > View.width){ Direction = 1; View.scaleX = -(Direction); }; }; }; this.CurrentPlatformIsMoves(); if (_accountant < MAX_ACCOUNTANT){ _accountant++; } else { if (Active){ this.ShotsEnemy(); }; _accountant = 0; }; } } }//package enemies
Section 252
//DroideGreen (enemies.DroideGreen) package enemies { import flash.events.*; import flash.display.*; import ui.*; import model.*; import flash.geom.*; import flash.text.*; import utils.*; import config.*; import view.*; import assets.*; public class DroideGreen extends Enemy { private var _posXShot:int; private var _globalShotPosition:Point; private var _accountant:int;// = 0 private var MAX_ACCOUNTANT:int; private var _radianesRotation:Number; private var _posYShot:int; private var MIN_DISTANCE_OF_BEN:int; private var _dxy:Number; private var _nextX:Number; private var _nextY:Number; public function DroideGreen(_arg1:MovieClip, _arg2:Character, _arg3:ShotsEnemyManager, _arg4:int, _arg5:Point){ _accountant = 0; super(_arg1, _arg2, _arg3, _arg4, _arg5); Type = 3; Direction = 0; SpeedX = 0; SpeedY = 0; GoOnBen = true; _radianesRotation = 0; _dxy = 20; _nextX = 0; _nextY = 0; _accountant = Math.ceil(((Math.random() * MAX_ACCOUNTANT) / 0.8)); LoadMyConfig(); TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); View.addEventListener("EnemyAnimationDieEnd", DispatchEvent); View.addEventListener("EnemyAnimationHitEnd", DispatchEvent); View.addEventListener("EnemyAnimationEnd", DispatchEvent); View.addEventListener("EnemyAnimationAttackEnd", DispatchEvent); } private function ResetSecondStateMc(_arg1:Event):void{ var _local2:MovieClip; var _local3:TextField; GameTemplateMainApp.MyStage.removeEventListener(Event.RENDER, ResetSecondStateMc); switch (PrimaryState){ case Enemy.PRI_ST_IDLE: _secondaryStateMc = _primaryStateMc; break; case Enemy.PRI_ST_DIE: _secondaryStateMc = _primaryStateMc; _local2 = new CoinMCAsset(); _local3 = ((_local2.getChildByName("puntajePowerUp_mc") as MovieClip).getChildByName("puntajePowerUp_txt") as TextField); _local2.x = (View.x + OffsetFromLevelLayer.x); _local2.y = (View.y + OffsetFromLevelLayer.y); _local3.text = String(ScoreForDeath); LayerFactory.Instance.GetLayer(LayerFactory.LAYER_GAME_LAYER).addChild(_local2); break; }; } public function DispatchEvent(_arg1:Event):void{ switch (_arg1.type){ case "EnemyAnimationHitEnd": TryNewPrimaryState(Enemy.PRI_ST_IDLE); break; case "EnemyAnimationEnd": TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "EnemyAnimationAttackEnd": TryNewPrimaryState(Enemy.SEC_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "EnemyAnimationDieEnd": View.visible = false; HUDManager.Instance.AddScore(ScoreForDeath); break; }; } public function LoadMyConfig():void{ Fragility = ConfigLoader.Instance.Config["DroideGreenFragility"]; EnergyToSubtractBenAttack = ConfigLoader.Instance.Config["DroideGreenEnergySubtractsForAttack"]; EnergyToSubtractBenShot = ConfigLoader.Instance.Config["DroideGreenEnergySubtractsForShot"]; EnergyToSubtractBenHit = ConfigLoader.Instance.Config["DroideGreenEnergySubtractsForHit"]; MAX_ACCOUNTANT = ConfigLoader.Instance.Config["DroideGreenMaxAccountant"]; ScoreForDeath = ConfigLoader.Instance.Config["DroideGreenScoreForDeath"]; MIN_DISTANCE_OF_BEN = ConfigLoader.Instance.Config["DroideGreenMinDistanceOfBen"]; ModSpeed = ConfigLoader.Instance.Config["DroideGreenVelocity"]; _posXShot = ConfigLoader.Instance.Config["DroideGreenPositionShotX"]; _posYShot = ConfigLoader.Instance.Config["DroideGreenPositionShotY"]; } override public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case Enemy.PRI_ST_IDLE: PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_HIT: PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_DIE: PrimaryState = _arg1; _local2 = true; Dead = true; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } public function ShotsEnemy():void{ TryNewSecondaryState(Enemy.SEC_ST_ATTACK); _globalShotPosition = View.localToGlobal(new Point()); _globalShotPosition.y = (_globalShotPosition.y + _posYShot); _globalShotPosition.x = (_globalShotPosition.x + ((Direction)==1) ? _posXShot : -(_posXShot)); ManagerShotsEnemy.AddShot(_globalShotPosition, 0, View.rotation, EnergyToSubtractBenShot, BenTen.View.localToGlobal(new Point())); Sfx.PlaySound(Sfx.SFX_ENEMY_SHOT); } override public function GotoSecondaryStateAnimation(_arg1:int):void{ if (_secondaryStateMc == null){ return; }; _secondaryStateMc.gotoAndStop(_secondaryStateLabels[_arg1]); } override public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMc == null){ return; }; GameTemplateMainApp.MyStage.addEventListener(Event.RENDER, ResetSecondStateMc); GameTemplateMainApp.MyStage.invalidate(); _primaryStateMc.gotoAndStop(_primaryStateLabels[_arg1]); } override public function TryNewSecondaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == SecondaryState){ return (false); }; _local2 = false; switch (_arg1){ case Enemy.SEC_ST_IDLE: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_ATTACK: if (SecondaryState == Enemy.SEC_ST_IDLE){ SecondaryState = _arg1; _local2 = true; }; break; }; if (_local2){ GotoSecondaryStateAnimation(_arg1); }; return (_local2); } override public function Update(_arg1:Number):void{ var _local2:int; var _local3:Number; if (((Dead) || (BenTen.Dead))){ if (((BenTen.Dead) && (!((SecondaryState == SEC_ST_ATTACK))))){ if (Dead){ View.visible = false; }; }; return; }; if (PrimaryState == Enemy.PRI_ST_HIT){ return; }; if (_accountant < MAX_ACCOUNTANT){ _accountant++; } else { if (Active){ this.ShotsEnemy(); }; _accountant = 0; }; PreviousAbsoluteX = CurrentAbsoluteX; PreviousAbsoluteY = CurrentAbsoluteY; _local2 = (BenTen.X - (View.x + OffsetFromLevelLayer.x)); _local3 = MovieClipUtils.Instance.GetScreenPosition(View).x; if ((((((_local2 < MIN_DISTANCE_OF_BEN)) && ((_local3 > 0)))) && ((_local3 < 600)))){ Active = true; } else { Active = false; }; if (_local2 < 0){ View.scaleX = 1; } else { if (_local2 > 0){ View.scaleX = -1; }; }; if (Active){ _nextX = (Math.abs(ModSpeed) * Math.cos(_radianesRotation)); _nextY = (Math.abs(ModSpeed) * Math.sin(_radianesRotation)); if (_nextX > SpeedX){ SpeedX = (SpeedX + _dxy); } else { SpeedX = (SpeedX - _dxy); }; if (_nextY > SpeedY){ SpeedY = (SpeedY + _dxy); } else { SpeedY = (SpeedY - _dxy); }; if (SpeedX != 0){ PreviousAbsoluteX = CurrentAbsoluteX; CurrentAbsoluteX = (CurrentAbsoluteX + (SpeedX * _arg1)); }; if (SpeedY != 0){ PreviousAbsoluteY = CurrentAbsoluteY; CurrentAbsoluteY = (CurrentAbsoluteY + (SpeedY * _arg1)); }; }; } override public function Flecha(_arg1:Number, _arg2:int):void{ _radianesRotation = ((_arg1 * Math.PI) / 180); } } }//package enemies
Section 253
//DroideRed (enemies.DroideRed) package enemies { import flash.events.*; import flash.display.*; import ui.*; import model.*; import flash.geom.*; import flash.text.*; import config.*; import view.*; import assets.*; public class DroideRed extends Enemy { private var _jumpingPoseMc:MovieClip;// = null private var MIN_DISTANCE_OF_BEN:int; public function DroideRed(_arg1:MovieClip, _arg2:Character, _arg3:ShotsEnemyManager, _arg4:int, _arg5:Point){ var _local6:Number; _jumpingPoseMc = null; super(_arg1, _arg2, _arg3, _arg4, _arg5); Type = 2; Direction = 0; SpeedX = 0; SpeedY = 0; GoOnBen = true; ModSpeed = (Character.MAX_SPEED_X * 0.2); HitAreaAttack = MovieClip(View.getChildByName("hitAreaAttack_mc")); View.addEventListener("EnemyAnimationDieEnd", DispatchEvent); View.addEventListener("EnemyAnimationHitEnd", DispatchEvent); View.addEventListener("EnemyAnimationEnd", DispatchEvent); View.addEventListener("EnemyAnimationAttackEnd", DispatchEvent); View.addEventListener("EnemyAnimationFallEnd", DispatchEvent); TryNewPrimaryState(Enemy.PRI_ST_IDLE); _local6 = Math.random(); if (_local6 < 0.5){ View.scaleX = -1; Direction = 1; } else { View.scaleX = 1; Direction = -1; }; LoadMyConfig(); } private function ResetSecondStateMc(_arg1:Event):void{ var _local2:MovieClip; var _local3:TextField; GameTemplateMainApp.MyStage.removeEventListener(Event.RENDER, ResetSecondStateMc); switch (PrimaryState){ case Enemy.PRI_ST_IDLE: _secondaryStateMc = ((View.getChildByName("droide_mc") as MovieClip).getChildByName("brazo_mc") as MovieClip); break; case Enemy.PRI_ST_RUNNING: _secondaryStateMc = ((View.getChildByName("droide_mc") as MovieClip).getChildByName("brazo_mc") as MovieClip); break; case Enemy.PRI_ST_HIT: case Enemy.PRI_ST_FALL: _secondaryStateMc = _primaryStateMc; break; case Enemy.PRI_ST_DIE: _secondaryStateMc = _primaryStateMc; _local2 = new CoinMCAsset(); _local3 = ((_local2.getChildByName("puntajePowerUp_mc") as MovieClip).getChildByName("puntajePowerUp_txt") as TextField); _local2.x = (View.x + OffsetFromLevelLayer.x); _local2.y = (View.y + OffsetFromLevelLayer.y); _local3.text = String(ScoreForDeath); LayerFactory.Instance.GetLayer(LayerFactory.LAYER_GAME_LAYER).addChild(_local2); break; case Enemy.PRI_ST_JUMPING: _jumpingPoseMc = MovieClip(View.getChildByName("droide_mc")); _secondaryStateMc = MovieClip(View.getChildByName("droide_mc")); break; }; } public function DispatchEvent(_arg1:Event):void{ switch (_arg1.type){ case "EnemyAnimationHitEnd": TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "EnemyAnimationEnd": TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "EnemyAnimationFallEnd": TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "EnemyAnimationDieEnd": View.visible = false; HUDManager.Instance.AddScore(ScoreForDeath); break; case "EnemyAnimationAttackEnd": GoOnBen = false; TryNewSecondaryState(PrimaryState); break; }; } public function LoadMyConfig():void{ Fragility = ConfigLoader.Instance.Config["DroideRedFragility"]; EnergyToSubtractBenAttack = ConfigLoader.Instance.Config["DroideRedEnergySubtractsForAttack"]; EnergyToSubtractBenShot = ConfigLoader.Instance.Config["DroideRedEnergySubtractsForShot"]; EnergyToSubtractBenHit = ConfigLoader.Instance.Config["DroideRedEnergySubtractsForHit"]; ScoreForDeath = ConfigLoader.Instance.Config["DroideRedScoreForDeath"]; MIN_DISTANCE_OF_BEN = ConfigLoader.Instance.Config["DroideRedMinDistanceOfBen"]; } public function FlipView():void{ var _local1:int; _local1 = (BenTen.X - (View.x + OffsetFromLevelLayer.x)); if ((((((_local1 > 100)) && (!(GoOnBen)))) && ((Direction == 1)))){ View.scaleX = 1; Direction = -1; } else { if ((((((_local1 < -100)) && (!(GoOnBen)))) && ((Direction == -1)))){ View.scaleX = -1; Direction = 1; }; }; } private function CurrentPlatformIsMoves():void{ if (CurrentPlatform != null){ if (CurrentPlatform.Moves){ PreviousAbsoluteY = CurrentAbsoluteY; PreviousAbsoluteX = CurrentAbsoluteX; CurrentAbsoluteX = (CurrentAbsoluteX + (CurrentPlatform.X - CurrentPlatformPreviousX)); CurrentAbsoluteY = (CurrentAbsoluteY + (CurrentPlatform.Y - CurrentPlatformPreviousY)); CurrentPlatformPreviousX = CurrentPlatform.X; CurrentPlatformPreviousY = CurrentPlatform.Y; }; }; } override public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case Enemy.PRI_ST_IDLE: PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_HIT: PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_FALL: PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_RUNNING: if (Jumping){ break; }; PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_JUMPING: if (SecondaryState == Enemy.SEC_ST_ATTACK){ break; }; PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_DIE: PrimaryState = _arg1; _local2 = true; Dead = true; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } override public function DownConditional():void{ } override public function UpObligatory():void{ if (((!((CurrentPlatform == null))) && ((PrimaryState == Enemy.PRI_ST_RUNNING)))){ PreviousSpeedY = SpeedY; SpeedY = -(Enemy.MAX_JUMP_STRENGTH); CurrentPlatform = null; Jumping = true; TryNewPrimaryState(PRI_ST_JUMPING); Sfx.PlaySound(Sfx.SFX_ENEMY_JUMP); }; } override public function GotoSecondaryStateAnimation(_arg1:int):void{ if (_secondaryStateMc == null){ return; }; if (PrimaryState != Enemy.PRI_ST_HIT){ _secondaryStateMc.gotoAndStop(_secondaryStateLabels[_arg1]); }; } override public function UpConditional():void{ if ((BenTen.CurrentAbsoluteY + (View.height / 2)) >= CurrentAbsoluteY){ return; }; if (CurrentPlatform != null){ PreviousSpeedY = SpeedY; SpeedY = -(Enemy.MAX_JUMP_STRENGTH); CurrentPlatform = null; Jumping = true; TryNewPrimaryState(PRI_ST_JUMPING); Sfx.PlaySound(Sfx.SFX_ENEMY_JUMP); }; } override public function DownObligatory():void{ } override public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMc == null){ return; }; GameTemplateMainApp.MyStage.addEventListener(Event.RENDER, ResetSecondStateMc); GameTemplateMainApp.MyStage.invalidate(); _primaryStateMc.gotoAndStop(_primaryStateLabels[_arg1]); } override public function LeftConditional():void{ if (View.scaleX < 0){ Direction = -1; View.scaleX = (View.scaleX * -1); GoOnBen = true; }; } override public function TryNewSecondaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == SecondaryState){ return (false); }; _local2 = false; switch (_arg1){ case Enemy.SEC_ST_IDLE: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_RUN: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_ATTACK: if (PrimaryState == Enemy.PRI_ST_JUMPING){ break; }; SecondaryState = _arg1; _local2 = true; break; }; if (_local2){ GotoSecondaryStateAnimation(_arg1); }; return (_local2); } override public function RightConditional():void{ if (View.scaleX > 0){ Direction = 1; View.scaleX = (View.scaleX * -1); GoOnBen = true; }; } override public function RightObligatory():void{ if (View.scaleX > 0){ Direction = 1; View.scaleX = (View.scaleX * -1); GoOnBen = false; }; } override public function Update(_arg1:Number):void{ var _local2:int; if (((Dead) || (BenTen.Dead))){ if (((BenTen.Dead) && (!((SecondaryState == SEC_ST_ATTACK))))){ if (Dead){ View.visible = false; }; TryNewPrimaryState(Enemy.PRI_ST_IDLE); }; this.CurrentPlatformIsMoves(); return; }; if (PrimaryState == Enemy.PRI_ST_HIT){ this.CurrentPlatformIsMoves(); return; }; _local2 = (BenTen.X - (View.x + OffsetFromLevelLayer.x)); if (View.name == "problemDroid"){ trace(("distanceOfBen: " + _local2)); }; if (Math.abs(_local2) < MIN_DISTANCE_OF_BEN){ Active = true; } else { TryNewPrimaryState(Enemy.PRI_ST_IDLE); Active = false; }; if (CurrentPlatform != null){ if (CurrentPlatform.Moves){ Active = true; }; }; if (Active){ if ((((((((_local2 > 100)) && (GoOnBen))) && (RangeOfVision()))) && ((Direction == -1)))){ View.scaleX = (View.scaleX * -1); Direction = 1; } else { if ((((((((_local2 < -100)) && (GoOnBen))) && (RangeOfVision()))) && ((Direction == 1)))){ View.scaleX = (View.scaleX * -1); Direction = -1; }; }; if (Direction != 0){ PreviousSpeedX = SpeedX; SpeedX = (ModSpeed * Direction); }; if (CurrentPlatform == null){ PreviousSpeedY = SpeedY; SpeedY = (SpeedY + (GRAVITY * _arg1)); if (SpeedY > MAX_SPEED_Y){ SpeedY = MAX_SPEED_Y; }; UpdateAirPose((SpeedY > 0)); } else { PreviousSpeedY = SpeedY; SpeedY = 0; this.CurrentPlatformIsMoves(); }; if (SpeedX != 0){ if (((((!((SecondaryState == Enemy.SEC_ST_ATTACK))) && (!((PrimaryState == Enemy.PRI_ST_HIT))))) && (!((PrimaryState == Enemy.PRI_ST_FALL))))){ TryNewPrimaryState(Enemy.PRI_ST_RUNNING); TryNewSecondaryState(Enemy.SEC_ST_RUN); }; if ((((PrimaryState == Enemy.PRI_ST_RUNNING)) || ((PrimaryState == Enemy.PRI_ST_JUMPING)))){ PreviousAbsoluteX = CurrentAbsoluteX; CurrentAbsoluteX = (CurrentAbsoluteX + (SpeedX * _arg1)); }; } else { if (SecondaryState != Enemy.SEC_ST_ATTACK){ TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_RUN); }; }; if (SpeedY != 0){ PreviousAbsoluteY = CurrentAbsoluteY; CurrentAbsoluteY = (CurrentAbsoluteY + (SpeedY * _arg1)); }; }; } override public function LeftObligatory():void{ if (View.scaleX < 0){ Direction = -1; View.scaleX = (View.scaleX * -1); GoOnBen = false; }; } public function RangeOfVision():Boolean{ return (true); } override public function UpdateAirPose(_arg1:Boolean):void{ if (_jumpingPoseMc != null){ if (_arg1){ if (((!((_jumpingPoseMc.currentFrame == 10))) && ((_jumpingPoseMc.currentFrame < 10)))){ _jumpingPoseMc.gotoAndStop(10); } else { if (_jumpingPoseMc.currentFrame < 19){ _jumpingPoseMc.nextFrame(); }; }; }; if (!_arg1){ if (((!((_jumpingPoseMc.currentFrame == 1))) && ((_jumpingPoseMc.currentFrame > 10)))){ _jumpingPoseMc.gotoAndStop(1); } else { if (_jumpingPoseMc.currentFrame < 10){ _jumpingPoseMc.nextFrame(); }; }; }; }; } } }//package enemies
Section 254
//EnemiesIAMarks (enemies.EnemiesIAMarks) package enemies { import flash.display.*; import flash.geom.*; import collision.*; public class EnemiesIAMarks implements ICollidable { private var _hitArea:MovieClip; private var _view:MovieClip; private var _offsetFromLevelLayer:Point;// = null private var _action:String; public function EnemiesIAMarks(_arg1:MovieClip, _arg2:Point){ _offsetFromLevelLayer = null; super(); _view = _arg1; _offsetFromLevelLayer = _arg2.clone(); _hitArea = (_view.getChildByName("hitArea_mc") as MovieClip); if (_hitArea == null){ _hitArea = _view; } else { _hitArea.alpha = 0; }; _action = _view.currentLabel; _view.alpha = 0; } public function get View():MovieClip{ return (_view); } public function get OffsetFromLevelLayer():Point{ return (_offsetFromLevelLayer); } public function get BottomGlobalY():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.y + _local1.height)); } public function GetCollisionSprite():Sprite{ if (_hitArea == null){ return (null); }; return (Sprite(_hitArea)); } public function GetType():int{ return (8); } public function GetGlobalCenterPoint():Point{ var _local1:Rectangle; if ((((_hitArea == null)) || ((_hitArea.stage == null)))){ return (null); }; _local1 = _hitArea.getBounds(_hitArea.stage); return (new Point(((_local1.x + _local1.width) >> 1), ((_local1.y + _local1.height) >> 1))); } public function get Action():String{ return (_action); } public function get TopGlobalY():Number{ return (_hitArea.getBounds(_hitArea.stage).y); } public function SetType(_arg1:int):void{ } public function GetRadio():int{ if (_hitArea == null){ return (0); }; return (((Math.max(_hitArea.width, _hitArea.height) >> 1) + 1)); } public function get LeftGlobalX():Number{ return (_hitArea.getBounds(_hitArea.stage).x); } public function get RightGlobalX():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.x + _local1.width)); } } }//package enemies
Section 255
//Enemy (enemies.Enemy) package enemies { import flash.display.*; import flash.utils.*; import ui.*; import game.*; import model.*; import flash.geom.*; import collision.*; import config.*; public class Enemy implements ICollidable { private var _direction:int; private var _speedX:Number; private var _speedY:Number; private var _accountantTinte:int;// = 0 private var _type:int; private var _active:Boolean; private var gravity:Number; protected var _secondaryStateMc:MovieClip; private var _energyToSubtractBenHit:int; private var _markIAEnable:String; private var _oldSpeedX:Number; private var _fragility:Number; private var _oldSpeedY:Number; private var _sublevel:int;// = 1 private var max_speed_y:int; private var _timeOfVariation:int;// = 0 protected var _secondaryStateLabels:Dictionary; private var _colorTinte:uint;// = 0 protected var _currentPlatform:Platform; private var _hit:Boolean;// = false private var _goOnBen:Boolean; protected var _previousPrimaryState:int; private var _jumpStrengthRemaining:int; private var _hitAreaAttack:MovieClip;// = null protected var _primaryStateLabels:Dictionary; private var _dead:Boolean;// = false private var _action:int; private var _timeOfDuration:int;// = 0 private var running_velocity:int; protected var _previousSecondaryState:int; private var _hitArea:MovieClip; private var _view:MovieClip;// = null protected var _primaryState:int;// = -1 private var _energyToSubtractBenShot:int; private var max_jump_strength:int; private var _energyToSubtractBenAttack:int; protected var _secondaryState:int;// = -1 private var _energy:Number; private var _character:Character; private var _alphaTinte:Number;// = 0 private var _jumping:Boolean; private var _modSpeed:Number; private var _offsetFromLevelLayer:Point;// = null protected var _primaryStateMc:MovieClip; private var jump_velocity:int; private var _tinte:Boolean;// = false private var _scoreForDeath:int; private var _shotsEnemyManager:ShotsEnemyManager; private var _oldX:Number; private var _oldY:Number; protected var _currentPlatformPreviousX:Number; protected var _currentPlatformPreviousY:Number; public static const SEC_ST_LEFTATTACKTWO_LBL:String = "leftAttackTwo"; public static const PRI_ST_JUMPING_LBL:String = "jump"; public static const ACTION_DOWN:uint = 4; public static const PRI_ST_IDLE_LBL:String = "idle"; public static const SEC_ST_RIGHTATTACKONE:int = 5; public static const PRI_ST_DIE_LBL:String = "die"; public static const ACTION_FIREX:uint = 6; public static const ACTION_FIREZ:uint = 5; public static const ACTION_SPACE:uint = 7; public static const SEC_ST_LEFTATTACKONE_LBL:String = "leftAttackOne"; public static const ACTION_NONE:uint = 0; public static const SEC_ST_SUPERATTACK_LBL:String = "superAttack"; public static const PRI_ST_HIT_LBL:String = "hit"; public static const SEC_ST_LEFTATTACKTWO:int = 7; public static const PRI_ST_JUMPING:int = 2; public static const SEC_ST_ATTACK_LBL:String = "attack"; public static const ACTION_RIGHT:uint = 2; public static const PRI_ST_FALL_LBL:String = "fall"; public static const SEC_ST_RUN_LBL:String = "run"; public static const PRI_ST_IDLE:int = 0; public static const SEC_ST_IDLE_LBL:String = "idle"; public static const PRI_ST_DIE:int = 4; public static const ACTION_UP:uint = 3; public static const MAX_SPEED_X:int = 300; public static const MAX_SPEED_Y:int = 10000; public static const SEC_ST_LEFTATTACKONE:int = 3; public static const PRI_ST_HIT:int = 3; public static const PRI_ST_RUNNING_LBL:String = "run"; public static const SEC_ST_SUPERATTACK:int = 9; public static const SEC_ST_RIGHTATTACKTWO_LBL:String = "rightAttackTwo"; public static const SEC_ST_ATTACK:int = 2; public static const SEC_ST_RUN:int = 1; public static const PRI_ST_FALL:int = 5; public static const SEC_ST_IDLE:int = 0; public static const SEC_ST_RIGHTATTACKONE_LBL:String = "rightAttackOne"; public static const ACTION_LEFT:uint = 1; public static const SEC_ST_RIGHTATTACKTWO:int = 8; public static const PRI_ST_RUNNING:int = 1; public static const MAX_JUMP_STRENGTH:int = 400; public function Enemy(_arg1:MovieClip, _arg2:Character, _arg3:ShotsEnemyManager, _arg4:int, _arg5:Point){ _view = null; _dead = false; _primaryState = -1; _secondaryState = -1; _hitAreaAttack = null; _sublevel = 1; _offsetFromLevelLayer = null; _hit = false; _tinte = false; _accountantTinte = 0; _timeOfDuration = 0; _timeOfVariation = 0; _colorTinte = 0; _alphaTinte = 0; super(); _view = _arg1; _offsetFromLevelLayer = _arg5.clone(); _shotsEnemyManager = _arg3; _hitArea = (_view.getChildByName("hitArea_mc") as MovieClip); if (_hitArea == null){ _hitArea = _view; } else { _hitArea.alpha = 0; }; _character = _arg2; _primaryStateLabels = new Dictionary(); _secondaryStateLabels = new Dictionary(); _primaryStateLabels[Enemy.PRI_ST_IDLE] = Enemy.PRI_ST_IDLE_LBL; _primaryStateLabels[Enemy.PRI_ST_RUNNING] = Enemy.PRI_ST_RUNNING_LBL; _primaryStateLabels[Enemy.PRI_ST_JUMPING] = Enemy.PRI_ST_JUMPING_LBL; _primaryStateLabels[Enemy.PRI_ST_HIT] = Enemy.PRI_ST_HIT_LBL; _primaryStateLabels[Enemy.PRI_ST_DIE] = Enemy.PRI_ST_DIE_LBL; _primaryStateLabels[Enemy.PRI_ST_FALL] = Enemy.PRI_ST_FALL_LBL; _secondaryStateLabels[Enemy.SEC_ST_IDLE] = Enemy.SEC_ST_IDLE_LBL; _secondaryStateLabels[Enemy.SEC_ST_RUN] = Enemy.SEC_ST_RUN_LBL; _secondaryStateLabels[Enemy.SEC_ST_ATTACK] = Enemy.SEC_ST_ATTACK_LBL; _secondaryStateLabels[Enemy.SEC_ST_LEFTATTACKONE] = Enemy.SEC_ST_LEFTATTACKONE_LBL; _secondaryStateLabels[Enemy.SEC_ST_LEFTATTACKTWO] = Enemy.SEC_ST_LEFTATTACKTWO_LBL; _secondaryStateLabels[Enemy.SEC_ST_RIGHTATTACKONE] = Enemy.SEC_ST_RIGHTATTACKONE_LBL; _secondaryStateLabels[Enemy.SEC_ST_RIGHTATTACKTWO] = Enemy.SEC_ST_RIGHTATTACKTWO_LBL; _secondaryStateLabels[Enemy.SEC_ST_SUPERATTACK] = Enemy.SEC_ST_SUPERATTACK_LBL; _primaryStateMc = _view; _secondaryStateMc = null; Active = false; Energy = 100; LoadConfig(); _sublevel = _arg4; } public function GetGlobalCenterPoint():Point{ var _local1:Rectangle; if ((((_hitArea == null)) || ((_hitArea.stage == null)))){ return (null); }; _local1 = _hitArea.getBounds(_hitArea.stage); return (new Point(((_local1.x + _local1.width) >> 1), ((_local1.y + _local1.height) >> 1))); } public function get GoOnBen():Boolean{ return (_goOnBen); } public function set GoOnBen(_arg1:Boolean):void{ _goOnBen = _arg1; } public function set HitAreaAttack(_arg1:MovieClip):void{ _hitAreaAttack = _arg1; } public function get TopGlobalY():Number{ return (_hitArea.getBounds(_hitArea.stage).y); } public function set SpeedY(_arg1:Number):void{ _speedY = _arg1; } public function get AlphaTinte():Number{ return (_alphaTinte); } public function get GRAVITY():int{ return (gravity); } public function get AccountantTinte():int{ return (_accountantTinte); } public function set SpeedX(_arg1:Number):void{ _speedX = _arg1; } public function get MAX_SPEED_Y():int{ return (max_speed_y); } public function get BottomGlobalY():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.y + _local1.height)); } public function set Active(_arg1:Boolean):void{ _active = _arg1; } public function TryNewPrimaryState(_arg1:int):Boolean{ return (true); } public function get X():Number{ return (_view.x); } public function set AlphaTinte(_arg1:Number):void{ _alphaTinte = _arg1; } public function set AccountantTinte(_arg1:int):void{ _accountantTinte = _arg1; } public function DownConditional():void{ } public function GetRadio():int{ if (_hitArea == null){ return (0); }; return (((Math.max(_hitArea.width, _hitArea.height) >> 1) + 1)); } public function get PreviousPrimaryState():int{ return (_previousPrimaryState); } public function get CurrentAbsoluteX():Number{ return (_view.x); } public function get CurrentAbsoluteY():Number{ return (_view.y); } public function get PreviousAbsoluteX():Number{ return (_oldX); } public function get PreviousAbsoluteY():Number{ return (_oldY); } public function get Y():Number{ return (_view.y); } public function get PreviousSecondaryState():int{ return (_previousSecondaryState); } public function get Dead():Boolean{ return (_dead); } public function get ModSpeed():Number{ return (_modSpeed); } public function GetCollisionSprite():Sprite{ if (_hitArea == null){ return (null); }; return (Sprite(_hitArea)); } public function set ColorTinte(_arg1:uint):void{ _colorTinte = _arg1; } public function get HitArea():MovieClip{ return (_hitArea); } public function get Energy():Number{ return (_energy); } public function SetType(_arg1:int):void{ } public function get MarkIAEnable():String{ return (_markIAEnable); } public function get Tinte():Boolean{ return (_tinte); } public function set Y(_arg1:Number):void{ _view.y = _arg1; } public function set Type(_arg1:int):void{ _type = _arg1; } public function get EnergyToSubtractBenShot():int{ return (_energyToSubtractBenShot); } public function get CurrentPlatformPreviousY():Number{ return (_currentPlatformPreviousY); } public function set X(_arg1:Number):void{ _view.x = _arg1; } public function set EnergyToSubtractBenHit(_arg1:int):void{ _energyToSubtractBenHit = _arg1; } public function set TimeOfDuration(_arg1:int):void{ _timeOfDuration = _arg1; } public function get CurrentPlatformPreviousX():Number{ return (_currentPlatformPreviousX); } public function get View():MovieClip{ return (_view); } public function set Sublevel(_arg1:int):void{ _sublevel = _arg1; } public function UpConditional():void{ } public function set PreviousPrimaryState(_arg1:int):void{ _previousPrimaryState = _arg1; } public function set Direction(_arg1:int):void{ _direction = _arg1; } public function get TimeOfVariation():int{ return (_timeOfVariation); } public function set CurrentAbsoluteX(_arg1:Number):void{ _view.x = _arg1; } public function set CurrentAbsoluteY(_arg1:Number):void{ _view.y = _arg1; } public function DownObligatory():void{ } public function set PreviousAbsoluteY(_arg1:Number):void{ _oldY = _arg1; } public function GotoPrimaryStateAnimation(_arg1:int):void{ } public function TryNewSecondaryState(_arg1:int):Boolean{ return (true); } public function get Jumping():Boolean{ return (_jumping); } public function set PreviousSecondaryState(_arg1:int):void{ _previousSecondaryState = _arg1; } public function get PreviousSpeedY():Number{ return (_oldSpeedY); } public function RightConditional():void{ } public function set PreviousAbsoluteX(_arg1:Number):void{ _oldX = _arg1; } public function set Hit(_arg1:Boolean):void{ _hit = _arg1; } public function get LeftGlobalX():Number{ return (_hitArea.getBounds(_hitArea.stage).x); } public function get PreviousSpeedX():Number{ return (_oldSpeedX); } public function Update(_arg1:Number):void{ } public function get CurrentPlatform():Platform{ return (_currentPlatform); } public function get EnergyToSubtractBenAttack():int{ return (_energyToSubtractBenAttack); } public function get OffsetFromLevelLayer():Point{ return (_offsetFromLevelLayer); } public function get SpeedY():Number{ return (_speedY); } public function get HitAreaAttack():MovieClip{ return (_hitAreaAttack); } public function get SpeedX():Number{ return (_speedX); } public function set ModSpeed(_arg1:Number):void{ _modSpeed = _arg1; } public function Show():void{ _view.visible = true; } public function set Dead(_arg1:Boolean):void{ _dead = _arg1; } public function get Active():Boolean{ return (_active); } public function set SecondaryState(_arg1:int):void{ _previousSecondaryState = _secondaryState; _secondaryState = _arg1; } public function get ColorTinte():uint{ return (_colorTinte); } public function set MarkIAEnable(_arg1:String):void{ _markIAEnable = _arg1; } public function get TimeOfDuration():int{ return (_timeOfDuration); } public function get Type():int{ return (_type); } public function set Tinte(_arg1:Boolean):void{ _tinte = _arg1; } public function set EnergyToSubtractBenShot(_arg1:int):void{ _energyToSubtractBenShot = _arg1; } public function get Direction():int{ return (_direction); } public function Hide():void{ _view.visible = false; } public function get Sublevel():int{ return (_sublevel); } public function get EnergyToSubtractBenHit():int{ return (_energyToSubtractBenHit); } public function set Energy(_arg1:Number):void{ _energy = _arg1; } public function set CurrentPlatformPreviousX(_arg1:Number):void{ _currentPlatformPreviousX = _arg1; } public function set BenTen(_arg1:Character):void{ } public function set CurrentPlatformPreviousY(_arg1:Number):void{ _currentPlatformPreviousY = _arg1; } public function get MAX_JUMP_STRENGTH():int{ return (max_jump_strength); } public function set ManagerShotsEnemy(_arg1:ShotsEnemyManager){ _shotsEnemyManager = _arg1; } public function get RightGlobalX():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.x + _local1.width)); } public function get Hit():Boolean{ return (_hit); } public function get RUNNING_VELOCITY():int{ return (running_velocity); } public function UpObligatory():void{ } public function set ScoreForDeath(_arg1:int):void{ _scoreForDeath = _arg1; } public function TryTransformation(_arg1:int):void{ } public function GetType():int{ return (2); } public function GotoSecondaryStateAnimation(_arg1:int):void{ } public function set TimeOfVariation(_arg1:int):void{ _timeOfVariation = _arg1; } public function get SecondaryState():int{ return (_secondaryState); } public function set PrimaryState(_arg1:int):void{ _previousPrimaryState = _primaryState; _primaryState = _arg1; } public function set Jumping(_arg1:Boolean):void{ _jumping = _arg1; } public function set Fragility(_arg1:Number):void{ _fragility = _arg1; } public function get BenTen():Character{ return (_character); } public function get ManagerShotsEnemy():ShotsEnemyManager{ return (_shotsEnemyManager); } public function get ScoreForDeath():int{ return (_scoreForDeath); } public function RightObligatory():void{ } public function get PrimaryState():int{ return (_primaryState); } public function set PreviousSpeedX(_arg1:Number):void{ _oldSpeedX = _arg1; } public function get JUMP_VELOCITY():Number{ return (jump_velocity); } public function set CurrentPlatform(_arg1:Platform):void{ _currentPlatform = _arg1; if (PrimaryState == PRI_ST_HIT){ SpeedY = 0; }; if (_currentPlatform == null){ _jumping = true; if (PrimaryState != PRI_ST_HIT){ TryNewPrimaryState(PRI_ST_JUMPING); }; return; }; _jumping = false; _jumpStrengthRemaining = MAX_JUMP_STRENGTH; if (_arg1.Moves){ _currentPlatformPreviousX = _arg1.X; _currentPlatformPreviousY = _arg1.Y; }; } public function get Fragility():Number{ return (_fragility); } public function EnergySubtract(_arg1:Number){ var _local2:int; if (Dead){ return; }; _energy = (_energy - (_arg1 * Fragility)); if (GameManager.Instance.FinalLevel){ _local2 = (100 - Energy); if (_local2 > 0){ HUDManager.Instance.LifeBarBossMC.gotoAndStop(_local2); } else { if (_local2 == 0){ HUDManager.Instance.LifeBarBossMC.gotoAndStop(1); } else { HUDManager.Instance.LifeBarBossMC.gotoAndStop(100); }; }; }; if (_energy <= 0){ Dead = true; TryNewPrimaryState(Enemy.PRI_ST_DIE); PreviousSpeedX = 0; PreviousSpeedY = 0; SpeedX = 0; SpeedY = 0; if (Type == 5){ Sfx.PlaySound(Sfx.SFX_ENEMY_DIE, false, -1, 0, 2); } else { Sfx.PlaySound(Sfx.SFX_ENEMY_DIE); }; }; } public function set PreviousSpeedY(_arg1:Number):void{ _oldSpeedY = _arg1; } public function LeftConditional():void{ } public function LoadConfig():void{ running_velocity = ConfigLoader.Instance.Config["EnemyRunningVelocity"]; jump_velocity = ConfigLoader.Instance.Config["EnemyJumpVelocity"]; gravity = ConfigLoader.Instance.Config["EnemyGravity"]; max_speed_y = ConfigLoader.Instance.Config["EnemyMaxSpeedY"]; max_jump_strength = ConfigLoader.Instance.Config["EnemyMaxJumpStrength"]; } public function LeftObligatory():void{ } public function set EnergyToSubtractBenAttack(_arg1:int):void{ _energyToSubtractBenAttack = _arg1; } public function Flecha(_arg1:Number, _arg2:int):void{ } public function UpdateAirPose(_arg1:Boolean):void{ } } }//package enemies
Section 256
//EnemyManager (enemies.EnemyManager) package enemies { import game.*; import model.*; public class EnemyManager { private var _enemies:Array; private var _character:Character; public function Initialize():void{ Reset(); } public function AddEnemy(_arg1:Enemy):void{ _enemies[(_arg1.Sublevel - 1)].push(_arg1); } public function Update(_arg1:Number, _arg2:int, _arg3:int):void{ var _local4:Array; var _local5:int; var _local6:Enemy; _local4 = null; _local5 = (_arg2 - 1); while (_local5 < _arg3) { _local4 = (_enemies[_local5] as Array); for each (_local6 in _local4) { _local6.Update(_arg1); }; _local5++; }; } public function Reset():void{ var _local1:int; _enemies = new Array(); _local1 = 0; while (_local1 < GameManager.Instance.MaxSublevels) { _enemies.push(new Array()); _local1++; }; } } }//package enemies
Section 257
//FinalBossesOne (enemies.FinalBossesOne) package enemies { import flash.events.*; import flash.display.*; import ui.*; import game.*; import model.*; import com.gamesandweb.game.*; import flash.geom.*; import utils.*; import config.*; public class FinalBossesOne extends Enemy { private var _posXShot:int; private var _jumpingPoseMc:MovieClip;// = null private var _globalShotPosition:Point; private var _accountant:int; private var MAX_ACCOUNTANT:int; private var _posYShot:int; private var _accountTimeTinte:int;// = 0 public function FinalBossesOne(_arg1:MovieClip, _arg2:Character, _arg3:ShotsEnemyManager, _arg4:int, _arg5:Point){ _jumpingPoseMc = null; _accountTimeTinte = 0; super(_arg1, _arg2, _arg3, _arg4, _arg5); Type = 4; Direction = -1; SpeedX = 0; SpeedY = 0; GoOnBen = true; ModSpeed = (Character.MAX_SPEED_X * 0.2); _accountant = Math.ceil(((Math.random() * MAX_ACCOUNTANT) / 0.8)); HitAreaAttack = MovieClip(View.getChildByName("hitAreaAttack_mc")); View.addEventListener("BossesAnimationDieEnd", DispatchEvent); View.addEventListener("BossesAnimationHitEnd", DispatchEvent); View.addEventListener("BossesAnimationEnd", DispatchEvent); View.addEventListener("BossesAnimationAttackEnd", DispatchEvent); View.addEventListener("BossesAnimationAttackBegin", DispatchEvent); View.addEventListener("BossesAnimationFallEnd", DispatchEvent); TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); Active = false; AccountantTinte = 0; LoadMyConfig(); } private function ResetSecondStateMc(_arg1:Event):void{ GameTemplateMainApp.MyStage.removeEventListener(Event.RENDER, ResetSecondStateMc); switch (PrimaryState){ case Enemy.PRI_ST_IDLE: _secondaryStateMc = ((View.getChildByName("view_mc") as MovieClip).getChildByName("brazo_mc") as MovieClip); break; case Enemy.PRI_ST_RUNNING: _secondaryStateMc = ((View.getChildByName("view_mc") as MovieClip).getChildByName("brazo_mc") as MovieClip); break; case Enemy.PRI_ST_HIT: case Enemy.PRI_ST_FALL: _secondaryStateMc = _primaryStateMc; break; case Enemy.PRI_ST_DIE: _secondaryStateMc = _primaryStateMc; break; case Enemy.PRI_ST_JUMPING: _jumpingPoseMc = MovieClip(View.getChildByName("view_mc")); _secondaryStateMc = MovieClip(View.getChildByName("view_mc")); break; }; } public function DispatchEvent(_arg1:Event):void{ switch (_arg1.type){ case "BossesAnimationHitEnd": TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "BossesAnimationEnd": TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "BossesAnimationFallEnd": TryNewPrimaryState(Enemy.SEC_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "BossesAnimationDieEnd": View.visible = false; HUDManager.Instance.BossFinal(); if (GameManager.Instance.GameWinner){ Global.DispatchGameEvent("LevelComplete"); } else { GameManager.Instance.ActivePowerUp(); }; break; case "BossesAnimationAttackEnd": TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "BossesAnimationAttackBegin": _globalShotPosition = View.localToGlobal(new Point()); _globalShotPosition.y = (_globalShotPosition.y + _posYShot); _globalShotPosition.x = (_globalShotPosition.x + ((Direction)==1) ? _posXShot : -(_posXShot)); ManagerShotsEnemy.AddShot(_globalShotPosition, View.scaleX, Direction, EnergyToSubtractBenShot); Sfx.PlaySound(Sfx.SFX_ENEMY_SHOT); break; }; } public function LoadMyConfig():void{ Fragility = ConfigLoader.Instance.Config["BossesOneFragility"]; EnergyToSubtractBenAttack = ConfigLoader.Instance.Config["BossesOneEnergySubtractsForAttack"]; EnergyToSubtractBenShot = ConfigLoader.Instance.Config["BossesOneEnergySubtractsForShot"]; EnergyToSubtractBenHit = ConfigLoader.Instance.Config["BossesOneEnergySubtractsForHit"]; MAX_ACCOUNTANT = ConfigLoader.Instance.Config["BossesOneMaxAccountant"]; ScoreForDeath = ConfigLoader.Instance.Config["BossesOneScoreForDeath"]; _posXShot = ConfigLoader.Instance.Config["BossesOnePositionShotX"]; _posYShot = ConfigLoader.Instance.Config["BossesOnePositionShotY"]; TimeOfDuration = ConfigLoader.Instance.Config["BossesOneTimeOfDuration"]; TimeOfVariation = ConfigLoader.Instance.Config["BossesOneTimeOfVariation"]; ColorTinte = ConfigLoader.Instance.Config["BossesOneColorTinte"]; AlphaTinte = ConfigLoader.Instance.Config["BossesOneAlphaTinte"]; } private function CurrentPlatformIsMoves():void{ if (CurrentPlatform != null){ if (CurrentPlatform.Moves){ PreviousAbsoluteY = CurrentAbsoluteY; PreviousAbsoluteX = CurrentAbsoluteX; CurrentAbsoluteX = (CurrentAbsoluteX + (CurrentPlatform.X - CurrentPlatformPreviousX)); CurrentAbsoluteY = (CurrentAbsoluteY + (CurrentPlatform.Y - CurrentPlatformPreviousY)); CurrentPlatformPreviousX = CurrentPlatform.X; CurrentPlatformPreviousY = CurrentPlatform.Y; }; }; } override public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case Enemy.PRI_ST_IDLE: PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_HIT: if (!Hit){ Hit = true; }; break; case Enemy.PRI_ST_RUNNING: if (Jumping){ break; }; PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_FALL: PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_JUMPING: if ((((SecondaryState == Enemy.SEC_ST_ATTACK)) || ((SecondaryState == Enemy.SEC_ST_SUPERATTACK)))){ break; }; PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_DIE: PrimaryState = _arg1; _local2 = true; Dead = true; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } override public function DownConditional():void{ } public function ShotsEnemy():void{ TryNewSecondaryState(Enemy.SEC_ST_SUPERATTACK); } override public function UpObligatory():void{ if (((!((CurrentPlatform == null))) && ((PrimaryState == Enemy.PRI_ST_RUNNING)))){ PreviousSpeedY = SpeedY; SpeedY = -(Enemy.MAX_JUMP_STRENGTH); CurrentPlatform = null; Jumping = true; TryNewPrimaryState(PRI_ST_JUMPING); Sfx.PlaySound(Sfx.SFX_ENEMY_JUMP); }; } override public function GotoSecondaryStateAnimation(_arg1:int):void{ if (_secondaryStateMc == null){ return; }; _secondaryStateMc.gotoAndStop(_secondaryStateLabels[_arg1]); } override public function UpConditional():void{ if ((BenTen.CurrentAbsoluteY + (View.height / 2)) >= CurrentAbsoluteY){ return; }; if (CurrentPlatform != null){ PreviousSpeedY = SpeedY; SpeedY = -(Enemy.MAX_JUMP_STRENGTH); CurrentPlatform = null; Jumping = true; TryNewPrimaryState(PRI_ST_JUMPING); Sfx.PlaySound(Sfx.SFX_ENEMY_JUMP); }; } override public function DownObligatory():void{ } override public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMc == null){ return; }; GameTemplateMainApp.MyStage.addEventListener(Event.RENDER, ResetSecondStateMc); GameTemplateMainApp.MyStage.invalidate(); _primaryStateMc.gotoAndStop(_primaryStateLabels[_arg1]); } override public function LeftConditional():void{ if (View.scaleX < 0){ Direction = -1; View.scaleX = (View.scaleX * -1); GoOnBen = true; }; } override public function TryNewSecondaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == SecondaryState){ return (false); }; _local2 = false; switch (_arg1){ case Enemy.SEC_ST_IDLE: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_RUN: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_ATTACK: if ((((((SecondaryState == Enemy.SEC_ST_SUPERATTACK)) || ((PrimaryState == Enemy.PRI_ST_JUMPING)))) || ((PrimaryState == Enemy.PRI_ST_FALL)))){ break; }; SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_SUPERATTACK: if ((((((SecondaryState == Enemy.SEC_ST_ATTACK)) || ((PrimaryState == Enemy.PRI_ST_JUMPING)))) || ((PrimaryState == Enemy.PRI_ST_FALL)))){ break; }; SecondaryState = _arg1; _local2 = true; break; }; if (_local2){ GotoSecondaryStateAnimation(_arg1); }; return (_local2); } override public function RightConditional():void{ if (View.scaleX > 0){ Direction = 1; View.scaleX = (View.scaleX * -1); GoOnBen = true; }; } override public function RightObligatory():void{ if (View.scaleX > 0){ Direction = 1; View.scaleX = (View.scaleX * -1); }; } override public function Update(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4:int; EnergySubtract(0); if (((Dead) || (BenTen.Dead))){ if (BenTen.Dead){ if (Dead){ View.visible = false; HUDManager.Instance.BossFinal(); if (GameManager.Instance.GameWinner){ Global.DispatchGameEvent("LevelComplete"); } else { GameManager.Instance.ActivePowerUp(); }; }; if (CurrentPlatform != null){ TryNewPrimaryState(Enemy.PRI_ST_IDLE); }; }; this.CurrentPlatformIsMoves(); return; }; if (PrimaryState == Enemy.PRI_ST_HIT){ this.CurrentPlatformIsMoves(); return; }; _local2 = MovieClipUtils.Instance.GetScreenPosition(BenTen.View).x; _local3 = MovieClipUtils.Instance.GetScreenPosition(View).x; Active = true; if (Active){ if ((((_local2 < _local3)) && ((Direction == -1)))){ GoOnBen = true; }; if ((((_local2 > _local3)) && ((Direction == 1)))){ GoOnBen = true; }; _local4 = (BenTen.X - (View.x + OffsetFromLevelLayer.x)); if ((((((_local4 < -50)) && (GoOnBen))) && (RangeOfVision()))){ View.scaleX = 1; Direction = -1; } else { if ((((((_local4 > 50)) && (GoOnBen))) && (RangeOfVision()))){ View.scaleX = -1; Direction = 1; }; }; if (Direction != 0){ PreviousSpeedX = SpeedX; SpeedX = (ModSpeed * Direction); }; if (CurrentPlatform == null){ PreviousSpeedY = SpeedY; SpeedY = (SpeedY + (GRAVITY * _arg1)); if (SpeedY > MAX_SPEED_Y){ SpeedY = MAX_SPEED_Y; }; UpdateAirPose((SpeedY > 0)); } else { PreviousSpeedY = SpeedY; SpeedY = 0; this.CurrentPlatformIsMoves(); }; if (SpeedX != 0){ if (((((!((SecondaryState == Enemy.SEC_ST_ATTACK))) && (!((SecondaryState == Enemy.SEC_ST_SUPERATTACK))))) && (!((PrimaryState == Enemy.PRI_ST_FALL))))){ TryNewPrimaryState(Enemy.PRI_ST_RUNNING); }; if ((((PrimaryState == Enemy.PRI_ST_RUNNING)) || ((PrimaryState == Enemy.PRI_ST_JUMPING)))){ PreviousAbsoluteX = CurrentAbsoluteX; CurrentAbsoluteX = (CurrentAbsoluteX + (SpeedX * _arg1)); }; } else { if (((!((SecondaryState == Enemy.SEC_ST_ATTACK))) && (!((SecondaryState == Enemy.SEC_ST_SUPERATTACK))))){ TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); }; }; if (SpeedY != 0){ PreviousAbsoluteY = CurrentAbsoluteY; CurrentAbsoluteY = (CurrentAbsoluteY + (SpeedY * _arg1)); }; if (_accountant < MAX_ACCOUNTANT){ _accountant++; } else { if (((!((PrimaryState == Enemy.PRI_ST_JUMPING))) && ((((_local3 > -100)) && ((_local3 < 700)))))){ this.ShotsEnemy(); }; _accountant = 0; }; if (Hit){ _accountTimeTinte++; if (AccountantTinte < TimeOfDuration){ if (_accountTimeTinte == TimeOfVariation){ if (Tinte){ MovieClipUtils.Instance.PaintMC(View, ColorTinte); AccountantTinte++; Tinte = false; } else { MovieClipUtils.Instance.PaintMC(View, ColorTinte, AlphaTinte); AccountantTinte++; Tinte = true; }; _accountTimeTinte = 0; }; } else { Hit = false; if (Tinte){ MovieClipUtils.Instance.PaintMC(View, 0); AccountantTinte++; }; Tinte = false; AccountantTinte = 0; _accountTimeTinte = 0; }; }; }; } override public function LeftObligatory():void{ if (View.scaleX < 0){ Direction = -1; View.scaleX = (View.scaleX * -1); }; } public function RangeOfVision():Boolean{ return (true); } override public function UpdateAirPose(_arg1:Boolean):void{ if (_jumpingPoseMc != null){ if (_arg1){ if (((!((_jumpingPoseMc.currentFrame == 10))) && ((_jumpingPoseMc.currentFrame < 10)))){ _jumpingPoseMc.gotoAndStop(10); } else { if (_jumpingPoseMc.currentFrame < 19){ _jumpingPoseMc.nextFrame(); }; }; }; if (!_arg1){ if (((!((_jumpingPoseMc.currentFrame == 1))) && ((_jumpingPoseMc.currentFrame > 10)))){ _jumpingPoseMc.gotoAndStop(1); } else { if (_jumpingPoseMc.currentFrame < 10){ _jumpingPoseMc.nextFrame(); }; }; }; }; } } }//package enemies
Section 258
//FinalBossesThree (enemies.FinalBossesThree) package enemies { import flash.events.*; import flash.display.*; import ui.*; import model.*; import com.gamesandweb.game.*; import flash.geom.*; import utils.*; import config.*; public class FinalBossesThree extends Enemy { private var _faceMC:MovieClip;// = null private var _accountantIA:int; private var _armsRight:Boolean;// = true private var _accountantTwo:int; private var _accountantOne:int; var _center:Boolean;// = false private var _maxAccountantIA:int; private var _maxAccountantAttackTwo:int; private var _armsHitMC:MovieClip;// = null private var _maxAccountantAttackOne:int; private var _armsLeft:Boolean;// = true private var _handHitMC:MovieClip;// = null private var _maxAccountantCombo:int; private var _armsAttack:int; private var _accountantCombo:int; public static var HIT_AREA:MovieClip = null; public static var LEFT_MC:MovieClip = null; public static var HITENABLE:Boolean = false; public static var RIGHT_MC:MovieClip = null; public static var ATTACKING:Boolean = false; public static var _attacking:Boolean; public function FinalBossesThree(_arg1:MovieClip, _arg2:Character, _arg3:ShotsEnemyManager, _arg4:int, _arg5:Point){ _armsLeft = true; _armsRight = true; _armsHitMC = null; _handHitMC = null; _faceMC = null; _center = false; super(_arg1, _arg2, _arg3, _arg4, _arg5); Type = 5; Direction = 0; SpeedX = 0; SpeedY = 0; _attacking = false; _armsAttack = 0; Active = false; _accountantOne = Math.ceil(((Math.random() * _maxAccountantAttackOne) / 0.8)); _accountantTwo = Math.ceil(((Math.random() * _maxAccountantAttackTwo) / 0.7)); _accountantCombo = Math.ceil(((Math.random() * _maxAccountantCombo) / 0.6)); _accountantIA = Math.ceil(((Math.random() * _maxAccountantIA) / 0.5)); View.addEventListener("BossesAnimationDieEnd", DispatchEvent); View.addEventListener("BossesAnimationHitEnd", DispatchEvent); View.addEventListener("BossesAnimationEnd", DispatchEvent); View.addEventListener("BossesAnimationAttackLeftEnd", DispatchEvent); View.addEventListener("BossesAnimationAttackRightEnd", DispatchEvent); View.addEventListener("BossesAnimationSuperAttackEnd", DispatchEvent); View.addEventListener("BossesAnimationHitEnableBegin", DispatchEvent); View.addEventListener("BossesAnimationHitEnableEnd", DispatchEvent); View.addEventListener("BossesSoundBegin", DispatchEvent); View.addEventListener("BossesSoundSuperAttackBegin", DispatchEvent); TryNewPrimaryState(Enemy.PRI_ST_IDLE); LoadMyConfig(); } public function get ArmsAttack():int{ return (_armsAttack); } private function ResetSecondStateMc(_arg1:Event):void{ GameTemplateMainApp.MyStage.removeEventListener(Event.RENDER, ResetSecondStateMc); if (PrimaryState == Enemy.PRI_ST_DIE){ _secondaryStateMc = _primaryStateMc; }; _secondaryStateMc = _primaryStateMc; _faceMC = MovieClip(MovieClip(View.getChildByName("view_mc")).getChildByName("cara_mc")); if (_faceMC != null){ _faceMC.gotoAndStop(_primaryStateLabels[PrimaryState]); }; if (PrimaryState == Enemy.PRI_ST_IDLE){ TryNewSecondaryState(Enemy.SEC_ST_IDLE); }; } private function AttackThree(_arg1:Number):void{ if (_accountantCombo < _maxAccountantCombo){ _accountantCombo++; } else { _accountantCombo = 0; if (!_attacking){ _attacking = true; TryNewSecondaryState(Enemy.SEC_ST_SUPERATTACK); }; }; } private function LoadMC(_arg1:Event):void{ GameTemplateMainApp.MyStage.removeEventListener(Event.RENDER, LoadMC); if ((((SecondaryState == Enemy.SEC_ST_LEFTATTACKONE)) || ((SecondaryState == Enemy.SEC_ST_LEFTATTACKTWO)))){ LEFT_MC = MovieClip(MovieClip(View.getChildByName("view_mc")).getChildByName("mano_mc")); if (LEFT_MC != null){ LEFT_MC.alpha = 1; ATTACKING = true; }; HIT_AREA = MovieClip(MovieClip(View.getChildByName("view_mc")).getChildByName("hitArea_mc")); }; if ((((SecondaryState == Enemy.SEC_ST_RIGHTATTACKONE)) || ((SecondaryState == Enemy.SEC_ST_RIGHTATTACKTWO)))){ RIGHT_MC = MovieClip(MovieClip(View.getChildByName("view_mc")).getChildByName("mano_mc")); if (RIGHT_MC != null){ ATTACKING = true; RIGHT_MC.alpha = 1; }; HIT_AREA = MovieClip(MovieClip(View.getChildByName("view_mc")).getChildByName("hitArea_mc")); }; if (SecondaryState == Enemy.SEC_ST_SUPERATTACK){ LEFT_MC = MovieClip(MovieClip(View.getChildByName("view_mc")).getChildByName("manoIzq_mc")); RIGHT_MC = MovieClip(MovieClip(View.getChildByName("view_mc")).getChildByName("manoDer_mc")); if (((!((LEFT_MC == null))) && (!((RIGHT_MC == null))))){ ATTACKING = true; }; }; _faceMC = MovieClip(MovieClip(View.getChildByName("view_mc")).getChildByName("cara_mc")); if (SecondaryState == Enemy.SEC_ST_SUPERATTACK){ _faceMC.gotoAndStop(_secondaryStateLabels[SecondaryState]); }; } public function DispatchEvent(_arg1:Event):void{ switch (_arg1.type){ case "BossesAnimationHitEnd": TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "BossesAnimationEnd": TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "BossesAnimationDieEnd": View.visible = false; HUDManager.Instance.BossFinal(); Global.DispatchGameEvent("OnGameWon"); break; case "BossesAnimationAttackLeftEnd": TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); _attacking = false; ATTACKING = false; break; case "BossesAnimationAttackRightEnd": TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); _attacking = false; ATTACKING = false; break; case "BossesAnimationSuperAttackEnd": TryNewSecondaryState(Enemy.SEC_ST_IDLE); _attacking = false; break; case "BossesAnimationHitEnableBegin": _handHitMC = MovieClip(MovieClip(View.getChildByName("view_mc")).getChildByName("manoHit_mc")); _armsHitMC = MovieClip(MovieClip(View.getChildByName("view_mc")).getChildByName("brazoHit_mc")); HITENABLE = true; break; case "BossesAnimationHitEnableEnd": HITENABLE = false; _handHitMC = null; _armsHitMC = null; break; case "BossesSoundBegin": Sfx.PlaySound(Sfx.SFX_ENEMY_ATTACK_KENKO); break; case "BossesSoundSuperAttackBegin": trace("SUPER ATTACK"); Sfx.PlaySound(Sfx.SFX_ENEMY_SUPERATTACK_KENKO); break; }; } public function LoadMyConfig():void{ Fragility = ConfigLoader.Instance.Config["BossesThreeFragility"]; EnergyToSubtractBenAttack = ConfigLoader.Instance.Config["BossesThreeEnergySubtractsForAttack"]; EnergyToSubtractBenShot = ConfigLoader.Instance.Config["BossesThreeEnergySubtractsForShot"]; EnergyToSubtractBenHit = ConfigLoader.Instance.Config["BossesThreeEnergySubtractsForHit"]; _maxAccountantAttackOne = ConfigLoader.Instance.Config["BossesThreeMaxAccountantAttackOne"]; _maxAccountantAttackTwo = ConfigLoader.Instance.Config["BossesThreeMaxAccountantAttackTwo"]; _maxAccountantCombo = ConfigLoader.Instance.Config["BossesThreeMaxAccountantCombo"]; _maxAccountantIA = ConfigLoader.Instance.Config["BossesThreeMaxAccountantIA"]; ScoreForDeath = ConfigLoader.Instance.Config["BossesThreeScoreForDeath"]; } public function set ArmsAttack(_arg1:int):void{ _armsAttack = _arg1; } override public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case Enemy.PRI_ST_IDLE: PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_HIT: if (HITENABLE){ PrimaryState = _arg1; _local2 = true; }; break; case Enemy.PRI_ST_DIE: PrimaryState = _arg1; _local2 = true; Dead = true; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } override public function GotoSecondaryStateAnimation(_arg1:int):void{ if (_secondaryStateMc == null){ return; }; GameTemplateMainApp.MyStage.stage.addEventListener(Event.RENDER, LoadMC); GameTemplateMainApp.MyStage.stage.invalidate(); _secondaryStateMc.gotoAndStop(_secondaryStateLabels[_arg1]); } private function AttackTwo(_arg1:Number):void{ if (_accountantTwo < _maxAccountantAttackTwo){ _accountantTwo++; } else { _accountantTwo = 0; if (!_attacking){ _attacking = true; if (_arg1 > 0){ TryNewSecondaryState(Enemy.SEC_ST_LEFTATTACKTWO); } else { TryNewSecondaryState(Enemy.SEC_ST_RIGHTATTACKTWO); }; }; }; } override public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMc == null){ return; }; GameTemplateMainApp.MyStage.stage.addEventListener(Event.RENDER, ResetSecondStateMc); GameTemplateMainApp.MyStage.stage.invalidate(); if (_arg1 == Enemy.PRI_ST_HIT){ Sfx.PlaySound(Sfx.SFX_ENEMY_KENKO_HIT); _armsHitMC.gotoAndStop(_primaryStateLabels[_arg1]); _handHitMC.gotoAndStop(_primaryStateLabels[_arg1]); } else { _primaryStateMc.gotoAndStop(_primaryStateLabels[_arg1]); }; } override public function TryNewSecondaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == SecondaryState){ return (false); }; _local2 = false; switch (_arg1){ case Enemy.SEC_ST_IDLE: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_LEFTATTACKONE: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_RIGHTATTACKONE: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_LEFTATTACKTWO: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_RIGHTATTACKTWO: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_SUPERATTACK: SecondaryState = _arg1; _local2 = true; break; }; if (_local2){ GotoSecondaryStateAnimation(_arg1); }; return (_local2); } private function AttackOne(_arg1:Number):void{ if (_accountantOne < _maxAccountantAttackOne){ _accountantOne++; } else { _accountantOne = 0; if (!_attacking){ _attacking = true; if (_arg1 > 0){ TryNewSecondaryState(Enemy.SEC_ST_LEFTATTACKONE); } else { TryNewSecondaryState(Enemy.SEC_ST_RIGHTATTACKONE); }; }; }; } override public function Update(_arg1:Number):void{ var _local2:Number; var _local3:Number; var _local4:Number; EnergySubtract(0); if (Dead){ return; }; if (PrimaryState == Enemy.PRI_ST_HIT){ return; }; _local2 = MovieClipUtils.Instance.GetScreenPosition(View).x; _local3 = MovieClipUtils.Instance.GetScreenPosition(BenTen.View).x; _local4 = (_local2 - _local3); if (_accountantIA < _maxAccountantIA){ _accountantIA++; AttackOne(_local4); AttackTwo(_local4); AttackThree(_local4); } else { _accountantIA = 0; if (!_attacking){ _attacking = true; if (_local4 > 150){ TryNewSecondaryState(Enemy.SEC_ST_LEFTATTACKTWO); } else { if (_local4 < -150){ TryNewSecondaryState(Enemy.SEC_ST_RIGHTATTACKTWO); } else { TryNewSecondaryState(Enemy.SEC_ST_SUPERATTACK); }; }; }; }; } } }//package enemies
Section 259
//FinalBossesTwo (enemies.FinalBossesTwo) package enemies { import flash.events.*; import flash.display.*; import ui.*; import game.*; import model.*; import com.gamesandweb.game.*; import flash.geom.*; import utils.*; import config.*; public class FinalBossesTwo extends Enemy { private var _posXShot:int; private var _jumpingPoseMc:MovieClip;// = null private var _globalShotPosition:Point; private var _accountant:int; private var MAX_ACCOUNTANT:int; private var _posYShot:int; private var _accountTimeTinte:int;// = 0 public function FinalBossesTwo(_arg1:MovieClip, _arg2:Character, _arg3:ShotsEnemyManager, _arg4:int, _arg5:Point){ _jumpingPoseMc = null; _accountTimeTinte = 0; super(_arg1, _arg2, _arg3, _arg4, _arg5); Type = 4; Direction = -1; SpeedX = 0; SpeedY = 0; GoOnBen = true; ModSpeed = (Character.MAX_SPEED_X * 0.4); _accountant = Math.ceil(((Math.random() * MAX_ACCOUNTANT) / 0.8)); HitAreaAttack = MovieClip(View.getChildByName("hitAreaAttack_mc")); View.addEventListener("BossesAnimationDieEnd", DispatchEvent); View.addEventListener("BossesAnimationHitEnd", DispatchEvent); View.addEventListener("BossesAnimationEnd", DispatchEvent); View.addEventListener("BossesAnimationAttackEnd", DispatchEvent); View.addEventListener("BossesAnimationAttackBegin", DispatchEvent); TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); Active = false; AccountantTinte = 0; LoadMyConfig(); } private function ResetSecondStateMc(_arg1:Event):void{ GameTemplateMainApp.MyStage.removeEventListener(Event.RENDER, ResetSecondStateMc); switch (PrimaryState){ case Enemy.PRI_ST_IDLE: _secondaryStateMc = ((View.getChildByName("view_mc") as MovieClip).getChildByName("brazo_mc") as MovieClip); break; case Enemy.PRI_ST_RUNNING: _secondaryStateMc = ((View.getChildByName("view_mc") as MovieClip).getChildByName("brazo_mc") as MovieClip); break; case Enemy.PRI_ST_HIT: _secondaryStateMc = _primaryStateMc; break; case Enemy.PRI_ST_DIE: _secondaryStateMc = _primaryStateMc; break; }; } public function DispatchEvent(_arg1:Event):void{ switch (_arg1.type){ case "BossesAnimationHitEnd": TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "BossesAnimationEnd": TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "BossesAnimationDieEnd": View.visible = false; HUDManager.Instance.BossFinal(); if (GameManager.Instance.GameWinner){ Global.DispatchGameEvent("LevelComplete"); } else { GameManager.Instance.ActivePowerUp(); }; break; case "BossesAnimationAttackEnd": TryNewSecondaryState(Enemy.SEC_ST_IDLE); break; case "BossesAnimationAttackBegin": _globalShotPosition = View.localToGlobal(new Point()); _globalShotPosition.y = (_globalShotPosition.y + _posYShot); _globalShotPosition.x = (_globalShotPosition.x + ((Direction)==1) ? _posXShot : -(_posXShot)); ManagerShotsEnemy.AddShot(_globalShotPosition, View.scaleX, Direction, EnergyToSubtractBenShot); Sfx.PlaySound(Sfx.SFX_ENEMY_SHOT); break; }; } public function LoadMyConfig():void{ Fragility = ConfigLoader.Instance.Config["BossesTwoFragility"]; EnergyToSubtractBenAttack = ConfigLoader.Instance.Config["BossesTwoEnergySubtractsForAttack"]; EnergyToSubtractBenShot = ConfigLoader.Instance.Config["BossesTwoEnergySubtractsForShot"]; EnergyToSubtractBenHit = ConfigLoader.Instance.Config["BossesTwoEnergySubtractsForHit"]; MAX_ACCOUNTANT = ConfigLoader.Instance.Config["BossesTwoMaxAccountant"]; ScoreForDeath = ConfigLoader.Instance.Config["BossesTwoScoreForDeath"]; _posXShot = ConfigLoader.Instance.Config["BossesTwoPositionShotX"]; _posYShot = ConfigLoader.Instance.Config["BossesTwoPositionShotY"]; TimeOfDuration = ConfigLoader.Instance.Config["BossesTwoTimeOfDuration"]; TimeOfVariation = ConfigLoader.Instance.Config["BossesTwoTimeOfVariation"]; ColorTinte = ConfigLoader.Instance.Config["BossesTwoColorTinte"]; AlphaTinte = ConfigLoader.Instance.Config["BossesTwoAlphaTinte"]; } private function CurrentPlatformIsMoves():void{ if (CurrentPlatform != null){ if (CurrentPlatform.Moves){ PreviousAbsoluteY = CurrentAbsoluteY; PreviousAbsoluteX = CurrentAbsoluteX; CurrentAbsoluteX = (CurrentAbsoluteX + (CurrentPlatform.X - CurrentPlatformPreviousX)); CurrentAbsoluteY = (CurrentAbsoluteY + (CurrentPlatform.Y - CurrentPlatformPreviousY)); CurrentPlatformPreviousX = CurrentPlatform.X; CurrentPlatformPreviousY = CurrentPlatform.Y; }; }; } override public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case Enemy.PRI_ST_IDLE: PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_HIT: if (!Hit){ Hit = true; }; break; case Enemy.PRI_ST_RUNNING: if (Jumping){ break; }; PrimaryState = _arg1; _local2 = true; break; case Enemy.PRI_ST_DIE: PrimaryState = _arg1; _local2 = true; Dead = true; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } override public function DownConditional():void{ } public function ShotsEnemy():void{ TryNewSecondaryState(Enemy.SEC_ST_SUPERATTACK); } override public function UpObligatory():void{ } override public function GotoSecondaryStateAnimation(_arg1:int):void{ if (_secondaryStateMc == null){ return; }; _secondaryStateMc.gotoAndStop(_secondaryStateLabels[_arg1]); } override public function UpConditional():void{ } override public function DownObligatory():void{ } override public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMc == null){ return; }; GameTemplateMainApp.MyStage.addEventListener(Event.RENDER, ResetSecondStateMc); GameTemplateMainApp.MyStage.invalidate(); _primaryStateMc.gotoAndStop(_primaryStateLabels[_arg1]); } override public function LeftConditional():void{ if (View.scaleX < 0){ Direction = -1; View.scaleX = -(Direction); GoOnBen = true; }; } override public function TryNewSecondaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == SecondaryState){ return (false); }; _local2 = false; switch (_arg1){ case Enemy.SEC_ST_IDLE: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_RUN: SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_ATTACK: if (((!((PrimaryState == Enemy.PRI_ST_RUNNING))) || ((SecondaryState == Enemy.SEC_ST_SUPERATTACK)))){ break; }; SecondaryState = _arg1; _local2 = true; break; case Enemy.SEC_ST_SUPERATTACK: if (((!((PrimaryState == Enemy.PRI_ST_RUNNING))) || ((SecondaryState == Enemy.SEC_ST_ATTACK)))){ break; }; SecondaryState = _arg1; _local2 = true; break; }; if (_local2){ GotoSecondaryStateAnimation(_arg1); }; return (_local2); } override public function RightConditional():void{ if (View.scaleX > 0){ Direction = 1; View.scaleX = -(Direction); GoOnBen = true; }; } override public function RightObligatory():void{ Direction = 1; View.scaleX = -(Direction); View.scaleX = -(Direction); } override public function Update(_arg1:Number):void{ var _local2:int; var _local3:Number; var _local4:Number; EnergySubtract(0); if (((Dead) || (BenTen.Dead))){ if (BenTen.Dead){ if (Dead){ View.visible = false; HUDManager.Instance.BossFinal(); if (GameManager.Instance.GameWinner){ Global.DispatchGameEvent("LevelComplete"); } else { GameManager.Instance.ActivePowerUp(); }; }; TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); }; this.CurrentPlatformIsMoves(); return; }; if (PrimaryState == Enemy.PRI_ST_HIT){ this.CurrentPlatformIsMoves(); return; }; _local2 = (BenTen.X - (View.x + OffsetFromLevelLayer.x)); _local3 = MovieClipUtils.Instance.GetScreenPosition(View).x; _local4 = MovieClipUtils.Instance.GetScreenPosition(BenTen.View).x; if ((((_local3 > -600)) && ((_local3 < 1200)))){ Active = true; } else { TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); Active = false; }; if (CurrentPlatform != null){ if (CurrentPlatform.Moves){ Active = true; }; }; Active = true; if (Active){ GoOnBen = true; if ((((BenTen.X > 400)) && ((BenTen.X < 1100)))){ if ((((((_local2 < -50)) && (GoOnBen))) && (RangeOfVision()))){ Direction = -1; View.scaleX = -(Direction); } else { if ((((((_local2 > 50)) && (GoOnBen))) && (RangeOfVision()))){ Direction = 1; View.scaleX = -(Direction); }; }; }; if (Direction != 0){ PreviousSpeedX = SpeedX; SpeedX = (ModSpeed * Direction); }; if (CurrentPlatform == null){ PreviousSpeedY = SpeedY; SpeedY = (SpeedY + (GRAVITY * _arg1)); if (SpeedY > MAX_SPEED_Y){ SpeedY = MAX_SPEED_Y; }; UpdateAirPose((SpeedY > 0)); } else { PreviousSpeedY = SpeedY; SpeedY = 0; this.CurrentPlatformIsMoves(); }; if (SpeedX != 0){ if (((((!((SecondaryState == Enemy.SEC_ST_ATTACK))) && (!((SecondaryState == Enemy.SEC_ST_SUPERATTACK))))) && (!((PrimaryState == Enemy.PRI_ST_FALL))))){ TryNewPrimaryState(Enemy.PRI_ST_RUNNING); }; if (PrimaryState == Enemy.PRI_ST_RUNNING){ PreviousAbsoluteX = CurrentAbsoluteX; CurrentAbsoluteX = (CurrentAbsoluteX + (SpeedX * _arg1)); }; } else { if (((!((SecondaryState == Enemy.SEC_ST_ATTACK))) && (!((SecondaryState == Enemy.SEC_ST_SUPERATTACK))))){ TryNewPrimaryState(Enemy.PRI_ST_IDLE); TryNewSecondaryState(Enemy.SEC_ST_IDLE); }; }; if (SpeedY != 0){ PreviousAbsoluteY = CurrentAbsoluteY; CurrentAbsoluteY = (CurrentAbsoluteY + (SpeedY * _arg1)); }; if (_accountant < MAX_ACCOUNTANT){ _accountant++; } else { if (((!((PrimaryState == Enemy.PRI_ST_JUMPING))) && ((((_local3 > -100)) && ((_local3 < 700)))))){ this.ShotsEnemy(); }; _accountant = 0; }; if (Hit){ _accountTimeTinte++; if (AccountantTinte < TimeOfDuration){ if (_accountTimeTinte == TimeOfVariation){ if (Tinte){ MovieClipUtils.Instance.PaintMC(View, ColorTinte); AccountantTinte++; Tinte = false; } else { MovieClipUtils.Instance.PaintMC(View, ColorTinte, AlphaTinte); AccountantTinte++; Tinte = true; }; _accountTimeTinte = 0; }; } else { Hit = false; if (Tinte){ MovieClipUtils.Instance.PaintMC(View, 0); AccountantTinte++; }; Tinte = false; AccountantTinte = 0; _accountTimeTinte = 0; }; }; }; } override public function LeftObligatory():void{ Direction = -1; View.scaleX = -(Direction); View.scaleX = -(Direction); } public function RangeOfVision():Boolean{ var _local1:Point; var _local2:Point; var _local3:Number; _local1 = MovieClipUtils.Instance.GetScreenPosition(View); _local2 = MovieClipUtils.Instance.GetScreenPosition(BenTen.View); _local3 = Math.atan2(Math.abs((_local2.y - _local1.y)), Math.abs((_local2.x - _local1.x))); if (_local3 <= (Math.PI / 4)){ return (true); }; return (false); } } }//package enemies
Section 260
//ShotEnemy (enemies.ShotEnemy) package enemies { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.geom.*; import collision.*; import config.*; import view.*; public class ShotEnemy implements ICollidable { private var _hitArea:MovieClip; private var _view:MovieClip; private var _primaryState:int; private var _speedX:Number; private var _speedY:Number; private var _primaryStateMC:MovieClip; private var _active:Boolean; private var _primaryStateLabels:Dictionary; private var _energy:Number; private var _currentTime:int; private var _offsetFromLevelLayer:Point;// = null private var _secondsPassed:Number; private var _lastTime:int; private var _start:Boolean;// = false public static const PRI_ST_IDLE_LBL:String = "idle"; public static const PRI_ST_DESTROYED:int = 1; public static const PRI_ST_IDLE:int = 0; public static const PRI_ST_DESTROYED_LBL:String = "destroyed"; public static var VELOCITY:Number; public function ShotEnemy(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Point){ _start = false; _offsetFromLevelLayer = null; super(); _view = new ShotEnemyAsset(); _offsetFromLevelLayer = _arg4.clone(); _hitArea = (_view.getChildByName("hitArea_mc") as MovieClip); if (_hitArea == null){ _hitArea = _view; } else { _hitArea.alpha = 0; }; CurrentAbsoluteX = _arg1; CurrentAbsoluteY = _arg2; LayerFactory.Instance.GetLayer(LayerFactory.LAYER_GAME_LAYER).addChild(_view); _lastTime = 0; Active = false; _speedX = 0; _speedY = 0; _primaryStateMC = _view; _primaryStateLabels = new Dictionary(); _primaryStateLabels[PRI_ST_IDLE] = PRI_ST_IDLE_LBL; _primaryStateLabels[PRI_ST_DESTROYED] = PRI_ST_DESTROYED_LBL; PrimaryState = -1; View.addEventListener("ShotEnemyAnimationDestroyedEnd", DispatchEvent); Hide(); LoadConfig(); } public function GetGlobalCenterPoint():Point{ var _local1:Rectangle; if ((((_hitArea == null)) || ((_hitArea.stage == null)))){ return (null); }; _local1 = _hitArea.getBounds(_hitArea.stage); return (new Point(((_local1.x + _local1.width) >> 1), ((_local1.y + _local1.height) >> 1))); } public function get OffsetFromLevelLayer():Point{ return (_offsetFromLevelLayer); } public function GetType():int{ return (3); } public function get SpeedX():Number{ return (_speedX); } public function get SpeedY():Number{ return (_speedY); } public function Show():void{ View.alpha = 1; } public function set PrimaryState(_arg1:int):void{ _primaryState = _arg1; } public function get TopGlobalY():Number{ return (_hitArea.getBounds(_hitArea.stage).y); } public function SetType(_arg1:int):void{ } public function get Active():Boolean{ return (_active); } public function get Energy():Number{ return (_energy); } public function set SpeedX(_arg1:Number):void{ _speedX = _arg1; } public function set SpeedY(_arg1:Number):void{ _speedY = _arg1; } public function DispatchEvent(_arg1:Event):void{ switch (_arg1.type){ case "ShotEnemyAnimationDestroyedEnd": Hide(); Active = false; break; }; } public function get PrimaryStateLabels():Dictionary{ return (_primaryStateLabels); } public function GetCollisionSprite():Sprite{ if (_hitArea == null){ return (null); }; return (Sprite(_hitArea)); } public function RotateView(_arg1:Number):void{ View.rotation = _arg1; } public function get View():MovieClip{ return (_view); } public function get BottomGlobalY():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.y + _local1.height)); } public function set Active(_arg1:Boolean):void{ _active = _arg1; } public function get PrimaryState():int{ return (_primaryState); } public function set CurrentAbsoluteY(_arg1:Number):void{ _view.y = _arg1; } public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case ShotEnemy.PRI_ST_IDLE: PrimaryState = _arg1; _local2 = true; break; case ShotEnemy.PRI_ST_DESTROYED: PrimaryState = _arg1; _local2 = true; Active = false; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } public function Pause():void{ _lastTime = 0; } public function set Energy(_arg1:Number):void{ _energy = _arg1; } public function FlipView(_arg1:Number):void{ View.scaleX = ((_arg1)>0) ? -(Math.abs(View.scaleX)) : Math.abs(View.scaleX); } public function set CurrentAbsoluteX(_arg1:Number):void{ _view.x = _arg1; } public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMC == null){ return; }; _primaryStateMC.gotoAndStop(_primaryStateLabels[_arg1]); } public function GetRadio():int{ if (_hitArea == null){ return (0); }; return (((Math.max(_hitArea.width, _hitArea.height) >> 1) + 1)); } public function get CurrentAbsoluteX():Number{ return (_view.x); } public function get CurrentAbsoluteY():Number{ return (_view.y); } public function get LeftGlobalX():Number{ return (_hitArea.getBounds(_hitArea.stage).x); } public function LoadConfig():void{ VELOCITY = ConfigLoader.Instance.Config["ShotEnemyVelocity"]; } public function Update():void{ if (!_active){ _lastTime = 0; } else { if (_lastTime == 0){ _lastTime = getTimer(); return; }; _currentTime = getTimer(); _secondsPassed = ((_currentTime - _lastTime) * 0.001); CurrentAbsoluteX = (CurrentAbsoluteX + (_speedX * _secondsPassed)); CurrentAbsoluteY = (CurrentAbsoluteY + (_speedY * _secondsPassed)); _lastTime = _currentTime; }; } public function Hide():void{ View.alpha = 0; } public function get RightGlobalX():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.x + _local1.width)); } } }//package enemies
Section 261
//ShotsEnemyManager (enemies.ShotsEnemyManager) package enemies { import flash.geom.*; import view.*; public class ShotsEnemyManager { private var _container:Array; private var _modSpeed:Number; private var DXY:Number;// = 100 private var _next:int;// = 0 private var _localShotPosition:Point; private var MAX_SHOTS:int;// = 14 private static const RAD_TO_DEG:Number = 57.2957795130823; public function ShotsEnemyManager(){ MAX_SHOTS = 14; _next = 0; DXY = 100; super(); Reset(); } public function Update():void{ var _local1:*; for each (_local1 in _container) { ShotEnemy(_local1).Update(); }; } public function DeleteShots():void{ var _local1:int; var _local2:int; if (_container.length != 0){ _local1 = _container.length; while (_local2 < _local1) { if (!ShotEnemy(_container[_local2]).Active){ _container.splice(_local2, 1); }; _local2++; }; }; } public function get Container():Array{ return (_container); } public function Reset():void{ _container = new Array(); _next = 0; while (_next <= MAX_SHOTS) { _container.push(new ShotEnemy(0, 0, 1, new Point())); _next++; }; _next = 0; } public function AddShot(_arg1:Point, _arg2:Number, _arg3:Number, _arg4:int, _arg5:Point=null):void{ var _local6:Number; var _local7:Number; var _local8:Number; _localShotPosition = LayerFactory.Instance.GetLayer(LayerFactory.LAYER_GAME_LAYER).globalToLocal(_arg1); if (_arg2 != 0){ ShotEnemy(_container[_next]).FlipView(_arg2); }; if (_arg3 != 0){ ShotEnemy(_container[_next]).RotateView(_arg3); }; ShotEnemy(_container[_next]).CurrentAbsoluteX = _localShotPosition.x; ShotEnemy(_container[_next]).CurrentAbsoluteY = _localShotPosition.y; ShotEnemy(_container[_next]).Energy = _arg4; ShotEnemy(_container[_next]).Active = true; ShotEnemy(_container[_next]).TryNewPrimaryState(ShotEnemy.PRI_ST_IDLE); ShotEnemy(_container[_next]).Show(); if (_arg5 != null){ _local6 = (_arg5.x - _arg1.x); _local7 = (_arg5.y - _arg1.y); _local8 = Math.atan2(_local7, _local6); ShotEnemy(_container[_next]).RotateView((_local8 * RAD_TO_DEG)); ShotEnemy(_container[_next]).SpeedX = (Math.abs(ShotEnemy.VELOCITY) * Math.cos(_local8)); ShotEnemy(_container[_next]).SpeedY = (Math.abs(ShotEnemy.VELOCITY) * Math.sin(_local8)); } else { ShotEnemy(_container[_next]).SpeedX = ((_arg2)<0) ? Math.abs(ShotEnemy.VELOCITY) : -(Math.abs(ShotEnemy.VELOCITY)); }; _next++; if (_next > MAX_SHOTS){ _next = 0; }; } public function Pause():void{ var _local1:*; for each (_local1 in _container) { ShotEnemy(_local1).Pause(); }; } } }//package enemies
Section 262
//Color (fl.motion.Color) package fl.motion { import flash.display.*; import flash.geom.*; public class Color extends ColorTransform { private var _tintMultiplier:Number;// = 0 private var _tintColor:Number;// = 0 public function Color(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){ _tintColor = 0; _tintMultiplier = 0; super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8); } public function setTint(_arg1:uint, _arg2:Number):void{ var _local3:uint; var _local4:uint; var _local5:uint; this._tintColor = _arg1; this._tintMultiplier = _arg2; this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - _arg2))); _local3 = ((_arg1 >> 16) & 0xFF); _local4 = ((_arg1 >> 8) & 0xFF); _local5 = (_arg1 & 0xFF); this.redOffset = Math.round((_local3 * _arg2)); this.greenOffset = Math.round((_local4 * _arg2)); this.blueOffset = Math.round((_local5 * _arg2)); } public function set tintColor(_arg1:uint):void{ this.setTint(_arg1, this.tintMultiplier); } public function get brightness():Number{ return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1)); } private function deriveTintColor():uint{ var _local1:Number; var _local2:uint; var _local3:uint; var _local4:uint; var _local5:uint; _local1 = (1 / this.tintMultiplier); _local2 = Math.round((this.redOffset * _local1)); _local3 = Math.round((this.greenOffset * _local1)); _local4 = Math.round((this.blueOffset * _local1)); _local5 = (((_local2 << 16) | (_local3 << 8)) | _local4); return (_local5); } public function get tintMultiplier():Number{ return (this._tintMultiplier); } public function get tintColor():uint{ return (this._tintColor); } public function set brightness(_arg1:Number):void{ var _local2:Number; var _local3:Number; if (_arg1 > 1){ _arg1 = 1; } else { if (_arg1 < -1){ _arg1 = -1; }; }; _local2 = (1 - Math.abs(_arg1)); _local3 = 0; if (_arg1 > 0){ _local3 = (_arg1 * 0xFF); }; this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = _local2)); this.redOffset = (this.greenOffset = (this.blueOffset = _local3)); } public function set tintMultiplier(_arg1:Number):void{ this.setTint(this.tintColor, _arg1); } private function parseXML(_arg1:XML=null):Color{ var _local2:XML; var _local3:XML; var _local4:String; var _local5:uint; if (!_arg1){ return (this); }; _local2 = _arg1.elements()[0]; if (!_local2){ return (this); }; for each (_local3 in _local2.attributes()) { _local4 = _local3.localName(); if (_local4 == "tintColor"){ _local5 = (Number(_local3.toString()) as uint); this.tintColor = _local5; } else { this[_local4] = Number(_local3.toString()); }; }; return (this); } public static function interpolateColor(_arg1:uint, _arg2:uint, _arg3:Number):uint{ var _local4:Number; var _local5:uint; var _local6:uint; var _local7:uint; var _local8:uint; var _local9:uint; var _local10:uint; var _local11:uint; var _local12:uint; var _local13:uint; var _local14:uint; var _local15:uint; var _local16:uint; var _local17:uint; _local4 = (1 - _arg3); _local5 = ((_arg1 >> 24) & 0xFF); _local6 = ((_arg1 >> 16) & 0xFF); _local7 = ((_arg1 >> 8) & 0xFF); _local8 = (_arg1 & 0xFF); _local9 = ((_arg2 >> 24) & 0xFF); _local10 = ((_arg2 >> 16) & 0xFF); _local11 = ((_arg2 >> 8) & 0xFF); _local12 = (_arg2 & 0xFF); _local13 = ((_local5 * _local4) + (_local9 * _arg3)); _local14 = ((_local6 * _local4) + (_local10 * _arg3)); _local15 = ((_local7 * _local4) + (_local11 * _arg3)); _local16 = ((_local8 * _local4) + (_local12 * _arg3)); _local17 = ((((_local13 << 24) | (_local14 << 16)) | (_local15 << 8)) | _local16); return (_local17); } public static function interpolateTransform(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{ var _local4:Number; var _local5:ColorTransform; _local4 = (1 - _arg3); _local5 = new ColorTransform(((_arg1.redMultiplier * _local4) + (_arg2.redMultiplier * _arg3)), ((_arg1.greenMultiplier * _local4) + (_arg2.greenMultiplier * _arg3)), ((_arg1.blueMultiplier * _local4) + (_arg2.blueMultiplier * _arg3)), ((_arg1.alphaMultiplier * _local4) + (_arg2.alphaMultiplier * _arg3)), ((_arg1.redOffset * _local4) + (_arg2.redOffset * _arg3)), ((_arg1.greenOffset * _local4) + (_arg2.greenOffset * _arg3)), ((_arg1.blueOffset * _local4) + (_arg2.blueOffset * _arg3)), ((_arg1.alphaOffset * _local4) + (_arg2.alphaOffset * _arg3))); return (_local5); } public static function fromXML(_arg1:XML):Color{ return (Color(new (Color).parseXML(_arg1))); } } }//package fl.motion
Section 263
//GameManager (game.GameManager) package game { import flash.events.*; import flash.display.*; import flash.utils.*; import ui.*; import model.*; import com.gamesandweb.game.*; import flash.geom.*; import collision.*; import enemies.*; import utils.*; import scroll.*; import flash.net.*; import config.*; import view.*; import assets.*; public class GameManager { private var _levelLimitsContainer:MovieClip; private var _scorePerBoss:int; private var _scorePerEnemy:int; private var _currentBackground:ScrollableScreenElement;// = null private var _activeFourArms:Boolean;// = false private var _levelLoader:Loader;// = null private var _pauseProcessed:Boolean;// = false private var _currentTime:int; private var _lastTime:int; private var _wallBlockedManager:WallBlockedManager; private var _activeCannonBolt:Boolean;// = false private var _forzeNotUpdate:Boolean;// = false private var _finalLevel:Boolean;// = false private var _finalScore:int;// = 0 private var _sectionLimits:Array;// = null private var _gameWinner:Boolean;// = false private var _mainCharacter:Character; public var Canvas:MovieClip; private var _collisionManager:CollisionManager; private var _fourarmsInstruccion:Boolean;// = false private var _ShotsFriendlyManager:ShotsFriendlyManager; private var _maxSublevels:int;// = 4 private var _enemysDead:int; private var _levelLimitsLocalOffset:Number; private var _scorePerLife:int; private var _specialWallManager:SpecialWallManager; private var _numberSubLevel:int; private var _scorePerEnergy:int; private var _sublevelInitialPlatform:Platform;// = null private var _powerUpFinal:PowerUp; private var _ShotsEnemyManager:ShotsEnemyManager; private var _cannonboltInstruccion:Boolean;// = false private var _secondsPassed:Number; private var _currentSectionOffsetFromLevelLayer:Point;// = null private var _enemyManager:EnemyManager; private var _update:Boolean;// = false private var _sectionExtraPixelsToCheck:int;// = 200 private var _numberLevel:int; private static var _instance:GameManager = null; public function GameManager(_arg1:SingletonBlocker){ _levelLoader = null; _update = false; _forzeNotUpdate = false; _activeCannonBolt = false; _activeFourArms = false; _gameWinner = false; _cannonboltInstruccion = false; _fourarmsInstruccion = false; _finalScore = 0; _finalLevel = false; _pauseProcessed = false; _maxSublevels = 4; _sectionExtraPixelsToCheck = 200; _sectionLimits = null; _currentSectionOffsetFromLevelLayer = null; _sublevelInitialPlatform = null; _currentBackground = null; super(); if (_arg1 == null){ return; }; } public function CharacterDead():void{ var _local1:Point; var _local2:Number; var _local3:Number; var _local4:int; _mainCharacter.PreviousAbsoluteX = _mainCharacter.CurrentAbsoluteX; _mainCharacter.PreviousAbsoluteY = _mainCharacter.CurrentAbsoluteY; _local1 = MovieClipUtils.Instance.GetScreenPosition(_mainCharacter.View); _mainCharacter.View.x = (_mainCharacter.View.x + (ScrollManager.MIN_SCREEN_X - _local1.x)); _mainCharacter.View.y = (_mainCharacter.View.y + (ScrollManager.MAX_SCREEN_Y - _local1.y)); if (((!((_mainCharacter.LastSecurePlatform == null))) && (!((NumberSubLevel == 4))))){ _local2 = (_mainCharacter.LastSecurePlatform.LeftGlobalX - _mainCharacter.View.localToGlobal(new Point()).x); _local3 = (_mainCharacter.LastSecurePlatform.TopGlobalY - _mainCharacter.View.localToGlobal(new Point()).y); if (_mainCharacter.LastSecurePlatform.Type == Platform.FLOOR){ _mainCharacter.CurrentAbsoluteX = (_mainCharacter.CurrentAbsoluteX + (_local2 + int(ConfigLoader.Instance.Config["CharacterDeadOffsetXOnFloor"]))); } else { if (NumberSubLevel != 4){ _local4 = int(ConfigLoader.Instance.Config[("CharacterDeadOffsetXLevel" + NumberLevel.toString())]); _mainCharacter.CurrentAbsoluteX = (_mainCharacter.CurrentAbsoluteX + (_local2 + _local4)); } else { _mainCharacter.CurrentAbsoluteX = (_mainCharacter.CurrentAbsoluteX + (_local2 + int(ConfigLoader.Instance.Config["CharacterDeadOffsetX"]))); }; }; _mainCharacter.CurrentAbsoluteY = (_mainCharacter.CurrentAbsoluteY + (_local3 - int(ConfigLoader.Instance.Config["CharacterDeadOffsetY"]))); ScrollManager.Instance.Unfreeze(); _mainCharacter.X = (_mainCharacter.X + (_mainCharacter.CurrentAbsoluteX - _mainCharacter.PreviousAbsoluteX)); _mainCharacter.Y = (_mainCharacter.Y + (_mainCharacter.CurrentAbsoluteY - _mainCharacter.PreviousAbsoluteY)); ScrollManager.Instance.UpdateScrollsImmediately(); _mainCharacter.PreviousAbsoluteX = _mainCharacter.CurrentAbsoluteX; _mainCharacter.PreviousAbsoluteY = _mainCharacter.CurrentAbsoluteY; } else { PositionResetCharacter(true); }; if (_mainCharacter.View.scaleX < 0){ _mainCharacter.View.scaleX = (_mainCharacter.View.scaleX * -1); }; _mainCharacter.Reset(true); _mainCharacter.Dead = false; _mainCharacter.Show(); _forzeNotUpdate = false; _mainCharacter.Invincible = true; Pause(); } public function RemoveViewOfLayer(_arg1:Boolean=false, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Boolean=false):void{ var _local6:int; _local6 = 0; if (((_arg1) && (!((LayerFactory.Instance.GetLayer(LayerFactory.LAYER_BACKGROUND).numChildren == 0))))){ _local6 = (LayerFactory.Instance.GetLayer(LayerFactory.LAYER_BACKGROUND).numChildren - 1); while (_local6 >= 0) { LayerFactory.Instance.GetLayer(LayerFactory.LAYER_BACKGROUND).removeChildAt(_local6); _local6--; }; }; if (((_arg2) && (!((LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).numChildren == 0))))){ _local6 = (LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).numChildren - 1); while (_local6 >= 0) { LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).removeChildAt(_local6); _local6--; }; }; if (((_arg3) && (!((LayerFactory.Instance.GetLayer(LayerFactory.LAYER_CHARACTER).numChildren == 0))))){ _local6 = (LayerFactory.Instance.GetLayer(LayerFactory.LAYER_CHARACTER).numChildren - 1); while (_local6 >= 0) { LayerFactory.Instance.GetLayer(LayerFactory.LAYER_CHARACTER).removeChildAt(_local6); _local6--; }; }; if (((_arg4) && (!((LayerFactory.Instance.GetLayer(LayerFactory.LAYER_GAME_LAYER).numChildren == 0))))){ _local6 = (LayerFactory.Instance.GetLayer(LayerFactory.LAYER_GAME_LAYER).numChildren - 1); while (_local6 >= 0) { LayerFactory.Instance.GetLayer(LayerFactory.LAYER_GAME_LAYER).removeChildAt(_local6); _local6--; }; }; if (((_arg5) && (!((LayerFactory.Instance.GetLayer(LayerFactory.LAYER_FOREGROUND).numChildren == 0))))){ _local6 = (LayerFactory.Instance.GetLayer(LayerFactory.LAYER_FOREGROUND).numChildren - 1); while (_local6 >= 0) { LayerFactory.Instance.GetLayer(LayerFactory.LAYER_FOREGROUND).removeChildAt(_local6); _local6--; }; }; } public function set ForceNotUpdate(_arg1:Boolean):void{ _forzeNotUpdate = _arg1; } public function get ActiveFourArms():Boolean{ return (_activeFourArms); } public function get FourarmsInstruccion():Boolean{ return (_fourarmsInstruccion); } public function LoadLevel(_arg1:int):void{ var level = _arg1; trace("LOAD LEVEL"); _numberLevel = level; _numberSubLevel = 1; _collisionManager.Reset(); InitializeCharacter(); EffectManager.Instance.Initialize(); InitializeBackground(); LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).x = 0; LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).y = 0; _ShotsEnemyManager = new ShotsEnemyManager(); _collisionManager.AddICollidableOfArray(_ShotsEnemyManager.Container, 0); _levelLoader.load(new URLRequest((((((GameContext.Instance.BasePath + "levels/Level") + _numberLevel) + "_") + _numberSubLevel) + ".swf"))); _levelLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, InitializeLevel); try { new LocalConnection().connect("foo"); new LocalConnection().connect("foo"); } catch(e) { }; } public function Reset():void{ _collisionManager.Reset(); _enemyManager.Reset(); _ShotsEnemyManager.Reset(); _mainCharacter.View = null; _mainCharacter = null; _ShotsFriendlyManager.Reset(); _wallBlockedManager.Reset(); _specialWallManager.Reset(); MovieClipUtils.Instance.Reset(); _powerUpFinal = null; RemoveViewOfLayer(true, true, true, true, true); _sectionLimits = new Array(); } private function AddElementOfLevel(_arg1:MovieClip, _arg2:int):void{ var _local3:int; var _local4:int; var _local5:DisplayObject; var _local6:DisplayObject; var _local7:Enemy; var _local8:Enemy; var _local9:Enemy; var _local10:SpecialWall; var _local11:PowerUp; var _local12:Enemy; var _local13:Enemy; var _local14:Enemy; var _local15:WallBlocked; _local3 = 0; while (_local3 < _arg1.numChildren) { _local5 = _arg1.getChildAt(_local3); if ((_local5 is PlatformAsset)){ _sublevelInitialPlatform = new Platform(MovieClip(_local5), _arg2, _currentSectionOffsetFromLevelLayer); if (_local5.name.indexOf("00") != -1){ _mainCharacter.CurrentPlatform = _sublevelInitialPlatform; }; _collisionManager.AddICollidable(_sublevelInitialPlatform, _arg2); }; if ((_local5 is PlatformContainerAsset)){ _local4 = 0; while (_local4 < MovieClip(_local5).numChildren) { _local6 = MovieClip(_local5).getChildAt(_local4); if ((_local6 is PlatformAsset)){ _collisionManager.AddICollidable(new Platform(MovieClip(_local6), _arg2, _currentSectionOffsetFromLevelLayer), _arg2); }; _local4++; }; }; if ((_local5 is DroideBlueAsset)){ _local7 = new DroideBlue(MovieClip(_local5), _mainCharacter, _ShotsEnemyManager, _arg2, _currentSectionOffsetFromLevelLayer); _enemyManager.AddEnemy(_local7); _collisionManager.AddICollidable(_local7, _arg2); }; if ((_local5 is DroideRedAsset)){ _local8 = new DroideRed(MovieClip(_local5), _mainCharacter, _ShotsEnemyManager, _arg2, _currentSectionOffsetFromLevelLayer); _enemyManager.AddEnemy(_local8); _collisionManager.AddICollidable(_local8, _arg2); }; if ((_local5 is DroideGreenAsset)){ _local9 = new DroideGreen(MovieClip(_local5), _mainCharacter, _ShotsEnemyManager, _arg2, _currentSectionOffsetFromLevelLayer); _enemyManager.AddEnemy(_local9); _collisionManager.AddICollidable(_local9, _arg2); }; if ((_local5 is SpecialWallAsset)){ _local10 = new SpecialWall(MovieClip(_local5), _mainCharacter, _currentSectionOffsetFromLevelLayer); _specialWallManager.AddSpecialWall(_local10); _collisionManager.AddICollidable(_local10, _arg2); }; if ((_local5 is PowerUpAsset)){ _local11 = new PowerUp(MovieClip(_local5), _currentSectionOffsetFromLevelLayer); if ((((_local11.View is PowerUpFourArmsAsset)) && (!(FourarmsInstruccion)))){ if (_local11.View.alpha == 0){ _local11.ActiveInstruccion = true; } else { _powerUpFinal = _local11; _powerUpFinal.Hide(); }; if (GameWinner){ _powerUpFinal = null; _local11.Hide(); } else { _collisionManager.AddICollidable(_local11, _arg2); }; } else { if ((((_local11.View is PowerUpCannonBoltAsset)) && (!(CannonboltInstruccion)))){ if (_local11.View.alpha == 0){ _local11.ActiveInstruccion = true; } else { _powerUpFinal = _local11; _powerUpFinal.Hide(); }; if (GameWinner){ _powerUpFinal = null; _local11.Hide(); } else { _collisionManager.AddICollidable(_local11, _arg2); }; } else { _collisionManager.AddICollidable(_local11, _arg2); }; }; }; if ((_local5 is FinalBossesOneAsset)){ _local12 = new FinalBossesOne(MovieClip(_local5), _mainCharacter, _ShotsEnemyManager, _arg2, _currentSectionOffsetFromLevelLayer); _enemyManager.AddEnemy(_local12); _collisionManager.AddICollidable(_local12, _arg2); }; if ((_local5 is FinalBossesTwoAsset)){ _local13 = new FinalBossesTwo(MovieClip(_local5), _mainCharacter, _ShotsEnemyManager, _arg2, _currentSectionOffsetFromLevelLayer); _enemyManager.AddEnemy(_local13); _collisionManager.AddICollidable(_local13, _arg2); }; if ((_local5 is FinalBossesThreeAsset)){ _local14 = new FinalBossesThree(MovieClip(_local5), _mainCharacter, _ShotsEnemyManager, _arg2, _currentSectionOffsetFromLevelLayer); _enemyManager.AddEnemy(_local14); _collisionManager.AddICollidable(_local14, _arg2); }; if ((_local5 is EnemiesIAMarksAsset)){ _collisionManager.AddICollidable(new EnemiesIAMarks(MovieClip(_local5), _currentSectionOffsetFromLevelLayer), _arg2); }; if ((_local5 is WallBlockedAsset)){ _local15 = new WallBlocked(MovieClip(_local5), _mainCharacter, _currentSectionOffsetFromLevelLayer); _wallBlockedManager.AddWallBlocked(_local15); _collisionManager.AddICollidable(_local15, _arg2); }; if ((_local5 is AnimationPlatformAsset)){ MovieClipUtils.Instance.AddMovieClip(MovieClip(_local5)); }; _local3++; }; } private function LoadMyConfig():void{ _scorePerEnemy = ConfigLoader.Instance.Config["GameManagerScorePerEnemy"]; _scorePerEnergy = ConfigLoader.Instance.Config["GameManagerScorePerEnergy"]; _scorePerLife = ConfigLoader.Instance.Config["GameManagerScorePerLife"]; _scorePerBoss = ConfigLoader.Instance.Config["GameManagerScorePerBoss"]; _sectionExtraPixelsToCheck = ConfigLoader.Instance.Config["SectionExtraPixelsToCheck"]; _maxSublevels = ConfigLoader.Instance.Config["MaxSublevels"]; } public function set NumberLevel(_arg1:int):void{ _numberLevel = _arg1; } public function Finalize():void{ GameTemplateMainApp.MyStage.removeEventListener(Event.ENTER_FRAME, GameLoop); InputManager.Instance.RemoveCharacters(_mainCharacter); InputManager.Finalize(); _collisionManager.Initialize(); if (_enemyManager != null){ _enemyManager.Reset(); }; if (_ShotsEnemyManager != null){ _ShotsEnemyManager.Reset(); }; if (_ShotsFriendlyManager != null){ _ShotsFriendlyManager.Reset(); }; ScrollManager.Instance.Remove(); } private function PositionResetCharacter(_arg1:Boolean=false):void{ if (_mainCharacter.View.scaleX < 0){ _mainCharacter.View.scaleX = (_mainCharacter.View.scaleX * -1); }; _mainCharacter.PreviousAbsoluteX = _mainCharacter.X; _mainCharacter.PreviousAbsoluteY = _mainCharacter.Y; _mainCharacter.X = ConfigLoader.Instance.Config[((("CharacterPositionXReset" + NumberLevel) + "_") + _numberSubLevel)]; _mainCharacter.Y = ConfigLoader.Instance.Config[((("CharacterPositionYReset" + NumberLevel) + "_") + _numberSubLevel)]; _mainCharacter.CurrentAbsoluteX = _mainCharacter.X; _mainCharacter.CurrentAbsoluteY = _mainCharacter.Y; _mainCharacter.SpeedX = (_mainCharacter.SpeedY = 0); if (_arg1){ ScrollManager.Instance.Unfreeze(); ScrollManager.Instance.UpdateScrollsImmediately(); }; _mainCharacter.PreviousAbsoluteX = _mainCharacter.CurrentAbsoluteX; _mainCharacter.PreviousAbsoluteY = _mainCharacter.CurrentAbsoluteY; } public function set ActiveFourArms(_arg1:Boolean):void{ _activeFourArms = _arg1; } public function LoadSubLevel(_arg1:int):void{ var subLevel = _arg1; _numberSubLevel = subLevel; RemoveViewOfLayer(false, true, false, true, true); if (NumberLevel == 1){ ScrollManager.Instance.Reset(false); } else { ScrollManager.Instance.Reset(false, false); }; _collisionManager.Reset(); _wallBlockedManager.Reset(); _specialWallManager.Reset(); MovieClipUtils.Instance.Reset(); _ShotsEnemyManager.Reset(); _ShotsFriendlyManager.Reset(); _enemyManager.Reset(); _collisionManager.AddICollidableOfArray(_ShotsEnemyManager.Container, 0); _collisionManager.AddICollidableOfArray(_ShotsFriendlyManager.Container, 0); _ShotsFriendlyManager.InitializeShots(); _mainCharacter.ShotsFriendlyManagerOfBen = _ShotsFriendlyManager; _powerUpFinal = null; PositionResetCharacter(true); _mainCharacter.Show(); _levelLoader.load(new URLRequest((((((GameContext.Instance.BasePath + "levels/Level") + _numberLevel) + "_") + _numberSubLevel) + ".swf"))); _levelLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, InitializeLevel); try { new LocalConnection().connect("foo"); new LocalConnection().connect("foo"); } catch(e) { }; } public function set FourarmsInstruccion(_arg1:Boolean):void{ _fourarmsInstruccion = _arg1; } public function get MainCharacter():Character{ return (_mainCharacter); } public function get ScorePerBoss():Number{ return ((_scorePerBoss * _numberLevel)); } private function InitializeCharacter():void{ _ShotsFriendlyManager = new ShotsFriendlyManager(); _mainCharacter = new Character(new MovieClip(), _ShotsFriendlyManager, new Point(0, 0)); InputManager.Instance.AddCharacter(_mainCharacter); _collisionManager.AddICollidable(_mainCharacter, 0); ScrollManager.Instance.Initialize(_mainCharacter); _ShotsFriendlyManager.InitializeShots(); _collisionManager.AddICollidableOfArray(_ShotsFriendlyManager.Container, 0); LayerFactory.Instance.GetLayer(LayerFactory.LAYER_CHARACTER).addChild(_mainCharacter.View); PositionResetCharacter(); } public function set CannonboltInstruccion(_arg1:Boolean):void{ _cannonboltInstruccion = _arg1; } private function AddNewLevel(_arg1:Number=0, _arg2:Number=0):void{ var _local3:Number; var _local4:String; var _local5:int; var _local6:int; var _local7:ScrollableScreenElement; var _local8:MovieClip; _local3 = 0; _local5 = MovieClip(_levelLoader.content).numChildren; if (_local5 == 1){ _finalLevel = true; HUDManager.Instance.BossFinal(true, NumberLevel); Sfx.PlayMusic(Sfx.MUSIC_ENEMY_FINAL); } else { _finalLevel = false; HUDManager.Instance.BossFinal(false, NumberLevel); }; _local6 = 1; while (_local6 <= _local5) { _local4 = (("subLevel" + _local6) + "_mc"); _local8 = MovieClip(MovieClip(_levelLoader.content).getChildByName(_local4)); if (_local8 == null){ } else { LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).addChild(_local8); if (_local6 == 1){ _local8.x = _arg1; } else { _local8.x = _local3; }; _local8.y = _arg2; _currentSectionOffsetFromLevelLayer = new Point(_local8.x, _local8.y); _local3 = (_local3 + MovieClip(_local8.getChildByName("levelLimit_mc")).width); AddElementOfLevel(_local8, _local6); if (_local6 == 1){ ScrollManager.Instance.LevelLimits = MovieClip(_local8.getChildByName("levelLimit_mc")); ScrollManager.Instance.LevelHeight = MovieClip(_local8.getChildByName("levelLimit_mc")).height; _sectionLimits = new Array(); _levelLimitsLocalOffset = MovieClip(_local8.getChildByName("levelLimit_mc")).x; }; MovieClip(_local8.getChildByName("levelLimit_mc")).visible = false; _sectionLimits.push(_local3); _levelLimitsContainer = LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL); }; _local6++; }; LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).addChild(LayerFactory.Instance.GetLayer(LayerFactory.LAYER_CHARACTER)); LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).addChild(LayerFactory.Instance.GetLayer(LayerFactory.LAYER_GAME_LAYER)); ScrollManager.Instance.LevelWidth = _local3; _local7 = new ScrollableScreenElement(LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL), 1, 1, GameTemplateMainApp.SCREEN_WIDTH, GameTemplateMainApp.SCREEN_HEIGHT, false, false); ScrollManager.Instance.AddScrollable(_local7); } public function ActivePowerUp():void{ if (_powerUpFinal == null){ return; }; _powerUpFinal.Show(); _powerUpFinal.Active = true; } public function get NumberLevel():int{ return (_numberLevel); } public function get NumberSubLevel():int{ return (_numberSubLevel); } public function Initialize():void{ LoadMyConfig(); _collisionManager = new CollisionManager(); _collisionManager.Initialize(); _enemyManager = new EnemyManager(); _enemyManager.Initialize(); _specialWallManager = new SpecialWallManager(); _wallBlockedManager = new WallBlockedManager(); _levelLoader = new Loader(); _numberLevel = 0; _numberSubLevel = 0; _sectionLimits = new Array(); GameTemplateMainApp.MyStage.addEventListener(Event.ENTER_FRAME, GameLoop); } public function get ScorePerEnergy():Number{ if (_mainCharacter.Energy < 0){ return (_scorePerEnergy); }; return ((_scorePerEnergy * _mainCharacter.Energy)); } public function set FinalScore(_arg1:int):void{ _finalScore = (_finalScore + _arg1); } private function InitializeLevel(_arg1:Event):void{ var _local2:int; var _local3:String; var _local4:ScrollableScreenElement; var _local5:Number; var _local6:Number; var _local7:String; var _local8:int; var _local9:MovieClip; var _local10:Boolean; _local2 = MovieClip(_levelLoader.content).numChildren; _local4 = null; _local8 = 1; while (_local8 <= _local2) { _local3 = (("loopLayer" + _local8) + "_mc"); _local9 = MovieClip(MovieClip(_levelLoader.content).getChildByName(_local3)); if (_local9 == null){ } else { _local5 = ConfigLoader.Instance.Config[(((("Level" + _numberLevel) + "Loop") + _local8) + "HorizontalDepth")]; _local6 = ConfigLoader.Instance.Config[(((("Level" + _numberLevel) + "Loop") + _local8) + "VerticalDepth")]; _local4 = new ScrollableScreenElement(_local9, _local5, _local6, GameTemplateMainApp.SCREEN_WIDTH, GameTemplateMainApp.SCREEN_HEIGHT, true, false); _local7 = ((((_local5 >= 1)) || ((_local6 >= 1)))) ? LayerFactory.LAYER_FOREGROUND : LayerFactory.LAYER_BACKGROUND; _local10 = false; if (_local7 == LayerFactory.LAYER_BACKGROUND){ _local10 = true; }; ScrollManager.Instance.AddScrollable(_local4, false, _local10); LayerFactory.Instance.GetLayer(_local7).addChild(_local9); }; _local8++; }; AddNewLevel(-30, -250.4); _lastTime = 0; if ((((NumberLevel == 1)) && ((NumberSubLevel == 1)))){ GameTemplateMainApp.Instance.LoadingLevelEnd(true); } else { GameTemplateMainApp.Instance.LoadingLevelEnd(); }; _currentBackground.Reset(); } public function get CannonboltInstruccion():Boolean{ return (_cannonboltInstruccion); } public function get MaxSublevels():int{ return (_maxSublevels); } public function Pause():void{ var _local1:int; var _local2:Array; var _local3:int; var _local4:Enemy; if (_update){ _update = false; _local1 = _collisionManager.Enemies.length; _local2 = new Array(); _local3 = 0; while (_local3 < _local1) { _local2 = (_collisionManager.Enemies[_local3] as Array); for each (_local4 in _local2) { if (((Enemy(_local4).Dead) && (Enemy(_local4).View.visible))){ Enemy(_local4).View.visible = false; }; Enemy(_local4).TryNewPrimaryState(Enemy.PRI_ST_IDLE); Enemy(_local4).TryNewSecondaryState(Enemy.SEC_ST_IDLE); FinalBossesThree._attacking = false; }; _local3++; }; } else { if (MovieClipUtils.Instance.Stop){ MovieClipUtils.Instance.AnimationMovieClipStart(); }; _update = true; if (_forzeNotUpdate){ HUDManager.Instance.Show(); _forzeNotUpdate = false; }; if (GameTemplateMainApp.StateGame != GameTemplateMainApp.STATE_IN_GAME){ UIFactory.Instance.LevelIndicator.SetTexts(); UIFactory.Instance.LevelIndicator.FadeIn(); GameTemplateMainApp.StateGame = GameTemplateMainApp.STATE_IN_GAME; }; }; _lastTime = 0; } public function get FinalScore():int{ return (_finalScore); } public function get FinalLevel():Boolean{ return (_finalLevel); } public function set GameWinner(_arg1:Boolean):void{ _gameWinner = _arg1; } public function RepositionAfterTransforming():void{ var _local1:Number; var _local2:int; var _local3:int; var _local4:Number; var _local5:int; var _local6:int; var _local7:int; _local1 = _levelLimitsContainer.x; _local2 = 1; _local3 = 1; _local5 = _sectionLimits.length; _local6 = 0; while (_local6 < _local5) { _local4 = (_local1 + _sectionLimits[_local6]); if (_local4 < 0){ _local2 = (_local6 + 2); }; if (_local4 < 600){ _local3 = (_local6 + 2); }; _local6++; }; _mainCharacter.CurrentAbsoluteX = _mainCharacter.PreviousAbsoluteX; _local7 = -1; if ((((_mainCharacter.View.scaleX > 0)) && ((_mainCharacter.CurrentTransformationId == Character.TRANSFORMATION_FOUR_ARMS)))){ _local7 = 1; }; _mainCharacter.CurrentAbsoluteX = (_mainCharacter.CurrentAbsoluteX + _local7); _mainCharacter.X = (_mainCharacter.X + _local7); _collisionManager.Update(_local2, _local3); } public function get ScorePerLife():Number{ return ((_scorePerLife * _mainCharacter.LifeNumber)); } public function get Update():Boolean{ return (_update); } public function GameLoop(_arg1:Event):void{ var _local2:int; var _local3:Array; var _local4:int; var _local5:Enemy; var _local6:Number; var _local7:int; var _local8:int; var _local9:Number; var _local10:int; var _local11:int; InputManager.Instance.Update(); if (_update){ if (_lastTime == 0){ _lastTime = getTimer(); return; }; _currentTime = getTimer(); _secondsPassed = ((_currentTime - _lastTime) * 0.001); if (((_mainCharacter.Pause) || (_mainCharacter.PauseComplete))){ if (!_pauseProcessed){ _pauseProcessed = true; _lastTime = 0; _mainCharacter.SpeedX = 0; _mainCharacter.SpeedY = 0; _ShotsEnemyManager.Pause(); _ShotsFriendlyManager.Pause(); _local2 = _collisionManager.Enemies.length; _local3 = new Array(); _local4 = 0; while (_local4 < _local2) { _local3 = (_collisionManager.Enemies[_local4] as Array); for each (_local5 in _local3) { if (((Enemy(_local5).Dead) && (Enemy(_local5).View.visible))){ Enemy(_local5).View.visible = false; }; Enemy(_local5).TryNewPrimaryState(Enemy.PRI_ST_IDLE); Enemy(_local5).TryNewSecondaryState(Enemy.SEC_ST_IDLE); FinalBossesThree._attacking = false; }; _local4++; }; if (!MovieClipUtils.Instance.Stop){ MovieClipUtils.Instance.AnimationMovieClipStop(); }; }; } else { if (_pauseProcessed){ _pauseProcessed = false; if (MovieClipUtils.Instance.Stop){ MovieClipUtils.Instance.AnimationMovieClipStart(); }; }; _local6 = _levelLimitsContainer.x; _local7 = 1; _local8 = 1; _local10 = _sectionLimits.length; _local11 = 0; while (_local11 < _local10) { _local9 = (_local6 + _sectionLimits[_local11]); if (_local9 < 0){ _local7 = (_local11 + 2); }; if (_local9 < 600){ _local8 = (_local11 + 2); }; _local11++; }; _mainCharacter.Update(_secondsPassed); _mainCharacter.X = (_mainCharacter.X + (_mainCharacter.CurrentAbsoluteX - _mainCharacter.PreviousAbsoluteX)); _mainCharacter.Y = (_mainCharacter.Y + (_mainCharacter.CurrentAbsoluteY - _mainCharacter.PreviousAbsoluteY)); _enemyManager.Update(_secondsPassed, _local7, _local8); _ShotsFriendlyManager.Update(); _ShotsEnemyManager.Update(); _specialWallManager.Update(); _wallBlockedManager.Update(); _collisionManager.Update(_local7, _local8); ScrollManager.Instance.Update(); }; _lastTime = _currentTime; } else { if (GameTemplateMainApp.StateGame == GameTemplateMainApp.STATE_INSTRUCTIONS){ MovieClipUtils.Instance.AnimationMovieClipStop(); }; _lastTime = 0; }; } public function get GameWinner():Boolean{ return (_gameWinner); } public function EnemyDead():void{ _enemysDead++; } public function set ActiveCannonBolt(_arg1:Boolean):void{ _activeCannonBolt = _arg1; } public function get ActiveCannonBolt():Boolean{ return (_activeCannonBolt); } public function get ScorePerEnemy():Number{ return ((_scorePerEnemy * _enemysDead)); } private function InitializeBackground():void{ var _local1:MovieClip; if (_numberLevel == 1){ _local1 = new Background1Asset(); } else { if (_numberLevel == 2){ _local1 = new Background2Asset(); } else { _local1 = new Background3Asset(); }; }; _currentBackground = new ScrollableScreenElement(_local1, ConfigLoader.Instance.Config["BackgroundDepthHorizontal"], ConfigLoader.Instance.Config["BackgroundDepthVertical"], GameTemplateMainApp.SCREEN_WIDTH, GameTemplateMainApp.SCREEN_HEIGHT, false, false); ScrollManager.Instance.AddScrollable(_currentBackground, true); LayerFactory.Instance.GetLayer(LayerFactory.LAYER_BACKGROUND).addChild(_local1); } public static function GetInstance():GameManager{ if (!(GameManager._instance is GameManager)){ GameManager._instance = new GameManager(new SingletonBlocker()); }; return (_instance); } public static function get Instance():GameManager{ return (GetInstance()); } } }//package game class SingletonBlocker { private function SingletonBlocker(){ } }
Section 264
//InputManager (game.InputManager) package game { import flash.display.*; import ui.*; import model.*; import com.gamesandweb.game.*; import config.*; import com.gamesandweb.utils.*; public class InputManager { private var _character:Character;// = null private var _actions:uint;// = 0 private static var _instance:InputManager = null; public function InputManager(_arg1:SingletonBlocker){ _character = null; _actions = 0; super(); if (_arg1 == null){ throw (new Error(("Public construction not allowed. " + "Use getInstance()"))); }; } private function _RemoveCursorActions():void{ _actions = (_actions & ~(Character.ACTION_UP)); _actions = (_actions & ~(Character.ACTION_DOWN)); _actions = (_actions & ~(Character.ACTION_LEFT)); _actions = (_actions & ~(Character.ACTION_RIGHT)); } public function AddCharacter(_arg1:Character):void{ _character = _arg1; } public function Update():void{ _actions = Character.ACTION_NONE; if (Key.isDown(Key.Left)){ _actions = (_actions | Character.ACTION_LEFT); } else { if (Key.isDown(Key.Right)){ _actions = (_actions | Character.ACTION_RIGHT); }; }; if (Key.isDown(Key.Up)){ _actions = (_actions | Character.ACTION_UP); } else { if (Key.isDown(Key.Down)){ _actions = (_actions | Character.ACTION_DOWN); }; }; if (((Key.isDown(Key.Shift)) || (Key.isDown(Key.x)))){ _actions = (_actions | Character.ACTION_FIREZ); } else { if (((Key.isDown(Key.Control)) || (Key.isDown(Key.z)))){ _actions = (_actions | Character.ACTION_FIREX); }; }; if (Key.isDown(Key.Spacebar)){ _actions = (_actions | Character.ACTION_SPACE); if (GameTemplateMainApp.StateGame != GameTemplateMainApp.STATE_IN_GAME){ GameTemplateMainApp.Instance.OnSpacePress(_actions); }; }; if (ConfigLoader.Instance.Config["DebugMode"] == "true"){ if (Key.isDown(Key.n1)){ if (GameManager.Instance.NumberSubLevel < 4){ Global.DispatchGameEvent("SubLevelComplete"); }; }; if (Key.isDown(Key.n2)){ Global.DispatchGameEvent("LevelComplete"); if (GameManager.Instance.NumberLevel < 3){ if (GameManager.Instance.NumberLevel == 1){ GameManager.Instance.ActiveFourArms = true; } else { GameManager.Instance.ActiveCannonBolt = true; }; } else { Global.DispatchGameEvent("OnGameWon"); UIFactory.Instance.ResultScreen.FadeOut(); }; }; if (Key.isDown(Key.n3)){ if (!_character.Dead){ _character.EnergySubtract(100); }; }; }; if (_character != null){ _character.UpdateAction(_actions); }; } private function _RemoveFireActions():void{ _actions = (_actions & ~(Character.ACTION_FIREZ)); _actions = (_actions & ~(Character.ACTION_FIREX)); _actions = (_actions & ~(Character.ACTION_SPACE)); } public function RemoveCharacters(_arg1:Character):void{ _character = null; } public static function get Instance():InputManager{ if (!(InputManager._instance is InputManager)){ InputManager._instance = new InputManager(new SingletonBlocker()); }; return (_instance); } public static function Finalize():void{ Key.finalize(); } public static function Initialize(_arg1:Stage):void{ Key.initialize(_arg1); } } }//package game class SingletonBlocker { private function SingletonBlocker(){ } }
Section 265
//TweenLite (gs.TweenLite) package gs { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.geom.*; public class TweenLite { public var delay:Number; protected var _hasUpdate:Boolean; public var started:Boolean; protected var _subTweens:Array; public var initted:Boolean; public var active:Boolean; public var startTime:Number; public var target:Object; public var duration:Number; protected var _hst:Boolean; protected var _isDisplayObject:Boolean; public var gc:Boolean; public var vars:Object; public var ease:Function; public var tweens:Array; protected var _specialVars:Object; public var combinedTimeScale:Number; public var initTime:Number; private static var _timer:Timer = new Timer(2000); private static var _classInitted:Boolean; public static var defaultEase:Function = TweenLite.easeOut; public static var version:Number = 9.3; public static var masterList:Dictionary = new Dictionary(false); public static var currentTime:uint; public static var overwriteManager:Object; public static var killDelayedCallsTo:Function = TweenLite.killTweensOf; public static var timingSprite:Sprite = new Sprite(); public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){ var _local4:int; super(); if (_arg1 == null){ return; }; if (!_classInitted){ currentTime = getTimer(); timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true); if (overwriteManager == null){ overwriteManager = {mode:1, enabled:false}; }; _timer.addEventListener("timer", killGarbage, false, 0, true); _timer.start(); _classInitted = true; }; this.vars = _arg3; this.duration = ((_arg2) || (0.001)); this.delay = ((_arg3.delay) || (0)); this.combinedTimeScale = ((_arg3.timeScale) || (1)); this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0)))); this.target = _arg1; _isDisplayObject = Boolean((((_arg1 is DisplayObject)) || (_arg1.hasOwnProperty("isTweenProxy")))); if (!(this.vars.ease is Function)){ this.vars.ease = defaultEase; }; if (this.vars.easeParams != null){ this.vars.proxiedEase = this.vars.ease; this.vars.ease = easeProxy; }; this.ease = this.vars.ease; if (!isNaN(Number(this.vars.autoAlpha))){ this.vars.alpha = Number(this.vars.autoAlpha); this.vars.visible = Boolean((this.vars.alpha > 0)); }; _specialVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars; this.tweens = []; _subTweens = []; _hst = (this.initted = false); this.initTime = currentTime; this.startTime = (this.initTime + (this.delay * 1000)); _local4 = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite); if ((((masterList[_arg1] == undefined)) || (((!((_arg1 == null))) && ((_local4 == 1)))))){ masterList[_arg1] = []; }; masterList[_arg1].push(this); if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){ initTweenVals(); if (this.active){ render((this.startTime + 1)); } else { render(this.startTime); }; if (((((!((_specialVars.visible == null))) && ((this.vars.runBackwards == true)))) && (_isDisplayObject))){ this.target.visible = _specialVars.visible; }; }; } public function set enabled(_arg1:Boolean):void{ var _local2:Array; var _local3:Boolean; var _local4:int; if (_arg1){ if (masterList[this.target] == undefined){ masterList[this.target] = [this]; } else { _local2 = masterList[this.target]; _local4 = (_local2.length - 1); while (_local4 > -1) { if (_local2[_local4] == this){ _local3 = true; break; }; _local4--; }; if (!_local3){ masterList[this.target].push(this); }; }; }; this.gc = (_arg1) ? false : true; if (this.gc){ this.active = false; } else { this.active = this.started; }; } public function render(_arg1:uint):void{ var _local2:Number; var _local3:Number; var _local4:Object; var _local5:int; _local2 = ((_arg1 - this.startTime) * 0.001); if (_local2 >= this.duration){ _local2 = this.duration; _local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0; } else { _local3 = this.ease(_local2, 0, 1, this.duration); }; _local5 = (this.tweens.length - 1); while (_local5 > -1) { _local4 = this.tweens[_local5]; _local4[0][_local4[1]] = (_local4[2] + (_local3 * _local4[3])); _local5--; }; if (_hst){ _local5 = (_subTweens.length - 1); while (_local5 > -1) { _subTweens[_local5].proxy(_subTweens[_local5], _local2); _local5--; }; }; if (_hasUpdate){ this.vars.onUpdate.apply(null, this.vars.onUpdateParams); }; if (_local2 == this.duration){ complete(true); }; } public function activate():void{ this.started = (this.active = true); if (!this.initted){ initTweenVals(); }; if (this.vars.onStart != null){ this.vars.onStart.apply(null, this.vars.onStartParams); }; if (this.duration == 0.001){ this.startTime = (this.startTime - 1); }; } public function clear():void{ this.tweens = []; _subTweens = []; this.vars = {}; _hst = (_hasUpdate = false); } protected function addSubTween(_arg1:String, _arg2:Function, _arg3:Object, _arg4:Object, _arg5:Object=null):void{ var _local6:String; _subTweens[_subTweens.length] = {name:_arg1, proxy:_arg2, target:_arg3, info:_arg5}; for (_local6 in _arg4) { if (typeof(_arg4[_local6]) == "number"){ this.tweens[this.tweens.length] = [_arg3, _local6, _arg3[_local6], (_arg4[_local6] - _arg3[_local6]), _arg1]; } else { this.tweens[this.tweens.length] = [_arg3, _local6, _arg3[_local6], Number(_arg4[_local6]), _arg1]; }; }; _hst = true; } public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{ var _local3:String; var _local4:int; var _local5:Array; var _local6:ColorTransform; var _local7:ColorTransform; var _local8:Object; if (((!(_arg1)) && (overwriteManager.enabled))){ overwriteManager.manageOverwrites(this, masterList[this.target]); }; if ((this.target is Array)){ _local5 = ((this.vars.endArray) || ([])); _local4 = 0; while (_local4 < _local5.length) { if (((!((this.target[_local4] == _local5[_local4]))) && (!((this.target[_local4] == undefined))))){ this.tweens[this.tweens.length] = [this.target, _local4.toString(), this.target[_local4], (_local5[_local4] - this.target[_local4]), _local4.toString()]; }; _local4++; }; } else { if (((((!((typeof(_specialVars.tint) == "undefined"))) || ((this.vars.removeTint == true)))) && (this.target.hasOwnProperty("transform")))){ _local6 = this.target.transform.colorTransform; _local7 = new ColorTransform(); if (_specialVars.alpha != undefined){ _local7.alphaMultiplier = _specialVars.alpha; delete _specialVars.alpha; } else { _local7.alphaMultiplier = this.target.alpha; }; if (((!((this.vars.removeTint == true))) && (((((!((_specialVars.tint == null))) && (!((_specialVars.tint == ""))))) || ((_specialVars.tint == 0)))))){ _local7.color = _specialVars.tint; }; addSubTween("tint", tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local6, endColor:_local7}); }; if (((!((_specialVars.frame == null))) && (_isDisplayObject))){ addSubTween("frame", frameProxy, {frame:this.target.currentFrame}, {frame:_specialVars.frame}, {target:this.target}); }; if (((!(isNaN(this.vars.volume))) && (this.target.hasOwnProperty("soundTransform")))){ addSubTween("volume", volumeProxy, this.target.soundTransform, {volume:this.vars.volume}, {target:this.target}); }; if (((!((_specialVars.visible == null))) && (_isDisplayObject))){ addSubTween("visible", visibleProxy, {}, {}, {tween:this}); }; for (_local3 in _specialVars) { if ((((((((((((((((((((((((((((((((((((_local3 == "ease")) || ((_local3 == "delay")))) || ((_local3 == "overwrite")))) || ((_local3 == "onComplete")))) || ((_local3 == "onCompleteParams")))) || ((_local3 == "runBackwards")))) || ((_local3 == "visible")))) || ((_local3 == "autoOverwrite")))) || ((_local3 == "persist")))) || ((_local3 == "onUpdate")))) || ((_local3 == "onUpdateParams")))) || ((_local3 == "autoAlpha")))) || ((_local3 == "onStart")))) || ((_local3 == "onStartParams")))) || ((_local3 == "renderOnStart")))) || ((_local3 == "proxiedEase")))) || ((_local3 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local3) + " ")) == -1))))))){ } else { if (((!(((_isDisplayObject) && ((((((_local3 == "tint")) || ((_local3 == "removeTint")))) || ((_local3 == "frame"))))))) && (!((((_local3 == "volume")) && (this.target.hasOwnProperty("soundTransform"))))))){ if (typeof(_specialVars[_local3]) == "number"){ this.tweens[this.tweens.length] = [this.target, _local3, this.target[_local3], (_specialVars[_local3] - this.target[_local3]), _local3]; } else { this.tweens[this.tweens.length] = [this.target, _local3, this.target[_local3], Number(_specialVars[_local3]), _local3]; }; }; }; }; }; if (this.vars.runBackwards == true){ _local4 = (this.tweens.length - 1); while (_local4 > -1) { _local8 = this.tweens[_local4]; _local8[2] = (_local8[2] + _local8[3]); _local8[3] = (_local8[3] * -1); _local4--; }; }; if (this.vars.onUpdate != null){ _hasUpdate = true; }; this.initted = true; } protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams))); } public function killVars(_arg1:Object):void{ if (overwriteManager.enabled){ overwriteManager.killVars(_arg1, this.vars, this.tweens, _subTweens, []); }; } public function get enabled():Boolean{ return ((this.gc) ? false : true); } public function complete(_arg1:Boolean=false):void{ if (!_arg1){ if (!this.initted){ initTweenVals(); }; this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale)); render(currentTime); return; }; if (this.vars.persist != true){ this.enabled = false; }; if (this.vars.onComplete != null){ this.vars.onComplete.apply(null, this.vars.onCompleteParams); }; } public static function frameProxy(_arg1:Object, _arg2:Number=0):void{ _arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame)); } public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{ if (_arg1 != null){ if (_arg2){ _arg1.clear(); }; _arg1.enabled = false; }; } public static function visibleProxy(_arg1:Object, _arg2:Number):void{ var _local3:TweenLite; _local3 = _arg1.info.tween; if (_local3.duration == _arg2){ if (((!((_local3.vars.runBackwards == true))) && ((_local3.ease == _local3.vars.ease)))){ _local3.target.visible = _local3.vars.visible; }; } else { if (_local3.target.visible != true){ _local3.target.visible = true; }; }; } public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{ var _local3:Array; var _local4:int; var _local5:TweenLite; if (((!((_arg1 == null))) && (!((masterList[_arg1] == undefined))))){ _local3 = masterList[_arg1]; _local4 = (_local3.length - 1); while (_local4 > -1) { _local5 = _local3[_local4]; if (((_arg2) && (!(_local5.gc)))){ _local5.complete(false); }; _local5.clear(); _local4--; }; delete masterList[_arg1]; }; } public static function updateAll(_arg1:Event=null):void{ var _local2:uint; var _local3:Dictionary; var _local4:Array; var _local5:int; var _local6:TweenLite; _local2 = (currentTime = getTimer()); _local3 = masterList; for each (_local4 in _local3) { _local5 = (_local4.length - 1); while (_local5 > -1) { _local6 = _local4[_local5]; if (_local6 == null){ } else { if (_local6.active){ _local6.render(_local2); } else { if (_local6.gc){ _local4.splice(_local5, 1); } else { if (_local2 >= _local6.startTime){ _local6.activate(); _local6.render(_local2); }; }; }; }; _local5--; }; }; } public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{ return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0})); } public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ _arg3.runBackwards = true; return (new TweenLite(_arg1, _arg2, _arg3)); } public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } public static function tintProxy(_arg1:Object, _arg2:Number=0):void{ var _local3:Number; var _local4:Number; var _local5:Object; var _local6:Object; _local3 = _arg1.target.progress; _local4 = (1 - _local3); _local5 = _arg1.info.color; _local6 = _arg1.info.endColor; _arg1.info.target.transform.colorTransform = new ColorTransform(((_local5.redMultiplier * _local4) + (_local6.redMultiplier * _local3)), ((_local5.greenMultiplier * _local4) + (_local6.greenMultiplier * _local3)), ((_local5.blueMultiplier * _local4) + (_local6.blueMultiplier * _local3)), ((_local5.alphaMultiplier * _local4) + (_local6.alphaMultiplier * _local3)), ((_local5.redOffset * _local4) + (_local6.redOffset * _local3)), ((_local5.greenOffset * _local4) + (_local6.greenOffset * _local3)), ((_local5.blueOffset * _local4) + (_local6.blueOffset * _local3)), ((_local5.alphaOffset * _local4) + (_local6.alphaOffset * _local3))); } public static function volumeProxy(_arg1:Object, _arg2:Number=0):void{ _arg1.info.target.soundTransform = _arg1.target; } protected static function killGarbage(_arg1:TimerEvent):void{ var _local2:Dictionary; var _local3:Object; var _local4:Array; _local2 = masterList; for (_local3 in _local2) { if (_local2[_local3].length == 0){ delete _local2[_local3]; }; }; } public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{ return (new TweenLite(_arg1, _arg2, _arg3)); } } }//package gs
Section 266
//BenSamurai (model.BenSamurai) package model { import flash.events.*; import flash.display.*; import flash.geom.*; import config.*; public class BenSamurai extends Transformation { private var _direction:int; private var _jumpingPoseMc:MovieClip;// = null private var _globalPositionShuriken:Point; private var _globalPositionShurikenMC:MovieClip;// = null private var _attack:Boolean; public function BenSamurai(_arg1:MovieClip, _arg2:Character):void{ _jumpingPoseMc = null; _globalPositionShurikenMC = null; _globalPositionShuriken = new Point(); super(_arg1, _arg2); _attack = false; LoadConfig(); } override public function TryTransformation(_arg1:int):void{ switch (_arg1){ case Character.TRANSFORMATION_BEN_SAMURAI: break; case Character.TRANSFORMATION_CANNONBOLT: _primaryStateMc.gotoAndStop("CannonBolt_idle"); _character.X = (_character.X - 20); break; case Character.TRANSFORMATION_FOUR_ARMS: _primaryStateMc.gotoAndStop("FourArms_idle"); _character.X = (_character.X - 20); break; }; } override public function GotoSecondaryStateAnimation(_arg1:int):void{ if (_secondaryStateMc == null){ return; }; if (_arg1 == Character.SEC_STATE_SWINGING_SWORD){ _character.HitAreaAttack = MovieClip(_primaryStateMc.getChildByName("hitAreaAttack_mc")); Sfx.PlaySound(Sfx.SFX_BEN_SWORD); }; if ((((((_character.SecondaryState == Character.SEC_STATE_THROWING_SHURIKEN)) || ((_character.SecondaryState == Character.SEC_STATE_SWINGING_SWORD)))) && (_attack))){ _attack = false; }; _secondaryStateMc.gotoAndStop(_secondaryStateLabels[_arg1]); } override public function Shot():void{ _globalPositionShurikenMC = MovieClip(_primaryStateMc.getChildByName("LugarSuriken_mc")); _globalPositionShuriken = _globalPositionShurikenMC.localToGlobal(new Point(0, 0)); if (_character.View.scaleX >= 0){ _direction = 1; _character.ShotsFriendlyManagerOfBen.AddShot(_globalPositionShuriken, _direction); } else { _direction = -1; _character.ShotsFriendlyManagerOfBen.AddShot(_globalPositionShuriken, _direction); }; } private function ResetSecondStateMc(_arg1:Event):void{ GameTemplateMainApp.MyStage.stage.removeEventListener(Event.RENDER, ResetSecondStateMc); switch (_character.PrimaryState){ case Character.PRI_ST_IDLE: case Character.PRI_ST_DIE: _secondaryStateMc = (_view.getChildByName("ben_mc") as MovieClip); break; case Character.PRI_ST_HIT: _secondaryStateMc = MovieClip(MovieClip(_view.getChildByName("ben_mc")).getChildByName("ben1_mc")); break; case Character.PRI_ST_CROUCHING: case Character.PRI_ST_RUNNING: _secondaryStateMc = MovieClip(MovieClip(MovieClip(_view.getChildByName("ben_mc")).getChildByName("ben2_mc")).getChildByName("ben3_mc")); break; case Character.PRI_ST_JUMPING: _jumpingPoseMc = MovieClip(MovieClip(_view.getChildByName("ben_mc")).getChildByName("ben2_mc")); _secondaryStateMc = MovieClip(_jumpingPoseMc.getChildByName("ben3_mc")); break; }; if ((((((_character.SecondaryState == Character.SEC_STATE_THROWING_SHURIKEN)) || ((_character.SecondaryState == Character.SEC_STATE_SWINGING_SWORD)))) && (_attack))){ _attack = false; }; if (_character.PrimaryState != Character.PRI_ST_HIT){ TryNewSecondaryState(Character.SEC_STATE_IDLE); }; } override public function UpdateAirPose(_arg1:Boolean):void{ if (_jumpingPoseMc != null){ if (_arg1){ if (((!((_jumpingPoseMc.currentFrame == 6))) && ((_jumpingPoseMc.currentFrame <= 5)))){ _jumpingPoseMc.gotoAndStop(6); } else { if (_jumpingPoseMc.currentFrame < 10){ _jumpingPoseMc.nextFrame(); }; }; }; if (!_arg1){ if (((!((_jumpingPoseMc.currentFrame == 1))) && ((_jumpingPoseMc.currentFrame >= 6)))){ _jumpingPoseMc.gotoAndStop(1); } else { if (_jumpingPoseMc.currentFrame < 5){ _jumpingPoseMc.nextFrame(); }; }; }; }; } public function set Attack(_arg1):void{ _attack = _arg1; } override public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == _character.PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case Character.PRI_ST_IDLE: _character.Crouching = false; _character.PrimaryState = _arg1; _local2 = true; break; case Character.PRI_ST_CROUCHING: if (_character.Jumping){ break; }; _character.Crouching = true; _character.PrimaryState = _arg1; _local2 = true; Sfx.PlaySound(Sfx.SFX_BEN_CROUCHING); break; case Character.PRI_ST_HIT: _character.Crouching = false; _character.PrimaryState = _arg1; _local2 = true; break; case Character.PRI_ST_RUNNING: if (((_character.Jumping) || (_character.Crouching))){ break; }; _character.PrimaryState = _arg1; _local2 = true; break; case Character.PRI_ST_JUMPING: _character.PrimaryState = _arg1; _local2 = true; break; case Character.PRI_ST_DIE: _character.PrimaryState = _arg1; _local2 = true; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } override public function TryNewSecondaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == _character.SecondaryState){ return (false); }; _local2 = false; switch (_arg1){ case Character.SEC_STATE_IDLE: _character.SecondaryState = _arg1; _local2 = true; break; case Character.SEC_STATE_SWINGING_SWORD: if (_character.SecondaryState == Character.SEC_STATE_IDLE){ _character.SecondaryState = _arg1; _onCurrentAnimationEnd = SetSecondaryStateIdle; _local2 = true; _character.AttackCollision = true; }; break; case Character.SEC_STATE_THROWING_SHURIKEN: if (_character.SecondaryState == Character.SEC_STATE_IDLE){ _character.SecondaryState = _arg1; _onCurrentAnimationEnd = SetSecondaryStateIdle; _local2 = true; _character.AttackCollision = true; }; break; }; if (_local2){ GotoSecondaryStateAnimation(_arg1); }; return (_local2); } public function get Attack():Boolean{ return (_attack); } override public function Update(_arg1:Number):void{ } override public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMc == null){ return; }; GameTemplateMainApp.MyStage.addEventListener(Event.RENDER, ResetSecondStateMc); GameTemplateMainApp.MyStage.stage.invalidate(); _primaryStateMc.gotoAndStop(_primaryStateLabels[_arg1]); } public function LoadConfig():void{ Fragility = ConfigLoader.Instance.Config["BenFragility"]; EnergyToSubtractEnemyAttack = ConfigLoader.Instance.Config["BenEnergySubtractsForAttack"]; EnergyToSubtractEnemyShot = ConfigLoader.Instance.Config["BenEnergySubtractsForShot"]; EnergyToSubtractEnemySuperAttack = ConfigLoader.Instance.Config["BenEnergySubtractsForSuperAttack"]; } override public function UpdateAction(_arg1:uint):void{ if (_character.Transforming){ return; }; if ((_arg1 & Character.ACTION_UP) == Character.ACTION_UP){ }; if ((_arg1 & Character.ACTION_DOWN) == Character.ACTION_DOWN){ TryNewPrimaryState(Character.PRI_ST_CROUCHING); } else { if (_character.Crouching){ TryNewPrimaryState(Character.PRI_ST_IDLE); }; }; if (((!(_character.Crouching)) && (!(_character.Jumping)))){ if ((_arg1 & Character.ACTION_LEFT) == Character.ACTION_LEFT){ if (((!(_character.OnPressSPACE)) && (!((_character.PrimaryState == Character.PRI_ST_HIT))))){ TryNewPrimaryState(Character.PRI_ST_RUNNING); }; } else { if ((_arg1 & Character.ACTION_RIGHT) == Character.ACTION_RIGHT){ if (((!(_character.OnPressSPACE)) && (!((_character.PrimaryState == Character.PRI_ST_HIT))))){ TryNewPrimaryState(Character.PRI_ST_RUNNING); }; } else { if (_character.PrimaryState != Character.PRI_ST_HIT){ TryNewPrimaryState(Character.PRI_ST_IDLE); }; }; }; }; if ((_arg1 & Character.ACTION_FIREX) == Character.ACTION_FIREX){ TryNewSecondaryState(Character.SEC_STATE_SWINGING_SWORD); _attack = true; }; if ((_arg1 & Character.ACTION_FIREZ) == Character.ACTION_FIREZ){ if (!_attack){ TryNewSecondaryState(Character.SEC_STATE_THROWING_SHURIKEN); _attack = true; }; }; if ((_arg1 & Character.ACTION_SPACE) == Character.ACTION_SPACE){ }; } } }//package model
Section 267
//CannonBolt (model.CannonBolt) package model { import flash.events.*; import flash.display.*; import config.*; public class CannonBolt extends Transformation { private var _direction:int; private var ACCELERATION_X_CANNONBOLT:int; private var SPEED_ATTACK_X:int; private var _notPressZ:Boolean;// = false private var _fast:Boolean;// = false private var _attack:Boolean;// = false private var _account:int; private var SPEED_ATTACK_LIMIT:int; public function CannonBolt(_arg1:MovieClip, _arg2:Character){ _fast = false; _attack = false; _notPressZ = false; super(_arg1, _arg2); _account = 0; LoadConfig(); } override public function TryTransformation(_arg1:int):void{ switch (_arg1){ case Character.TRANSFORMATION_CANNONBOLT: case Character.TRANSFORMATION_FOUR_ARMS: break; case Character.TRANSFORMATION_BEN_SAMURAI: _primaryStateMc.gotoAndStop("BenSamurai_idle"); break; }; } override public function GotoSecondaryStateAnimation(_arg1:int):void{ if (_secondaryStateMc == null){ return; }; if ((((_arg1 == Character.SEC_STATE_FAST)) || ((_arg1 == Character.SEC_STATE_ATTACK)))){ _character.HitAreaAttack = MovieClip(_primaryStateMc.getChildByName("hitAreaAttack_mc")); }; _secondaryStateMc.gotoAndStop(_secondaryStateLabels[_arg1]); } private function ResetSecondStateMc(_arg1:Event):void{ GameTemplateMainApp.MyStage.removeEventListener(Event.RENDER, ResetSecondStateMc); _secondaryStateMc = _primaryStateMc; } override public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == _character.PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case Character.PRI_ST_IDLE: _character.Crouching = false; _character.PrimaryState = _arg1; _local2 = true; break; case Character.PRI_ST_HIT: _character.Crouching = false; _character.PrimaryState = _arg1; _local2 = true; break; case Character.PRI_ST_RUNNING: _character.PrimaryState = _arg1; _local2 = true; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } override public function TryNewSecondaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == _character.SecondaryState){ return (false); }; _local2 = false; switch (_arg1){ case Character.SEC_STATE_IDLE: _character.SecondaryState = _arg1; _local2 = true; break; case Character.SEC_STATE_RUN: _character.SecondaryState = _arg1; _local2 = true; break; case Character.SEC_STATE_FAST: _character.SecondaryState = _arg1; _local2 = true; _character.AttackCollision = true; break; case Character.SEC_STATE_ATTACK: Sfx.PlaySound(Sfx.SFX_BEN_SONIC); _character.SecondaryState = _arg1; _local2 = true; _character.AttackCollision = true; break; }; if (_local2){ GotoSecondaryStateAnimation(_arg1); }; return (_local2); } public function LoadConfig():void{ Fragility = ConfigLoader.Instance.Config["CannonboltFragility"]; EnergyToSubtractEnemyAttack = ConfigLoader.Instance.Config["CannonboltEnergySubtractsForAttack"]; EnergyToSubtractEnemyShot = ConfigLoader.Instance.Config["CannonboltEnergySubtractsForShot"]; EnergyToSubtractEnemySuperAttack = ConfigLoader.Instance.Config["CannonboltEnergySubtractsForSuperAttack"]; SPEED_ATTACK_X = ConfigLoader.Instance.Config["CannonboltSpeedAttackX"]; SPEED_ATTACK_LIMIT = ConfigLoader.Instance.Config["CannonboltSpeedAttackLimit"]; ACCELERATION_X_CANNONBOLT = ConfigLoader.Instance.Config["CannonboltAcelerationX"]; } override public function Update(_arg1:Number):void{ if (_character.Transforming){ return; }; if (_attack){ if (_direction == 1){ _character.SpeedX = SPEED_ATTACK_X; } else { if (_direction == -1){ _character.SpeedX = -(SPEED_ATTACK_X); }; }; _account = (_account + _character.SpeedX); if (Math.abs(_account) > SPEED_ATTACK_LIMIT){ _attack = false; TryNewPrimaryState(Character.SEC_STATE_RUN); _account = 0; }; }; if (((!(_fast)) && ((_character.SecondaryState == Character.SEC_STATE_FAST)))){ TryNewPrimaryState(Character.SEC_STATE_RUN); }; } override public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMc == null){ return; }; GameTemplateMainApp.MyStage.addEventListener(Event.RENDER, ResetSecondStateMc); GameTemplateMainApp.MyStage.invalidate(); if (_arg1 == Character.PRI_ST_HIT){ _primaryStateMc.gotoAndStop((_primaryStateLabels[_arg1] + _primaryStateLabels[_character.PreviousPrimaryState])); return; }; _primaryStateMc.gotoAndStop(_primaryStateLabels[_arg1]); } override public function UpdateAction(_arg1:uint):void{ if (_character.Transforming){ return; }; if (!_character.Crouching){ if ((_arg1 & Character.ACTION_LEFT) == Character.ACTION_LEFT){ if (!_character.OnPressSPACE){ TryNewPrimaryState(Character.PRI_ST_RUNNING); if (((!(_fast)) && (!(_attack)))){ _character.SpeedX = -(Character.MAX_SPEED_X); }; if (((_fast) && (!(_attack)))){ _character.SpeedX = (_character.SpeedX - ACCELERATION_X_CANNONBOLT); }; }; } else { if ((_arg1 & Character.ACTION_RIGHT) == Character.ACTION_RIGHT){ if (!_character.OnPressSPACE){ TryNewPrimaryState(Character.PRI_ST_RUNNING); if (((!(_fast)) && (!(_attack)))){ _character.SpeedX = Character.MAX_SPEED_X; }; if (((_fast) && (!(_attack)))){ _character.SpeedX = (_character.SpeedX + ACCELERATION_X_CANNONBOLT); }; }; } else { TryNewPrimaryState(Character.PRI_ST_IDLE); }; }; }; if ((_arg1 & Character.ACTION_FIREZ) == Character.ACTION_FIREZ){ if (_character.PrimaryState == Character.PRI_ST_RUNNING){ TryNewSecondaryState(Character.SEC_STATE_FAST); }; _fast = true; } else { _fast = false; }; if ((_arg1 & Character.ACTION_FIREX) == Character.ACTION_FIREX){ if (((((!(_attack)) && (!(_notPressZ)))) && ((_character.PrimaryState == Character.PRI_ST_RUNNING)))){ _attack = true; if (_character.PreviousSpeedX != 0){ if (_character.PreviousSpeedX >= 0){ _direction = 1; } else { _direction = -1; }; } else { if (_character.PreviousSpeedXNotZero >= 0){ _direction = 1; } else { _direction = -1; }; }; TryNewSecondaryState(Character.SEC_STATE_ATTACK); }; _notPressZ = true; } else { _notPressZ = false; if (_character.SecondaryState != Character.SEC_STATE_FAST){ _character.SecondaryState = _character.PrimaryState; }; }; } } }//package model
Section 268
//Character (model.Character) package model { import flash.display.*; import ui.*; import game.*; import com.gamesandweb.game.*; import flash.geom.*; import collision.*; import utils.*; import scroll.*; import com.gamesandweb.game.events.*; import config.*; public class Character implements ICollidable { private var _y:Number; private var _selectTransformation:int; private var _speedX:Number; private var _speedY:Number; private var _numberSuriken:int; private var _accountantTinte:int;// = 0 private var _pointPlatform:Point; private var _wasRunning:Boolean;// = false private var _enableTransformation:Boolean; private var _reset:Boolean;// = false protected var _currentTransformationId:int; protected var _crouching:Boolean; private var _oldSpeedX:Number; private var _oldSpeedY:Number; private var _energyOmnitrix:Number; private var _point:int; private var _BenSamurai:BenSamurai; private var _previousSelectTransformation:int; private var _timeOfVariation:int;// = 0 private var _colorTinte:uint;// = 0 private var _currentPlatform:Platform; private var _transforming:Boolean;// = false private var _timeOfDischargeOnmitrix:int; private var _CannonBolt:CannonBolt; private var _pause:Boolean;// = false private var _timeOfRechargeOnmitrix:int; private var _currentTimeOmnitrix:int; private var _jumpDead:Boolean;// = false protected var _previousPrimaryState:int; private var _jumpStrengthRemaining:int; private var _activeFourArms:Boolean; private var _activeCannonBolt:Boolean; private var _hitAreaAttack:MovieClip;// = null private var _dead:Boolean;// = false private var _pauseComplete:Boolean;// = false private var _timeOfDuration:int;// = 0 private var _FourArms:FourArms; private var running_velocity:int; private var _oldSpeedXNotZero:Number; private var _shotsFriendlyManager; private var _coin:int; protected var _previousSecondaryState:int; private var _stateOmnitrix:int; protected var _view:MovieClip;// = null private var _attackCollision:Boolean;// = false protected var _primaryState:int; private var _state:Boolean; private var _rangeIncrementEnergyOmnitrix:int; private var _onPressSPACE:Boolean;// = false protected var _secondaryState:int; private var _energy:Number; private var _alphaTinte:Number;// = 0 private var _accountInvincible:int;// = 0 protected var _jumping:Boolean; private var _localPosition:Point; private var _invincible:Boolean;// = false private var _rangeDecrementEnergyOmnitrix:int; private var _offsetFromLevelLayer:Point;// = null private var _tinte:Boolean;// = false private var jump_velocity:int; private var _life:int; private var _lastSecurePlatform:Platform;// = null private var _currentTransformation:Transformation; private var _numberFrame:int;// = 0 private var _oldX:Number; private var _useTransformation:Boolean; protected var _currentPlatformPreviousX:Number; protected var _currentPlatformPreviousY:Number; private var _oldY:Number; private var _x:Number; public static const LEFT:int = 1; public static const TRANSFORMATION_CANNONBOLT:int = 1; public static const ACTION_DOWN:uint = 8; public static const SEC_STATE_RUN:int = 3; public static const PRI_ST_IDLE_LBL:String = "idle"; public static const PRI_ST_DIE_LBL:String = "die"; public static const SEC_STATE_THROWING_SHURIKEN_LBL:String = "shuriken"; public static const SEC_STATE_ATTACK:int = 7; public static const SEC_STATE_FAST_LBL:String = "fast"; public static const PRI_ST_CROUCHING:int = 1; public static const SEC_STATE_FAST:int = 6; public static const PRI_ST_IDLE:int = 0; public static const PRI_ST_DIE:int = 6; public static const ACTION_UP:uint = 4; public static const PRI_ST_HIT:int = 5; public static const TRANSFORMATION_FOUR_ARMS:int = 2; public static const SEC_STATE_THROWING_SHURIKEN:int = 2; public static const SEC_STATE_ARMSRIGHT:int = 4; public static const SEC_STATE_RUN_LBL:String = "run"; public static const ACTION_ENTER:uint = 128; public static const ACTION_LEFT:uint = 1; public static const SEC_STATE_ARMS:int = 7; public static const PRI_ST_RUNNING:int = 2; public static const PRI_ST_JUMPING_LBL:String = "jump"; public static const SEC_STATE_IDLE_LBL:String = "idle"; public static const ACTION_FIREX:uint = 32; public static const ACTION_FIREZ:uint = 16; public static const ACTION_SPACE:uint = 64; public static const ACTION_NONE:uint = 0; public static const DOWN:int = 3; public static const PRI_ST_HIT_LBL:String = "hit"; public static const UP:int = 2; public static const PRI_ST_JUMPING:int = 3; public static const SEC_STATE_IDLE:int = 0; public static const ACTION_RIGHT:uint = 2; public static const SEC_STATE_SWINGING_SWORD_LBL:String = "sword"; public static const TRANSFORMATION_BEN_SAMURAI:int = 0; public static const SEC_STATE_ARMSRIGHT_LBL:String = "armsRight"; public static const SEC_STATE_ARMS_LBL:String = "arms"; public static const PRI_ST_RUNNING_LBL:String = "run"; public static const SEC_STATE_ARMSLEFT_LBL:String = "armsLeft"; public static const SEC_STATE_SWINGING_SWORD:int = 1; public static const PRI_ST_CROUCHING_LBL:String = "crouch"; public static const SEC_STATE_ARMSLEFT:int = 5; public static const SEC_STATE_ATTACK_LBL:String = "attack"; public static const RIGHT:int = 0; public static var GRAVITY:int; public static var MAX_SPEED_Y:int; public static var MAX_SPEED_X:int; public static var MAX_JUMP_STRENGTH:int; public static var TIME_INVINCIBLE:int; public function Character(_arg1:MovieClip, _arg2:ShotsFriendlyManager, _arg3:Point):void{ _view = null; _invincible = false; _accountInvincible = 0; _tinte = false; _accountantTinte = 0; _timeOfDuration = 0; _timeOfVariation = 0; _colorTinte = 0; _alphaTinte = 0; _offsetFromLevelLayer = null; _dead = false; _onPressSPACE = false; _transforming = false; _shotsFriendlyManager = new ShotsFriendlyManager(); _hitAreaAttack = null; _attackCollision = false; _numberFrame = 0; _reset = false; _pause = false; _pauseComplete = false; _jumpDead = false; _lastSecurePlatform = null; _wasRunning = false; _localPosition = new Point(); super(); _view = _arg1; _offsetFromLevelLayer = _arg3.clone(); ShotsFriendlyManagerOfBen = _arg2; _BenSamurai = new BenSamurai(new BenSamuraiAsset(), this); _CannonBolt = new CannonBolt(new CannonBoltAsset(), this); _FourArms = new FourArms(new FourArmsAsset(), this); _BenSamurai.Hide(); _CannonBolt.Hide(); _FourArms.Hide(); _view.addChild(_BenSamurai.View); _view.addChild(_CannonBolt.View); _view.addChild(_FourArms.View); LoadConfig(); _pointPlatform = new Point(); Reset(); Global.AddEventListener(GameEvent.MILESTONE_REACH, OnGameEvent); } public function GetGlobalCenterPoint():Point{ return (_currentTransformation.GetGlobalCenterPoint()); } public function get PointPlatform():Point{ return (_pointPlatform); } public function set PointPlatform(_arg1:Point):void{ _pointPlatform = _arg1.clone(); } public function get ShotsFriendlyManagerOfBen():ShotsFriendlyManager{ return (_shotsFriendlyManager); } public function BenDie():void{ if (HUDManager.Instance.RemoveLife()){ if (GameManager.Instance.Update){ GameManager.Instance.Pause(); }; ScrollManager.Instance.Freeze(); GameTemplateMainApp.Instance.ResetCharacterDead(); } else { if (GameManager.Instance.Update){ GameManager.Instance.Pause(); }; Global.DispatchGameEvent("OnGameLost"); }; } public function set ShotsFriendlyManagerOfBen(_arg1:ShotsFriendlyManager):void{ _shotsFriendlyManager = _arg1; } public function set HitAreaAttack(_arg1:MovieClip):void{ _hitAreaAttack = _arg1; } public function get TopGlobalY():Number{ return (_currentTransformation.TopGlobalY); } public function get PreviousSpeedXNotZero():Number{ return (_oldSpeedXNotZero); } public function get AlphaTinte():Number{ return (_alphaTinte); } public function set PreviousSpeedXNotZero(_arg1:Number):void{ if (_arg1 != 0){ _oldSpeedX = _arg1; }; } public function get AccountantTinte():int{ return (_accountantTinte); } public function set SpeedY(_arg1:Number):void{ _speedY = _arg1; } public function get Invincible():Boolean{ return (_invincible); } private function Jump():void{ if (CurrentPlatform != null){ PreviousSpeedY = SpeedY; SpeedY = -(MAX_JUMP_STRENGTH); if (CurrentPlatform.Type == Platform.FLOOR){ _localPosition.x = X; _localPosition.y = Y; EffectManager.Instance.PlayEffect(EffectManager.EFFECT_JUMP, _localPosition); }; CurrentPlatform = null; _jumping = true; _currentTransformation.TryNewPrimaryState(PRI_ST_JUMPING); Sfx.PlaySound(Sfx.SFX_BEN_JUMP); }; } public function set SpeedX(_arg1:Number):void{ _speedX = _arg1; } public function GotoStateAnimation():void{ } public function set AlphaTinte(_arg1:Number):void{ _alphaTinte = _arg1; } public function get Y():Number{ return (_view.y); } public function get BottomGlobalY():Number{ return (_currentTransformation.BottomGlobalY); } public function get X():Number{ return (_view.x); } public function set AccountantTinte(_arg1:int):void{ _accountantTinte = _arg1; } public function set PauseComplete(_arg1:Boolean):void{ _pauseComplete = _arg1; } public function get PreviousPrimaryState():int{ return (_previousPrimaryState); } public function get CurrentAbsoluteX():Number{ return (_x); } public function get PreviousAbsoluteY():Number{ return (_oldY); } public function GetRadio():int{ return (_currentTransformation.GetRadio()); } public function RemoveSuriken(_arg1:int):void{ if (_numberSuriken > 0){ _numberSuriken = (_numberSuriken - _arg1); }; } public function get CurrentAbsoluteY():Number{ return (_y); } public function get PreviousAbsoluteX():Number{ return (_oldX); } public function get PreviousSecondaryState():int{ return (_previousSecondaryState); } public function set Invincible(_arg1:Boolean):void{ _invincible = _arg1; } public function UpdateAction(_arg1:uint):void{ if (((((((((Dead) || (_transforming))) || ((PrimaryState == PRI_ST_HIT)))) || (_jumpDead))) || (!(GameManager.Instance.Update)))){ return; }; PreviousSpeedXNotZero = SpeedX; _speedX = 0; if ((_arg1 & ACTION_LEFT) == ACTION_LEFT){ if (((((_onPressSPACE) && (_activeCannonBolt))) && (_enableTransformation))){ _selectTransformation = TRANSFORMATION_CANNONBOLT; HUDManager.Instance.CharactersElectionMC.gotoAndStop(3); if ((((_currentTransformationId == TRANSFORMATION_FOUR_ARMS)) || ((_currentTransformationId == TRANSFORMATION_CANNONBOLT)))){ _selectTransformation = TRANSFORMATION_BEN_SAMURAI; HUDManager.Instance.CharactersElectionMC.gotoAndStop(1); }; } else { if (!_onPressSPACE){ if (CurrentTransformationId != TRANSFORMATION_CANNONBOLT){ PreviousSpeedX = SpeedX; _speedX = -(MAX_SPEED_X); }; }; }; }; if ((_arg1 & ACTION_RIGHT) == ACTION_RIGHT){ if (((((_onPressSPACE) && (_activeFourArms))) && (_enableTransformation))){ _selectTransformation = TRANSFORMATION_FOUR_ARMS; HUDManager.Instance.CharactersElectionMC.gotoAndStop(2); if ((((_currentTransformationId == TRANSFORMATION_CANNONBOLT)) || ((_currentTransformationId == TRANSFORMATION_FOUR_ARMS)))){ _selectTransformation = TRANSFORMATION_BEN_SAMURAI; HUDManager.Instance.CharactersElectionMC.gotoAndStop(1); }; } else { if (!_onPressSPACE){ if (CurrentTransformationId != TRANSFORMATION_CANNONBOLT){ PreviousSpeedX = SpeedX; _speedX = MAX_SPEED_X; }; }; }; }; if ((_arg1 & ACTION_UP) == ACTION_UP){ if (((((!(Transforming)) && ((CurrentTransformationId == TRANSFORMATION_BEN_SAMURAI)))) && (!(_onPressSPACE)))){ Jump(); }; } else { _jumpStrengthRemaining = 0; }; if ((_arg1 & ACTION_DOWN) == ACTION_DOWN){ }; if ((_arg1 & ACTION_FIREX) == ACTION_FIREX){ }; if ((_arg1 & ACTION_FIREZ) == ACTION_FIREZ){ }; if ((_arg1 & Character.ACTION_SPACE) == Character.ACTION_SPACE){ if (((((!(_onPressSPACE)) && (!(_jumping)))) && (!(_crouching)))){ _onPressSPACE = true; Pause = true; _currentTransformation.TryNewPrimaryState(PRI_ST_IDLE); _selectTransformation = TRANSFORMATION_BEN_SAMURAI; HUDManager.Instance.CharactersElectionMC.visible = true; HUDManager.Instance.CharactersElectionMC.gotoAndStop(1); ScrollManager.Instance.Freeze(); if (((UIFactory.Instance.LevelIndicator.HasFadeIn) || (UIFactory.Instance.LevelIndicator.HasFadeOut))){ UIFactory.Instance.LevelIndicator.Hide(); }; }; } else { _onPressSPACE = false; Pause = false; ScrollManager.Instance.Unfreeze(); if (((!((_selectTransformation == _currentTransformationId))) && (!((_previousSelectTransformation == _selectTransformation))))){ _currentTransformation.TryTransformation(_selectTransformation); _transforming = true; PauseComplete = true; if (_selectTransformation == TRANSFORMATION_BEN_SAMURAI){ HUDManager.Instance.CharacterMC.gotoAndStop(1); } else { if (_selectTransformation == TRANSFORMATION_FOUR_ARMS){ HUDManager.Instance.CharacterMC.gotoAndStop(2); } else { HUDManager.Instance.CharacterMC.gotoAndStop(3); }; }; Sfx.PlaySound(Sfx.SFX_BEN_TRANSFORMATION); }; if (HUDManager.Instance.CharactersElectionMC.visible){ HUDManager.Instance.CharactersElectionMC.visible = false; }; _previousSelectTransformation = _selectTransformation; }; if (!Pause){ _currentTransformation.UpdateAction(_arg1); }; } public function get Dead():Boolean{ return (_dead); } public function GetCollisionSprite():Sprite{ return (_currentTransformation.GetCollisionSprite()); } public function OnGameEvent(_arg1:GameEvent):void{ switch (_arg1.name){ case "CharacterAnimationEnd": if (View == null){ break; }; if (_primaryState == Character.PRI_ST_HIT){ if (_currentTransformationId == Character.TRANSFORMATION_CANNONBOLT){ _currentTransformation.TryNewPrimaryState(PreviousPrimaryState); } else { _currentTransformation.TryNewPrimaryState(PRI_ST_IDLE); }; } else { _currentTransformation.TryNewSecondaryState(Character.SEC_STATE_IDLE); }; break; case "CharacterAnimationShurikenEnd": if (View == null){ break; }; _currentTransformation.TryNewSecondaryState(SEC_STATE_IDLE); if (_currentTransformationId == TRANSFORMATION_BEN_SAMURAI){ BenSamurai(_currentTransformation).Attack = false; }; break; case "CharacterAnimationSwordEnd": if (View == null){ break; }; _currentTransformation.TryNewSecondaryState(SEC_STATE_IDLE); if (_currentTransformationId == TRANSFORMATION_BEN_SAMURAI){ BenSamurai(_currentTransformation).Attack = false; }; break; case "ArmsRightAnimationEnd": if (View == null){ break; }; FourArms._attackingArmsRight = false; FourArms._attacking = false; if (PrimaryState == PRI_ST_RUNNING){ _currentTransformation.TryNewSecondaryState(SEC_STATE_RUN); } else { _currentTransformation.TryNewSecondaryState(SEC_STATE_IDLE); }; break; case "ArmsLeftAnimationEnd": if (View == null){ break; }; FourArms._attackingArmsLeft = false; FourArms._attacking = false; if (PrimaryState == PRI_ST_RUNNING){ _currentTransformation.TryNewSecondaryState(SEC_STATE_RUN); } else { _currentTransformation.TryNewSecondaryState(SEC_STATE_IDLE); }; break; case "EndTransformations": if (View == null){ break; }; TransformTo(_selectTransformation); _transforming = false; PauseComplete = false; if (_selectTransformation != TRANSFORMATION_BEN_SAMURAI){ GameManager.Instance.RepositionAfterTransforming(); }; break; case "CharacterAnimationAttackEnd": if (View == null){ break; }; _currentTransformation.TryNewSecondaryState(SEC_STATE_RUN); break; case "CharacterAnimationDieEnd": if ((((View == null)) || (!(_state)))){ break; }; Hide(); _currentTransformation.TryNewPrimaryState(Character.PRI_ST_IDLE); BenDie(); _state = false; break; case "CharacterShurikenBegin": if (View == null){ break; }; if (CurrentTransformationId == TRANSFORMATION_BEN_SAMURAI){ _currentTransformation.Shot(); }; break; }; } public function get EnergyOmnitrix():Number{ return (_energyOmnitrix); } public function set ColorTinte(_arg1:uint):void{ _colorTinte = _arg1; } public function AddPowerUpType(_arg1:int, _arg2:Number, _arg3:Boolean=false):void{ switch (_arg1){ case 1: LifeNumber = (LifeNumber + _arg2); HUDManager.Instance.AddLife(); break; case 2: PointNumber = (PointNumber + _arg2); HUDManager.Instance.AddScore(_arg2); break; case 3: GameTemplateMainApp.StateGame = GameTemplateMainApp.STATE_CREDITOS; GameTemplateMainApp.Instance.Pause(); if (GameManager.Instance.Update){ GameManager.Instance.Pause(); }; UIFactory.Instance.Creditos.FadeIn(); break; case 4: if (_arg3){ GameTemplateMainApp.StateGame = GameTemplateMainApp.STATE_INSTRUCTIONS; GameTemplateMainApp.Instance.Pause(); UIFactory.Instance.InstructionsFourArms.FadeIn(); GameManager.Instance.FourarmsInstruccion = true; }; break; case 5: if (_arg3){ GameTemplateMainApp.StateGame = GameTemplateMainApp.STATE_INSTRUCTIONS; GameTemplateMainApp.Instance.Pause(); UIFactory.Instance.InstructionsCannonBolt.FadeIn(); GameManager.Instance.CannonboltInstruccion = true; }; break; case 6: AddSuriken(_arg2); break; case 7: PointNumber = (PointNumber + _arg2); HUDManager.Instance.AddScore(_arg2); break; }; } public function SetType(_arg1:int):void{ } public function get Energy():Number{ return (_energy); } public function get Tinte():Boolean{ return (_tinte); } public function set Y(_arg1:Number):void{ _view.y = _arg1; } public function set CoinNumber(_arg1:int):void{ _coin = _arg1; } public function set TimeOfDuration(_arg1:int):void{ _timeOfDuration = _arg1; } public function set X(_arg1:Number):void{ _view.x = _arg1; } public function get CurrentTransformation():Transformation{ return (_currentTransformation); } public function get View():MovieClip{ return (_view); } public function set PreviousPrimaryState(_arg1:int):void{ _previousPrimaryState = _arg1; } public function get TimeOfVariation():int{ return (_timeOfVariation); } public function set CurrentAbsoluteX(_arg1:Number):void{ _x = _arg1; } public function set PreviousAbsoluteX(_arg1:Number):void{ _oldX = _arg1; } public function set PreviousAbsoluteY(_arg1:Number):void{ _oldY = _arg1; } public function get PointNumber():int{ return (_point); } public function get Jumping():Boolean{ return (_jumping); } public function get ResetBen():Boolean{ return (_reset); } public function set CurrentAbsoluteY(_arg1:Number):void{ _y = _arg1; } public function get PreviousSpeedX():Number{ return (_oldSpeedX); } public function get PreviousSpeedY():Number{ return (_oldSpeedY); } public function get CurrentPlatform():Platform{ return (_currentPlatform); } private function TransformTo(_arg1:int):void{ _currentTransformation.Hide(); switch (_arg1){ case TRANSFORMATION_BEN_SAMURAI: _currentTransformation = _BenSamurai; break; case TRANSFORMATION_CANNONBOLT: _currentTransformation = _CannonBolt; break; case TRANSFORMATION_FOUR_ARMS: _currentTransformation = _FourArms; break; }; _currentTransformationId = _arg1; _currentTransformation.Show(); PrimaryState = PRI_ST_HIT; _currentTransformation.TryNewPrimaryState(PRI_ST_IDLE); SecondaryState = SEC_STATE_RUN; } public function set PreviousSecondaryState(_arg1:int):void{ _previousSecondaryState = _arg1; } public function get LeftGlobalX():Number{ return (_currentTransformation.LeftGlobalX); } public function Update(_arg1:Number):void{ if (((((((Dead) || (_transforming))) || ((PrimaryState == PRI_ST_HIT)))) || (Pause))){ PreviousSpeedY = 0; SpeedY = 0; PreviousAbsoluteX = CurrentAbsoluteX; PreviousAbsoluteY = CurrentAbsoluteY; this.CurrentPlatformIsMoves(); return; }; if (_reset){ if (HUDManager.Instance.TransformationCorrect != null){ HUDManager.Instance.TransformationCorrect.gotoAndStop(100); _enableTransformation = true; _stateOmnitrix = 2; HUDManager.Instance.TransformationBarFrame(_stateOmnitrix); }; _reset = false; } else { if (_stateOmnitrix == 1){ if (_useTransformation){ if (HUDManager.Instance.TransformationCorrect != null){ HUDManager.Instance.TransformationCorrect.gotoAndStop((100 - _numberFrame)); _currentTimeOmnitrix = (((100 - _numberFrame) * _timeOfRechargeOnmitrix) / 100); _numberFrame = 0; _useTransformation = false; }; }; if (((((!(_useTransformation)) && ((_currentTimeOmnitrix < _timeOfRechargeOnmitrix)))) && (!(_enableTransformation)))){ if ((_currentTimeOmnitrix % _rangeIncrementEnergyOmnitrix) == 0){ if (HUDManager.Instance.TransformationCorrect != null){ if (HUDManager.Instance.TransformationCorrect.currentFrame < 100){ HUDManager.Instance.TransformationCorrect.nextFrame(); EnergyOmnitrix++; _currentTimeOmnitrix++; } else { _currentTimeOmnitrix = (_timeOfRechargeOnmitrix + 1); }; }; } else { _currentTimeOmnitrix++; }; } else { if (!_useTransformation){ if (HUDManager.Instance.TransformationCorrect.currentFrame < 100){ HUDManager.Instance.TransformationCorrect.gotoAndStop(100); }; _currentTimeOmnitrix = 0; _enableTransformation = true; _stateOmnitrix = 2; HUDManager.Instance.TransformationBarFrame(_stateOmnitrix); Sfx.PlaySound(Sfx.SFX_OTHERS_ENERGY_COMPLETE); }; }; } else { if (CurrentTransformationId != TRANSFORMATION_BEN_SAMURAI){ if ((((_currentTimeOmnitrix < _timeOfDischargeOnmitrix)) && (_enableTransformation))){ _useTransformation = true; if ((_currentTimeOmnitrix % _rangeDecrementEnergyOmnitrix) == 0){ if (HUDManager.Instance.TransformationCorrect != null){ HUDManager.Instance.TransformationCorrect.nextFrame(); _currentTimeOmnitrix++; EnergyOmnitrix--; }; } else { _currentTimeOmnitrix++; }; } else { if (HUDManager.Instance.TransformationCorrect.currentFrame < 100){ HUDManager.Instance.TransformationCorrect.gotoAndStop(100); }; _currentTimeOmnitrix = 0; _enableTransformation = false; _useTransformation = false; _transforming = true; PauseComplete = true; _previousSelectTransformation = _selectTransformation; _selectTransformation = TRANSFORMATION_BEN_SAMURAI; _currentTransformation.TryTransformation(_selectTransformation); if (_selectTransformation == TRANSFORMATION_BEN_SAMURAI){ HUDManager.Instance.CharacterMC.gotoAndStop(1); } else { if (_selectTransformation == TRANSFORMATION_FOUR_ARMS){ HUDManager.Instance.CharacterMC.gotoAndStop(2); } else { HUDManager.Instance.CharacterMC.gotoAndStop(3); }; }; Sfx.PlaySound(Sfx.SFX_BEN_TRANSFORMATION); _stateOmnitrix = 1; HUDManager.Instance.TransformationBarFrame(_stateOmnitrix); }; } else { if (_useTransformation){ _numberFrame = HUDManager.Instance.TransformationCorrect.currentFrame; _enableTransformation = false; _stateOmnitrix = 1; HUDManager.Instance.TransformationBarFrame(_stateOmnitrix); if (HUDManager.Instance.TransformationCorrect != null){ HUDManager.Instance.TransformationCorrect.gotoAndStop((100 - _numberFrame)); _currentTimeOmnitrix = (((100 - _numberFrame) * _timeOfRechargeOnmitrix) / 100); _numberFrame = 0; _useTransformation = false; }; }; }; }; }; if (Invincible){ _accountInvincible++; if (AccountantTinte < TimeOfDuration){ if (_accountInvincible == TimeOfVariation){ if (Tinte){ MovieClipUtils.Instance.PaintMC(View, ColorTinte); AccountantTinte++; Tinte = false; } else { MovieClipUtils.Instance.PaintMC(View, ColorTinte, AlphaTinte); AccountantTinte++; Tinte = true; }; _accountInvincible = 0; }; } else { Invincible = false; if (Tinte){ MovieClipUtils.Instance.PaintMC(View, 0); AccountantTinte++; }; Tinte = false; AccountantTinte = 0; _accountInvincible = 0; }; }; if ((((PrimaryState == Character.PRI_ST_RUNNING)) && (!(_wasRunning)))){ Sfx.PlaySoundLoop(Sfx.SFX_BEN_RUN, false); } else { if (((!((PrimaryState == Character.PRI_ST_RUNNING))) && (_wasRunning))){ Sfx.StopSound(Sfx.SFX_BEN_RUN); }; }; _wasRunning = (PrimaryState == Character.PRI_ST_RUNNING); PreviousAbsoluteX = CurrentAbsoluteX; PreviousAbsoluteY = CurrentAbsoluteY; _currentTransformation.Update(_arg1); if (CurrentPlatform == null){ PreviousSpeedY = SpeedY; SpeedY = (SpeedY + (GRAVITY * _arg1)); if (SpeedY > MAX_SPEED_Y){ SpeedY = MAX_SPEED_Y; }; _currentTransformation.UpdateAirPose((SpeedY > 0)); } else { PreviousSpeedY = SpeedY; SpeedY = 0; this.CurrentPlatformIsMoves(); if (_jumpDead){ _currentTransformation.TryNewPrimaryState(Character.PRI_ST_IDLE); }; EnergySubtract(0); }; if ((((((_speedX > 0)) && ((_view.scaleX < 0)))) || ((((_speedX < 0)) && ((_view.scaleX > 0)))))){ _view.scaleX = (_view.scaleX * -1); }; if (Crouching){ _speedX = 0; }; if (_speedX != 0){ CurrentAbsoluteX = (CurrentAbsoluteX + (_speedX * _arg1)); }; if (_speedY != 0){ CurrentAbsoluteY = (CurrentAbsoluteY + (_speedY * _arg1)); }; } public function set RUNNING_VELOCITY(_arg1:int):void{ } public function get OffsetFromLevelLayer():Point{ return (_offsetFromLevelLayer); } public function get SpeedY():Number{ return (_speedY); } public function get HitAreaAttack():MovieClip{ return (_hitAreaAttack); } public function set LifeNumber(_arg1:int):void{ _life = _arg1; } public function Show():void{ _view.alpha = 1; } public function get SpeedX():Number{ return (_speedX); } public function set EnergyOmnitrix(_arg1:Number):void{ _energyOmnitrix = _arg1; } public function set Dead(_arg1:Boolean):void{ _dead = _arg1; } private function CurrentPlatformIsMoves():void{ if (CurrentPlatform != null){ if (CurrentPlatform.Moves){ PreviousAbsoluteX = CurrentAbsoluteX; PreviousAbsoluteY = CurrentAbsoluteY; CurrentAbsoluteX = (CurrentAbsoluteX + (CurrentPlatform.X - _currentPlatformPreviousX)); CurrentAbsoluteY = (CurrentAbsoluteY + (CurrentPlatform.Y - _currentPlatformPreviousY)); CurrentAbsoluteX = (CurrentAbsoluteX + (Math.abs((CurrentPlatform.X - _currentPlatformPreviousX)) * ConfigLoader.Instance.Config["MovingPlatformXCorrectionFactor"])); CurrentAbsoluteY = (CurrentAbsoluteY + (Math.abs((CurrentPlatform.Y - _currentPlatformPreviousY)) * ConfigLoader.Instance.Config["MovingPlatformYCorrectionFactor"])); _currentPlatformPreviousX = CurrentPlatform.X; _currentPlatformPreviousY = CurrentPlatform.Y; }; }; } public function get Transforming():Boolean{ return (_transforming); } public function get PauseComplete():Boolean{ return (_pauseComplete); } public function set SecondaryState(_arg1:int):void{ _previousSecondaryState = _secondaryState; _secondaryState = _arg1; } public function get ColorTinte():uint{ return (_colorTinte); } public function Reset(_arg1:Boolean=false):void{ _reset = true; _CannonBolt.Hide(); _FourArms.Hide(); _BenSamurai.Hide(); _currentTransformation = _BenSamurai; TransformTo(TRANSFORMATION_BEN_SAMURAI); _selectTransformation = TRANSFORMATION_BEN_SAMURAI; _previousSelectTransformation = _selectTransformation; SpeedX = 0; SpeedY = 0; _currentTimeOmnitrix = 0; PreviousPrimaryState = -1; PreviousSecondaryState = -1; PrimaryState = -1; SecondaryState = -1; Crouching = false; Jumping = false; if (_arg1){ CoinNumber = 0; PointNumber = 0; }; _activeCannonBolt = GameManager.Instance.ActiveCannonBolt; _activeFourArms = GameManager.Instance.ActiveFourArms; if (((_activeCannonBolt) || (_activeFourArms))){ _enableTransformation = true; } else { _enableTransformation = false; }; _useTransformation = false; CurrentPlatform = null; _currentTransformation.TryNewPrimaryState(PRI_ST_IDLE); _currentTransformation.TryNewSecondaryState(SEC_STATE_IDLE); _rangeIncrementEnergyOmnitrix = Math.ceil((_timeOfRechargeOnmitrix / 100)); _rangeDecrementEnergyOmnitrix = Math.ceil((_timeOfDischargeOnmitrix / 100)); if (HUDManager.Instance.TransformationBar.currentFrame == 2){ _stateOmnitrix = 1; HUDManager.Instance.TransformationBarFrame(_stateOmnitrix); }; if (HUDManager.Instance.CharacterMC.currentFrame != 1){ HUDManager.Instance.CharacterMC.gotoAndStop(1); }; Energy = ConfigLoader.Instance.Config["CharacterEnergy"]; EnergySubtract(0); _state = true; Pause = false; PauseComplete = false; if (GameManager.Instance.GameWinner){ _activeCannonBolt = true; _activeFourArms = true; }; } public function set Tinte(_arg1:Boolean):void{ _tinte = _arg1; } public function get TimeOfDuration():int{ return (_timeOfDuration); } public function set AttackCollision(_arg1:Boolean):void{ _attackCollision = _arg1; } public function set Energy(_arg1:Number):void{ _energy = _arg1; } public function get CoinNumber():int{ return (_coin); } public function get LastSecurePlatform():Platform{ return (_lastSecurePlatform); } public function Hide():void{ _view.alpha = 0; } public function get RightGlobalX():Number{ return (_currentTransformation.RightGlobalX); } public function get RUNNING_VELOCITY():int{ return (running_velocity); } public function get LifeNumber():int{ return (_life); } public function set View(_arg1:MovieClip):void{ _view = _arg1; } public function set Crouching(_arg1:Boolean):void{ _crouching = _arg1; } public function get CurrentTransformationId():int{ return (_currentTransformationId); } public function GetType():int{ return (1); } public function get SecondaryState():int{ return (_secondaryState); } public function set TimeOfVariation(_arg1:int):void{ _timeOfVariation = _arg1; } public function set PrimaryState(_arg1:int):void{ _previousPrimaryState = _primaryState; _primaryState = _arg1; } public function set Jumping(_arg1:Boolean):void{ _jumping = _arg1; } public function set Pause(_arg1:Boolean):void{ _pause = _arg1; } public function get AttackCollision():Boolean{ return (_attackCollision); } public function set PointNumber(_arg1:int){ _point = _arg1; } public function set JUMP_VELOCITY(_arg1:Number):void{ } public function get Crouching():Boolean{ return (_crouching); } public function get JUMP_VELOCITY():Number{ return (jump_velocity); } public function get PrimaryState():int{ return (_primaryState); } public function set PreviousSpeedX(_arg1:Number):void{ _oldSpeedX = _arg1; } public function set PreviousSpeedY(_arg1:Number):void{ _oldSpeedY = _arg1; } public function get Pause():Boolean{ return (_pause); } public function set CurrentPlatform(_arg1:Platform):void{ _currentPlatform = _arg1; if (PrimaryState == PRI_ST_HIT){ SpeedY = 0; }; if (_currentPlatform == null){ _jumping = true; if (PrimaryState != PRI_ST_HIT){ _currentTransformation.TryNewPrimaryState(PRI_ST_JUMPING); }; return; }; _jumping = false; _jumpStrengthRemaining = MAX_JUMP_STRENGTH; if (_arg1.Moves){ _currentPlatformPreviousX = _arg1.X; _currentPlatformPreviousY = _arg1.Y; }; if (((!(_currentPlatform.Moves)) && (!((_currentPlatform == null))))){ _pointPlatform.x = CurrentAbsoluteX; _pointPlatform.y = CurrentAbsoluteY; }; if (!_currentPlatform.Moves){ _lastSecurePlatform = _currentPlatform; }; } public function AddSuriken(_arg1:int):void{ _numberSuriken = (_numberSuriken + _arg1); } public function EnergySubtract(_arg1:Number){ var _local2:int; Energy = (Energy - (_arg1 * CurrentTransformation.Fragility)); _local2 = (100 - Energy); if (_local2 > 0){ HUDManager.Instance.LifeBarMC.gotoAndStop(_local2); } else { if (_local2 == 0){ HUDManager.Instance.LifeBarMC.gotoAndStop(1); } else { HUDManager.Instance.LifeBarMC.gotoAndStop(100); }; }; if (Energy <= 0){ if (CurrentTransformationId == TRANSFORMATION_BEN_SAMURAI){ if (PrimaryState != Character.PRI_ST_JUMPING){ _jumpDead = false; Dead = true; _currentTransformation.TryNewPrimaryState(PRI_ST_DIE); PreviousSpeedX = 0; PreviousSpeedY = 0; SpeedX = 0; SpeedY = 0; PreviousAbsoluteX = CurrentAbsoluteX; PreviousAbsoluteY = CurrentAbsoluteY; Sfx.PlaySound(Sfx.SFX_BEN_DIE); } else { _jumpDead = true; }; } else { _transforming = true; PauseComplete = true; _enableTransformation = false; _previousSelectTransformation = _selectTransformation; _selectTransformation = TRANSFORMATION_BEN_SAMURAI; _currentTransformation.TryTransformation(_selectTransformation); if (_selectTransformation == TRANSFORMATION_BEN_SAMURAI){ HUDManager.Instance.CharacterMC.gotoAndStop(1); } else { if (_selectTransformation == TRANSFORMATION_FOUR_ARMS){ HUDManager.Instance.CharacterMC.gotoAndStop(2); } else { HUDManager.Instance.CharacterMC.gotoAndStop(3); }; }; }; }; } public function get OnPressSPACE():Boolean{ return (_onPressSPACE); } public function LoadConfig():void{ Energy = ConfigLoader.Instance.Config["CharacterEnergy"]; EnergyOmnitrix = ConfigLoader.Instance.Config["CharacterOmnitrixEnergy"]; LifeNumber = ConfigLoader.Instance.Config["CharacterNumLives"]; MAX_SPEED_X = ConfigLoader.Instance.Config["CharacterMaxSpeedX"]; MAX_SPEED_Y = ConfigLoader.Instance.Config["CharacterMaxSpeedY"]; GRAVITY = ConfigLoader.Instance.Config["CharacterGravity"]; MAX_JUMP_STRENGTH = ConfigLoader.Instance.Config["CharacterMaxJumpStrength"]; TIME_INVINCIBLE = ConfigLoader.Instance.Config["CharacterTimeInvincible"]; RUNNING_VELOCITY = ConfigLoader.Instance.Config["CharacterRunningVelocity"]; JUMP_VELOCITY = ConfigLoader.Instance.Config["CharacterJumpVelocity"]; _timeOfRechargeOnmitrix = ConfigLoader.Instance.Config["CharacterTimeOfRechargeOnmitrix"]; _timeOfDischargeOnmitrix = ConfigLoader.Instance.Config["CharacterTimeOfDischargeOnmitrix"]; _numberSuriken = ConfigLoader.Instance.Config["CharacterNumberSuriken"]; TimeOfDuration = ConfigLoader.Instance.Config["CharacterTimeOfDuration"]; TimeOfVariation = ConfigLoader.Instance.Config["CharacterTimeOfVariation"]; ColorTinte = ConfigLoader.Instance.Config["CharacterColorTinte"]; AlphaTinte = ConfigLoader.Instance.Config["CharacterAlphaTinte"]; } public function get NumberSurike():int{ return (_numberSuriken); } public function set NumberSurike(_arg1:int):void{ _numberSuriken = _arg1; } } }//package model
Section 269
//EffectManager (model.EffectManager) package model { import flash.events.*; import flash.display.*; import flash.geom.*; import view.*; import assets.*; public class EffectManager { private var _view:MovieClip; protected var _initialized:Boolean;// = false private var _active:Boolean; private var _effectMC1:MovieClip; private var _effectMC2:MovieClip; private var _effectMC3:MovieClip; public static const EFFECT_ATTACK:int = 1; public static const EFFECT_JUMP:int = 0; public static const EFFECT_SWORD:int = 2; private static var _instance:EffectManager = null; public function EffectManager(_arg1:SingletonEnforcer){ _initialized = false; super(); } public function PlayEffect(_arg1:int, _arg2:Point):Boolean{ if (_effectMC1.alpha == 0){ _effectMC1 = LoadMC(_arg1); _effectMC1.x = _arg2.x; _effectMC1.y = _arg2.y; LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).addChild(_effectMC1); Show(_effectMC1); _effectMC1.gotoAndStop(1); _effectMC1.addEventListener("AnimationEnd", AnimationEnd); return (true); }; if (_effectMC2.alpha == 0){ _effectMC2 = LoadMC(_arg1); _effectMC2.x = _arg2.x; _effectMC2.y = _arg2.y; LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).addChild(_effectMC2); Show(_effectMC2); _effectMC2.gotoAndStop(1); _effectMC2.addEventListener("AnimationEnd", AnimationEnd); return (true); }; if (_effectMC3.alpha == 0){ _effectMC3 = LoadMC(_arg1); _effectMC3.x = _arg2.x; _effectMC3.y = _arg2.y; LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL).addChild(_effectMC3); Show(_effectMC3); _effectMC3.gotoAndStop(1); _effectMC3.addEventListener("AnimationEnd", AnimationEnd); return (true); }; return (false); } public function Position(_arg1:int=0, _arg2:int=0):void{ _view.x = _arg1; _view.y = _arg2; } public function get View():MovieClip{ return (_view); } public function Flip(_arg1:int=1):void{ _view.scaleX = (_view.scaleX * _arg1); } public function AnimationEnd(_arg1:Event):void{ Hide(MovieClip(_arg1.target)); } private function LoadMC(_arg1:int):MovieClip{ if (_arg1 == EFFECT_JUMP){ return (new Effect1Asset()); }; if (_arg1 == EFFECT_ATTACK){ return (new Effect2Asset()); }; if (_arg1 == EFFECT_SWORD){ return (new Effect3Asset()); }; return (null); } public function Show(_arg1:MovieClip):void{ _arg1.alpha = 1; } public function Hide(_arg1:MovieClip):void{ _arg1.alpha = 0; } public function Initialize():void{ if (!_initialized){ _initialized = true; _active = false; _view = new EffectAsset(); _effectMC1 = new MovieClip(); _effectMC2 = new MovieClip(); _effectMC3 = new MovieClip(); Hide(_view); Hide(_effectMC1); Hide(_effectMC2); Hide(_effectMC3); }; } public function Scale(_arg1:int=1, _arg2:int=1):void{ _view.scaleX = _arg1; _view.scaleY = _arg2; } private function AddEffect(_arg1:MovieClip, _arg2:Number, _arg3:Number):void{ } public static function GetInstance():EffectManager{ if (_instance == null){ _instance = new EffectManager(new SingletonEnforcer()); }; return (_instance); } public static function get Instance():EffectManager{ return (GetInstance()); } } }//package model class SingletonEnforcer { private function SingletonEnforcer(){ } }
Section 270
//EnvironmentElement (model.EnvironmentElement) package model { import flash.display.*; import flash.geom.*; import collision.*; public class EnvironmentElement implements ICollidable { protected var _view:MovieClip; protected var _stopsDownUp:Boolean; protected var _stopsRightLeft:Boolean; protected var _stopsUpDown:Boolean; protected var _stopsLeftRight:Boolean; private var _offsetFromLevelLayer:Point;// = null protected var _moves:Boolean; public function EnvironmentElement(_arg1:MovieClip, _arg2:Boolean, _arg3:Boolean, _arg4:Boolean, _arg5:Boolean, _arg6:Point, _arg7:Boolean=false){ _offsetFromLevelLayer = null; super(); _view = _arg1; _stopsUpDown = _arg2; _stopsDownUp = _arg3; _stopsLeftRight = _arg4; _stopsRightLeft = _arg5; _moves = _arg7; _offsetFromLevelLayer = _arg6.clone(); _arg1.alpha = 0; } public function GetGlobalCenterPoint():Point{ var _local1:Rectangle; if ((((_view == null)) || ((_view.stage == null)))){ return (null); }; _local1 = _view.getBounds(_view.stage); return (new Point(((_local1.x + _local1.width) >> 1), ((_local1.y + _local1.height) >> 1))); } public function set View(_arg1:MovieClip):void{ _view = _arg1; } public function set Height(_arg1:Number):void{ _view.height = _arg1; } public function GetType():int{ return (0); } public function get OffsetFromLevelLayer():Point{ return (_offsetFromLevelLayer); } public function set StopsLeftRight(_arg1:Boolean):void{ _stopsLeftRight = _arg1; } public function set StopsUpDown(_arg1:Boolean):void{ _stopsUpDown = _arg1; } public function Show():void{ _view.visible = true; } public function get TopGlobalY():Number{ return (_view.getBounds(_view.stage).y); } public function set StopsDownUp(_arg1:Boolean):void{ _stopsDownUp = _arg1; } public function get Width():Number{ return (_view.width); } public function get Moves():Boolean{ return (_moves); } public function SetType(_arg1:int):void{ } public function GetCollisionSprite():Sprite{ if (_view == null){ return (null); }; return (Sprite(_view)); } public function set X(_arg1:Number):void{ _view.x = _arg1; } public function get StopsRightLeft():Boolean{ return (_stopsRightLeft); } public function set Y(_arg1:Number):void{ _view.y = _arg1; } public function get StopsLeftRight():Boolean{ return (_stopsLeftRight); } public function get View():MovieClip{ return (_view); } public function get Height():Number{ return (_view.height); } public function get BottomGlobalY():Number{ var _local1:Rectangle; _local1 = _view.getBounds(_view.stage); return ((_local1.y + _local1.height)); } public function set Width(_arg1:Number):void{ _view.width = _arg1; } public function get StopsUpDown():Boolean{ return (_stopsUpDown); } public function get StopsDownUp():Boolean{ return (_stopsDownUp); } public function get X():Number{ return (_view.x); } public function get Y():Number{ return (_view.y); } public function set StopsRightLeft(_arg1:Boolean):void{ _stopsRightLeft = _arg1; } public function Hide():void{ _view.visible = false; } public function get LeftGlobalX():Number{ return (_view.getBounds(_view.stage).x); } public function GetRadio():int{ return (0); } public function get RightGlobalX():Number{ var _local1:Rectangle; _local1 = _view.getBounds(_view.stage); return ((_local1.x + _local1.width)); } } }//package model
Section 271
//FourArms (model.FourArms) package model { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; import config.*; public class FourArms extends Transformation { private var _armsRightBoolean:Boolean;// = false private var _armsLeftMc:MovieClip;// = null private var _armsLeftBoolean:Boolean;// = false private var _armsRightMc:MovieClip;// = null public static var _attackingArmsLeft:Boolean = false; public static var _attackingArmsRight:Boolean = false; public static var _attacking:Boolean = false; public function FourArms(_arg1:MovieClip, _arg2:Character){ _armsLeftMc = null; _armsRightMc = null; _armsLeftBoolean = false; _armsRightBoolean = false; super(_arg1, _arg2); LoadConfig(); } override public function TryTransformation(_arg1:int):void{ switch (_arg1){ case Character.TRANSFORMATION_CANNONBOLT: case Character.TRANSFORMATION_FOUR_ARMS: break; case Character.TRANSFORMATION_BEN_SAMURAI: _primaryStateMc.gotoAndStop("BenSamurai_idle"); break; }; } override public function GotoSecondaryStateAnimation(_arg1:int):void{ if ((((_armsLeftMc == null)) && ((_armsRightMc == null)))){ return; }; if ((((_arg1 == Character.SEC_STATE_ARMSLEFT)) || ((_arg1 == Character.SEC_STATE_ARMSRIGHT)))){ _character.HitAreaAttack = MovieClip(_primaryStateMc.getChildByName("hitAreaAttack_mc")); }; if (_arg1 == Character.SEC_STATE_ARMSLEFT){ if (((_armsLeftBoolean) && (!(_attackingArmsLeft)))){ if (_armsLeftMc.currentLabel == _secondaryStateLabels[Character.SEC_STATE_ARMSLEFT]){ _armsLeftMc.gotoAndStop(_secondaryStateLabels[_character.PrimaryState]); }; _armsLeftMc.gotoAndStop(_secondaryStateLabels[_arg1]); _armsRightMc.gotoAndStop(_secondaryStateLabels[_arg1]); FourArms._attackingArmsLeft = true; }; } else { if (_arg1 == Character.SEC_STATE_ARMSRIGHT){ if (((_armsRightBoolean) && (!(_attackingArmsRight)))){ if (_armsRightMc.currentLabel == _secondaryStateLabels[Character.SEC_STATE_ARMSRIGHT]){ _armsRightMc.gotoAndStop(_secondaryStateLabels[_character.PrimaryState]); }; _armsRightMc.gotoAndStop(_secondaryStateLabels[_arg1]); _armsLeftMc.gotoAndStop(_secondaryStateLabels[_arg1]); FourArms._attackingArmsRight = true; }; } else { if (!_attackingArmsLeft){ _armsLeftMc.gotoAndStop(_secondaryStateLabels[_arg1]); }; if (!_attackingArmsRight){ _armsRightMc.gotoAndStop(_secondaryStateLabels[_arg1]); }; }; }; } private function ResetSecondStateMc(_arg1:Event):void{ GameTemplateMainApp.MyStage.stage.removeEventListener(Event.RENDER, ResetSecondStateMc); switch (_character.PrimaryState){ case Character.PRI_ST_IDLE: case Character.PRI_ST_RUNNING: _armsLeftMc = MovieClip(MovieClip(MovieClip(_view.getChildByName("FourArms_mc")).getChildByName("FourArms2_mc")).getChildByName("ArmsLeft_mc")); _armsRightMc = MovieClip(MovieClip(MovieClip(_view.getChildByName("FourArms_mc")).getChildByName("FourArms2_mc")).getChildByName("ArmsRight_mc")); break; }; Global.DispatchGameEvent("ArmsRightAnimationEnd"); Global.DispatchGameEvent("ArmsLeftAnimationEnd"); if (_character.PrimaryState == Character.PRI_ST_RUNNING){ TryNewSecondaryState(Character.SEC_STATE_RUN); } else { if (_character.PrimaryState == Character.PRI_ST_IDLE){ TryNewSecondaryState(Character.SEC_STATE_IDLE); }; }; } override public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == _character.PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case Character.PRI_ST_IDLE: _character.Crouching = false; _character.PrimaryState = _arg1; _local2 = true; break; case Character.PRI_ST_HIT: _character.Crouching = false; _character.PrimaryState = _arg1; _local2 = true; break; case Character.PRI_ST_RUNNING: _character.PrimaryState = _arg1; _local2 = true; break; case Character.PRI_ST_JUMPING: _character.PrimaryState = _arg1; _local2 = true; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } override public function TryNewSecondaryState(_arg1:int):Boolean{ var _local2:Boolean; if ((((((_arg1 == _character.SecondaryState)) && (!((_arg1 == Character.SEC_STATE_ARMSLEFT))))) && (!((_arg1 == Character.SEC_STATE_ARMSRIGHT))))){ return (false); }; _local2 = false; switch (_arg1){ case Character.SEC_STATE_IDLE: _character.SecondaryState = _arg1; _local2 = true; break; case Character.SEC_STATE_RUN: _character.SecondaryState = _arg1; _local2 = true; break; case Character.SEC_STATE_ARMSLEFT: if (((((((!(FourArms._attackingArmsLeft)) && (_armsLeftBoolean))) && (!(FourArms._attackingArmsRight)))) && (!(_armsRightBoolean)))){ _character.SecondaryState = _arg1; _local2 = true; _character.AttackCollision = true; Sfx.PlaySound(Sfx.SFX_BEN_ARMS_LEFT); }; break; case Character.SEC_STATE_ARMSRIGHT: if (((((((!(FourArms._attackingArmsRight)) && (_armsRightBoolean))) && (!(FourArms._attackingArmsLeft)))) && (!(_armsLeftBoolean)))){ _character.SecondaryState = _arg1; _local2 = true; _character.AttackCollision = true; Sfx.PlaySound(Sfx.SFX_BEN_ARMS_RIGHT); }; break; }; if (_local2){ GotoSecondaryStateAnimation(_arg1); }; return (_local2); } public function LoadConfig():void{ Fragility = ConfigLoader.Instance.Config["FourArmsFragility"]; EnergyToSubtractEnemyAttack = ConfigLoader.Instance.Config["FourArmsEnergySubtractsForAttack"]; EnergyToSubtractEnemyShot = ConfigLoader.Instance.Config["FourArmsEnergySubtractsForShot"]; EnergyToSubtractEnemySuperAttack = ConfigLoader.Instance.Config["FourArmsEnergySubtractsForSuperAttack"]; } override public function Update(_arg1:Number):void{ } override public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMc == null){ return; }; GameTemplateMainApp.MyStage.addEventListener(Event.RENDER, ResetSecondStateMc); GameTemplateMainApp.MyStage.stage.invalidate(); _primaryStateMc.gotoAndStop(_primaryStateLabels[_arg1]); } override public function UpdateAction(_arg1:uint):void{ if (_character.Transforming){ return; }; if ((_arg1 & Character.ACTION_UP) == Character.ACTION_UP){ }; if ((_arg1 & Character.ACTION_DOWN) == Character.ACTION_DOWN){ }; if (((!(_character.Crouching)) && (!(_character.Jumping)))){ if ((_arg1 & Character.ACTION_LEFT) == Character.ACTION_LEFT){ if (!_character.OnPressSPACE){ TryNewPrimaryState(Character.PRI_ST_RUNNING); }; } else { if ((_arg1 & Character.ACTION_RIGHT) == Character.ACTION_RIGHT){ if (!_character.OnPressSPACE){ TryNewPrimaryState(Character.PRI_ST_RUNNING); }; } else { TryNewPrimaryState(Character.PRI_ST_IDLE); }; }; }; _armsRightBoolean = false; _armsLeftBoolean = false; if ((_arg1 & Character.ACTION_FIREZ) == Character.ACTION_FIREZ){ _armsRightBoolean = true; TryNewSecondaryState(Character.SEC_STATE_ARMSRIGHT); }; _armsRightBoolean = false; if ((_arg1 & Character.ACTION_FIREX) == Character.ACTION_FIREX){ _armsLeftBoolean = true; TryNewSecondaryState(Character.SEC_STATE_ARMSLEFT); }; _armsLeftBoolean = false; if ((_arg1 & Character.ACTION_SPACE) == Character.ACTION_SPACE){ }; } } }//package model
Section 272
//Platform (model.Platform) package model { import flash.display.*; import flash.geom.*; import utils.*; import assets.*; public class Platform extends EnvironmentElement { private var _type:int; private var _sublevel:int;// = 1 private var _innerPlatform:MovieClip;// = null public static const PLATFORM:int = 4; public static const ROOF:int = 3; public static const BOX:int = 2; public static const FLOOR:int = 1; public function Platform(_arg1:MovieClip, _arg2:int, _arg3:Point){ _sublevel = 1; _innerPlatform = null; _type = 0; super(_arg1, !((_arg1.name.indexOf("u") == -1)), !((_arg1.name.indexOf("d") == -1)), !((_arg1.name.indexOf("l") == -1)), !((_arg1.name.indexOf("r") == -1)), _arg3, (_arg1 is MovingPlatformAsset)); if ((_arg1 is MovingPlatformAsset)){ MovieClipUtils.Instance.AddMovieClip(_arg1); }; if ((((_type == 0)) && (!((_arg1.name.indexOf("1") == -1))))){ _type = FLOOR; }; if ((((_type == 0)) && (!((_arg1.name.indexOf("2") == -1))))){ _type = BOX; }; if ((((_type == 0)) && (!((_arg1.name.indexOf("3") == -1))))){ _type = ROOF; }; if ((((_type == 0)) && (!((_arg1.name.indexOf("4") == -1))))){ _type = PLATFORM; }; _sublevel = _arg2; if (Moves){ _innerPlatform = (_view.getChildByName("platform_mc") as MovieClip); }; } override public function get RightGlobalX():Number{ var _local1:Rectangle; _local1 = _view.getBounds(_view.stage); return ((_local1.x + _local1.width)); } override public function GetGlobalCenterPoint():Point{ var _local1:Rectangle; var _local2:Number; var _local3:Number; if ((((_view == null)) || ((_view.stage == null)))){ return (null); }; _local1 = _view.getBounds(_view.stage); _local2 = _view.localToGlobal(new Point(0, 0)).x; _local3 = _view.localToGlobal(new Point(0, (-(_view.height) >> 1))).y; return (new Point(((_local1.x + _local1.width) >> 1), ((_local1.y + _local1.height) >> 1))); } override public function GetType():int{ return (5); } override public function get TopGlobalY():Number{ return (_view.getBounds(_view.stage).y); } override public function SetType(_arg1:int):void{ } override public function GetCollisionSprite():Sprite{ if (_view == null){ return (null); }; return (Sprite(_view)); } public function set Sublevel(_arg1:int):void{ _sublevel = _arg1; } override public function get BottomGlobalY():Number{ var _local1:Rectangle; _local1 = _view.getBounds(_view.stage); return ((_local1.y + _local1.height)); } override public function get X():Number{ if (Moves){ return (_innerPlatform.x); }; return (_view.x); } override public function get Y():Number{ if (Moves){ return (_innerPlatform.y); }; return (_view.y); } public function get Type():int{ return (_type); } public function GetGlobalCenterPointOld():Point{ var _local1:Number; var _local2:Number; if (_view == null){ return (new Point(0, 0)); }; _local1 = _view.localToGlobal(new Point((_view.width >> 1), 0)).x; _local2 = _view.localToGlobal(new Point(0, (_view.height >> 1))).y; return (new Point(_local1, _local2)); } public function get Sublevel():int{ return (_sublevel); } override public function get LeftGlobalX():Number{ return (_view.getBounds(_view.stage).x); } override public function GetRadio():int{ if (_view == null){ return (0); }; return ((Math.max(_view.width, _view.height) / 2)); } } }//package model
Section 273
//PowerUp (model.PowerUp) package model { import flash.events.*; import flash.display.*; import flash.utils.*; import game.*; import com.gamesandweb.game.*; import flash.geom.*; import collision.*; import flash.text.*; import config.*; import assets.*; public class PowerUp implements ICollidable { public var SCORE_FOUR_ARMS:int; private var _view:MovieClip; private var _hitArea:MovieClip; private var _primaryState:int; private var _score:int; private var _type:int; private var _primaryStateMC:MovieClip; private var _active:Boolean; public var SCORE_LIFE:int; private var _primaryStateLabels:Dictionary; public var SCORE_SURIKEN:int; public var SCORE_COIN_SHADOW:int; private var _offsetFromLevelLayer:Point;// = null public var SCORE_COIN_NOT_SHADOW:int; private var _scoreTXT:TextField; public var SCORE_OMNITRIX:int; private var _activeInstruccion:Boolean; public var SCORE_CANNONBOLT:int; public static const PRI_ST_IDLE_LBL:String = "idle"; public static const PRI_ST_DESTROYED:int = 1; public static const PRI_ST_IDLE:int = 0; public static const PRI_ST_DESTROYED_LBL:String = "destroyed"; public function PowerUp(_arg1:MovieClip, _arg2:Point){ _offsetFromLevelLayer = null; super(); _view = _arg1; _offsetFromLevelLayer = _arg2.clone(); _hitArea = (_view.getChildByName("hitArea_mc") as MovieClip); if (_hitArea == null){ _hitArea = _view; } else { _hitArea.alpha = 0; }; _primaryStateMC = _view; _primaryStateLabels = new Dictionary(); _primaryStateLabels[PRI_ST_IDLE] = PRI_ST_IDLE_LBL; _primaryStateLabels[PRI_ST_DESTROYED] = PRI_ST_DESTROYED_LBL; Active = true; ActiveInstruccion = false; TypePowerUp(); TryNewPrimaryState(PowerUp.PRI_ST_IDLE); View.addEventListener("PowerUpAnimationDestroyedEnd", DispatchEvent); LoadConfig(); } public function get RightGlobalX():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.x + _local1.width)); } public function get OffsetFromLevelLayer():Point{ return (_offsetFromLevelLayer); } public function GetType():int{ return (7); } public function Show():void{ View.alpha = 1; } public function set PrimaryState(_arg1:int):void{ _primaryState = _arg1; } private function SeekScore(_arg1:Event):void{ GameTemplateMainApp.MyStage.removeEventListener(Event.RENDER, SeekScore); if (PrimaryState == PRI_ST_DESTROYED){ _scoreTXT = (((View.getChildByName("view_mc") as MovieClip).getChildByName("puntajePowerUp_mc") as MovieClip).getChildByName("puntajePowerUp_txt") as TextField); if (Type == 1){ _score = SCORE_LIFE; _scoreTXT.text = String(SCORE_LIFE); GameManager.Instance.MainCharacter.AddPowerUpType(_type, _score); return; }; if (Type == 2){ _score = SCORE_COIN_SHADOW; _scoreTXT.text = String(SCORE_COIN_SHADOW); GameManager.Instance.MainCharacter.AddPowerUpType(_type, _score); return; }; if (Type == 3){ _score = SCORE_OMNITRIX; _scoreTXT.text = String(SCORE_OMNITRIX); GameManager.Instance.MainCharacter.AddPowerUpType(_type, _score); return; }; if (Type == 4){ _score = SCORE_FOUR_ARMS; _scoreTXT.text = String(SCORE_FOUR_ARMS); GameManager.Instance.ActiveFourArms = true; return; }; if (Type == 5){ _score = SCORE_CANNONBOLT; _scoreTXT.text = String(SCORE_CANNONBOLT); GameManager.Instance.ActiveCannonBolt = true; return; }; if (Type == 6){ _score = SCORE_SURIKEN; _scoreTXT.text = String(SCORE_SURIKEN); return; }; if (Type == 7){ _score = SCORE_COIN_NOT_SHADOW; _scoreTXT.text = String(SCORE_COIN_NOT_SHADOW); GameManager.Instance.MainCharacter.AddPowerUpType(_type, _score); return; }; }; } public function get TopGlobalY():Number{ return (_hitArea.getBounds(_hitArea.stage).y); } public function SetType(_arg1:int):void{ } public function get Active():Boolean{ return (_active); } public function DispatchEvent(_arg1:Event):void{ switch (_arg1.type){ case "PowerUpAnimationDestroyedEnd": Hide(); if ((((_score == SCORE_FOUR_ARMS)) || ((_score == SCORE_CANNONBOLT)))){ Global.DispatchGameEvent("LevelComplete"); }; break; }; } public function GetGlobalCenterPoint():Point{ var _local1:Rectangle; if ((((_hitArea == null)) || ((_hitArea.stage == null)))){ return (null); }; _local1 = _hitArea.getBounds(_hitArea.stage); return (new Point(((_local1.x + _local1.width) >> 1), ((_local1.y + _local1.height) >> 1))); } public function get ActiveInstruccion():Boolean{ return (_activeInstruccion); } public function get PrimaryStateLabels():Dictionary{ return (_primaryStateLabels); } public function get View():MovieClip{ return (_view); } private function TypePowerUp():void{ if ((View is PowerUpLifeAsset)){ _type = 1; return; }; if ((View is PowerUpCoinShadowAsset)){ _type = 2; return; }; if ((View is PowerUpOmnitrixAsset)){ _type = 3; return; }; if ((View is PowerUpFourArmsAsset)){ _type = 4; return; }; if ((View is PowerUpCannonBoltAsset)){ _type = 5; return; }; if ((View is PowerUpSurikenAsset)){ _type = 6; return; }; if ((View is PowerUpCoinNotShadowAsset)){ _type = 7; return; }; } public function GetCollisionSprite():Sprite{ if (_hitArea == null){ return (null); }; return (Sprite(_hitArea)); } public function get BottomGlobalY():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.y + _local1.height)); } public function set Active(_arg1:Boolean):void{ _active = _arg1; } public function get PrimaryState():int{ return (_primaryState); } public function set CurrentAbsoluteX(_arg1:Number):void{ } public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case PowerUp.PRI_ST_IDLE: PrimaryState = _arg1; _local2 = true; break; case PowerUp.PRI_ST_DESTROYED: PrimaryState = _arg1; _local2 = true; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } public function set CurrentAbsoluteY(_arg1:Number):void{ } public function get Type():int{ return (_type); } public function Hide():void{ View.alpha = 0; } public function GetRadio():int{ if (_hitArea == null){ return (0); }; return (((Math.max(_hitArea.width, _hitArea.height) >> 1) + 1)); } public function get CurrentAbsoluteX():Number{ return (_view.x); } public function get CurrentAbsoluteY():Number{ return (_view.y); } public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMC == null){ return; }; GameTemplateMainApp.MyStage.addEventListener(Event.RENDER, SeekScore); GameTemplateMainApp.MyStage.invalidate(); _primaryStateMC.gotoAndStop(_primaryStateLabels[_arg1]); } public function get LeftGlobalX():Number{ return (_hitArea.getBounds(_hitArea.stage).x); } public function LoadConfig():void{ SCORE_LIFE = ConfigLoader.Instance.Config["ScoreLife"]; SCORE_COIN_SHADOW = ConfigLoader.Instance.Config["ScoreCoinShadow"]; SCORE_COIN_NOT_SHADOW = ConfigLoader.Instance.Config["ScoreCoinNotShadow"]; SCORE_OMNITRIX = ConfigLoader.Instance.Config["ScoreOmnitrix"]; SCORE_FOUR_ARMS = ConfigLoader.Instance.Config["ScoreFourArms"]; SCORE_CANNONBOLT = ConfigLoader.Instance.Config["ScoreCannonBolt"]; SCORE_SURIKEN = ConfigLoader.Instance.Config["ScoreSuriken"]; } public function Update():void{ } public function get Score():int{ return (_score); } public function set ActiveInstruccion(_arg1:Boolean):void{ _activeInstruccion = _arg1; } } }//package model
Section 274
//ShotFriendly (model.ShotFriendly) package model { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.geom.*; import collision.*; import config.*; import view.*; public class ShotFriendly implements ICollidable { private var _direction:int;// = 0 private var _hitArea:MovieClip; private var _view:MovieClip; private var _primaryState:int; private var _primaryStateMC:MovieClip; private var _active:Boolean; private var _energy:Number;// = 50 private var _primaryStateLabels:Dictionary; private var _currentTime:int; private var _offsetFromLevelLayer:Point;// = null private var _timeLeft:int;// = 0 private var VELOCITY:Number; private var _lastTime:int; private var MAX_TIME:int; public static const PRI_ST_IDLE_LBL:String = "idle"; public static const PRI_ST_DESTROYED:int = 1; public static const PRI_ST_IDLE:int = 0; public static const PRI_ST_DESTROYED_LBL:String = "destroyed"; public function ShotFriendly(_arg1:Number, _arg2:Number, _arg3:int, _arg4:Point){ _energy = 50; _direction = 0; _timeLeft = 0; _offsetFromLevelLayer = null; super(); _view = new ShotFriendlyAsset(); _offsetFromLevelLayer = _arg4.clone(); _hitArea = (_view.getChildByName("hitArea_mc") as MovieClip); if (_hitArea == null){ _hitArea = _view; } else { _hitArea.alpha = 0; }; CurrentAbsoluteX = _arg1; CurrentAbsoluteY = _arg2; Direction = _arg3; _primaryStateMC = _view; _primaryStateLabels = new Dictionary(); _primaryStateLabels[PRI_ST_IDLE] = PRI_ST_IDLE_LBL; _primaryStateLabels[PRI_ST_DESTROYED] = PRI_ST_DESTROYED_LBL; TryNewPrimaryState(ShotFriendly.PRI_ST_IDLE); View.addEventListener("ShotFriendlyAnimationDestroyedEnd", DispatchEvent); _lastTime = 0; Active = false; Hide(); LoadConfig(); _timeLeft = MAX_TIME; } public function GetGlobalCenterPoint():Point{ var _local1:Rectangle; if ((((_hitArea == null)) || ((_hitArea.stage == null)))){ return (null); }; _local1 = _hitArea.getBounds(_hitArea.stage); return (new Point(((_local1.x + _local1.width) >> 1), ((_local1.y + _local1.height) >> 1))); } public function get OffsetFromLevelLayer():Point{ return (_offsetFromLevelLayer); } public function GetType():int{ return (4); } public function GetCollisionSprite():Sprite{ if (_hitArea == null){ return (null); }; return (Sprite(_hitArea)); } public function Show():void{ View.alpha = 1; } public function set PrimaryState(_arg1:int):void{ _primaryState = _arg1; } public function DispatchEvent(_arg1:Event):void{ switch (_arg1.type){ case "ShotFriendlyAnimationDestroyedEnd": Active = false; Hide(); break; }; } public function get TopGlobalY():Number{ return (_hitArea.getBounds(_hitArea.stage).y); } public function SetType(_arg1:int):void{ } public function get Energy():Number{ return (_energy); } public function Initialize():void{ LayerFactory.Instance.GetLayer(LayerFactory.LAYER_GAME_LAYER).addChild(_view); } public function get PrimaryStateLabels():Dictionary{ return (_primaryStateLabels); } private function SeekMC(_arg1:Event):void{ GameTemplateMainApp.MyStage.removeEventListener(Event.RENDER, SeekMC); } public function set Direction(_arg1:int):void{ _direction = _arg1; } public function get View():MovieClip{ return (_view); } public function get BottomGlobalY():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.y + _local1.height)); } public function set Active(_arg1:Boolean):void{ _active = _arg1; if (_active){ _timeLeft = MAX_TIME; }; } public function get PrimaryState():int{ return (_primaryState); } public function set CurrentAbsoluteX(_arg1:Number):void{ _view.x = _arg1; } public function set CurrentAbsoluteY(_arg1:Number):void{ _view.y = _arg1; } public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case ShotFriendly.PRI_ST_IDLE: PrimaryState = _arg1; _local2 = true; break; case ShotFriendly.PRI_ST_DESTROYED: PrimaryState = _arg1; _local2 = true; Active = false; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } public function Pause():void{ _lastTime = 0; } public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMC == null){ return; }; _primaryStateMC.gotoAndStop(_primaryStateLabels[_arg1]); } public function get Direction():int{ return (_direction); } public function GetRadio():int{ if (_hitArea == null){ return (0); }; return (((Math.max(_hitArea.width, _hitArea.height) >> 1) + 1)); } public function get CurrentAbsoluteY():Number{ return (_view.y); } public function get Active():Boolean{ return (_active); } public function get LeftGlobalX():Number{ return (_hitArea.getBounds(_hitArea.stage).x); } public function get CurrentAbsoluteX():Number{ return (_view.x); } public function Update():void{ if (!_active){ _lastTime = 0; } else { if (_lastTime == 0){ _lastTime = getTimer(); return; }; _currentTime = getTimer(); CurrentAbsoluteX = (CurrentAbsoluteX + ((Direction * VELOCITY) * (_currentTime - _lastTime))); _timeLeft = (_timeLeft - (_currentTime - _lastTime)); _lastTime = _currentTime; if (_timeLeft <= 0){ TryNewPrimaryState(PRI_ST_DESTROYED); }; }; } public function Hide():void{ View.alpha = 0; } public function set Energy(_arg1:Number):void{ _energy = _arg1; } public function LoadConfig():void{ VELOCITY = ConfigLoader.Instance.Config["ShotFriendlyVelocity"]; MAX_TIME = ConfigLoader.Instance.Config["ShotFriendlyMaxTime"]; } public function get RightGlobalX():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.x + _local1.width)); } } }//package model
Section 275
//ShotsFriendlyManager (model.ShotsFriendlyManager) package model { import flash.geom.*; import view.*; public class ShotsFriendlyManager { private const POINT_ZERO:Point; private var MAX_SURIKEN:int;// = 14 private var _container:Array; private var _next:int;// = 0 private var _localPositionShuriken:Point;// = null public function ShotsFriendlyManager(){ POINT_ZERO = new Point(0, 0); MAX_SURIKEN = 14; _next = 0; _localPositionShuriken = null; super(); _container = new Array(); _next = 0; while (_next <= MAX_SURIKEN) { _container.push(new ShotFriendly(0, 0, 1, POINT_ZERO)); _next++; }; _next = 0; } public function AddShotNew(_arg1:Number, _arg2:Number, _arg3:int):void{ var _local4:*; if (_container.length != 0){ for each (_local4 in _container) { if (!ShotFriendly(_local4).Active){ ShotFriendly(_local4).Direction = _arg3; ShotFriendly(_local4).CurrentAbsoluteX = _arg1; ShotFriendly(_local4).CurrentAbsoluteY = _arg2; ShotFriendly(_local4).Active = true; ShotFriendly(_container[_next]).TryNewPrimaryState(ShotFriendly.PRI_ST_IDLE); ShotFriendly(_container[_next]).Show(); return; }; }; _container.push(new ShotFriendly(_arg1, _arg2, _arg3, POINT_ZERO)); return; }; _container.push(new ShotFriendly(_arg1, _arg2, _arg3, POINT_ZERO)); } public function get Container():Array{ return (_container); } public function InitializeShots():void{ var _local1:*; if (_container.length != 0){ for each (_local1 in _container) { ShotFriendly(_local1).Initialize(); }; }; } public function Update():void{ var _local1:*; for each (_local1 in _container) { ShotFriendly(_local1).Update(); }; } public function DeleteShots():void{ var _local1:int; var _local2:int; if (_container.length != 0){ _local1 = _container.length; while (_local2 < _local1) { if (!ShotFriendly(_container[_local2]).Active){ _container.splice(_local2, 1); }; _local2++; }; }; } public function AddShot(_arg1:Point, _arg2:int):void{ _localPositionShuriken = LayerFactory.Instance.GetLayer(LayerFactory.LAYER_GAME_LAYER).globalToLocal(_arg1); ShotFriendly(_container[_next]).Direction = _arg2; ShotFriendly(_container[_next]).CurrentAbsoluteX = _localPositionShuriken.x; ShotFriendly(_container[_next]).CurrentAbsoluteY = _localPositionShuriken.y; ShotFriendly(_container[_next]).Active = true; ShotFriendly(_container[_next]).TryNewPrimaryState(ShotFriendly.PRI_ST_IDLE); ShotFriendly(_container[_next]).Show(); Sfx.PlaySound(Sfx.SFX_BEN_SHURIKEN); _next++; if (_next > MAX_SURIKEN){ _next = 0; }; } public function Pause():void{ var _local1:*; for each (_local1 in _container) { ShotFriendly(_local1).Pause(); }; } public function Reset():void{ var _local1:*; for each (_local1 in _container) { ShotFriendly(_local1).Active = false; ShotFriendly(_local1).Hide(); }; _next = 0; } } }//package model
Section 276
//SpecialWall (model.SpecialWall) package model { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.geom.*; import collision.*; import config.*; public class SpecialWall implements ICollidable { private var _hitArea:MovieClip; private var _view:MovieClip; private var _numberCombo:int; private var _primaryState:int; private var _combo:Dictionary; private var _destroyed:Boolean; private var _stateCombo:MovieClip; private var _active:Boolean; private var _enabledTransformation:uint;// = 0 private var _primaryStateLabels:Dictionary; private var _accountant:int;// = 0 private var _primaryStateMc:MovieClip; private var _offsetFromLevelLayer:Point;// = null private var _BenTen:Character; private var MAX_ACCOUNTANT:int; public static const PRI_ST_IDLE:int = 0; public static const PRI_ST_HIT_LBL:String = "hit"; public static const DISTANCE_OF_BEN:int = 800; public static const PRI_ST_DESTROYED_LBL:String = "destroyed"; public static const PRI_ST_HIT_IDLE:int = 2; public static const PRI_ST_IDLE_LBL:String = "idle"; public static const PRI_ST_DESTROYED:int = 3; public static const PRI_ST_HIT:int = 1; public static const PRI_ST_HIT_IDLE_LBL:String = "hitIdle"; public function SpecialWall(_arg1:MovieClip, _arg2:Character, _arg3:Point){ var _local4:String; var _local5:int; var _local6:int; var _local7:int; _accountant = 0; _enabledTransformation = 0; _offsetFromLevelLayer = null; super(); _view = _arg1; _offsetFromLevelLayer = _arg3.clone(); _BenTen = _arg2; _hitArea = (_view.getChildByName("hitArea_mc") as MovieClip); if (_hitArea == null){ _hitArea = _view; } else { _hitArea.alpha = 0; }; _primaryStateMc = _view; _primaryStateLabels = new Dictionary(); _combo = new Dictionary(); _local4 = _view.name.toUpperCase(); _local5 = _local4.length; if (_local5 < 4){ _enabledTransformation = 2; } else { _stateCombo = (_view.getChildByName("secuencia_mc") as MovieClip); _enabledTransformation = 1; _local6 = 0; while (_local6 < _local5) { _local7 = (_local6 + 1); _combo[_local7] = _local4.charAt(_local6); _local6++; }; }; _primaryStateLabels[PRI_ST_IDLE] = PRI_ST_IDLE_LBL; _primaryStateLabels[PRI_ST_HIT] = PRI_ST_HIT_LBL; _primaryStateLabels[PRI_ST_HIT_IDLE] = PRI_ST_HIT_IDLE_LBL; _primaryStateLabels[PRI_ST_DESTROYED] = PRI_ST_DESTROYED_LBL; Active = false; Destroyed = false; _numberCombo = 0; TryNewPrimaryState(SpecialWall.PRI_ST_IDLE); View.addEventListener("SpecialWallAnimationHitEnd", DispatchEvent); View.addEventListener("SpecialWallAnimationDestroyedEnd", DispatchEvent); Show(); LoadConfig(); } public function get RightGlobalX():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.x + _local1.width)); } public function GetGlobalCenterPoint():Point{ var _local1:Rectangle; if ((((_hitArea == null)) || ((_hitArea.stage == null)))){ return (null); }; _local1 = _hitArea.getBounds(_hitArea.stage); return (new Point(((_local1.x + _local1.width) >> 1), ((_local1.y + _local1.height) >> 1))); } public function get OffsetFromLevelLayer():Point{ return (_offsetFromLevelLayer); } private function ResetSecondStateMc(_arg1:Event):void{ GameTemplateMainApp.MyStage.removeEventListener(Event.RENDER, ResetSecondStateMc); switch (PrimaryState){ case PRI_ST_HIT_IDLE: break; }; } public function set Destroyed(_arg1:Boolean):void{ _destroyed = _arg1; } public function get EnabledTransformation():uint{ return (_enabledTransformation); } public function Show():void{ View.alpha = 1; if (_enabledTransformation == 1){ _stateCombo.alpha = 1; }; } public function GetType():int{ return (6); } public function DispatchEvent(_arg1:Event):void{ switch (_arg1.type){ case "SpecialWallAnimationHitEnd": TryNewPrimaryState(SpecialWall.PRI_ST_HIT_IDLE); break; case "SpecialWallAnimationDestroyedEnd": Hide(); NumberCombo = 0; Active = false; Destroyed = true; break; }; } public function get TopGlobalY():Number{ return (_hitArea.getBounds(_hitArea.stage).y); } public function StateCombo(_arg1:int):void{ _stateCombo.gotoAndStop((_arg1 + 1)); } public function get Active():Boolean{ return (_active); } public function get NumberCombo():int{ return (_numberCombo); } public function get PrimaryStateLabels():Dictionary{ return (_primaryStateLabels); } public function set PrimaryState(_arg1:int):void{ _primaryState = _arg1; } public function get Accountant():int{ return (_accountant); } public function SetType(_arg1:int):void{ } public function get View():MovieClip{ return (_view); } public function GetCollisionSprite():Sprite{ if (_hitArea == null){ return (null); }; return (Sprite(_hitArea)); } public function set NumberCombo(_arg1:int):void{ _numberCombo = _arg1; } public function get BottomGlobalY():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.y + _local1.height)); } public function set Active(_arg1:Boolean):void{ _active = _arg1; } public function get PrimaryState():int{ return (_primaryState); } public function set CurrentAbsoluteX(_arg1:Number):void{ } public function set CurrentAbsoluteY(_arg1:Number):void{ } public function TryNewPrimaryState(_arg1:int):Boolean{ var _local2:Boolean; if (_arg1 == PrimaryState){ return (false); }; _local2 = false; switch (_arg1){ case SpecialWall.PRI_ST_IDLE: PrimaryState = _arg1; _local2 = true; break; case SpecialWall.PRI_ST_HIT: PrimaryState = _arg1; _local2 = true; break; case SpecialWall.PRI_ST_HIT_IDLE: PrimaryState = _arg1; _local2 = true; break; case SpecialWall.PRI_ST_DESTROYED: PrimaryState = _arg1; _local2 = true; break; }; if (_local2){ GotoPrimaryStateAnimation(_arg1); }; return (_local2); } public function GotoPrimaryStateAnimation(_arg1:int):void{ if (_primaryStateMc == null){ return; }; _primaryStateMc.gotoAndStop(_primaryStateLabels[_arg1]); } public function Hide():void{ View.alpha = 0; if (_enabledTransformation == 1){ _stateCombo.alpha = 0; }; } public function GetRadio():int{ if (_hitArea == null){ return (0); }; return (((Math.max(_hitArea.width, _hitArea.height) >> 1) + 1)); } public function get CurrentAbsoluteX():Number{ return (_view.x); } public function get CurrentAbsoluteY():Number{ return (_view.y); } public function get Combo():Dictionary{ return (_combo); } public function LoadConfig():void{ MAX_ACCOUNTANT = ConfigLoader.Instance.Config["SpecialWallMaxAccountant"]; } public function Update():void{ var _local1:int; if (Destroyed){ return; }; _local1 = (_BenTen.X - (View.x + OffsetFromLevelLayer.x)); if (Math.abs(_local1) < DISTANCE_OF_BEN){ Active = true; } else { Active = false; }; if (((Active) && ((_enabledTransformation == 1)))){ if (_accountant < MAX_ACCOUNTANT){ _accountant++; } else { _accountant = 0; NumberCombo = 0; StateCombo(NumberCombo); }; }; } public function set Accountant(_arg1:int):void{ _accountant = _arg1; } public function get Destroyed():Boolean{ return (_destroyed); } public function get LeftGlobalX():Number{ return (_hitArea.getBounds(_hitArea.stage).x); } } }//package model
Section 277
//SpecialWallManager (model.SpecialWallManager) package model { public class SpecialWallManager { private var _container:Array; public function SpecialWallManager(){ _container = new Array(); } public function RemoveSpecialWall(_arg1:SpecialWall):void{ var _local2:int; var _local3:int; if (_container.length != 0){ _local2 = _container.length; while (_local3 < _local2) { if (!SpecialWall(_container[_local3]).Active){ _container.splice(_local3, 1); }; _local3++; }; }; } public function Update():void{ var _local1:*; for each (_local1 in _container) { SpecialWall(_local1).Update(); }; } public function AddSpecialWall(_arg1:SpecialWall):void{ _container.push(_arg1); } public function Reset():void{ _container = new Array(); } } }//package model
Section 278
//Transformation (model.Transformation) package model { import flash.display.*; import flash.utils.*; import flash.geom.*; public class Transformation { protected var _hitArea:MovieClip; protected var _view:MovieClip; protected var _onCurrentAnimationEnd:Function; private var _energyToSubtractEnemyShot:int; protected var _character:Character; protected var _primaryStateLabels:Dictionary; protected var _secondaryStateLabels:Dictionary; protected var _primaryStateMc:MovieClip; protected var _secondaryStateMc:MovieClip; private var _energyToSubtractEnemyAttack:int; private var _energyToSubtractEnergySuperAttack:int; protected var _fragility:Number; public function Transformation(_arg1:MovieClip, _arg2:Character){ _view = _arg1; _hitArea = (_view.getChildByName("hitArea_mc") as MovieClip); if (_hitArea == null){ _hitArea = _view; } else { _hitArea.alpha = 0; }; _character = _arg2; _onCurrentAnimationEnd = null; _primaryStateLabels = new Dictionary(); _secondaryStateLabels = new Dictionary(); _primaryStateLabels[Character.PRI_ST_IDLE] = Character.PRI_ST_IDLE_LBL; _primaryStateLabels[Character.PRI_ST_CROUCHING] = Character.PRI_ST_CROUCHING_LBL; _primaryStateLabels[Character.PRI_ST_RUNNING] = Character.PRI_ST_RUNNING_LBL; _primaryStateLabels[Character.PRI_ST_JUMPING] = Character.PRI_ST_JUMPING_LBL; _primaryStateLabels[Character.PRI_ST_HIT] = Character.PRI_ST_HIT_LBL; _primaryStateLabels[Character.PRI_ST_DIE] = Character.PRI_ST_DIE_LBL; _secondaryStateLabels[Character.SEC_STATE_IDLE] = Character.SEC_STATE_IDLE_LBL; _secondaryStateLabels[Character.SEC_STATE_SWINGING_SWORD] = Character.SEC_STATE_SWINGING_SWORD_LBL; _secondaryStateLabels[Character.SEC_STATE_THROWING_SHURIKEN] = Character.SEC_STATE_THROWING_SHURIKEN_LBL; _secondaryStateLabels[Character.SEC_STATE_RUN] = Character.SEC_STATE_RUN_LBL; _secondaryStateLabels[Character.SEC_STATE_ARMS] = Character.SEC_STATE_ARMS_LBL; _secondaryStateLabels[Character.SEC_STATE_ARMSLEFT] = Character.SEC_STATE_ARMSLEFT_LBL; _secondaryStateLabels[Character.SEC_STATE_ARMSRIGHT] = Character.SEC_STATE_ARMSRIGHT_LBL; _secondaryStateLabels[Character.SEC_STATE_FAST] = Character.SEC_STATE_FAST_LBL; _secondaryStateLabels[Character.SEC_STATE_ATTACK] = Character.SEC_STATE_ATTACK_LBL; _primaryStateMc = _view; _secondaryStateMc = null; } public function get RightGlobalX():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.x + _local1.width)); } public function GetGlobalCenterPoint():Point{ var _local1:Rectangle; if ((((_hitArea == null)) || ((_hitArea.stage == null)))){ return (null); }; _local1 = _hitArea.getBounds(_hitArea.stage); return (new Point(((_local1.x + _local1.width) >> 1), ((_local1.y + _local1.height) >> 1))); } public function TryTransformation(_arg1:int):void{ } public function GetCollisionSprite():Sprite{ if (_hitArea == null){ return (null); }; return (Sprite(_hitArea)); } public function get EnergyToSubtractEnemySuperAttack():int{ return (_energyToSubtractEnergySuperAttack); } public function GotoSecondaryStateAnimation(_arg1:int):void{ } public function Shot():void{ } public function Show():void{ _view.visible = true; } public function get HitArea():MovieClip{ return (_hitArea); } public function get TopGlobalY():Number{ return (_hitArea.getBounds(_hitArea.stage).y); } public function UpdateAirPose(_arg1:Boolean):void{ } public function set EnergyToSubtractEnemySuperAttack(_arg1:int):void{ _energyToSubtractEnergySuperAttack = _arg1; } public function set Fragility(_arg1:Number):void{ _fragility = _arg1; } public function CurrentAnimationFinished():void{ if (_onCurrentAnimationEnd != null){ _onCurrentAnimationEnd(); }; } public function get View():MovieClip{ return (_view); } public function get BottomGlobalY():Number{ var _local1:Rectangle; _local1 = _hitArea.getBounds(_hitArea.stage); return ((_local1.y + _local1.height)); } public function SetSecondaryStateIdle():void{ TryNewSecondaryState(Character.SEC_STATE_IDLE); } public function set EnergyToSubtractEnemyShot(_arg1:int):void{ _energyToSubtractEnemyShot = _arg1; } public function get Fragility():Number{ return (_fragility); } public function TryNewPrimaryState(_arg1:int):Boolean{ return (true); } public function Hide():void{ _view.visible = false; } public function Update(_arg1:Number):void{ } public function GotoPrimaryStateAnimation(_arg1:int):void{ } public function get EnergyToSubtractEnemyShot():int{ return (_energyToSubtractEnemyShot); } public function GetRadio():int{ if (_hitArea == null){ return (0); }; return (((Math.max(_hitArea.width, _hitArea.height) >> 1) + 1)); } public function get LeftGlobalX():Number{ return (_hitArea.getBounds(_hitArea.stage).x); } public function TryNewSecondaryState(_arg1:int):Boolean{ return (true); } public function set EnergyToSubtractEnemyAttack(_arg1:int):void{ _energyToSubtractEnemyAttack = _arg1; } public function get EnergyToSubtractEnemyAttack():int{ return (_energyToSubtractEnemyAttack); } public function UpdateAction(_arg1:uint):void{ } } }//package model
Section 279
//WallBlocked (model.WallBlocked) package model { import flash.display.*; import flash.geom.*; import config.*; public class WallBlocked extends EnvironmentElement { private var _active:Boolean; private var _BenTen:Character; private var _positionXEnable:int; public function WallBlocked(_arg1:MovieClip, _arg2:Character, _arg3:Point){ super(_arg1, true, true, true, true, _arg3); _BenTen = _arg2; Active = false; LoadMyConfig(); } override public function get RightGlobalX():Number{ var _local1:Rectangle; _local1 = _view.getBounds(_view.stage); return ((_local1.x + _local1.width)); } override public function GetGlobalCenterPoint():Point{ var _local1:Rectangle; var _local2:Number; var _local3:Number; if ((((_view == null)) || ((_view.stage == null)))){ return (null); }; _local1 = _view.getBounds(_view.stage); _local2 = _view.localToGlobal(new Point(0, 0)).x; _local3 = _view.localToGlobal(new Point(0, (-(_view.height) >> 1))).y; return (new Point(((_local1.x + _local1.width) >> 1), ((_local1.y + _local1.height) >> 1))); } override public function GetType():int{ return (9); } override public function get TopGlobalY():Number{ return (_view.getBounds(_view.stage).y); } override public function SetType(_arg1:int):void{ } public function get Active():Boolean{ return (_active); } override public function GetCollisionSprite():Sprite{ if (_view == null){ return (null); }; return (Sprite(_view)); } public function LoadMyConfig():void{ _positionXEnable = ConfigLoader.Instance.Config["WallBlockedEnablePosition"]; } override public function get BottomGlobalY():Number{ var _local1:Rectangle; _local1 = _view.getBounds(_view.stage); return ((_local1.y + _local1.height)); } public function set Active(_arg1:Boolean):void{ _active = _arg1; } public function GetGlobalCenterPointOld():Point{ var _local1:Number; var _local2:Number; if (_view == null){ return (new Point(0, 0)); }; _local1 = _view.localToGlobal(new Point((_view.width >> 1), 0)).x; _local2 = _view.localToGlobal(new Point(0, (_view.height >> 1))).y; return (new Point(_local1, _local2)); } override public function get LeftGlobalX():Number{ return (_view.getBounds(_view.stage).x); } public function Update():void{ if (((!(Active)) && ((_BenTen.CurrentAbsoluteX >= _positionXEnable)))){ Active = true; if (View.currentFrame == 1){ View.gotoAndPlay(2); }; }; } override public function GetRadio():int{ if (_view == null){ return (0); }; return ((Math.max(_view.width, _view.height) / 2)); } } }//package model
Section 280
//WallBlockedManager (model.WallBlockedManager) package model { public class WallBlockedManager { private var _container:Array; public function WallBlockedManager(){ Reset(); } public function Reset():void{ _container = new Array(); } public function AddWallBlocked(_arg1:WallBlocked):void{ _container.push(_arg1); } public function Update():void{ var _local1:*; for each (_local1 in _container) { WallBlocked(_local1).Update(); }; } public function RemoveWallBlocked(_arg1:WallBlocked):void{ var _local2:int; var _local3:int; if (_container.length != 0){ _local2 = _container.length; while (_local3 < _local2) { if (!WallBlocked(_container[_local3]).Active){ _container.splice(_local3, 1); }; _local3++; }; }; } } }//package model
Section 281
//ScrollableScreenElement (scroll.ScrollableScreenElement) package scroll { import flash.display.*; public class ScrollableScreenElement { private var _loopWidth:Number; private var _depthHorizontal:Number; private var _initX:Number; private var _initY:Number; private var _loopHorizontal:Boolean; private var _loopHeight:Number; private var _screenHeight:Number; private var _loopVertical:Boolean; private var _depthVertical:Number; private var _asset:MovieClip;// = null private var _screenWidth:Number; private var _frozen:Boolean; public static const LOOP_VERTICAL:String = "LoopVertical"; public static const LOOP_HORIZONTAL:String = "LoopHorizontal"; public function ScrollableScreenElement(_arg1:MovieClip, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Boolean, _arg7:Boolean=false, _arg8:Number=0, _arg9:Number=0){ _asset = null; super(); _asset = _arg1; _depthHorizontal = _arg2; _depthVertical = _arg3; _screenWidth = _arg4; _screenHeight = _arg5; _loopHorizontal = _arg6; _loopVertical = _arg7; _initX = _asset.x; _initY = _asset.y; _frozen = false; _loopWidth = ((_asset.width - _arg8) / 2); _loopHeight = ((_asset.height - _arg9) / 2); } private function CheckVerticalLoop():void{ if (_asset.y > 0){ _asset.y = (_asset.y - _loopHeight); } else { if (_asset.y < -(_loopHeight)){ _asset.y = (_asset.y + _loopHeight); }; }; } public function ScrollX(_arg1:Number):void{ if (_frozen){ return; }; _asset.x = (_asset.x - (_arg1 * _depthHorizontal)); if (_loopHorizontal){ CheckHorizontalLoop(); }; } public function ScrollY(_arg1:Number):void{ if (_frozen){ return; }; _asset.y = (_asset.y - (_arg1 * _depthVertical)); if (_loopVertical){ CheckVerticalLoop(); }; } public function Unfreeze():void{ _frozen = false; } public function get Asset():MovieClip{ return (_asset); } public function AdjustHorizontalScroll(_arg1:Number):void{ if (_frozen){ return; }; _asset.x = (((-1 * _arg1) * _depthHorizontal) + _initX); if (_loopHorizontal){ CheckHorizontalLoop(); }; } public function Reset():void{ _asset.x = _initX; _asset.y = _initY; _frozen = false; } private function CheckHorizontalLoop():void{ if (_asset.x > 0){ _asset.x = (_asset.x - _loopWidth); } else { if (_asset.x < -(_loopWidth)){ _asset.x = (_asset.x + _loopWidth); }; }; } public function Freeze():void{ _frozen = true; } public function AdjustVerticalScroll(_arg1:Number):void{ if (_frozen){ return; }; _asset.y = (((-1 * _arg1) * _depthVertical) + _initY); if (_loopVertical){ CheckVerticalLoop(); }; } } }//package scroll
Section 282
//ScrollManager (scroll.ScrollManager) package scroll { import flash.display.*; import game.*; import model.*; import com.gamesandweb.game.*; import flash.geom.*; import gs.*; import config.*; import view.*; public class ScrollManager { private var _levelHeight:Number;// = 1000 private var _localStageYOffset:Number;// = 0 private var _levelLimitsLocalYOffset:Number;// = 100 private var _dummyZeroPoint:Point; private var _heightsRatio:Number;// = 1 private var _loadingSubLevel:Boolean;// = false private var _isLoopLayer:ScrollableScreenElement; private var _levelWidth:Number;// = 1000 private var _screenLockedWidth:Number;// = 600 private var _isBackground:ScrollableScreenElement; private var _localStageXOffset:Number;// = 0 private var _characterYCorrectionFactorOnScreenScroll:Number;// = 0.5 private var _levelLimitsLocalXOffset:Number;// = 100 private var _horizontalScrollFactor:Number;// = 0.05 private var _endSubLevel:Boolean;// = false private var _scrollableElements:Array;// = null private var _incrementY1:int; private var _incrementY2:int; private var _verticalScrollFactor:Number;// = 0.1 private var _scrollImmediately:Boolean;// = false private var _screenLocked:Boolean;// = false private var _mainCharacter:Character;// = null private var _incrementY3:int; private var _levelContainer:MovieClip;// = null private var _levelLimits:MovieClip;// = null public static const LONG_MAX_OF_SUBLEVEL:int = 3000; public static var MIN_ABS_X_WITH_SCROLL:Number = (MIN_ABS_X + (MIN_SCREEN_X - SCR_POS_MIN_ABS_X)); public static var MIN_ABS_Y_WITH_SCROLL:Number = (MIN_ABS_Y + (MIN_SCREEN_Y - SCR_POS_MIN_ABS_Y)); public static var SCR_POS_MIN_ABS_X:Number = 30; public static var MAX_ABS_X_WITH_SCROLL:Number = (MAX_ABS_X + (MAX_SCREEN_X - SCR_POS_MAX_ABS_X)); public static var MAX_ABS_Y_WITH_SCROLL:Number = (MAX_ABS_Y + (MAX_SCREEN_Y - SCR_POS_MAX_ABS_Y)); public static var MIN_ABS_X:Number = 10; public static var MIN_ABS_Y:Number = -200; public static var MAX_SCREEN_X:Number = 500; public static var MAX_SCREEN_Y:Number = 350; public static var SCR_POS_MAX_ABS_X:Number = 550; public static var SCR_POS_MIN_ABS_Y:Number = 50; public static var MAX_ABS_X:Number = 3000; public static var MAX_ABS_Y:Number = 600; public static var MIN_SCREEN_X:Number = 100; public static var MIN_SCREEN_Y:Number = 100; private static var _instance:ScrollManager = null; public static var SCR_POS_MAX_ABS_Y:Number = 590; public function ScrollManager(_arg1:SingletonBlocker=null){ _endSubLevel = false; _loadingSubLevel = false; _scrollableElements = null; _mainCharacter = null; _horizontalScrollFactor = 0.05; _verticalScrollFactor = 0.1; _levelContainer = null; _levelLimits = null; _levelLimitsLocalXOffset = 100; _levelLimitsLocalYOffset = 100; _levelWidth = 1000; _levelHeight = 1000; _heightsRatio = 1; _dummyZeroPoint = new Point(); _localStageXOffset = 0; _localStageYOffset = 0; _scrollImmediately = false; _screenLocked = false; _screenLockedWidth = 600; _characterYCorrectionFactorOnScreenScroll = 0.5; super(); if (_arg1 == null){ throw (new Error("Public construction not allowed. Use GetInstance()")); }; _horizontalScrollFactor = ConfigLoader.Instance.Config["HorizontalScrollFactor"]; _verticalScrollFactor = ConfigLoader.Instance.Config["VerticalScrollFactor"]; _incrementY1 = ConfigLoader.Instance.Config["IncrementYLevel1"]; _incrementY2 = ConfigLoader.Instance.Config["IncrementYLevel2"]; _incrementY3 = ConfigLoader.Instance.Config["IncrementYLevel3"]; _characterYCorrectionFactorOnScreenScroll = Number(ConfigLoader.Instance.Config["CharacterYCorrectionFactorOnScreenScroll"]); _scrollImmediately = false; } public function RemoveScrollable(_arg1:ScrollableScreenElement):void{ _scrollableElements.splice(_scrollableElements.indexOf(_arg1), 1); } public function set LevelWidth(_arg1:Number):void{ _levelWidth = _arg1; } public function get EndSubLevel():Boolean{ return (_endSubLevel); } private function BenFell():void{ ScrollManager.Instance.Unfreeze(); _mainCharacter.BenDie(); } public function Update():void{ ScrollX(); ScrollY(); } public function Unfreeze():void{ var _local1:int; var _local2:int; _local1 = _scrollableElements.length; _local2 = 0; while (_local2 < _local1) { (_scrollableElements[_local2] as ScrollableScreenElement).Unfreeze(); _local2++; }; } public function ScrollX():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:int; var _local10:int; _local1 = (_mainCharacter.CurrentAbsoluteX - _mainCharacter.PreviousAbsoluteX); _local2 = _local1; _local3 = (_levelContainer.x + _levelLimitsLocalXOffset); _local4 = 0; _local5 = 0; _local6 = _levelWidth; _local7 = (_mainCharacter.View.localToGlobal(_dummyZeroPoint).x + _localStageXOffset); if (_screenLocked){ _local3 = 0; _local6 = 600; }; _local8 = (_scrollImmediately) ? 1 : _horizontalScrollFactor; if ((((_mainCharacter.View.scaleX > 0)) && (!((_local7 == MIN_SCREEN_X))))){ _local4 = ((_local7 - MIN_SCREEN_X) * _local8); if (Math.abs(_local4) < 0.05){ _local4 = (_local7 - MIN_SCREEN_X); }; } else { if ((((_mainCharacter.View.scaleX < 0)) && (!((_local7 == MAX_SCREEN_X))))){ _local4 = ((MAX_SCREEN_X - _local7) * _local8); if (Math.abs(_local4) < 0.05){ _local4 = (MAX_SCREEN_X - _local7); }; _local4 = (_local4 * -1); }; }; if (_scrollImmediately){ _local4 = 0; }; if (!_scrollImmediately){ if ((_local3 - (_local2 + _local4)) > 0){ if (_local4 < 0){ _local4 = 0; }; _local5 = _local2; if (_local7 <= 50){ _mainCharacter.CurrentAbsoluteX = (_mainCharacter.CurrentAbsoluteX + (_local4 - _local5)); _mainCharacter.X = (_mainCharacter.X + (_local4 - _local5)); }; } else { if (((_local3 + _local6) - (_local2 + _local4)) < 600){ if (_local4 > 0){ _local4 = 0; }; _local5 = _local2; if (_local7 >= 550){ if (GameManager.Instance.FinalLevel == false){ Global.DispatchGameEvent("SubLevelComplete"); }; _mainCharacter.CurrentAbsoluteX = (_mainCharacter.CurrentAbsoluteX + (_local4 - _local5)); _mainCharacter.X = (_mainCharacter.X + (_local4 - _local5)); }; }; }; }; _local2 = (_local2 + (_local4 - _local5)); if (_local2 != 0){ _local9 = _scrollableElements.length; _local10 = 0; while (_local10 < _local9) { (_scrollableElements[_local10] as ScrollableScreenElement).ScrollX(_local2); _local10++; }; }; } public function ScrollY():void{ var _local1:Number; var _local2:Number; var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:int; var _local9:int; var _local10:int; _local1 = (_mainCharacter.CurrentAbsoluteY - _mainCharacter.PreviousAbsoluteY); _local2 = _local1; _local3 = (_mainCharacter.View.localToGlobal(_dummyZeroPoint).y + _localStageYOffset); _local4 = (_levelLimits.localToGlobal(_dummyZeroPoint).y + _localStageYOffset); _local5 = (MIN_SCREEN_Y + ((_local3 - _local4) * _heightsRatio)); _local6 = (_scrollImmediately) ? 1 : _verticalScrollFactor; _local7 = (-((_local5 - _local3)) * _local6); if (Math.abs(_local7) < 0.1){ _local7 = 0; }; if (_local7 != 0){ _local2 = (_local2 + _local7); }; _local2 = _local7; _local8 = ((GameManager.Instance.NumberLevel == 1)) ? _incrementY1 : ((GameManager.Instance.NumberLevel == 2)) ? _incrementY2 : _incrementY3; if (((((!(_mainCharacter.Dead)) && (!(_scrollImmediately)))) && ((_local3 >= ((_local4 + LevelHeight) + _local8))))){ _mainCharacter.Dead = true; TweenLite.to(_mainCharacter.View, 0.8, {y:(_mainCharacter.View.y + 300), onComplete:BenFell}); ScrollManager.Instance.Freeze(); }; if (_local2 != 0){ _local9 = _scrollableElements.length; _local10 = 0; while (_local10 < _local9) { (_scrollableElements[_local10] as ScrollableScreenElement).ScrollY(_local2); _local10++; }; }; } public function AddScrollable(_arg1:ScrollableScreenElement, _arg2:Boolean=false, _arg3:Boolean=false):void{ if (_arg2){ _isBackground = _arg1; }; if (_arg3){ _isLoopLayer = _arg1; }; _scrollableElements.push(_arg1); } public function UpdateScrollsImmediately():void{ _scrollImmediately = true; Update(); _scrollImmediately = false; } public function Remove():void{ _scrollableElements = new Array(); _mainCharacter = null; } public function LockScreen(_arg1:Number=600):void{ _screenLocked = true; _screenLockedWidth = _arg1; } public function get LevelHeight():Number{ return (_levelHeight); } public function Reset(_arg1:Boolean=true, _arg2:Boolean=true):void{ var _local3:int; var _local4:int; _local3 = _scrollableElements.length; _local4 = 0; while (_local4 < _local3) { if (((((!(_arg1)) && (((_scrollableElements[_local4] as ScrollableScreenElement) == _isBackground)))) || (((!(_arg2)) && (((_scrollableElements[_local4] as ScrollableScreenElement) == _isLoopLayer)))))){ } else { (_scrollableElements[_local4] as ScrollableScreenElement).Reset(); }; _local4++; }; Release(_arg1, _arg2); } public function Initialize(_arg1:Character):void{ _scrollableElements = new Array(); _mainCharacter = _arg1; _dummyZeroPoint = new Point(0, 0); _localStageXOffset = GameContext.Instance.GameSprite.localToGlobal(_dummyZeroPoint).x; _localStageYOffset = GameContext.Instance.GameSprite.localToGlobal(_dummyZeroPoint).y; } public function Freeze():void{ var _local1:int; var _local2:int; _local1 = _scrollableElements.length; _local2 = 0; while (_local2 < _local1) { (_scrollableElements[_local2] as ScrollableScreenElement).Freeze(); _local2++; }; } public function set LevelLimits(_arg1:MovieClip):void{ _levelLimits = _arg1; _levelContainer = LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LEVEL); _levelLimitsLocalXOffset = 0; _levelLimitsLocalYOffset = 0; } public function UnLockScreen():void{ _screenLocked = false; } public function get LevelWidth():Number{ return (_levelWidth); } public function set LoadingSubLevel(_arg1:Boolean):void{ _loadingSubLevel = _arg1; } public function set LevelHeight(_arg1:Number):void{ _levelHeight = _arg1; _heightsRatio = ((MAX_SCREEN_Y - MIN_SCREEN_Y) / _levelHeight); } public function AdjustScroll(_arg1:Number, _arg2:Number):void{ var _local3:int; _local3 = 0; while (_local3 < _scrollableElements.length) { (_scrollableElements[_local3] as ScrollableScreenElement).AdjustHorizontalScroll(_arg1); (_scrollableElements[_local3] as ScrollableScreenElement).AdjustVerticalScroll(_arg2); _local3++; }; } public function get LoadingSubLevel():Boolean{ return (_loadingSubLevel); } public function Scroll(_arg1:Number, _arg2:Number):void{ var _local3:int; _local3 = 0; while (_local3 < _scrollableElements.length) { (_scrollableElements[_local3] as ScrollableScreenElement).ScrollX(_arg1); (_scrollableElements[_local3] as ScrollableScreenElement).ScrollY(_arg2); _local3++; }; } public function Release(_arg1:Boolean, _arg2:Boolean):void{ _scrollableElements = new Array(); if (!_arg1){ _scrollableElements.push(_isBackground); }; if (!_arg2){ _scrollableElements.push(_isLoopLayer); }; } public function set EndSubLevel(_arg1:Boolean):void{ _endSubLevel = _arg1; } public static function get Instance():ScrollManager{ return (GetInstance()); } public static function GetInstance():ScrollManager{ if (!(ScrollManager._instance is ScrollManager)){ ScrollManager._instance = new ScrollManager(new SingletonBlocker()); }; return (_instance); } } }//package scroll class SingletonBlocker { private function SingletonBlocker(){ } }
Section 283
//TextLoader (txt.TextLoader) package txt { import flash.events.*; import flash.utils.*; import flash.net.*; import com.bourre.load.*; public class TextLoader extends EventDispatcher { private var _texts:Dictionary;// = null private var _loader:XMLLoader;// = null public static const LOAD_COMPLETE:String = "LoadComplete"; private static var _instance:TextLoader = null; public function TextLoader(_arg1:SingletonBlocker){ _loader = null; _texts = null; super(); if (_arg1 == null){ return; }; _texts = new Dictionary(); } public function LoadTexts(_arg1:String):void{ _loader = new XMLLoader(); _loader.addEventListener(LoaderEvent.onLoadInitEVENT, OnLoadInit); _loader.load(new URLRequest(_arg1)); } private function OnLoadInit(_arg1:LoaderEvent):void{ _loader.removeEventListener(LoaderEvent.onLoadInitEVENT, OnLoadInit); ParseTexts(_texts, _loader.getXML()); dispatchEvent(new Event(LOAD_COMPLETE)); } private function ParseTexts(_arg1:Dictionary, _arg2:XML):void{ var _local3:XML; for each (_local3 in _arg2.term) { _arg1[_local3.@key.toString()] = _local3.toString(); }; } public function get Texts():Dictionary{ return (_texts); } public static function get Instance():TextLoader{ if (!(TextLoader._instance is TextLoader)){ TextLoader._instance = new TextLoader(new SingletonBlocker()); }; return (_instance); } } }//package txt class SingletonBlocker { private function SingletonBlocker(){ } }
Section 284
//HUDManager (ui.HUDManager) package ui { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; import flash.text.*; import utils.*; import config.*; import txt.*; import buttons.*; import flash.ui.*; public class HUDManager { private var _view:MovieClip;// = null private var _bossFinalTXT:TextField; private var _lifeTXT:TextField; private var _lifeBarBossMC:MovieClip; private var _bossFinalMC:MovieClip; private var _transformationBarMC:MovieClip; private var _transformationCorrect:MovieClip; private var _soundMC:MovieClip; private var _characterMC:MovieClip; private var _lifeBarMC:MovieClip; private var _scoreTXT:TextField; private var _charactersElectionMC:MovieClip; private var _infoMC:MovieClip; private var _mute:Boolean;// = true private static var _instance:HUDManager; public function HUDManager(_arg1:SingletonBlocker){ _view = null; _mute = true; super(); if (_arg1 == null){ return; }; } private function CustomizeContextMenu():void{ var _local1:ContextMenu; var _local2:ContextMenuItem; _local1 = new ContextMenu(); _local1.hideBuiltInItems(); _local2 = new ContextMenuItem("Arte: Pablete", true); _local1.customItems.push(new ContextMenuItem("Arte: Pablete", true)); _local1.customItems.push(new ContextMenuItem("Programación: Diego y Alfred", true)); _local1.customItems.push(new ContextMenuItem("Game Design: Echo", true)); _local1.customItems.push(new ContextMenuItem("Ilustraciones: Paco", true)); _local1.customItems.push(new ContextMenuItem("Animación: César", true)); _lifeBarMC.contextMenu = _local1; } protected function OnSoundButtonClick(_arg1:MouseEvent):void{ Global.DispatchGameEvent("OnSoundBtnClick"); } public function get TransformationCorrect():MovieClip{ return (_transformationCorrect); } public function AddScore(_arg1:int):void{ _scoreTXT.text = StringUtils.IntToStr((int(_scoreTXT.text) + _arg1), 5); } public function BossFinal(_arg1:Boolean=false, _arg2:int=1):void{ _bossFinalMC.visible = _arg1; _bossFinalMC.gotoAndStop(_arg2); _lifeBarBossMC.gotoAndStop(1); (_bossFinalMC.getChildByName("bossName_txt") as TextField).text = TextLoader.Instance.Texts[("BossName" + _arg2.toString())]; } public function get CharactersElectionMC():MovieClip{ return (_charactersElectionMC); } public function Show():void{ View.visible = true; } public function get Life():int{ return (int(_lifeTXT.text)); } public function AddLife():Boolean{ var _local1:int; _local1 = (int(_lifeTXT.text) + 1); _lifeTXT.text = String(_local1); return (true); } public function get LifeBarMC():MovieClip{ return (_lifeBarMC); } public function Reset():void{ _charactersElectionMC.visible = false; _characterMC.gotoAndStop(1); _lifeBarMC.gotoAndStop(1); _scoreTXT.text = StringUtils.IntToStr(0, 5); _lifeTXT.text = ConfigLoader.Instance.Config["CharacterNumLives"]; TransformationBarFrame(1); } public function get TransformationBar():MovieClip{ return (_transformationBarMC); } public function Initialize(_arg1:MovieClip):void{ _view = _arg1; InitializeChildren(); SetTexts(); Mute(); } public function Mute():void{ _mute = !(_mute); if (_mute){ (GetChildByPath(View, ["sound_btn", "muted_mc"]) as MovieClip).visible = true; } else { (GetChildByPath(View, ["sound_btn", "muted_mc"]) as MovieClip).visible = false; }; } public function get BossFinalMC():MovieClip{ return (_bossFinalMC); } public function get View():MovieClip{ return (_view); } public function RemoveLife():Boolean{ var _local1:int; _local1 = (int(_lifeTXT.text) - 1); if (_local1 >= 0){ _lifeTXT.text = String(_local1); return (true); }; return (false); } private function GetChildByPath(_arg1:DisplayObjectContainer, _arg2:Array):DisplayObject{ var _local3:DisplayObjectContainer; var _local4:int; var _local5:int; _local3 = _arg1; _local4 = _arg2.length; _local5 = 0; while (_local5 < (_local4 - 1)) { _local3 = DisplayObjectContainer(_local3.getChildByName(_arg2[_local5])); _local5++; }; return (DisplayObject(_local3.getChildByName(_arg2[_local5]))); } protected function SetTexts():void{ (_charactersElectionMC.getChildByName("alienSelection_txt") as TextField).text = TextLoader.Instance.Texts["AlienSelection"]; ((_view.getChildByName("score_mc") as MovieClip).getChildByName("scoreLbl_txt") as TextField).text = TextLoader.Instance.Texts["ScoreLbl"]; (_bossFinalMC.getChildByName("bossName_txt") as TextField).text = TextLoader.Instance.Texts["BossName1"]; } protected function InitializeChildren():void{ _charactersElectionMC = (GetChildByPath(View, ["eleccion_mc"]) as MovieClip); _characterMC = (GetChildByPath(View, ["personajeHud_mc"]) as MovieClip); _lifeBarMC = (GetChildByPath(View, ["barraDeVida_mc", "barra_mc"]) as MovieClip); _transformationBarMC = (GetChildByPath(View, ["barraTransformacion_mc"]) as MovieClip); _scoreTXT = (GetChildByPath(View, ["score_mc", "score_txt"]) as TextField); _lifeTXT = (GetChildByPath(View, ["numeroVida_mc", "numeroVida_txt"]) as TextField); _bossFinalMC = (GetChildByPath(View, ["bossFinal_mc"]) as MovieClip); _lifeBarBossMC = (GetChildByPath(View, ["bossFinal_mc", "barra_mc"]) as MovieClip); BossFinal(); Reset(); RollOutBtn(_view.getChildByName("help_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnHelpButtonClick); RollOutBtn(_view.getChildByName("sound_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnSoundButtonClick); } public function Hide():void{ View.visible = false; } public function get InfoMC():MovieClip{ return (_infoMC); } public function get CharacterMC():MovieClip{ return (_characterMC); } public function Update():void{ } public function TransformationBarFrame(_arg1:int):void{ _transformationCorrect = null; GameTemplateMainApp.MyStage.addEventListener(Event.RENDER, LoadComplete); GameTemplateMainApp.MyStage.invalidate(); _transformationBarMC.gotoAndStop(_arg1); } private function LoadComplete(_arg1:Event):void{ GameTemplateMainApp.MyStage.removeEventListener(Event.RENDER, LoadComplete); _transformationCorrect = MovieClip(_transformationBarMC.getChildByName("barra_mc")); } public function get Score():int{ return (int(_scoreTXT.text)); } public function ResetSubLevel():void{ _charactersElectionMC.visible = false; _characterMC.gotoAndStop(1); _lifeBarMC.gotoAndStop(1); _transformationBarMC.gotoAndStop(1); } protected function OnHelpButtonClick(_arg1:MouseEvent):void{ Global.DispatchGameEvent("OnHelpBtnClick"); } public function get LifeBarBossMC():MovieClip{ return (_lifeBarBossMC); } public static function GetInstance():HUDManager{ if (!(HUDManager._instance is HUDManager)){ HUDManager._instance = new HUDManager(new SingletonBlocker()); }; return (_instance); } public static function get Instance():HUDManager{ return (GetInstance()); } } }//package ui class SingletonBlocker { private function SingletonBlocker(){ } }
Section 285
//UICreditos (ui.UICreditos) package ui { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; import flash.text.*; import txt.*; import com.gamesandweb.ui.*; import buttons.*; public class UICreditos extends UIWidget { protected var _continueBtn:SimpleButton;// = null public function UICreditos(_arg1:MovieClip, _arg2:int=-1){ _continueBtn = null; super(_arg1, _arg2); InitializeChildren(); SetTexts(); } protected function SetTexts():void{ TextField(MovieClip(View.getChildByName("creditsTitle_mc")).getChildByName("text_txt")).text = TextLoader.Instance.Texts["CreditosTitle"]; TextField(MovieClip(View.getChildByName("creditsTitle_mc")).getChildByName("text1_txt")).text = TextLoader.Instance.Texts["CreditostDescription"]; TextField(MovieClip(View.getChildByName("creditsTitle_mc")).getChildByName("scoreLabel_txt")).text = TextLoader.Instance.Texts["CreditosCodigoLabel"]; TextField(MovieClip(View.getChildByName("creditsTitle_mc")).getChildByName("score_txt")).text = TextLoader.Instance.Texts["CreditosCodigo"]; TextContainerButtonMovieClip(_view.getChildByName("continue_btn")).Text = TextLoader.Instance.Texts["ContinueBtn"]; } protected function InitializeChildren():void{ TextContainerButtonMovieClip(_view.getChildByName("continue_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnContinueButtonClick); } override public function FadeIn():void{ Sfx.PlaySound(Sfx.SFX_OTHERS_POP_UP); super.FadeIn(); } override public function OnFadeInOver(_arg1:Event):void{ super.OnFadeInOver(_arg1); GameTemplateMainApp.StateGameEnd = true; } override public function OnFadeOutOver(_arg1:Event):void{ super.OnFadeOutOver(_arg1); Global.DispatchGameEvent("InstructionsFadeOutOver"); } protected function OnContinueButtonClick(_arg1:MouseEvent):void{ Sfx.PlaySound(Sfx.SFX_OTHERS_POP_OUT); FadeOut(); } } }//package ui
Section 286
//UIFactory (ui.UIFactory) package ui { import flash.display.*; import assets.*; public class UIFactory { private var _container:Sprite;// = null private var _resultScreen:UIResultScreen;// = null private var _levelIndicator:UILevelIndicator;// = null private var _instructions:UIInstructions;// = null private var _gameWonScreen:UIGameWonScreen;// = null private var _mainMenu:UIMainMenu;// = null private var _instructionsFourArms:UIInstructionsFourArms;// = null private var _instructionsCannonBolt:UIInstructionsCannonBolt;// = null private var _gameLostScreen:UIGameLostScreen;// = null private var _transition:UITransition;// = null private var _objectives:UIObjectives;// = null private var _creditos:UICreditos;// = null private static var _instance:UIFactory; public function UIFactory(_arg1:SingletonBlocker){ _container = null; _mainMenu = null; _objectives = null; _instructions = null; _resultScreen = null; _gameWonScreen = null; _gameLostScreen = null; _transition = null; _levelIndicator = null; _instructionsCannonBolt = null; _instructionsFourArms = null; _creditos = null; super(); if (_arg1 == null){ throw (new Error(("Public construction not allowed." + "Use GetInstance()"))); }; _container = new Sprite(); } public function get Instructions():UIInstructions{ if (!(_instructions is UIInstructions)){ _instructions = new UIInstructions(new InstructionsAsset()); _container.addChild(_instructions.View); }; return (_instructions); } public function get LevelIndicator():UILevelIndicator{ if (!(_levelIndicator is UILevelIndicator)){ _levelIndicator = new UILevelIndicator(new LevelIndicatorAsset()); _container.addChild(_levelIndicator.View); }; return (_levelIndicator); } public function get MainMenu():UIMainMenu{ if (!(_mainMenu is UIMainMenu)){ _mainMenu = new UIMainMenu(new MainMenuAsset()); _container.addChild(_mainMenu.View); }; return (_mainMenu); } public function get InstructionsCannonBolt():UIInstructionsCannonBolt{ if (!(_instructionsCannonBolt is UIInstructionsCannonBolt)){ _instructionsCannonBolt = new UIInstructionsCannonBolt(new InstructionsCannonBoltAsset()); _container.addChild(_instructionsCannonBolt.View); }; return (_instructionsCannonBolt); } public function get InstructionsFourArms():UIInstructionsFourArms{ if (!(_instructionsFourArms is UIInstructionsFourArms)){ _instructionsFourArms = new UIInstructionsFourArms(new InstructionsFourArmsAsset()); _container.addChild(_instructionsFourArms.View); }; return (_instructionsFourArms); } public function get GameLostScreen():UIGameLostScreen{ if (!(_gameLostScreen is UIGameLostScreen)){ _gameLostScreen = new UIGameLostScreen(new GameLostAsset()); _container.addChild(_gameLostScreen.View); }; return (_gameLostScreen); } public function get ResultScreen():UIResultScreen{ if (!(_resultScreen is UIResultScreen)){ _resultScreen = new UIResultScreen(new LevelWonAsset()); _container.addChild(_resultScreen.View); }; return (_resultScreen); } public function get Container():Sprite{ return (_container); } public function get Transition():UITransition{ if (!(_transition is UITransition)){ _transition = new UITransition(new TransitionAsset()); _container.addChild(_transition.View); }; return (_transition); } public function Initialize():void{ MainMenu.Hide(); Objectives.Hide(); Instructions.Hide(); ResultScreen.Hide(); GameLostScreen.Hide(); GameWonScreen.Hide(); Transition.Hide(); LevelIndicator.Hide(); InstructionsCannonBolt.Hide(); InstructionsFourArms.Hide(); Creditos.Hide(); MainMenu.View.gotoAndStop(1); Objectives.View.gotoAndStop(1); Instructions.View.gotoAndStop(1); ResultScreen.View.gotoAndStop(1); GameLostScreen.View.gotoAndStop(1); GameWonScreen.View.gotoAndStop(1); Transition.View.gotoAndStop(1); LevelIndicator.View.gotoAndStop(1); InstructionsCannonBolt.View.gotoAndStop(1); InstructionsFourArms.View.gotoAndStop(1); Creditos.View.gotoAndStop(1); MainMenu.View.tabChildren = false; Objectives.View.tabChildren = false; Instructions.View.tabChildren = false; ResultScreen.View.tabChildren = false; GameLostScreen.View.tabChildren = false; GameWonScreen.View.tabChildren = false; Transition.View.tabChildren = false; LevelIndicator.View.tabChildren = false; InstructionsCannonBolt.View.tabChildren = false; InstructionsFourArms.View.tabChildren = false; Creditos.View.tabChildren = false; } public function get Objectives():UIObjectives{ if (!(_objectives is UIObjectives)){ _objectives = new UIObjectives(new InstructionsAsset()); _container.addChild(_objectives.View); }; return (_objectives); } public function get Creditos():UICreditos{ if (!(_creditos is UICreditos)){ _creditos = new UICreditos(new CreditosAsset()); _container.addChild(_creditos.View); }; return (_creditos); } public function get GameWonScreen():UIGameWonScreen{ if (!(_gameWonScreen is UIGameWonScreen)){ _gameWonScreen = new UIGameWonScreen(new GameWonAsset()); _container.addChild(_gameWonScreen.View); }; return (_gameWonScreen); } public static function GetInstance():UIFactory{ if (!(UIFactory._instance is UIFactory)){ UIFactory._instance = new UIFactory(new SingletonBlocker()); }; return (_instance); } public static function get Instance():UIFactory{ return (GetInstance()); } } }//package ui class SingletonBlocker { private function SingletonBlocker(){ } }
Section 287
//UIGameLostScreen (ui.UIGameLostScreen) package ui { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; import flash.text.*; import utils.*; import txt.*; import com.gamesandweb.ui.*; import buttons.*; public class UIGameLostScreen extends UIWidget { protected var _scoreTxt:TextField;// = null public function UIGameLostScreen(_arg1:MovieClip, _arg2:int=-1){ _scoreTxt = null; super(_arg1, _arg2); InitializeChildren(); SetTexts(); } protected function SetTexts():void{ TextField(MovieClip(View.getChildByName("gameLostTitle_mc")).getChildByName("titles_txt")).text = TextLoader.Instance.Texts["GameLostTitle"]; TextField(MovieClip(View.getChildByName("gameLostTitle_mc")).getChildByName("text_txt")).text = TextLoader.Instance.Texts["GameLostDescription"]; TextField(MovieClip(MovieClip(View.getChildByName("score_mc")).getChildByName("scoreTxt_mc")).getChildByName("scoreLabel_txt")).text = TextLoader.Instance.Texts["ScoreLabel"]; TextContainerButtonMovieClip(_view.getChildByName("playAgain_btn")).HTMLText = TextLoader.Instance.Texts["PlayAgainBtn"]; TextContainerButtonMovieClip(_view.getChildByName("mainMenu_btn")).Text = TextLoader.Instance.Texts["MainMenuBtn"]; } protected function InitializeChildren():void{ var _local1:MovieClip; TextContainerButtonMovieClip(_view.getChildByName("playAgain_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnPlayAgainButtonClick); TextContainerButtonMovieClip(_view.getChildByName("mainMenu_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnMainMenuButtonClick); _local1 = (_view.getChildByName("scoreTxt_mc") as MovieClip); _scoreTxt = (((_view.getChildByName("score_mc") as MovieClip).getChildByName("scoreTxt_mc") as MovieClip).getChildByName("score_txt") as TextField); _scoreTxt.text = StringUtils.IntToStr(0, 5); } override public function OnFadeInOver(_arg1:Event):void{ super.OnFadeInOver(_arg1); GameTemplateMainApp.StateGameEnd = true; } protected function OnMainMenuButtonClick(_arg1:MouseEvent):void{ Global.DispatchGameEvent("OnMainMenuBtnClick"); } public function set Score(_arg1:int):void{ _scoreTxt.text = StringUtils.IntToStr(_arg1, 5); } protected function OnPlayAgainButtonClick(_arg1:MouseEvent):void{ Global.DispatchGameEvent("OnGameLostPlayAgainBtnClick"); } } }//package ui
Section 288
//UIGameWonScreen (ui.UIGameWonScreen) package ui { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; import flash.text.*; import utils.*; import txt.*; import com.gamesandweb.ui.*; import buttons.*; public class UIGameWonScreen extends UIWidget { protected var _scoreTxt:TextField;// = null public function UIGameWonScreen(_arg1:MovieClip, _arg2:int=-1){ _scoreTxt = null; super(_arg1, _arg2); InitializeChildren(); SetTexts(); } protected function SetTexts():void{ TextField(MovieClip(View.getChildByName("gameWonTitle_mc")).getChildByName("titles_txt")).htmlText = TextLoader.Instance.Texts["GameWonTitle"]; TextField(MovieClip(View.getChildByName("gameWonTitle_mc")).getChildByName("text_txt")).text = TextLoader.Instance.Texts["GameWonDescription"]; TextField(MovieClip(View.getChildByName("scoreTxt_mc")).getChildByName("scoreLabel_txt")).text = TextLoader.Instance.Texts["ScoreLabel"]; TextContainerButtonMovieClip(_view.getChildByName("playAgain_btn")).HTMLText = TextLoader.Instance.Texts["PlayAgainBtn"]; TextContainerButtonMovieClip(_view.getChildByName("mainMenu_btn")).Text = TextLoader.Instance.Texts["MainMenuBtn"]; } protected function InitializeChildren():void{ TextContainerButtonMovieClip(_view.getChildByName("playAgain_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnPlayAgainButtonClick); TextContainerButtonMovieClip(_view.getChildByName("mainMenu_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnMainMenuButtonClick); _scoreTxt = ((_view.getChildByName("scoreTxt_mc") as MovieClip).getChildByName("score_txt") as TextField); _scoreTxt.text = StringUtils.IntToStr(0, 5); } override public function OnFadeInOver(_arg1:Event):void{ super.OnFadeInOver(_arg1); GameTemplateMainApp.StateGameEnd = true; } protected function OnMainMenuButtonClick(_arg1:MouseEvent):void{ Global.DispatchGameEvent("OnMainMenuBtnClick"); } public function set Score(_arg1:int):void{ _scoreTxt.text = StringUtils.IntToStr(_arg1, 5); } protected function OnPlayAgainButtonClick(_arg1:MouseEvent):void{ Global.DispatchGameEvent("OnGameWonPlayAgainBtnClick"); } } }//package ui
Section 289
//UIInstructions (ui.UIInstructions) package ui { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; import flash.text.*; import txt.*; import com.gamesandweb.ui.*; import buttons.*; public class UIInstructions extends UIWidget { protected var _continueBtn:SimpleButton;// = null public function UIInstructions(_arg1:MovieClip, _arg2:int=-1){ _continueBtn = null; super(_arg1, _arg2); InitializeChildren(); SetTexts(); } protected function SetTexts():void{ TextField(MovieClip(View.getChildByName("instructionsTitle_mc")).getChildByName("text_txt")).text = TextLoader.Instance.Texts["InstructionsBenTitle"]; TextField(MovieClip(View.getChildByName("instructionsTitle_mc")).getChildByName("text1_txt")).text = TextLoader.Instance.Texts["InstructionsBenDescription"]; TextField(MovieClip(View.getChildByName("instructionsTitle_mc")).getChildByName("txt_2")).text = TextLoader.Instance.Texts["InstructionsBenTxt1"]; TextField(MovieClip(View.getChildByName("instructionsTitle_mc")).getChildByName("txt_2a")).text = TextLoader.Instance.Texts["InstructionsBenTxt2"]; TextField(MovieClip(View.getChildByName("instructionsTitle_mc")).getChildByName("txt_2b")).text = TextLoader.Instance.Texts["InstructionsBenTxt3"]; TextField(MovieClip(View.getChildByName("instructionsTitle_mc")).getChildByName("txt_2c")).text = TextLoader.Instance.Texts["InstructionsBenTxt4"]; TextContainerButtonMovieClip(_view.getChildByName("continue_btn")).Text = TextLoader.Instance.Texts["ContinueBtn"]; } protected function InitializeChildren():void{ TextContainerButtonMovieClip(_view.getChildByName("continue_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnContinueButtonClick); } override public function FadeIn():void{ Sfx.PlaySound(Sfx.SFX_OTHERS_POP_UP); super.FadeIn(); } override public function OnFadeInOver(_arg1:Event):void{ super.OnFadeInOver(_arg1); GameTemplateMainApp.StateGameEnd = true; } override public function OnFadeOutOver(_arg1:Event):void{ super.OnFadeOutOver(_arg1); Global.DispatchGameEvent("InstructionsFadeOutOver"); } protected function OnContinueButtonClick(_arg1:MouseEvent):void{ Sfx.PlaySound(Sfx.SFX_OTHERS_POP_OUT); FadeOut(); } } }//package ui
Section 290
//UIInstructionsCannonBolt (ui.UIInstructionsCannonBolt) package ui { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; import flash.text.*; import txt.*; import com.gamesandweb.ui.*; import buttons.*; public class UIInstructionsCannonBolt extends UIWidget { protected var _continueBtn:SimpleButton;// = null public function UIInstructionsCannonBolt(_arg1:MovieClip, _arg2:int=-1){ _continueBtn = null; super(_arg1, _arg2); InitializeChildren(); SetTexts(); } protected function SetTexts():void{ TextField(MovieClip(View.getChildByName("objectivesTitle_mc")).getChildByName("titles_txt")).text = TextLoader.Instance.Texts["InstructionsCannonBoltTitle"]; TextField(MovieClip(View.getChildByName("objectivesTitle_mc")).getChildByName("text1_txt")).text = TextLoader.Instance.Texts["InstructionsCannonBoltDescription"]; TextField(MovieClip(View.getChildByName("objectivesTitle_mc")).getChildByName("txt_2c")).text = TextLoader.Instance.Texts["InstructionsCannonBoltTxt1"]; TextField(MovieClip(View.getChildByName("objectivesTitle_mc")).getChildByName("txt_2")).text = TextLoader.Instance.Texts["InstructionsCannonBoltTxt2"]; TextField(MovieClip(View.getChildByName("objectivesTitle_mc")).getChildByName("txt_2b")).text = TextLoader.Instance.Texts["InstructionsCannonBoltTxt3"]; TextContainerButtonMovieClip(_view.getChildByName("continue_btn")).Text = TextLoader.Instance.Texts["ContinueBtn"]; } protected function InitializeChildren():void{ TextContainerButtonMovieClip(_view.getChildByName("continue_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnContinueButtonClick); } override public function FadeIn():void{ Sfx.PlaySound(Sfx.SFX_OTHERS_POP_UP); super.FadeIn(); } override public function OnFadeInOver(_arg1:Event):void{ super.OnFadeInOver(_arg1); GameTemplateMainApp.StateGameEnd = true; } override public function OnFadeOutOver(_arg1:Event):void{ super.OnFadeOutOver(_arg1); Global.DispatchGameEvent("InstructionsFadeOutOver"); } protected function OnContinueButtonClick(_arg1:MouseEvent):void{ Sfx.PlaySound(Sfx.SFX_OTHERS_POP_UP); FadeOut(); } } }//package ui
Section 291
//UIInstructionsFourArms (ui.UIInstructionsFourArms) package ui { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; import flash.text.*; import txt.*; import com.gamesandweb.ui.*; import buttons.*; public class UIInstructionsFourArms extends UIWidget { protected var _continueBtn:SimpleButton;// = null public function UIInstructionsFourArms(_arg1:MovieClip, _arg2:int=-1){ _continueBtn = null; super(_arg1, _arg2); InitializeChildren(); SetTexts(); } protected function SetTexts():void{ TextField(MovieClip(View.getChildByName("objectivesTitle_mc")).getChildByName("titles_txt")).text = TextLoader.Instance.Texts["InstructionsFourArmsTitle"]; TextField(MovieClip(View.getChildByName("objectivesTitle_mc")).getChildByName("text1_txt")).text = TextLoader.Instance.Texts["InstructionsFourArmsDescription"]; TextField(MovieClip(View.getChildByName("objectivesTitle_mc")).getChildByName("txt_2c")).text = TextLoader.Instance.Texts["InstructionsFourArmsTxt1"]; TextField(MovieClip(View.getChildByName("objectivesTitle_mc")).getChildByName("txt_2b")).text = TextLoader.Instance.Texts["InstructionsFourArmsTxt2"]; TextContainerButtonMovieClip(_view.getChildByName("continue_btn")).Text = TextLoader.Instance.Texts["ContinueBtn"]; } protected function InitializeChildren():void{ TextContainerButtonMovieClip(_view.getChildByName("continue_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnContinueButtonClick); } override public function FadeIn():void{ Sfx.PlaySound(Sfx.SFX_OTHERS_POP_UP); super.FadeIn(); } override public function OnFadeInOver(_arg1:Event):void{ super.OnFadeInOver(_arg1); GameTemplateMainApp.StateGameEnd = true; } override public function OnFadeOutOver(_arg1:Event):void{ super.OnFadeOutOver(_arg1); Global.DispatchGameEvent("InstructionsFadeOutOver"); } protected function OnContinueButtonClick(_arg1:MouseEvent):void{ Sfx.PlaySound(Sfx.SFX_OTHERS_POP_OUT); FadeOut(); } } }//package ui
Section 292
//UILevelIndicator (ui.UILevelIndicator) package ui { import flash.events.*; import flash.display.*; import game.*; import flash.text.*; import txt.*; import com.gamesandweb.ui.*; public class UILevelIndicator extends UIWidget { public function UILevelIndicator(_arg1:MovieClip, _arg2:int=-1){ super(_arg1, _arg2); InitializeChildren(); SetTexts(); } public function SetTexts():void{ var _local1:String; _local1 = ((((TextLoader.Instance.Texts["LevelIndicator"] + " ") + GameManager.Instance.NumberLevel) + " - ") + GameManager.Instance.NumberSubLevel); TextField(MovieClip(View.getChildByName("levelIndicator_mc")).getChildByName("levelindicator_txt")).text = _local1; TextField(MovieClip(View.getChildByName("levelIndicator2_mc")).getChildByName("levelindicator_txt")).text = _local1; } protected function InitializeChildren():void{ } override public function OnFadeOutOver(_arg1:Event):void{ } } }//package ui
Section 293
//UIMainMenu (ui.UIMainMenu) package ui { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; import flash.net.*; import txt.*; import com.gamesandweb.ui.*; import buttons.*; public class UIMainMenu extends UIWidget { protected var _playBtn:TextContainerButtonMovieClip;// = null public function UIMainMenu(_arg1:MovieClip, _arg2:int=-1){ _playBtn = null; super(_arg1, _arg2); InitializeChildren(); SetTexts(); } protected function SetTexts():void{ var _local1:Loader; TextContainerButtonMovieClip(_view.getChildByName("play_btn")).Text = TextLoader.Instance.Texts["PlayBtn"]; _local1 = new Loader(); _local1.load(new URLRequest((((GameContext.Instance.BasePath + "texts/logo-") + GameContext.Instance.Lang) + ".png"))); (View.getChildByName("logoContainer_mc") as MovieClip).addChild(_local1); } protected function InitializeChildren():void{ TextContainerButtonMovieClip(_view.getChildByName("play_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnPlayButtonClick); } protected function OnPlayButtonClick(_arg1:MouseEvent):void{ Global.DispatchGameEvent("OnPlayBtnClick"); } } }//package ui
Section 294
//UIObjectives (ui.UIObjectives) package ui { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; import flash.text.*; import txt.*; import com.gamesandweb.ui.*; import buttons.*; public class UIObjectives extends UIWidget { protected var _continueBtn:SimpleButton;// = null public function UIObjectives(_arg1:MovieClip, _arg2:int=-1){ _continueBtn = null; super(_arg1, _arg2); InitializeChildren(); SetTexts(); } protected function SetTexts():void{ TextField(MovieClip(View.getChildByName("instructionsTitle_mc")).getChildByName("text_txt")).text = TextLoader.Instance.Texts["InstructionsBenTitle"]; TextField(MovieClip(View.getChildByName("instructionsTitle_mc")).getChildByName("text1_txt")).text = TextLoader.Instance.Texts["InstructionsBenDescription"]; TextField(MovieClip(View.getChildByName("instructionsTitle_mc")).getChildByName("txt_2")).text = TextLoader.Instance.Texts["InstructionsBenTxt1"]; TextField(MovieClip(View.getChildByName("instructionsTitle_mc")).getChildByName("txt_2a")).text = TextLoader.Instance.Texts["InstructionsBenTxt2"]; TextField(MovieClip(View.getChildByName("instructionsTitle_mc")).getChildByName("txt_2b")).text = TextLoader.Instance.Texts["InstructionsBenTxt3"]; TextField(MovieClip(View.getChildByName("instructionsTitle_mc")).getChildByName("txt_2c")).text = TextLoader.Instance.Texts["InstructionsBenTxt4"]; TextContainerButtonMovieClip(_view.getChildByName("continue_btn")).Text = TextLoader.Instance.Texts["ContinueBtn"]; } protected function InitializeChildren():void{ TextContainerButtonMovieClip(_view.getChildByName("continue_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnContinueButtonClick); } override public function OnFadeInOver(_arg1:Event):void{ super.OnFadeInOver(_arg1); GameTemplateMainApp.StateGameEnd = true; } override public function OnFadeOutOver(_arg1:Event):void{ super.OnFadeOutOver(_arg1); Global.DispatchGameEvent("ObjectivesFadeOutOver"); } protected function OnContinueButtonClick(_arg1:MouseEvent):void{ Sfx.PlaySound(Sfx.SFX_OTHERS_POP_OUT); FadeOut(); } } }//package ui
Section 295
//UIResultScreen (ui.UIResultScreen) package ui { import flash.events.*; import flash.display.*; import game.*; import com.gamesandweb.game.*; import flash.text.*; import utils.*; import txt.*; import com.gamesandweb.ui.*; import buttons.*; public class UIResultScreen extends UIWidget { protected var _scoreBossTxt:TextField;// = null protected var _scoreLifeTxt:TextField;// = null protected var _scoreTxt:TextField;// = null protected var _scoreEnergyTxt:TextField;// = null protected var _scoreEnemyTxt:TextField;// = null public function UIResultScreen(_arg1:MovieClip, _arg2:int=-1){ _scoreTxt = null; _scoreEnemyTxt = null; _scoreEnergyTxt = null; _scoreLifeTxt = null; _scoreBossTxt = null; super(_arg1, _arg2); InitializeChildren(); SetTexts(); } override public function OnFadeInOver(_arg1:Event):void{ super.OnFadeInOver(_arg1); GameTemplateMainApp.StateGameEnd = true; } override public function OnFadeOut(_arg1:Event):void{ super.OnFadeOut(_arg1); Sfx.PlaySound(Sfx.SFX_OTHERS_POP_OUT); } protected function SetTexts():void{ TextContainerButtonMovieClip(_view.getChildByName("continue_btn")).Text = TextLoader.Instance.Texts["ContinueBtn"]; TextField(MovieClip(View.getChildByName("objectivesTitle_mc")).getChildByName("titles_txt")).text = TextLoader.Instance.Texts["ResultScreenTitle"]; TextField(MovieClip(View.getChildByName("scoreTxt_mc")).getChildByName("txt1_txt")).text = TextLoader.Instance.Texts["ScoreEnemy"]; TextField(MovieClip(View.getChildByName("scoreTxt_mc")).getChildByName("txt2_txt")).text = TextLoader.Instance.Texts["ScoreEnergy"]; TextField(MovieClip(View.getChildByName("scoreTxt_mc")).getChildByName("txt3_txt")).text = TextLoader.Instance.Texts["ScoreLife"]; TextField(MovieClip(View.getChildByName("scoreTxt_mc")).getChildByName("txt4_txt")).text = TextLoader.Instance.Texts["ScoreBoss"]; TextField(MovieClip(View.getChildByName("scoreTxt_mc")).getChildByName("scoreLabel_txt")).text = TextLoader.Instance.Texts["ScoreLabel"]; } protected function InitializeChildren():void{ var _local1:MovieClip; TextContainerButtonMovieClip(_view.getChildByName("continue_btn")).HitArea.addEventListener(MouseEvent.CLICK, OnNewLevelClick); _local1 = (_view.getChildByName("scoreTxt_mc") as MovieClip); _scoreTxt = ((_view.getChildByName("scoreTxt_mc") as MovieClip).getChildByName("score_txt") as TextField); _scoreTxt.text = StringUtils.IntToStr(0, 5); _scoreEnemyTxt = ((_view.getChildByName("scoreTxt_mc") as MovieClip).getChildByName("t1_txt") as TextField); _scoreEnemyTxt.text = StringUtils.IntToStr(0, 5); _scoreEnergyTxt = ((_view.getChildByName("scoreTxt_mc") as MovieClip).getChildByName("t2_txt") as TextField); _scoreEnergyTxt.text = StringUtils.IntToStr(0, 5); _scoreLifeTxt = ((_view.getChildByName("scoreTxt_mc") as MovieClip).getChildByName("t3_txt") as TextField); _scoreLifeTxt.text = StringUtils.IntToStr(0, 5); _scoreBossTxt = ((_view.getChildByName("scoreTxt_mc") as MovieClip).getChildByName("t4_txt") as TextField); _scoreBossTxt.text = StringUtils.IntToStr(0, 5); } override public function FadeIn():void{ super.FadeIn(); Sfx.PlaySound(Sfx.SFX_OTHERS_POP_UP); } protected function OnNewLevelClick(_arg1:MouseEvent):void{ Global.DispatchGameEvent("NewLevel"); } public function CalculateScore():void{ var _local1:Number; _scoreEnemyTxt.text = StringUtils.IntToStr(HUDManager.Instance.Score, 5); _scoreEnergyTxt.text = StringUtils.IntToStr(GameManager.Instance.ScorePerEnergy, 5); _scoreLifeTxt.text = StringUtils.IntToStr(GameManager.Instance.ScorePerLife, 5); _scoreBossTxt.text = StringUtils.IntToStr(GameManager.Instance.ScorePerBoss, 5); _local1 = (((Number(_scoreEnemyTxt.text) + Number(_scoreEnergyTxt.text)) + Number(_scoreLifeTxt.text)) + Number(_scoreBossTxt.text)); _scoreTxt.text = StringUtils.IntToStr(_local1, 5); GameManager.Instance.FinalScore = Math.abs(_local1); } } }//package ui
Section 296
//UITransition (ui.UITransition) package ui { import flash.events.*; import flash.display.*; import com.gamesandweb.game.*; import com.gamesandweb.ui.*; public class UITransition extends UIWidget { public function UITransition(_arg1:MovieClip, _arg2:int=-1){ super(_arg1, _arg2); } override public function OnFadeInOver(_arg1:Event):void{ super.OnFadeInOver(_arg1); Global.DispatchGameEvent("TransitionFadeInOver"); } override public function OnFadeOutOver(_arg1:Event):void{ super.OnFadeOutOver(_arg1); Global.DispatchGameEvent("TransitionFadeOutOver"); } } }//package ui
Section 297
//MovieClipUtils (utils.MovieClipUtils) package utils { import flash.display.*; import com.gamesandweb.game.*; import flash.geom.*; import fl.motion.*; public class MovieClipUtils { private var _stop:Boolean;// = false private var _container:Array; private static var _instance:MovieClipUtils = null; public function MovieClipUtils(_arg1:SingletonEnforcer){ _stop = false; super(); Reset(); } public function AnimationMovieClip(_arg1:MovieClip, _arg2:Boolean=false, _arg3:Boolean=false):void{ if (_arg1 == null){ return; }; if (((_arg2) && (!(_arg3)))){ _arg1.stop(); }; if (((_arg3) && (!(_arg2)))){ _arg1.play(); }; } public function AnimationMovieClipStart():void{ var _local1:MovieClip; if (_container.length == 0){ return; }; for each (_local1 in _container) { _local1.play(); }; _stop = false; } public function GetScreenPosition(_arg1:MovieClip):Point{ return (_arg1.localToGlobal(new Point()).subtract(GameContext.Instance.GlobalScreenPos)); } public function Reset():void{ _container = new Array(); } public function get Stop():Boolean{ return (_stop); } public function PaintMC(_arg1:MovieClip, _arg2:uint, _arg3:Number=0):void{ var _local4:Color; _local4 = new Color(); _local4.setTint(_arg2, _arg3); _arg1.transform.colorTransform = _local4; } public function RemoveMovieClip(_arg1:MovieClip):void{ var _local2:int; if (_container.length == 0){ return; }; while (_local2 < _container.length) { _container.splice(_local2, 1); _local2++; }; } public function AnimationMovieClipStop():void{ var _local1:MovieClip; if (_container.length == 0){ return; }; for each (_local1 in _container) { _local1.stop(); }; _stop = true; } public function AddMovieClip(_arg1:MovieClip):void{ _container.push(_arg1); } public static function get Instance():MovieClipUtils{ if (_instance == null){ _instance = new MovieClipUtils(new SingletonEnforcer()); }; return (_instance); } } }//package utils class SingletonEnforcer { private function SingletonEnforcer(){ } }
Section 298
//StringUtils (utils.StringUtils) package utils { import flash.text.*; public class StringUtils { public static function SetTextPreservingFormat(_arg1:TextField, _arg2:String):void{ var _local3:TextFormat; _local3 = _arg1.getTextFormat(); _arg1.text = _arg2; _arg1.setTextFormat(_local3); } public static function IntToStr(_arg1:int, _arg2:int=0):String{ var _local3:String; _local3 = _arg1.toString(); while (_local3.length < _arg2) { _local3 = ("0" + _local3); }; return (_local3); } } }//package utils
Section 299
//LayerFactory (view.LayerFactory) package view { import flash.display.*; import flash.utils.*; public class LayerFactory extends MovieClip { protected var _container:DisplayObjectContainer;// = null protected var _initialized:Boolean;// = false protected var _layers:Dictionary;// = null protected var _layersArray:Array;// = null public static const LAYER_HUD:String = "hud"; public static const LAYER_UI:String = "ui"; public static const LAYER_LOADLEVEL:String = "loadLevel"; public static const LAYER_FOREGROUND:String = "foreground"; public static const LAYER_GAME_LAYER:String = "gameLayer"; public static const LAYER_LEVEL:String = "level"; public static const LAYER_CHARACTER:String = "character"; public static const LAYER_BACKGROUND:String = "background"; private static var _instance:LayerFactory = null; public function LayerFactory(_arg1:SingletonEnforcer){ _container = null; _layers = null; _layersArray = null; _initialized = false; super(); } public function Initialize(_arg1:DisplayObjectContainer, _arg2:Array=null):void{ var _local3:String; if (!_initialized){ _initialized = true; _container = _arg1; _layers = new Dictionary(); _layersArray = new Array(); for (_local3 in _arg2) { _layers[_arg2[_local3]] = new MovieClip(); _layersArray.push(_layers[_arg2[_local3]]); _container.addChild(_layers[_arg2[_local3]]); }; }; } public function GetLayer(_arg1:String):MovieClip{ return ((_layers[_arg1] as MovieClip)); } public static function GetInstance():LayerFactory{ if (_instance == null){ _instance = new LayerFactory(new SingletonEnforcer()); }; return (_instance); } public static function get Instance():LayerFactory{ return (GetInstance()); } } }//package view class SingletonEnforcer { private function SingletonEnforcer(){ } }
Section 300
//Background1Asset (Background1Asset) package { import flash.display.*; public dynamic class Background1Asset extends MovieClip { } }//package
Section 301
//Background2Asset (Background2Asset) package { import flash.display.*; public dynamic class Background2Asset extends MovieClip { } }//package
Section 302
//Background3Asset (Background3Asset) package { import flash.display.*; public dynamic class Background3Asset extends MovieClip { } }//package
Section 303
//BenSamuraiAsset (BenSamuraiAsset) package { import flash.display.*; public dynamic class BenSamuraiAsset extends MovieClip { public var hitAreaAttack_mc:MovieClip; public var hitArea_mc:MovieClip; public var LugarSuriken_mc:MovieClip; public var ben_mc:MovieClip; public function BenSamuraiAsset(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10); } function frame10(){ stop(); } function frame3(){ stop(); } function frame6(){ stop(); } function frame1(){ stop(); } function frame7(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame9(){ stop(); } function frame8(){ stop(); } function frame2(){ stop(); } } }//package
Section 304
//CannonBoltAsset (CannonBoltAsset) package { import flash.display.*; public dynamic class CannonBoltAsset extends MovieClip { public var hitAreaAttack_mc:MovieClip; public var hitArea_mc:MovieClip; public function CannonBoltAsset(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9); } function frame3(){ stop(); } function frame6(){ stop(); } function frame7(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame9(){ stop(); } function frame8(){ stop(); } function frame2(){ stop(); } } }//package
Section 305
//Continue1BtnAsset (Continue1BtnAsset) package { import buttons.*; public dynamic class Continue1BtnAsset extends TextContainerButtonMovieClip { public function Continue1BtnAsset(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 306
//FourArmsAsset (FourArmsAsset) package { import flash.display.*; public dynamic class FourArmsAsset extends MovieClip { public var hitAreaAttack_mc:MovieClip; public var FourArms_mc:MovieClip; public var hitArea_mc:MovieClip; public function FourArmsAsset(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6); } function frame3(){ stop(); } function frame6(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame5(){ stop(); } function frame2(){ stop(); } } }//package
Section 307
//GameTemplateMainApp (GameTemplateMainApp) package { import flash.events.*; import flash.display.*; import ui.*; import game.*; import model.*; import com.gamesandweb.game.*; import flash.geom.*; import flash.text.*; import com.gamesandweb.game.events.*; import config.*; import txt.*; import com.gamesandweb.ui.*; import view.*; import assets.*; import flash.ui.*; public class GameTemplateMainApp extends MovieClip { private var _onInstructionsFadeOutOver:Function;// = null private var _preloader:MovieClip;// = null private var _onTransitionFadeInOver:Function;// = null private var _initialized:Boolean;// = false private var _indicadorLevel:Boolean;// = false private var _loaderLevel:MovieClip; private var _loadSubLevelOne:Boolean;// = false private var _onTransitionFadeOutOver:Function;// = null private var _objective:Boolean;// = false private var _currentGameOverScreen:UIWidget;// = null public static const CONFIG_PATH:String = "config/config.xml"; public static const STATE_IN_GAME:uint = 3; public static const STATE_WINNER:uint = 8; public static const SCREEN_WIDTH:uint = 600; public static const STATE_MAIN_MENU:uint = 1; public static const SCREEN_HEIGHT:uint = 400; public static const STATE_TRANSITION:uint = 10; public static const STATE_OBJECTIVES:uint = 4; public static const STATE_RESULT:uint = 5; public static const STATE_LOAD_SUBLEVEL:uint = 6; public static const STATE_CREDITOS:uint = 9; public static const STATE_INSTRUCTIONS:uint = 2; public static const SND_WEIGHT_PCT:int = 10; public static const STATE_LOST:uint = 7; public static const SND_FILENAME:String = "sounds.swf"; public static const STATE_INTRO:uint = 0; public static var StateGame:uint = 0; public static var StateGameEnd:Boolean = false; public static var STAGE00:Point = new Point(); private static var _instance:GameTemplateMainApp; private static var _stage:Stage = null; public function GameTemplateMainApp(){ _objective = false; _preloader = null; _loadSubLevelOne = false; _indicadorLevel = false; _onTransitionFadeInOver = null; _onTransitionFadeOutOver = null; _onInstructionsFadeOutOver = null; _initialized = false; _currentGameOverScreen = null; super(); addFrameScript(0, frame1, 1, frame2, 2, frame3); _instance = this; _initialized = false; GameContext.Instance.BasePath = (((loaderInfo.parameters.basePath as String) == null)) ? "" : (loaderInfo.parameters.basePath as String); StartPreloader(); Global.Initialize(this); Global.AddEventListener(GameEvent.MILESTONE_REACH, OnGameEvent); CustomizeContextMenu(); addEventListener(Event.REMOVED_FROM_STAGE, OnRemoved); } private function OnConfigLoadComplete(_arg1:Event):void{ ConfigLoader.Instance.removeEventListener(ConfigLoader.LOAD_COMPLETE, OnConfigLoadComplete); GameContext.Instance.Lang = (((loaderInfo.parameters.lang as String) == null)) ? ConfigLoader.Instance.Config["DefaultLang"] : (loaderInfo.parameters.lang as String); TextLoader.Instance.addEventListener(TextLoader.LOAD_COMPLETE, OnTxtLoadComplete); TextLoader.Instance.LoadTexts((((GameContext.Instance.BasePath + "texts/texts-") + GameContext.Instance.Lang) + ".xml")); } protected function ShowMainMenu():void{ StateGame = STATE_INTRO; Sfx.PlaySound(Sfx.SFX_OTHERS_JOSTICK); UIFactory.Instance.MainMenu.FadeIn(); } public function LoadingLevelEnd(_arg1:Boolean=false):void{ if (((!((_loaderLevel == null))) && ((_loaderLevel.visible == true)))){ _loaderLevel.visible = false; if (_loadSubLevelOne){ _loadSubLevelOne = false; } else { GameManager.Instance.Pause(); }; if (_arg1){ if (!_objective){ StateGame = STATE_OBJECTIVES; UIFactory.Instance.Objectives.FadeIn(); _objective = true; } else { if (((UIFactory.Instance.Transition.View.visible) && (((UIFactory.Instance.Transition.HasFadeIn) || (UIFactory.Instance.Transition.HasFadeOut))))){ _indicadorLevel = true; } else { GameManager.Instance.Pause(); _indicadorLevel = false; }; }; }; }; } public function ToggleSound():Boolean{ Sfx.ToggleMute(); return (false); } protected function ObjetiveAlreadyFadedIn():void{ StateGame = STATE_OBJECTIVES; UIFactory.Instance.Objectives.View.gotoAndStop("FadeInComplete"); UIFactory.Instance.Objectives.Show(); } protected function RemovePreloader():void{ removeChild(_preloader); } public function OnSpacePress(_arg1:uint):void{ if ((_arg1 & Character.ACTION_SPACE) == Character.ACTION_SPACE){ switch (StateGame){ case STATE_MAIN_MENU: if (StateGameEnd){ Global.DispatchGameEvent("OnPlayBtnClick"); StateGameEnd = false; }; break; case STATE_OBJECTIVES: if (StateGameEnd){ UIFactory.Instance.Objectives.FadeOut(); StateGameEnd = false; }; break; case STATE_INSTRUCTIONS: if (StateGameEnd){ UIFactory.Instance.Instructions.FadeOut(); UIFactory.Instance.InstructionsCannonBolt.FadeOut(); UIFactory.Instance.InstructionsFourArms.FadeOut(); StateGameEnd = false; }; break; case STATE_RESULT: if (StateGameEnd){ Global.DispatchGameEvent("NewLevel"); StateGameEnd = false; }; break; case STATE_LOST: if (StateGameEnd){ Global.DispatchGameEvent("OnGameLostPlayAgainBtnClick"); StateGameEnd = false; }; break; case STATE_WINNER: if (StateGameEnd){ Global.DispatchGameEvent("OnGameWonPlayAgainBtnClick"); StateGameEnd = false; }; break; case STATE_CREDITOS: if (StateGameEnd){ UIFactory.Instance.Creditos.FadeOut(); StateGameEnd = false; }; break; }; }; } public function ResetCharacterDead():void{ if (GameManager.Instance.Update){ GameManager.Instance.Pause(); }; PlayTransition(GameManager.Instance.CharacterDead); } private function StartPreloader():void{ _preloader = new PreloaderAsset(); addChild(_preloader); addEventListener(Event.ENTER_FRAME, LoadProgress); } public function NextLevel():Boolean{ Sfx.StopSound(Sfx.SFX_OTHERS_LEVEL_COMPLETE); Sfx.PlayMusic(Sfx.MUSIC_INGAME); GameManager.Instance.LoadLevel((GameManager.Instance.NumberLevel + 1)); HUDManager.Instance.Show(); GameManager.Instance.ForceNotUpdate = true; return (true); } private function LoadProgress(_arg1:Event):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:String; var _local6:TextField; _local2 = this.root.loaderInfo.bytesLoaded; _local3 = this.root.loaderInfo.bytesTotal; _local4 = Math.floor(((_local2 / _local3) * 100)); if (_local4 >= 10){ _local5 = String((_local4 - 10)); _local6 = ((_preloader.getChildByName("progress_mc") as MovieClip).getChildByName("progress_txt") as TextField); _local6.text = (_local5 + " %"); (_preloader.getChildByName("progressBar_mc") as MovieClip).gotoAndStop((_local4 - 10)); }; if (_local2 >= _local3){ removeEventListener(Event.ENTER_FRAME, LoadProgress); Sfx.InitExternal((GameContext.Instance.BasePath + SND_FILENAME)); addEventListener(Event.ENTER_FRAME, OnSoundsLoadProgress); }; } function frame3(){ stop(); } private function OnRemoved(_arg1:Event):void{ removeEventListener(Event.REMOVED_FROM_STAGE, OnRemoved); removeEventListener(Event.ENTER_FRAME, LoadProgress); removeEventListener(Event.ENTER_FRAME, OnSoundsLoadProgress); ConfigLoader.Instance.removeEventListener(ConfigLoader.LOAD_COMPLETE, OnConfigLoadComplete); TextLoader.Instance.removeEventListener(TextLoader.LOAD_COMPLETE, OnTxtLoadComplete); Sfx.Destroy(); GameManager.Instance.Finalize(); } function frame1(){ stop(); } public function set LoadSubLevelOne(_arg1:Boolean):void{ _loadSubLevelOne = _arg1; } protected function ShowObjectives():void{ UIFactory.Instance.Objectives.FadeIn(); } function frame2(){ stop(); } public function NextSubLevel():Boolean{ LoadingLevelBegin(); GameManager.Instance.LoadSubLevel((GameManager.Instance.NumberSubLevel + 1)); HUDManager.Instance.Show(); GameManager.Instance.ForceNotUpdate = true; return (true); } protected function ShowMainMenuAlreadyFadedIn():void{ GameManager.Instance.Reset(); HUDManager.Instance.Reset(); StateGame = STATE_MAIN_MENU; Sfx.PlayMusic(Sfx.MUSIC_MAIN_SCREEN); UIFactory.Instance.MainMenu.View.gotoAndStop("FadeInComplete"); UIFactory.Instance.MainMenu.Show(); } private function CustomizeContextMenu():void{ var _local1:ContextMenu; var _local2:ContextMenuItem; _local1 = new ContextMenu(); _local1.hideBuiltInItems(); _local2 = new ContextMenuItem("Ben 10", true); _local1.customItems.push(_local2); this.contextMenu = _local1; } public function Resume():void{ HUDManager.Instance.Show(); GameManager.Instance.Pause(); } public function Initialize():void{ if (!_initialized){ _initialized = true; _stage = this.stage; GameContext.Instance.GameSprite = (this as Sprite); GameContext.Instance.GlobalStage = this.stage; STAGE00 = this.localToGlobal(new Point()); LayerFactory.Instance.Initialize(DisplayObjectContainer(this), [LayerFactory.LAYER_BACKGROUND, LayerFactory.LAYER_LEVEL, LayerFactory.LAYER_CHARACTER, LayerFactory.LAYER_GAME_LAYER, LayerFactory.LAYER_FOREGROUND, LayerFactory.LAYER_HUD, LayerFactory.LAYER_LOADLEVEL, LayerFactory.LAYER_UI]); Sfx.AddSounds(); this.gotoAndStop("game"); _loaderLevel = new LoaderLevelAsset(); LayerFactory.Instance.GetLayer(LayerFactory.LAYER_LOADLEVEL).addChild(_loaderLevel); _loaderLevel.visible = false; (_loaderLevel.getChildByName("loading_txt") as TextField).text = TextLoader.Instance.Texts["Loading"]; UIFactory.Instance.Initialize(); HUDManager.Instance.Initialize(new HUDAsset()); HUDManager.Instance.Hide(); LayerFactory.Instance.GetLayer(LayerFactory.LAYER_UI).addChild(UIFactory.Instance.Container); LayerFactory.Instance.GetLayer(LayerFactory.LAYER_HUD).addChild(HUDManager.Instance.View); RemovePreloader(); ShowMainMenu(); InputManager.Initialize(this.stage); GameManager.Instance.Initialize(); }; } public function Start():Boolean{ Sfx.PlayMusic(Sfx.MUSIC_INGAME); HUDManager.Instance.Hide(); _loadSubLevelOne = true; LoadingLevelBegin(); GameManager.Instance.LoadLevel(1); GameManager.Instance.ForceNotUpdate = true; return (true); } public function LoadingLevelBegin(_arg1:Boolean=false):void{ if (_loaderLevel == null){ trace("[error]: not initialize _loadLevel"); } else { if (((!((StateGame == STATE_INSTRUCTIONS))) && (!(_loaderLevel.visible)))){ _loaderLevel.gotoAndPlay(1); _loaderLevel.visible = true; }; if (_arg1){ GameManager.Instance.Reset(); NextLevel(); }; }; } public function OnGameEvent(_arg1:GameEvent):void{ var event = _arg1; switch (event.name){ case "OnPlayBtnClick": Sfx.StopSound(Sfx.SFX_OTHERS_JOSTICK); PlayTransition(UIFactory.Instance.MainMenu.FadeOut); Start(); break; case "ObjectivesFadeOutOver": GameManager.Instance.Pause(); break; case "InstructionsFadeOutOver": StateGame = STATE_IN_GAME; Resume(); break; case "OnGameLost": StateGame = STATE_LOST; Sfx.PlayMusic(Sfx.MUSIC_GAME_OVER); if (GameManager.Instance.Update){ GameManager.Instance.Pause(); }; GameManager.Instance.ForceNotUpdate = true; HUDManager.Instance.Hide(); UIFactory.Instance.GameLostScreen.Score = HUDManager.Instance.Score; HUDManager.Instance.Reset(); _currentGameOverScreen = UIFactory.Instance.GameLostScreen; _currentGameOverScreen.FadeIn(); break; case "OnGameWon": StateGame = STATE_WINNER; Sfx.PlayMusic(Sfx.MUSIC_WINNER); GameManager.Instance.GameWinner = true; if (GameManager.Instance.Update){ GameManager.Instance.Pause(); }; HUDManager.Instance.Hide(); UIFactory.Instance.ResultScreen.CalculateScore(); UIFactory.Instance.GameWonScreen.Score = GameManager.Instance.FinalScore; HUDManager.Instance.Reset(); _currentGameOverScreen = UIFactory.Instance.GameWonScreen; _currentGameOverScreen.FadeIn(); break; case "OnMainMenuBtnClick": PlayTransition(ShowMainMenuAlreadyFadedIn); UIFactory.Instance.GameLostScreen.FadeOut(); UIFactory.Instance.GameWonScreen.FadeOut(); break; case "OnGameLostPlayAgainBtnClick": GameManager.Instance.NumberLevel = (GameManager.Instance.NumberLevel - 1); PlayTransition(function (){ LoadingLevelBegin(true); }, null); UIFactory.Instance.GameLostScreen.FadeOut(); break; case "OnGameWonPlayAgainBtnClick": GameManager.Instance.Reset(); PlayTransition(Start); UIFactory.Instance.GameWonScreen.FadeOut(); break; case "TransitionFadeInOver": if (_onTransitionFadeInOver != null){ _onTransitionFadeInOver(); }; _onTransitionFadeInOver = null; break; case "TransitionFadeOutOver": if (_onTransitionFadeOutOver != null){ _onTransitionFadeOutOver(); }; _onTransitionFadeOutOver = null; if (StateGame == STATE_INTRO){ Sfx.FadeSound(Sfx.SFX_OTHERS_JOSTICK, Sfx.VolumeFadeDownXML(Sfx.SFX_OTHERS_JOSTICK), Sfx.TimeFadeXML(Sfx.SFX_OTHERS_JOSTICK)); }; if (_indicadorLevel){ _indicadorLevel = false; if (!GameManager.Instance.Update){ GameManager.Instance.Pause(); }; }; break; case "SubLevelComplete": StateGame = STATE_LOAD_SUBLEVEL; HUDManager.Instance.Hide(); GameManager.Instance.MainCharacter.CurrentTransformation.TryNewPrimaryState(Character.PRI_ST_IDLE); if (GameManager.Instance.Update){ GameManager.Instance.Pause(); }; GameManager.Instance.ForceNotUpdate = false; NextSubLevel(); break; case "LevelComplete": StateGame = STATE_RESULT; HUDManager.Instance.Hide(); GameManager.Instance.MainCharacter.CurrentTransformation.TryNewPrimaryState(Character.PRI_ST_IDLE); if (GameManager.Instance.Update){ GameManager.Instance.Pause(); }; GameManager.Instance.ForceNotUpdate = false; UIFactory.Instance.ResultScreen.CalculateScore(); HUDManager.Instance.ResetSubLevel(); _currentGameOverScreen = UIFactory.Instance.ResultScreen; _currentGameOverScreen.FadeIn(); break; case "NewLevel": Sfx.PlayMusic(Sfx.MUSIC_INGAME); _currentGameOverScreen.FadeOut(); PlayTransition(function (){ LoadingLevelBegin(true); }, null); break; case "EndMainMenu": if (StateGame == STATE_INTRO){ Sfx.StopSound(Sfx.SFX_OTHERS_JOSTICK); Sfx.PlayMusic(Sfx.MUSIC_MAIN_SCREEN); StateGame = STATE_MAIN_MENU; StateGameEnd = true; }; break; case "OnHelpBtnClick": StateGame = STATE_INSTRUCTIONS; if (((UIFactory.Instance.LevelIndicator.HasFadeIn) || (UIFactory.Instance.LevelIndicator.HasFadeOut))){ UIFactory.Instance.LevelIndicator.Hide(); }; Pause(); UIFactory.Instance.Instructions.FadeIn(); break; case "OnSoundBtnClick": HUDManager.Instance.Mute(); ToggleSound(); break; }; } public function get LoadSubLevelOne():Boolean{ return (_loadSubLevelOne); } public function PlayTransition(_arg1:Function=null, _arg2:Function=null, _arg3:UIWidget=null):void{ _onTransitionFadeInOver = _arg1; _onTransitionFadeOutOver = _arg2; if (_arg3 == null){ _arg3 = UIFactory.Instance.Transition; }; _arg3.Show(); _arg3.FadeIn(); } private function OnTxtLoadComplete(_arg1:Event):void{ TextLoader.Instance.removeEventListener(TextLoader.LOAD_COMPLETE, OnTxtLoadComplete); Initialize(); } public function Pause():Boolean{ HUDManager.Instance.Hide(); GameManager.Instance.Pause(); return (true); } private function OnSoundsLoadProgress(_arg1:Event):void{ var _local2:int; var _local3:TextField; _local2 = ((100 - SND_WEIGHT_PCT) + Math.floor(((Sfx.GetLoadedPercent() * SND_WEIGHT_PCT) / 100))); _local3 = ((_preloader.getChildByName("progress_mc") as MovieClip).getChildByName("progress_txt") as TextField); _local3.text = (String(_local2) + " %"); (_preloader.getChildByName("progressBar_mc") as MovieClip).gotoAndStop(_local2); if ((((Sfx.GetLoadedPercent() == 100)) && (Sfx.IsLoading()))){ _local3.text = "100 %"; (_preloader.getChildByName("progressBar_mc") as MovieClip).gotoAndStop(100); removeEventListener(Event.ENTER_FRAME, OnSoundsLoadProgress); ConfigLoader.Instance.addEventListener(ConfigLoader.LOAD_COMPLETE, OnConfigLoadComplete); ConfigLoader.Instance.LoadConfig((GameContext.Instance.BasePath + CONFIG_PATH)); }; } public static function get MyStage():Stage{ return (_stage); } public static function GetInstance():GameTemplateMainApp{ return (_instance); } public static function get Instance():GameTemplateMainApp{ return (GetInstance()); } } }//package
Section 308
//HelpBtn (HelpBtn) package { import buttons.*; public dynamic class HelpBtn extends RollOutBtn { public function HelpBtn(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package
Section 309
//LoaderLevelAsset (LoaderLevelAsset) package { import flash.display.*; import flash.text.*; public dynamic class LoaderLevelAsset extends MovieClip { public var loading_txt:TextField; } }//package
Section 310
//MainMenu1BtnAsset (MainMenu1BtnAsset) package { import buttons.*; public dynamic class MainMenu1BtnAsset extends TextContainerButtonMovieClip { public function MainMenu1BtnAsset(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 311
//MainMenu2BtnAsset (MainMenu2BtnAsset) package { import buttons.*; public dynamic class MainMenu2BtnAsset extends TextContainerButtonMovieClip { public function MainMenu2BtnAsset(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 312
//pared4brazosXXZZ (pared4brazosXXZZ) package { import assets.*; public dynamic class pared4brazosXXZZ extends SpecialWallAsset { public function pared4brazosXXZZ(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package
Section 313
//PlayAgain1BtnAsset (PlayAgain1BtnAsset) package { import buttons.*; public dynamic class PlayAgain1BtnAsset extends TextContainerButtonMovieClip { public function PlayAgain1BtnAsset(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 314
//PlayAgain2BtnAsset (PlayAgain2BtnAsset) package { import buttons.*; public dynamic class PlayAgain2BtnAsset extends TextContainerButtonMovieClip { public function PlayAgain2BtnAsset(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 315
//PlayBtnAsset (PlayBtnAsset) package { import buttons.*; public dynamic class PlayBtnAsset extends TextContainerButtonMovieClip { public function PlayBtnAsset(){ addFrameScript(0, frame1, 1, frame2, 2, frame3); } function frame3(){ stop(); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 316
//PreloaderAsset (PreloaderAsset) package { import flash.display.*; public dynamic class PreloaderAsset extends MovieClip { public var progressBar_mc:MovieClip; public var progress_mc:MovieClip; public function PreloaderAsset(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package
Section 317
//Sfx (Sfx) package { import flash.events.*; import flash.utils.*; import com.reintroducing.sound.*; import flash.system.*; import flash.net.*; import com.bourre.load.*; import config.*; import com.bourre.error.*; public class Sfx { public static const SFX_OTHERS_WALL_HIT:String = "OthersWallHit"; public static const SFX_ENEMY_BROKEN_ARMS:String = "EnemyBrokenArms"; public static const MUSIC_INGAME:String = "MusicInGame"; public static const SFX_BEN_JUMP:String = "BenJump"; public static const SFX_ENEMY_DROIDE_GREEN:String = "EnemyDroideGreen"; public static const SFX_ENEMY_ATTACK_THWO:String = "EnemyAttack1"; public static const SFX_OTHERS_BROKEN_WALL:String = "OthersBrokenWall"; public static const MUSIC_GAME_OVER:String = "MusicGameOver"; public static const SFX_OTHERS_OMNITRIX:String = "OthersOmitrix"; public static const SFX_OTHERS_ENERGY_COMPLETE:String = "OthersEnergyComplete"; public static const SFX_OTHERS_ROLLOVER:String = "OthersRollover"; public static const SFX_ENEMY_KENKO_HIT:String = "EnemyKenkoHit"; public static const SFX_OTHERS_POP_UP:String = "OthersPopUp"; public static const SFX_OTHERS_POP_OUT:String = "OthersPopOut"; public static const SFX_ENEMY_ATTACK_KENKO:String = "EnemyAttackKenko"; public static const SFX_BEN_TRANSFORMATION:String = "BenTransformation"; public static const MUSIC_MAIN_SCREEN:String = "MusicMainScreen"; public static const SOUNDS_ARRAY:Array = [MUSIC_MAIN_SCREEN, MUSIC_INGAME, MUSIC_WINNER, MUSIC_GAME_OVER, MUSIC_ENEMY_FINAL, SFX_BEN_ARMS_LEFT, SFX_BEN_ARMS_RIGHT, SFX_BEN_CROUCHING, SFX_BEN_DIE, SFX_BEN_HIT, SFX_BEN_JUMP, SFX_BEN_RUN, SFX_BEN_SHURIKEN, SFX_BEN_SONIC, SFX_BEN_SWORD, SFX_BEN_TRANSFORMATION, SFX_ENEMY_ATTACK_ONE, SFX_ENEMY_ATTACK_THWO, SFX_ENEMY_KENKO_HIT, SFX_ENEMY_ATTACK_KENKO, SFX_ENEMY_SUPERATTACK_KENKO, SFX_ENEMY_BROKEN_ARMS, SFX_ENEMY_DROIDE_GREEN, SFX_ENEMY_DIE, SFX_ENEMY_HIT, SFX_ENEMY_JUMP, SFX_ENEMY_SHOT, SFX_OTHERS_JOSTICK, SFX_OTHERS_BROKEN_WALL, SFX_OTHERS_ENERGY_COMPLETE, SFX_OTHERS_LEVEL_COMPLETE, SFX_OTHERS_OMNITRIX, SFX_OTHERS_ONE_LIFE, SFX_OTHERS_POP_OUT, SFX_OTHERS_POP_UP, SFX_OTHERS_POWER_UP, SFX_OTHERS_WALL_HIT, SFX_OTHERS_ROLLOVER]; public static const SFX_BEN_ARMS_LEFT:String = "BenArmsLeft"; public static const MUSIC_ENEMY_FINAL:String = "MusicEnemyFinal"; public static const SFX_OTHERS_JOSTICK:String = "OthersJoystick"; public static const SFX_ENEMY_SHOT:String = "EnemyShot"; public static const SFX_BEN_CROUCHING:String = "BenCrouching"; public static const SFX_ENEMY_ATTACK_ONE:String = "EnemyAttack"; private static const MUSICS_ARRAY:Array = [MUSIC_MAIN_SCREEN, MUSIC_INGAME, MUSIC_WINNER, MUSIC_GAME_OVER, MUSIC_ENEMY_FINAL]; public static const SFX_BEN_SWORD:String = "BenSword"; public static const SFX_BEN_DIE:String = "BenDie"; public static const SFX_OTHERS_POWER_UP:String = "OthersPowerUp"; public static const MUSIC_WINNER:String = "MusicWinner"; public static const SFX_BEN_RUN:String = "BenRun"; public static const SFX_ENEMY_DIE:String = "EnemyDie"; public static const SFX_ENEMY_JUMP:String = "EnemyJump"; public static const SFX_BEN_ARMS_RIGHT:String = "BenArmsRight"; public static const SFX_BEN_HIT:String = "BenHit"; public static const SFX_ENEMY_HIT:String = "EnemyHit"; public static const SFX_ENEMY_SUPERATTACK_KENKO:String = "EnemyKenkoSuperAttack"; public static const SFX_OTHERS_LEVEL_COMPLETE:String = "OthersLevelComplete"; public static const SFX_OTHERS_ONE_LIFE:String = "OthersOneLife"; public static const SFX_BEN_SONIC:String = "BenSonic"; public static const SFX_BEN_SHURIKEN:String = "BenShuriken"; private static var _loader:GraphicLoader = null; private static var _volumes:Dictionary = null; private static var _muted:Boolean = false; private static var _currentMusicPlaying:String = ""; private static var _masterVolume:Number = 1; public static function VolumeIDXML(_arg1:String):Number{ return (Number(ConfigLoader.Instance.Config[("Volume" + _arg1)])); } public static function StopSound(_arg1:String){ SoundManager.getInstance().stopSound(_arg1); if (_arg1 == _currentMusicPlaying){ _currentMusicPlaying = null; }; } public static function InitLocal():void{ AddSounds(); } public static function AddSounds():void{ var _local1:Number; var _local2:int; var _local3:int; var _local4:String; _volumes = new Dictionary(); _local2 = SOUNDS_ARRAY.length; _local3 = 0; while (_local3 < _local2) { _volumes[SOUNDS_ARRAY[_local3]] = 1; _local1 = Number(ConfigLoader.Instance.Config[("Volume" + SOUNDS_ARRAY[_local3])]); if (!isNaN(_local1)){ _volumes[SOUNDS_ARRAY[_local3]] = _local1; }; _local3++; }; for each (_local4 in SOUNDS_ARRAY) { SoundManager.getInstance().addLibrarySound(_local4, _local4, _volumes[_local4]); }; } public static function InitExternal(_arg1:String):void{ var _local2:URLRequest; _local2 = new URLRequest(_arg1); _loader = new GraphicLoader(); _loader.addEventListener(GraphicLoaderEvent.onLoadInitEVENT, CallBack); _loader.load(_local2); } public static function PlayMusic(_arg1:String, _arg2:Boolean=false):void{ var _local3:String; if (_arg1 != _currentMusicPlaying){ PlaySoundLoop(_arg1); _currentMusicPlaying = _arg1; for each (_local3 in MUSICS_ARRAY) { if (_local3 != _arg1){ StopSound(_local3); }; }; }; } public static function PlaySound(_arg1:String, _arg2:Boolean=true, _arg3:Number=-1, _arg4:Number=0, _arg5:int=0):void{ if (((_arg2) || (!(IsPlaying(_arg1))))){ if (_arg3 == -1){ _arg3 = _volumes[_arg1]; }; SoundManager.getInstance().playSound(_arg1, (_arg3 * Volume), 0, _arg5); }; } public static function get Volume():Number{ return (_masterVolume); } public static function StopAllSounds():void{ var _local1:String; for each (_local1 in SOUNDS_ARRAY) { StopSound(_local1); }; } public static function get Muted():Boolean{ return (_muted); } public static function VolumeFadeUpXML(_arg1:String):Number{ var _local2:Number; _local2 = Number(ConfigLoader.Instance.Config[(("Volume" + _arg1) + "FadeUp")]); return ((isNaN(_local2)) ? VolumeIDXML(_arg1) : _local2); } public static function Resume():void{ } public static function TimeFadeXML(_arg1:String):Number{ var _local2:Number; _local2 = Number(ConfigLoader.Instance.Config[(("Time" + _arg1) + "Fade")]); return ((isNaN(_local2)) ? 0 : _local2); } public static function PlaySoundLoop(_arg1:String, _arg2:Boolean=true, _arg3:Number=-1, _arg4:Number=0):void{ if (((_arg2) || (IsPlaying(_arg1)))){ if (_arg3 == -1){ _arg3 = _volumes[_arg1]; }; SoundManager.getInstance().playSound(_arg1, (_arg3 * Volume), 0, int.MAX_VALUE); }; } public static function VolumeFadeDownXML(_arg1:String):Number{ var _local2:Number; _local2 = Number(ConfigLoader.Instance.Config[(("Volume" + _arg1) + "FadeDown")]); return ((isNaN(_local2)) ? 0 : _local2); } public static function set Volume(_arg1:Number):void{ _masterVolume = _arg1; } public static function get Volumes():Dictionary{ return (_volumes); } private static function CallBack(_arg1:Event):void{ var applicationDomain:ApplicationDomain; var e = _arg1; try { applicationDomain = _loader.getApplicationDomain(); if ((!(applicationDomain) is ApplicationDomain)){ applicationDomain = ApplicationDomain.currentDomain; }; _loader.removeEventListener(GraphicLoaderEvent.onLoadInitEVENT, CallBack); SoundManager.getInstance().MyApplicationDomain = applicationDomain; } catch(e:IllegalStateException) { trace(e.message); }; _loader.removeEventListener(GraphicLoaderEvent.onLoadInitEVENT, CallBack); } public static function SetGainOverCurrent(_arg1:String, _arg2:Number):void{ SoundManager.getInstance().setSoundVolume(_arg1, (_arg2 * Volume)); } public static function IsPlaying(_arg1:String):Boolean{ return (SoundManager.getInstance().IsPlayed(_arg1)); } public static function IsLoading():Boolean{ return (((!((_loader == null))) && (!((_loader.getContent() == null))))); } public static function ToggleMute():void{ _muted = !(_muted); Volume = (_muted) ? 0 : ConfigLoader.Instance.Config["MasterVolume"]; if (_muted){ SoundManager.getInstance().muteAllSounds(); } else { SoundManager.getInstance().unmuteAllSounds(); }; } public static function FadeSound(_arg1:String, _arg2:Number=0, _arg3:Number=1, _arg4:Number=-1):void{ if (_arg4 != -1){ SoundManager.getInstance().setSoundVolume(_arg1, _arg4); }; SoundManager.getInstance().fadeSound(_arg1, _arg2, _arg3); } public static function Destroy():void{ StopAllSounds(); SoundManager.getInstance().stopAllSounds(); SoundManager.getInstance().removeAllSounds(); } public static function Pause():void{ SoundManager.getInstance().pauseAllSounds(); } public static function GetLoadedPercent():Number{ var _local1:Number; return (_loader.getPerCent()); } } }//package
Section 318
//ShotEnemyAsset (ShotEnemyAsset) package { import flash.display.*; public dynamic class ShotEnemyAsset extends MovieClip { public var hitArea_mc:MovieClip; public function ShotEnemyAsset(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 319
//ShotFriendlyAsset (ShotFriendlyAsset) package { import flash.display.*; public dynamic class ShotFriendlyAsset extends MovieClip { public function ShotFriendlyAsset(){ addFrameScript(0, frame1, 1, frame2); } function frame1(){ stop(); } function frame2(){ stop(); } } }//package
Section 320
//SndBtn (SndBtn) package { import buttons.*; public dynamic class SndBtn extends RollOutBtn { public function SndBtn(){ addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4); } function frame3(){ stop(); } function frame1(){ stop(); } function frame4(){ stop(); } function frame2(){ stop(); } } }//package

Library Items

Symbol 1 BitmapUsed by:2
Symbol 2 GraphicUses:1Used by:3
Symbol 3 MovieClipUses:2Used by:52 850
Symbol 4 GraphicUsed by:5 132 181 184 282 310 362 568 579 600 761 765 767 815
Symbol 5 MovieClipUses:4Used by:52
Symbol 6 BitmapUsed by:7
Symbol 7 GraphicUses:6Used by:8
Symbol 8 MovieClipUses:7Used by:12
Symbol 9 BitmapUsed by:10
Symbol 10 GraphicUses:9Used by:11
Symbol 11 MovieClipUses:10Used by:12
Symbol 12 MovieClip {BenSamurai_fla.secuenciaXXZZ_431}Uses:8 11Used by:52
Symbol 13 BitmapUsed by:14
Symbol 14 GraphicUses:13Used by:22 23 51 847
Symbol 15 BitmapUsed by:16
Symbol 16 GraphicUses:15Used by:17
Symbol 17 MovieClipUses:16Used by:21
Symbol 18 BitmapUsed by:19
Symbol 19 GraphicUses:18Used by:20
Symbol 20 MovieClipUses:19Used by:21
Symbol 21 MovieClip {BenSamurai_fla.Piedritas_rotor_366}Uses:17 20Used by:22
Symbol 22 MovieClipUses:14 21Used by:52 850
Symbol 23 MovieClipUses:14Used by:52 850
Symbol 24 BitmapUsed by:25
Symbol 25 GraphicUses:24Used by:26
Symbol 26 MovieClipUses:25Used by:51 847 850
Symbol 27 BitmapUsed by:28
Symbol 28 GraphicUses:27Used by:29
Symbol 29 MovieClipUses:28Used by:51 847 850
Symbol 30 BitmapUsed by:31
Symbol 31 GraphicUses:30Used by:32
Symbol 32 MovieClipUses:31Used by:51 847 850
Symbol 33 BitmapUsed by:34
Symbol 34 GraphicUses:33Used by:35
Symbol 35 MovieClipUses:34Used by:51 847 850
Symbol 36 BitmapUsed by:37
Symbol 37 GraphicUses:36Used by:38
Symbol 38 MovieClipUses:37Used by:51 847 850
Symbol 39 BitmapUsed by:40
Symbol 40 GraphicUses:39Used by:41
Symbol 41 MovieClipUses:40Used by:51 847 850
Symbol 42 BitmapUsed by:43
Symbol 43 GraphicUses:42Used by:44
Symbol 44 MovieClipUses:43Used by:51 847 850
Symbol 45 BitmapUsed by:46
Symbol 46 GraphicUses:45Used by:47
Symbol 47 MovieClipUses:46Used by:51 847 850
Symbol 48 BitmapUsed by:49
Symbol 49 GraphicUses:48Used by:50
Symbol 50 MovieClipUses:49Used by:51 847 850
Symbol 51 MovieClip {BenSamurai_fla.pared4brazosdestruida_434}Uses:14 26 29 32 35 38 41 44 47 50Used by:52
Symbol 52 MovieClip {pared4brazosXXZZ}Uses:3 5 12 22 23 51
Symbol 53 FontUsed by:54 81 85 86 87 88 89 90 91 92 93 94 96 122 139 141 146 147 176 179 191 308 313 319 322 323 646 652 653 655 656 680 723 726 732 738 819
Symbol 54 EditableTextUses:53Used by:57
Symbol 55 BitmapUsed by:56
Symbol 56 GraphicUses:55Used by:57
Symbol 57 MovieClip {BenSamurai_fla._puntajepowerups_428}Uses:54 56Used by:58
Symbol 58 MovieClip {assets.CoinMCAsset}Uses:57
Symbol 59 BitmapUsed by:60
Symbol 60 GraphicUses:59Used by:61
Symbol 61 MovieClipUses:60Used by:80 83
Symbol 62 BitmapUsed by:63
Symbol 63 GraphicUses:62Used by:64
Symbol 64 MovieClipUses:63Used by:80 83
Symbol 65 BitmapUsed by:66
Symbol 66 GraphicUses:65Used by:67
Symbol 67 MovieClipUses:66Used by:80 83
Symbol 68 BitmapUsed by:69
Symbol 69 GraphicUses:68Used by:70
Symbol 70 MovieClipUses:69Used by:80 83
Symbol 71 BitmapUsed by:72
Symbol 72 GraphicUses:71Used by:73
Symbol 73 MovieClipUses:72Used by:80 83
Symbol 74 BitmapUsed by:75
Symbol 75 GraphicUses:74Used by:76
Symbol 76 MovieClipUses:75Used by:80 83
Symbol 77 BitmapUsed by:78
Symbol 78 GraphicUses:77Used by:79
Symbol 79 MovieClipUses:78Used by:80 83
Symbol 80 MovieClip {BenSamurai_fla._SquareGeneralidle_9}Uses:61 64 67 70 73 76 79Used by:84 182 725 728
Symbol 81 EditableTextUses:53 645Used by:82
Symbol 82 MovieClip {BenSamurai_fla.ContinueBtnTxt_24}Uses:81Used by:84
Symbol 83 MovieClip {BenSamurai_fla._SquareGeneral_19}Uses:61 64 67 70 73 76 79Used by:84 182 725 728
Symbol 84 MovieClip {Continue1BtnAsset}Uses:80 82 83Used by:112 151 277 818 856
Symbol 85 EditableTextUses:53Used by:95
Symbol 86 EditableTextUses:53Used by:95
Symbol 87 EditableTextUses:53Used by:95
Symbol 88 EditableTextUses:53Used by:95
Symbol 89 EditableTextUses:53Used by:95
Symbol 90 EditableTextUses:53Used by:95
Symbol 91 EditableTextUses:53Used by:95
Symbol 92 EditableTextUses:53Used by:95
Symbol 93 EditableTextUses:53Used by:95
Symbol 94 EditableTextUses:53Used by:95
Symbol 95 MovieClip {BenSamurai_fla.ScoreWonRText_418}Uses:85 86 87 88 89 90 91 92 93 94Used by:112
Symbol 96 EditableTextUses:53Used by:97
Symbol 97 MovieClip {BenSamurai_fla.ObjectivesTitleTxt_419}Uses:96Used by:112
Symbol 98 GraphicUsed by:99
Symbol 99 MovieClipUses:98Used by:112 151 277 737 818 856
Symbol 100 BitmapUsed by:101 103 658
Symbol 101 GraphicUses:100Used by:102
Symbol 102 MovieClipUses:101Used by:112 151 277 737 818 856
Symbol 103 GraphicUses:100Used by:104
Symbol 104 MovieClipUses:103Used by:112 151 277 737 818 856
Symbol 105 BitmapUsed by:106
Symbol 106 GraphicUses:105Used by:111 150
Symbol 107 GraphicUsed by:108
Symbol 108 MovieClipUses:107Used by:111
Symbol 109 BitmapUsed by:110
Symbol 110 GraphicUses:109Used by:111 321 730
Symbol 111 MovieClipUses:106 108 110Used by:112
Symbol 112 MovieClip {assets.LevelWonAsset}Uses:84 95 97 99 102 104 111
Symbol 113 BitmapUsed by:114
Symbol 114 GraphicUses:113Used by:131 190
Symbol 115 BitmapUsed by:116
Symbol 116 GraphicUses:115Used by:121 175
Symbol 117 GraphicUsed by:118
Symbol 118 MovieClipUses:117Used by:121 175
Symbol 119 BitmapUsed by:120
Symbol 120 GraphicUses:119Used by:121 175
Symbol 121 MovieClipUses:116 118 120Used by:131
Symbol 122 EditableTextUses:53Used by:123
Symbol 123 MovieClip {BenSamurai_fla.ProgressText_410}Uses:122Used by:131
Symbol 124 GraphicUsed by:125
Symbol 125 MovieClipUses:124Used by:128
Symbol 126 BitmapUsed by:127
Symbol 127 GraphicUses:126Used by:128 178
Symbol 128 MovieClipUses:125 127Used by:131
Symbol 129 BitmapUsed by:130
Symbol 130 GraphicUses:129Used by:131 190
Symbol 131 MovieClip {PreloaderAsset}Uses:114 121 123 128 130
Symbol 132 MovieClipUses:4Used by:140 874
Symbol 133 GraphicUsed by:134
Symbol 134 MovieClipUses:133Used by:140
Symbol 135 GraphicUsed by:136 206
Symbol 136 MovieClipUses:135Used by:140
Symbol 137 GraphicUsed by:138 207
Symbol 138 MovieClipUses:137Used by:140
Symbol 139 TextUses:53Used by:140
Symbol 140 MovieClip {assets.LoadSubLevelAsset}Uses:132 134 136 138 139
Symbol 141 EditableTextUses:53Used by:149
Symbol 142 FontUsed by:144 192 320 731 739 820
Symbol 143 FontUsed by:144 193 194 195 740 741 742 743 821 822
Symbol 144 EditableTextUses:142 143Used by:149
Symbol 145 GraphicUsed by:149
Symbol 146 EditableTextUses:53Used by:149
Symbol 147 EditableTextUses:53Used by:149
Symbol 148 GraphicUsed by:149
Symbol 149 MovieClip {BenSamurai_fla.CREDITSTitleTxt_401}Uses:141 144 145 146 147 148Used by:151
Symbol 150 MovieClipUses:106Used by:151
Symbol 151 MovieClip {assets.CreditosAsset}Uses:84 149 99 102 104 150Used by:898
Symbol 152 GraphicUsed by:153
Symbol 153 MovieClipUses:152Used by:170
Symbol 154 GraphicUsed by:155
Symbol 155 MovieClipUses:154Used by:170
Symbol 156 GraphicUsed by:157
Symbol 157 MovieClipUses:156Used by:170
Symbol 158 GraphicUsed by:159
Symbol 159 MovieClipUses:158Used by:170
Symbol 160 GraphicUsed by:161
Symbol 161 MovieClipUses:160Used by:170
Symbol 162 GraphicUsed by:163
Symbol 163 MovieClipUses:162Used by:170
Symbol 164 GraphicUsed by:165
Symbol 165 MovieClipUses:164Used by:170
Symbol 166 GraphicUsed by:167
Symbol 167 MovieClipUses:166Used by:170
Symbol 168 GraphicUsed by:169
Symbol 169 MovieClipUses:168Used by:170
Symbol 170 MovieClip {BenSamurai_fla.fx_minipower_pluf_01_281}Uses:153 155 157 159 161 163 165 167 169Used by:171
Symbol 171 MovieClip {assets.Effect3Asset}Uses:170Used by:898
Symbol 172 BitmapUsed by:173
Symbol 173 GraphicUses:172Used by:190
Symbol 174 MovieClipUsed by:190
Symbol 175 MovieClipUses:116 118 120Used by:190
Symbol 176 EditableTextUses:53Used by:177
Symbol 177 MovieClip {BenSamurai_fla.ProgressTextcopy_6}Uses:176Used by:190
Symbol 178 MovieClipUses:127Used by:190
Symbol 179 EditableTextUses:53 645Used by:180
Symbol 180 MovieClip {BenSamurai_fla.PlayBtnTxt_17}Uses:179Used by:182
Symbol 181 MovieClipUses:4Used by:182
Symbol 182 MovieClip {PlayBtnAsset}Uses:80 180 181 83Used by:190
Symbol 183 VideoUsed by:190
Symbol 184 MovieClipUses:4Used by:190
Symbol 185 BitmapUsed by:186
Symbol 186 GraphicUses:185Used by:190
Symbol 187 BitmapUsed by:188
Symbol 188 GraphicUses:187Used by:189
Symbol 189 MovieClipUses:188Used by:190
Symbol 190 MovieClip {assets.MainMenuAsset}Uses:173 174 114 175 177 178 130 182 183 184 186 189Used by:898
Symbol 191 EditableTextUses:53Used by:196
Symbol 192 EditableTextUses:142Used by:196
Symbol 193 EditableTextUses:143Used by:196
Symbol 194 EditableTextUses:143Used by:196
Symbol 195 EditableTextUses:143Used by:196
Symbol 196 MovieClip {BenSamurai_fla.TutorialTitleTxt_25}Uses:191 192 193 194 195Used by:277
Symbol 197 BitmapUsed by:200
Symbol 198 BitmapUsed by:200
Symbol 199 BitmapUsed by:200 825
Symbol 200 GraphicUses:197 198 199Used by:276
Symbol 201 GraphicUsed by:202
Symbol 202 MovieClipUses:201Used by:203 498 507 535 544 800 852
Symbol 203 MovieClipUses:202Used by:222 361
Symbol 204 GraphicUsed by:205
Symbol 205 MovieClipUses:204Used by:208 534
Symbol 206 MovieClipUses:135Used by:208 534
Symbol 207 MovieClipUses:137Used by:208 534
Symbol 208 MovieClipUses:205 206 207Used by:222 498 499 507 508 544 545 800
Symbol 209 BitmapUsed by:210
Symbol 210 GraphicUses:209Used by:221 235
Symbol 211 BitmapUsed by:212
Symbol 212 GraphicUses:211Used by:221
Symbol 213 BitmapUsed by:214
Symbol 214 GraphicUses:213Used by:221
Symbol 215 BitmapUsed by:216
Symbol 216 GraphicUses:215Used by:221
Symbol 217 BitmapUsed by:218
Symbol 218 GraphicUses:217Used by:221
Symbol 219 BitmapUsed by:220
Symbol 220 GraphicUses:219Used by:221
Symbol 221 MovieClipUses:210 212 214 216 218 220Used by:222 254 255 508 545 550
Symbol 222 MovieClipUses:203 208 221Used by:276
Symbol 223 BitmapUsed by:224
Symbol 224 GraphicUses:223Used by:235 540
Symbol 225 BitmapUsed by:226
Symbol 226 GraphicUses:225Used by:235 540
Symbol 227 BitmapUsed by:228
Symbol 228 GraphicUses:227Used by:235 540
Symbol 229 BitmapUsed by:230
Symbol 230 GraphicUses:229Used by:235 540
Symbol 231 BitmapUsed by:232
Symbol 232 GraphicUses:231Used by:235 540
Symbol 233 BitmapUsed by:234
Symbol 234 GraphicUses:233Used by:235 540
Symbol 235 MovieClipUses:210 224 226 228 230 232 234Used by:276
Symbol 236 BitmapUsed by:237
Symbol 237 GraphicUses:236Used by:238
Symbol 238 MovieClipUses:237Used by:256
Symbol 239 BitmapUsed by:240
Symbol 240 GraphicUses:239Used by:241
Symbol 241 MovieClipUses:240Used by:256
Symbol 242 BitmapUsed by:243
Symbol 243 GraphicUses:242Used by:244
Symbol 244 MovieClipUses:243Used by:256
Symbol 245 BitmapUsed by:246
Symbol 246 GraphicUses:245Used by:247
Symbol 247 MovieClipUses:246Used by:256
Symbol 248 BitmapUsed by:249
Symbol 249 GraphicUses:248Used by:250
Symbol 250 MovieClipUses:249Used by:256
Symbol 251 BitmapUsed by:252
Symbol 252 GraphicUses:251Used by:253
Symbol 253 MovieClipUses:252Used by:256
Symbol 254 MovieClip {BenSamurai_fla._Superataque_46}Uses:221Used by:256 564
Symbol 255 MovieClipUses:221Used by:256 564
Symbol 256 MovieClipUses:238 241 244 247 250 253 254 255Used by:276
Symbol 257 GraphicUsed by:265 827
Symbol 258 BitmapUsed by:259
Symbol 259 GraphicUses:258Used by:260
Symbol 260 MovieClipUses:259Used by:265 827
Symbol 261 GraphicUsed by:265 827
Symbol 262 BitmapUsed by:263
Symbol 263 GraphicUses:262Used by:264
Symbol 264 MovieClipUses:263Used by:265 827
Symbol 265 MovieClipUses:257 260 261 264Used by:276
Symbol 266 GraphicUsed by:270 853
Symbol 267 BitmapUsed by:268
Symbol 268 GraphicUses:267Used by:269
Symbol 269 MovieClipUses:268Used by:270 853
Symbol 270 MovieClipUses:266 269Used by:276
Symbol 271 GraphicUsed by:275 854
Symbol 272 BitmapUsed by:273
Symbol 273 GraphicUses:272Used by:274
Symbol 274 MovieClipUses:273Used by:275 854
Symbol 275 MovieClipUses:271 274Used by:276
Symbol 276 MovieClipUses:200 222 235 256 265 270 275Used by:277
Symbol 277 MovieClip {assets.InstructionsCannonBoltAsset}Uses:84 196 99 102 104 276Used by:898
Symbol 278 VideoUsed by:325
Symbol 279 BitmapUsed by:280
Symbol 280 GraphicUses:279Used by:281
Symbol 281 MovieClipUses:280Used by:325
Symbol 282 MovieClipUses:4Used by:325
Symbol 283 BitmapUsed by:284
Symbol 284 GraphicUses:283Used by:285
Symbol 285 MovieClipUses:284Used by:325
Symbol 286 BitmapUsed by:287
Symbol 287 GraphicUses:286Used by:288
Symbol 288 MovieClipUses:287Used by:307 311
Symbol 289 BitmapUsed by:290
Symbol 290 GraphicUses:289Used by:291
Symbol 291 MovieClipUses:290Used by:307 311
Symbol 292 BitmapUsed by:293
Symbol 293 GraphicUses:292Used by:294
Symbol 294 MovieClipUses:293Used by:307 311
Symbol 295 BitmapUsed by:296
Symbol 296 GraphicUses:295Used by:297
Symbol 297 MovieClipUses:296Used by:307 311
Symbol 298 BitmapUsed by:299
Symbol 299 GraphicUses:298Used by:300
Symbol 300 MovieClipUses:299Used by:307 311
Symbol 301 BitmapUsed by:302
Symbol 302 GraphicUses:301Used by:303
Symbol 303 MovieClipUses:302Used by:307 311
Symbol 304 BitmapUsed by:305
Symbol 305 GraphicUses:304Used by:306
Symbol 306 MovieClipUses:305Used by:307 311
Symbol 307 MovieClip {BenSamurai_fla._SquareGeneralidle_60}Uses:288 291 294 297 300 303 306Used by:312 315
Symbol 308 EditableTextUses:53 645Used by:309
Symbol 309 MovieClip {BenSamurai_fla.PlayAgainBtnTxt_68}Uses:308Used by:312
Symbol 310 MovieClipUses:4Used by:312 315
Symbol 311 MovieClip {BenSamurai_fla._SquareGeneral_70}Uses:288 291 294 297 300 303 306Used by:312 315
Symbol 312 MovieClip {PlayAgain2BtnAsset}Uses:307 309 310 311Used by:325
Symbol 313 EditableTextUses:53 645Used by:314
Symbol 314 MovieClip {BenSamurai_fla.MainMenuBtnTxt_72}Uses:313Used by:315
Symbol 315 MovieClip {MainMenu2BtnAsset}Uses:307 314 310 311Used by:325
Symbol 316 GraphicUsed by:321
Symbol 317 BitmapUsed by:318
Symbol 318 GraphicUses:317Used by:321
Symbol 319 EditableTextUses:53Used by:321
Symbol 320 EditableTextUses:142Used by:321
Symbol 321 MovieClip {BenSamurai_fla.GameWonTitleTxt_73}Uses:316 110 318 319 320Used by:325
Symbol 322 EditableTextUses:53Used by:324
Symbol 323 EditableTextUses:53Used by:324
Symbol 324 MovieClip {BenSamurai_fla.ScoreWonText_74}Uses:322 323Used by:325 730
Symbol 325 MovieClip {assets.GameWonAsset}Uses:278 281 282 285 312 315 321 324Used by:898
Symbol 326 GraphicUsed by:327
Symbol 327 MovieClipUses:326Used by:353 379 424 444 805
Symbol 328 GraphicUsed by:329
Symbol 329 MovieClipUses:328Used by:353 365
Symbol 330 GraphicUsed by:331
Symbol 331 MovieClipUses:330Used by:353
Symbol 332 GraphicUsed by:341
Symbol 333 GraphicUsed by:341
Symbol 334 GraphicUsed by:341
Symbol 335 GraphicUsed by:341
Symbol 336 GraphicUsed by:341
Symbol 337 GraphicUsed by:341
Symbol 338 GraphicUsed by:341
Symbol 339 GraphicUsed by:341
Symbol 340 GraphicUsed by:341
Symbol 341 MovieClipUses:332 333 334 335 336 337 338 339 340Used by:342
Symbol 342 MovieClipUses:341Used by:353 379 444
Symbol 343 GraphicUsed by:344
Symbol 344 MovieClipUses:343Used by:353 379 389 424 444 805
Symbol 345 GraphicUsed by:346
Symbol 346 MovieClipUses:345Used by:353 379 424 444 805
Symbol 347 GraphicUsed by:348
Symbol 348 MovieClipUses:347Used by:353 379 424 444 805
Symbol 349 GraphicUsed by:350
Symbol 350 MovieClipUses:349Used by:353 379 424 444 805
Symbol 351 GraphicUsed by:352
Symbol 352 MovieClipUses:351Used by:353 379 424 444 805
Symbol 353 MovieClip {BenSamurai_fla.Ben_espadazo_77}Uses:327 329 331 342 344 346 348 350 352Used by:361
Symbol 354 GraphicUsed by:355
Symbol 355 MovieClipUses:354Used by:360 795
Symbol 356 GraphicUsed by:357
Symbol 357 MovieClipUses:356Used by:360 382 795
Symbol 358 GraphicUsed by:359
Symbol 359 MovieClipUses:358Used by:360 382 795
Symbol 360 MovieClip {BenSamurai_fla.Ben_Shurikenea_88}Uses:355 357 359Used by:361
Symbol 361 MovieClip {BenSamurai_fla._Idle_76}Uses:203 353 360Used by:509
Symbol 362 MovieClipUses:4Used by:509 538 564
Symbol 363 GraphicUsed by:364
Symbol 364 MovieClipUses:363Used by:365 785
Symbol 365 MovieClip {BenSamurai_fla.Ben_Espadol_mc_95}Uses:364 329Used by:399 438 446 801 807
Symbol 366 GraphicUsed by:367
Symbol 367 MovieClipUses:366Used by:399 787 807
Symbol 368 GraphicUsed by:369
Symbol 369 MovieClipUses:368Used by:370 442
Symbol 370 MovieClipUses:369Used by:373 379 382 389 424 444 805
Symbol 371 GraphicUsed by:372
Symbol 372 MovieClipUses:371Used by:373 382 389
Symbol 373 MovieClipUses:370 372Used by:376
Symbol 374 GraphicUsed by:375
Symbol 375 MovieClipUses:374Used by:376 443
Symbol 376 MovieClipUses:373 375Used by:390 425 786
Symbol 377 GraphicUsed by:378
Symbol 378 MovieClipUses:377Used by:379 424 444 805
Symbol 379 MovieClip {BenSamurai_fla.Ben_Torso_Ani_02_105}Uses:327 370 378 344 342 346 348 350 352Used by:390
Symbol 380 GraphicUsed by:381
Symbol 381 MovieClipUses:380Used by:382 389
Symbol 382 MovieClip {BenSamurai_fla.Ben_Torso_Ani_03_107}Uses:370 381 357 359 372Used by:390 425 445
Symbol 383 GraphicUsed by:384
Symbol 384 MovieClipUses:383Used by:389
Symbol 385 GraphicUsed by:386
Symbol 386 MovieClipUses:385Used by:389
Symbol 387 GraphicUsed by:388
Symbol 388 MovieClipUses:387Used by:389
Symbol 389 MovieClipUses:370 381 344 384 372 386 388Used by:390 425 445
Symbol 390 MovieClip {BenSamurai_fla.Ben_Torso_mc_98}Uses:376 379 382 389Used by:399
Symbol 391 GraphicUsed by:392
Symbol 392 MovieClipUses:391Used by:399 787 807
Symbol 393 GraphicUsed by:394
Symbol 394 MovieClipUses:393Used by:399 787 807
Symbol 395 GraphicUsed by:396
Symbol 396 MovieClipUses:395Used by:399 787 807
Symbol 397 GraphicUsed by:398
Symbol 398 MovieClipUses:397Used by:399 787 807
Symbol 399 MovieClip {BenSamurai_fla.Ben_corre_B_94}Uses:365 367 390 392 394 396 398Used by:413 499 508 536 545
Symbol 400 GraphicUsed by:412
Symbol 401 GraphicUsed by:412
Symbol 402 GraphicUsed by:412
Symbol 403 GraphicUsed by:412
Symbol 404 GraphicUsed by:412
Symbol 405 GraphicUsed by:412
Symbol 406 GraphicUsed by:412
Symbol 407 GraphicUsed by:412
Symbol 408 GraphicUsed by:412
Symbol 409 GraphicUsed by:412
Symbol 410 GraphicUsed by:412
Symbol 411 GraphicUsed by:412 563
Symbol 412 MovieClipUses:400 401 402 403 404 405 406 407 408 409 410 411Used by:413 538
Symbol 413 MovieClip {BenSamurai_fla._Run_93}Uses:399 412Used by:509
Symbol 414 GraphicUsed by:415
Symbol 415 MovieClipUses:414Used by:438 801
Symbol 416 GraphicUsed by:417
Symbol 417 MovieClipUses:416Used by:438 801
Symbol 418 GraphicUsed by:419
Symbol 419 MovieClipUses:418Used by:438 801
Symbol 420 GraphicUsed by:421
Symbol 421 MovieClipUses:420Used by:438 801
Symbol 422 GraphicUsed by:423
Symbol 423 MovieClipUses:422Used by:438 801
Symbol 424 MovieClip {BenSamurai_fla.Ben_Torso_Ani_02salto_126}Uses:327 370 378 344 346 348 350 352Used by:425
Symbol 425 MovieClip {BenSamurai_fla.Ben_Torso_mc2_125}Uses:376 424 382 389Used by:438
Symbol 426 GraphicUsed by:427
Symbol 427 MovieClipUses:426Used by:438 801
Symbol 428 GraphicUsed by:429
Symbol 429 MovieClipUses:428Used by:438 801
Symbol 430 GraphicUsed by:431
Symbol 431 MovieClipUses:430Used by:438 801
Symbol 432 GraphicUsed by:433
Symbol 433 MovieClipUses:432Used by:438 801
Symbol 434 GraphicUsed by:435
Symbol 435 MovieClipUses:434Used by:438 801
Symbol 436 GraphicUsed by:437
Symbol 437 MovieClipUses:436Used by:438 801
Symbol 438 MovieClip {BenSamurai_fla.Ben_salta_119}Uses:365 415 417 419 421 423 425 427 429 431 433 435 437Used by:439
Symbol 439 MovieClip {BenSamurai_fla._Jump_118}Uses:438Used by:509
Symbol 440 GraphicUsed by:441
Symbol 441 MovieClipUses:440Used by:446 803
Symbol 442 MovieClipUses:369Used by:443
Symbol 443 MovieClipUses:442 375Used by:445
Symbol 444 MovieClip {BenSamurai_fla.Ben_Torso_Ani_05_139}Uses:327 370 378 344 342 346 348 350 352Used by:445
Symbol 445 MovieClip {BenSamurai_fla.Ben_Torso_02_mc3_136}Uses:443 444 382 389Used by:446
Symbol 446 MovieClip {BenSamurai_fla.Ben_agachau_134}Uses:365 441 445Used by:447
Symbol 447 MovieClip {BenSamurai_fla._Crouch_133}Uses:446Used by:509
Symbol 448 GraphicUsed by:449
Symbol 449 MovieClipUses:448Used by:450
Symbol 450 MovieClip {BenSamurai_fla.Ben_hit_141}Uses:449Used by:451
Symbol 451 MovieClip {BenSamurai_fla._Hit_140}Uses:450Used by:509
Symbol 452 GraphicUsed by:453
Symbol 453 MovieClipUses:452Used by:458
Symbol 454 GraphicUsed by:455
Symbol 455 MovieClipUses:454Used by:458
Symbol 456 GraphicUsed by:457
Symbol 457 MovieClipUses:456Used by:458
Symbol 458 MovieClip {BenSamurai_fla.Ben_muere_144}Uses:453 455 457Used by:459
Symbol 459 MovieClip {BenSamurai_fla._Die_143}Uses:458Used by:509
Symbol 460 GraphicUsed by:461
Symbol 461 MovieClipUses:460Used by:462 466 469 510
Symbol 462 MovieClipUses:461Used by:470 511
Symbol 463 GraphicUsed by:464
Symbol 464 MovieClipUses:463Used by:465 537
Symbol 465 MovieClipUses:464Used by:470 511
Symbol 466 MovieClipUses:461Used by:470
Symbol 467 GraphicUsed by:468
Symbol 468 MovieClipUses:467Used by:469
Symbol 469 MovieClip {BenSamurai_fla.Fourarms_brazos_izq_pega_157}Uses:461 468Used by:470 511
Symbol 470 MovieClip {BenSamurai_fla.Fourarms_brazos_izq_mc_151}Uses:462 465 466 469Used by:496
Symbol 471 GraphicUsed by:472
Symbol 472 MovieClipUses:471Used by:496 537
Symbol 473 GraphicUsed by:474
Symbol 474 MovieClipUses:473Used by:480
Symbol 475 GraphicUsed by:476
Symbol 476 MovieClipUses:475Used by:479 483 537
Symbol 477 GraphicUsed by:478
Symbol 478 MovieClipUses:477Used by:479 483 491 494 537
Symbol 479 MovieClipUses:476 478Used by:480
Symbol 480 MovieClipUses:474 479Used by:495
Symbol 481 GraphicUsed by:482
Symbol 482 MovieClipUses:481Used by:484
Symbol 483 MovieClipUses:476 478Used by:484
Symbol 484 MovieClipUses:482 483Used by:495
Symbol 485 GraphicUsed by:486
Symbol 486 MovieClipUses:485Used by:491
Symbol 487 GraphicUsed by:488
Symbol 488 MovieClipUses:487Used by:491 494
Symbol 489 GraphicUsed by:490
Symbol 490 MovieClipUses:489Used by:491
Symbol 491 MovieClip {BenSamurai_fla.Fourarms_Pega_der_169}Uses:486 488 478 490Used by:495
Symbol 492 GraphicUsed by:493
Symbol 493 MovieClipUses:492Used by:494 537
Symbol 494 MovieClipUses:493 488 478Used by:495
Symbol 495 MovieClip {BenSamurai_fla.Fourarms_Torso_mc_160}Uses:480 484 491 494Used by:496 528
Symbol 496 MovieClip {BenSamurai_fla.Fourarms_Idle_150}Uses:470 472 495Used by:497 535
Symbol 497 MovieClip {BenSamurai_fla._Idle_149}Uses:496Used by:498 538
Symbol 498 MovieClip {BenSamurai_fla.Ben_Idle_Transform_Four_148}Uses:202 208 497Used by:509
Symbol 499 MovieClip {BenSamurai_fla.Ben_Corre_Transform_Four_175}Uses:399 208Used by:509
Symbol 500 GraphicUsed by:501
Symbol 501 MovieClipUses:500Used by:506
Symbol 502 GraphicUsed by:503
Symbol 503 MovieClipUses:502Used by:506
Symbol 504 GraphicUsed by:505
Symbol 505 MovieClipUses:504Used by:506
Symbol 506 MovieClipUses:501 503 505Used by:507 544 564 800
Symbol 507 MovieClip {BenSamurai_fla.Ben_Idle_Transform_Cannon_176}Uses:202 208 506Used by:509
Symbol 508 MovieClip {BenSamurai_fla.Ben_Corre_Transform_Cannon_181}Uses:399 208 221Used by:509
Symbol 509 MovieClip {BenSamuraiAsset}Uses:361 362 413 439 447 451 459 498 499 507 508Used by:898
Symbol 510 MovieClipUses:461Used by:511
Symbol 511 MovieClip {BenSamurai_fla.Fourarms_Brazos_Izq_mccopy_185}Uses:462 465 510 469Used by:528
Symbol 512 GraphicUsed by:513
Symbol 513 MovieClipUses:512Used by:528
Symbol 514 GraphicUsed by:515
Symbol 515 MovieClipUses:514Used by:528
Symbol 516 GraphicUsed by:517
Symbol 517 MovieClipUses:516Used by:528
Symbol 518 GraphicUsed by:519
Symbol 519 MovieClipUses:518Used by:528
Symbol 520 GraphicUsed by:521
Symbol 521 MovieClipUses:520Used by:528
Symbol 522 GraphicUsed by:523
Symbol 523 MovieClipUses:522Used by:528
Symbol 524 GraphicUsed by:525
Symbol 525 MovieClipUses:524Used by:528
Symbol 526 GraphicUsed by:527
Symbol 527 MovieClipUses:526Used by:528
Symbol 528 MovieClip {BenSamurai_fla.Fourarms_camina_184}Uses:511 513 495 515 517 519 521 523 525 527Used by:529 536
Symbol 529 MovieClip {BenSamurai_fla._Run_183}Uses:528Used by:538
Symbol 530 GraphicUsed by:531
Symbol 531 MovieClipUses:530Used by:532
Symbol 532 MovieClip {BenSamurai_fla.Fourarms_hit_196}Uses:531Used by:533
Symbol 533 MovieClipUses:532Used by:538
Symbol 534 MovieClipUses:205 206 207Used by:535 536 852
Symbol 535 MovieClip {BenSamurai_fla.Fourarms_Idle_Transform_Ben_198}Uses:496 534 202Used by:538
Symbol 536 MovieClipUses:528 534 399Used by:538
Symbol 537 MovieClip {BenSamurai_fla._Fall_201}Uses:472 464 493 476 478Used by:538
Symbol 538 MovieClip {FourArmsAsset}Uses:497 362 529 412 533 535 536 537Used by:898
Symbol 539 GraphicUsed by:564
Symbol 540 MovieClipUses:224 226 228 230 232 234Used by:541
Symbol 541 MovieClipUses:540Used by:564
Symbol 542 GraphicUsed by:543
Symbol 543 MovieClipUses:542Used by:564
Symbol 544 MovieClip {BenSamurai_fla.Cannonbolt_Idle_Transform_Ben_206}Uses:506 208 202Used by:564
Symbol 545 MovieClip {BenSamurai_fla.Cannonbolt_Corre_Transform_Ben_207}Uses:221 208 399Used by:564
Symbol 546 GraphicUsed by:547
Symbol 547 MovieClipUses:546Used by:548
Symbol 548 MovieClip {BenSamurai_fla.Cannonbolt_Hited_209}Uses:547Used by:549
Symbol 549 MovieClipUses:548Used by:564
Symbol 550 MovieClip {BenSamurai_fla.Cannonbolt_Bola_Hit_212}Uses:221Used by:551
Symbol 551 MovieClipUses:550Used by:564
Symbol 552 GraphicUsed by:563
Symbol 553 GraphicUsed by:563
Symbol 554 GraphicUsed by:563
Symbol 555 GraphicUsed by:563
Symbol 556 GraphicUsed by:563
Symbol 557 GraphicUsed by:563
Symbol 558 GraphicUsed by:563
Symbol 559 GraphicUsed by:563
Symbol 560 GraphicUsed by:563
Symbol 561 GraphicUsed by:563
Symbol 562 GraphicUsed by:563
Symbol 563 MovieClip {BenSamurai_fla.Humito_corridacopy_213}Uses:552 553 554 555 556 557 558 559 560 561 562 411Used by:564
Symbol 564 MovieClip {CannonBoltAsset}Uses:539 255 362 541 543 506 544 545 549 551 254 563Used by:898
Symbol 565 BitmapUsed by:566
Symbol 566 GraphicUses:565Used by:567 569
Symbol 567 MovieClipUses:566Used by:571 573
Symbol 568 MovieClipUses:4Used by:573
Symbol 569 MovieClipUses:566Used by:570 572
Symbol 570 MovieClip {BenSamurai_fla.HelpBtnOver_218}Uses:569Used by:573
Symbol 571 MovieClip {BenSamurai_fla.HelpBtnDown_220}Uses:567Used by:573
Symbol 572 MovieClip {BenSamurai_fla.HelpBtnOut_221}Uses:569Used by:573
Symbol 573 MovieClip {HelpBtn}Uses:567 568 570 571 572Used by:689
Symbol 574 BitmapUsed by:575
Symbol 575 GraphicUses:574Used by:576 580
Symbol 576 MovieClipUses:575Used by:582 584
Symbol 577 GraphicUsed by:578
Symbol 578 MovieClipUses:577Used by:584
Symbol 579 MovieClipUses:4Used by:584
Symbol 580 MovieClipUses:575Used by:581 583
Symbol 581 MovieClip {BenSamurai_fla.BtnOver_226}Uses:580Used by:584
Symbol 582 MovieClip {BenSamurai_fla.BtnDown_228}Uses:576Used by:584
Symbol 583 MovieClip {BenSamurai_fla.BtnOut_229}Uses:580Used by:584
Symbol 584 MovieClip {SndBtn}Uses:576 578 579 581 582 583Used by:689
Symbol 585 BitmapUsed by:586
Symbol 586 GraphicUses:585Used by:595 604
Symbol 587 GraphicUsed by:588
Symbol 588 MovieClipUses:587Used by:594
Symbol 589 BitmapUsed by:590 641
Symbol 590 GraphicUses:589Used by:594
Symbol 591 BitmapUsed by:592
Symbol 592 GraphicUses:591Used by:593
Symbol 593 MovieClipUses:592Used by:594 642
Symbol 594 MovieClip {BenSamurai_fla.barradevida_231}Uses:588 590 593Used by:595
Symbol 595 MovieClip {BenSamurai_fla.barradevida_230}Uses:586 594Used by:689
Symbol 596 GraphicUsed by:607 608
Symbol 597 GraphicUsed by:598
Symbol 598 MovieClipUses:597Used by:599
Symbol 599 MovieClipUses:598Used by:607
Symbol 600 MovieClipUses:4Used by:607 608
Symbol 601 GraphicUsed by:602
Symbol 602 MovieClipUses:601Used by:607 608
Symbol 603 GraphicUsed by:604 895
Symbol 604 MovieClipUses:603 586Used by:607
Symbol 605 ShapeTweeningUsed by:607
Symbol 606 GraphicUsed by:607
Symbol 607 MovieClip {BenSamurai_fla.barradedescarga_235}Uses:596 599 600 602 604 605 606Used by:609
Symbol 608 MovieClip {BenSamurai_fla.barradecarga_241}Uses:596 600 602Used by:609
Symbol 609 MovieClip {BenSamurai_fla.BarradeTransformacion_234}Uses:607 608Used by:689
Symbol 610 BitmapUsed by:611
Symbol 611 GraphicUses:610Used by:615 623
Symbol 612 BitmapUsed by:613
Symbol 613 GraphicUses:612Used by:614 624
Symbol 614 MovieClipUses:613Used by:615
Symbol 615 MovieClipUses:611 614Used by:636
Symbol 616 GraphicUsed by:619
Symbol 617 GraphicUsed by:618
Symbol 618 MovieClipUses:617Used by:619
Symbol 619 MovieClipUses:616 618Used by:636
Symbol 620 BitmapUsed by:621
Symbol 621 GraphicUses:620Used by:622
Symbol 622 MovieClipUses:621Used by:628
Symbol 623 MovieClipUses:611Used by:628 635
Symbol 624 MovieClipUses:613Used by:628 635
Symbol 625 BitmapUsed by:626
Symbol 626 GraphicUses:625Used by:627
Symbol 627 MovieClipUses:626Used by:628
Symbol 628 MovieClip {BenSamurai_fla.cara4brazos_247}Uses:622 623 624 627Used by:636
Symbol 629 BitmapUsed by:630
Symbol 630 GraphicUses:629Used by:631
Symbol 631 MovieClipUses:630Used by:635
Symbol 632 BitmapUsed by:633
Symbol 633 GraphicUses:632Used by:634
Symbol 634 MovieClipUses:633Used by:635
Symbol 635 MovieClip {BenSamurai_fla.caracannonbolt_252}Uses:631 634 623 624Used by:636
Symbol 636 MovieClip {BenSamurai_fla.personajeshud_242}Uses:615 619 628 635Used by:689
Symbol 637 BitmapUsed by:638
Symbol 638 GraphicUses:637Used by:649
Symbol 639 GraphicUsed by:640
Symbol 640 MovieClipUses:639Used by:642
Symbol 641 GraphicUses:589Used by:642
Symbol 642 MovieClip {BenSamurai_fla.barradevidabos_256}Uses:640 641 593Used by:649
Symbol 643 BitmapUsed by:644
Symbol 644 GraphicUses:643Used by:649
Symbol 645 FontUsed by:81 179 308 313 646 680 690 723 726 896
Symbol 646 EditableTextUses:53 645Used by:649
Symbol 647 BitmapUsed by:648
Symbol 648 GraphicUses:647Used by:649
Symbol 649 MovieClip {BenSamurai_fla.bosslife_255}Uses:638 642 644 646 648Used by:689
Symbol 650 BitmapUsed by:651
Symbol 651 GraphicUses:650Used by:689
Symbol 652 TextUses:53Used by:654
Symbol 653 EditableTextUses:53Used by:654
Symbol 654 MovieClip {BenSamurai_fla.Vidas_258}Uses:652 653Used by:689
Symbol 655 EditableTextUses:53Used by:657
Symbol 656 EditableTextUses:53Used by:657
Symbol 657 MovieClip {BenSamurai_fla.puntaje_259}Uses:655 656Used by:689
Symbol 658 GraphicUses:100Used by:679 684 687
Symbol 659 BitmapUsed by:660 681
Symbol 660 GraphicUses:659Used by:661
Symbol 661 MovieClipUses:660Used by:679 684 687
Symbol 662 BitmapUsed by:663
Symbol 663 GraphicUses:662Used by:679 684 687
Symbol 664 GraphicUsed by:672
Symbol 665 GraphicUsed by:672 683
Symbol 666 GraphicUsed by:667
Symbol 667 MovieClipUses:666Used by:672 683 686
Symbol 668 GraphicUsed by:669
Symbol 669 MovieClipUses:668Used by:672 683 686
Symbol 670 GraphicUsed by:671
Symbol 671 MovieClipUses:670Used by:672 683 686
Symbol 672 MovieClipUses:664 665 667 669 671Used by:679 684 687
Symbol 673 BitmapUsed by:674
Symbol 674 GraphicUses:673Used by:675
Symbol 675 MovieClipUses:674Used by:679 684 687
Symbol 676 BitmapUsed by:677
Symbol 677 GraphicUses:676Used by:678
Symbol 678 MovieClipUses:677Used by:679 684 687
Symbol 679 MovieClipUses:658 661 663 672 675 678Used by:688
Symbol 680 EditableTextUses:53 645Used by:688
Symbol 681 GraphicUses:659Used by:682
Symbol 682 MovieClipUses:681Used by:684 687
Symbol 683 MovieClipUses:665 667 669 671Used by:684
Symbol 684 MovieClipUses:658 661 682 663 672 683 675 678Used by:688
Symbol 685 GraphicUsed by:686
Symbol 686 MovieClipUses:685 667 669 671Used by:687
Symbol 687 MovieClipUses:658 661 682 663 672 686 675 678Used by:688
Symbol 688 MovieClip {BenSamurai_fla.elecciondepersonaje_260}Uses:679 680 684 687Used by:689
Symbol 689 MovieClip {assets.HUDAsset}Uses:573 584 595 609 636 649 651 654 657 688Used by:898
Symbol 690 EditableTextUses:645Used by:691
Symbol 691 MovieClip {BenSamurai_fla.levelindicatormove_275}Uses:690Used by:692
Symbol 692 MovieClip {assets.LevelIndicatorAsset}Uses:691Used by:898
Symbol 693 GraphicUsed by:705
Symbol 694 GraphicUsed by:705
Symbol 695 GraphicUsed by:705
Symbol 696 GraphicUsed by:705
Symbol 697 GraphicUsed by:705
Symbol 698 GraphicUsed by:705
Symbol 699 GraphicUsed by:705
Symbol 700 GraphicUsed by:705
Symbol 701 GraphicUsed by:705
Symbol 702 GraphicUsed by:705
Symbol 703 GraphicUsed by:705
Symbol 704 GraphicUsed by:705
Symbol 705 MovieClip {BenSamurai_fla.Humito_corrida_277}Uses:693 694 695 696 697 698 699 700 701 702 703 704Used by:706
Symbol 706 MovieClip {assets.Effect1Asset}Uses:705Used by:898
Symbol 707 GraphicUsed by:712
Symbol 708 GraphicUsed by:712
Symbol 709 GraphicUsed by:712
Symbol 710 GraphicUsed by:712
Symbol 711 GraphicUsed by:712
Symbol 712 MovieClip {BenSamurai_fla.espadagolpea_279}Uses:707 708 709 710 711Used by:713
Symbol 713 MovieClip {assets.Effect2Asset}Uses:712Used by:898
Symbol 714 BitmapUsed by:715
Symbol 715 GraphicUses:714Used by:716
Symbol 716 MovieClip {Background1Asset}Uses:715Used by:898
Symbol 717 BitmapUsed by:718
Symbol 718 GraphicUses:717Used by:719
Symbol 719 MovieClip {Background2Asset}Uses:718Used by:898
Symbol 720 BitmapUsed by:721
Symbol 721 GraphicUses:720Used by:722
Symbol 722 MovieClip {Background3Asset}Uses:721Used by:898
Symbol 723 EditableTextUses:53 645Used by:724
Symbol 724 MovieClip {BenSamurai_fla.PlayAgainBtnTxt_296}Uses:723Used by:725
Symbol 725 MovieClip {PlayAgain1BtnAsset}Uses:80 724 83Used by:737
Symbol 726 EditableTextUses:53 645Used by:727
Symbol 727 MovieClip {BenSamurai_fla.MainMenuBtnTxt_298}Uses:726Used by:728
Symbol 728 MovieClip {MainMenu1BtnAsset}Uses:80 727 83Used by:737
Symbol 729 GraphicUsed by:730
Symbol 730 MovieClip {BenSamurai_fla.ScoreText_299}Uses:729 110 324Used by:737
Symbol 731 EditableTextUses:142Used by:733
Symbol 732 EditableTextUses:53Used by:733
Symbol 733 MovieClip {BenSamurai_fla.GameLostTitleTxt_300}Uses:731 732Used by:737
Symbol 734 BitmapUsed by:735
Symbol 735 GraphicUses:734Used by:736
Symbol 736 MovieClipUses:735Used by:737
Symbol 737 MovieClip {assets.GameLostAsset}Uses:725 728 730 733 99 102 104 736Used by:898
Symbol 738 EditableTextUses:53Used by:744
Symbol 739 EditableTextUses:142Used by:744
Symbol 740 EditableTextUses:143Used by:744
Symbol 741 EditableTextUses:143Used by:744
Symbol 742 EditableTextUses:143Used by:744
Symbol 743 EditableTextUses:143Used by:744
Symbol 744 MovieClip {BenSamurai_fla.InstructionsTitleTxt_303}Uses:738 739 740 741 742 743Used by:818
Symbol 745 BitmapUsed by:746
Symbol 746 GraphicUses:745Used by:747
Symbol 747 MovieClipUses:746Used by:770 817
Symbol 748 BitmapUsed by:749
Symbol 749 GraphicUses:748Used by:750
Symbol 750 MovieClipUses:749Used by:770 817
Symbol 751 BitmapUsed by:752
Symbol 752 GraphicUses:751Used by:753
Symbol 753 MovieClipUses:752Used by:770 817
Symbol 754 BitmapUsed by:755
Symbol 755 GraphicUses:754Used by:756
Symbol 756 MovieClipUses:755Used by:770 817
Symbol 757 GraphicUsed by:770 817
Symbol 758 GraphicUsed by:759
Symbol 759 MovieClipUses:758Used by:760 769 813 814 816
Symbol 760 MovieClip {BenSamurai_fla.gradientpopup_309}Uses:759Used by:770
Symbol 761 MovieClip {BenSamurai_fla.maskpopupfinale_311}Uses:4Used by:770
Symbol 762 BitmapUsed by:763
Symbol 763 GraphicUses:762Used by:764 770 817
Symbol 764 MovieClipUses:763Used by:770 817
Symbol 765 MovieClipUses:4Used by:766 811
Symbol 766 MovieClip {BenSamurai_fla.maskpopupfinalecopy_313}Uses:765Used by:770
Symbol 767 MovieClipUses:4Used by:768 812
Symbol 768 MovieClip {BenSamurai_fla.mascarapopup_315}Uses:767Used by:770
Symbol 769 MovieClip {BenSamurai_fla.gradientpopupcopy_317}Uses:759Used by:770
Symbol 770 MovieClip {BenSamurai_fla.conenedorpopup_304}Uses:747 750 753 756 757 760 761 764 766 768 763 769Used by:818
Symbol 771 BitmapUsed by:772
Symbol 772 GraphicUses:771Used by:810
Symbol 773 GraphicUsed by:784 809
Symbol 774 BitmapUsed by:776 778 780 782
Symbol 775 BitmapUsed by:776 778 780 782
Symbol 776 GraphicUses:774 775Used by:777
Symbol 777 MovieClipUses:776Used by:784
Symbol 778 GraphicUses:774 775Used by:779
Symbol 779 MovieClipUses:778Used by:784
Symbol 780 GraphicUses:774 775Used by:781
Symbol 781 MovieClipUses:780Used by:784
Symbol 782 GraphicUses:774 775Used by:783
Symbol 783 MovieClipUses:782Used by:784
Symbol 784 MovieClipUses:773 777 779 781 783Used by:809
Symbol 785 MovieClip {BenSamurai_fla.Ben_Espadol_mcI_327}Uses:364Used by:787 803
Symbol 786 MovieClipUses:376Used by:787 801 803
Symbol 787 MovieClip {BenSamurai_fla.Ben_corre_Inst_326}Uses:785 367 786 392 394 396 398Used by:788
Symbol 788 MovieClip {BenSamurai_fla._RunInstr_325}Uses:787Used by:809
Symbol 789 BitmapUsed by:790 793
Symbol 790 GraphicUses:789Used by:791
Symbol 791 MovieClipUses:790Used by:809
Symbol 792 BitmapUsed by:793
Symbol 793 GraphicUses:792 789Used by:794
Symbol 794 MovieClipUses:793Used by:809
Symbol 795 MovieClipUses:355 357 359Used by:809
Symbol 796 GraphicUsed by:809
Symbol 797 BitmapUsed by:798
Symbol 798 GraphicUses:797Used by:799
Symbol 799 MovieClipUses:798Used by:809
Symbol 800 MovieClipUses:202 208 506Used by:809
Symbol 801 MovieClip {BenSamurai_fla.Ben_saltaI_335}Uses:365 415 417 419 421 423 786 427 429 431 433 435 437Used by:802
Symbol 802 MovieClip {BenSamurai_fla._JumpI_334}Uses:801Used by:809
Symbol 803 MovieClip {BenSamurai_fla.Ben_agachauI_337}Uses:785 441 786Used by:804
Symbol 804 MovieClip {BenSamurai_fla._CrouchI_336}Uses:803Used by:809
Symbol 805 MovieClipUses:327 370 378 344 346 348 350 352Used by:806
Symbol 806 MovieClip {BenSamurai_fla.Ben_Torso_mccopy_340}Uses:805Used by:807
Symbol 807 MovieClip {BenSamurai_fla.Ben_corre_Bcopy_339}Uses:365 367 806 392 394 396 398Used by:808
Symbol 808 MovieClip {BenSamurai_fla._Runcopy_338}Uses:807Used by:809
Symbol 809 MovieClip {BenSamurai_fla.teclas_mc_319}Uses:784 788 773 791 794 795 796 799 800 802 804 808Used by:810
Symbol 810 MovieClipUses:772 809Used by:818
Symbol 811 MovieClip {BenSamurai_fla.maskpopupfinalecopy2_343}Uses:765Used by:817
Symbol 812 MovieClip {BenSamurai_fla.mascarapopupcopy_344}Uses:767Used by:817
Symbol 813 MovieClip {BenSamurai_fla.gradientpopupcopy4_345}Uses:759Used by:817
Symbol 814 MovieClip {BenSamurai_fla.gradientpopupcopy5_346}Uses:759Used by:817
Symbol 815 MovieClip {BenSamurai_fla.maskpopupfinalecopy3_347}Uses:4Used by:817
Symbol 816 MovieClip {BenSamurai_fla.gradientpopupcopy3_348}Uses:759Used by:817
Symbol 817 MovieClip {BenSamurai_fla.conenedorpopupcopy_342}Uses:811 764 812 763 757 813 814 747 750 753 756 815 816Used by:818
Symbol 818 MovieClip {assets.InstructionsAsset}Uses:84 744 99 102 104 770 810 817Used by:898
Symbol 819 EditableTextUses:53Used by:823
Symbol 820 EditableTextUses:142Used by:823
Symbol 821 EditableTextUses:143Used by:823
Symbol 822 EditableTextUses:143Used by:823
Symbol 823 MovieClip {BenSamurai_fla.TutorialTitle2Txt_350}Uses:819 820 821 822Used by:856
Symbol 824 BitmapUsed by:825
Symbol 825 GraphicUses:824 199Used by:826
Symbol 826 MovieClipUses:825Used by:855
Symbol 827 MovieClipUses:257 260 261 264Used by:855
Symbol 828 GraphicUsed by:829
Symbol 829 MovieClipUses:828Used by:850 851
Symbol 830 GraphicUsed by:831
Symbol 831 MovieClipUses:830Used by:850 851
Symbol 832 GraphicUsed by:833
Symbol 833 MovieClipUses:832Used by:850 851
Symbol 834 GraphicUsed by:835
Symbol 835 MovieClipUses:834Used by:838
Symbol 836 GraphicUsed by:837
Symbol 837 MovieClipUses:836Used by:838 850
Symbol 838 MovieClipUses:835 837Used by:850 851
Symbol 839 GraphicUsed by:840
Symbol 840 MovieClipUses:839Used by:850
Symbol 841 GraphicUsed by:842
Symbol 842 MovieClipUses:841Used by:850
Symbol 843 GraphicUsed by:844
Symbol 844 MovieClipUses:843Used by:850
Symbol 845 GraphicUsed by:846
Symbol 846 MovieClipUses:845Used by:850
Symbol 847 MovieClipUses:14 26 29 32 35 38 41 44 47 50Used by:850
Symbol 848 GraphicUsed by:849
Symbol 849 MovieClipUses:848Used by:850
Symbol 850 MovieClipUses:3 829 831 833 838 840 842 837 844 22 23 846 847 849 26 29 32 35 38 41 44 47 50Used by:855
Symbol 851 MovieClipUses:829 831 833 838Used by:852
Symbol 852 MovieClipUses:202 534 851Used by:855
Symbol 853 MovieClipUses:266 269Used by:855
Symbol 854 MovieClipUses:271 274Used by:855
Symbol 855 MovieClipUses:826 827 850 852 853 854Used by:856
Symbol 856 MovieClip {assets.InstructionsFourArmsAsset}Uses:84 823 99 102 104 855Used by:898
Symbol 857 GraphicUsed by:860
Symbol 858 GraphicUsed by:860
Symbol 859 GraphicUsed by:860
Symbol 860 MovieClipUses:857 858 859Used by:874
Symbol 861 GraphicUsed by:873
Symbol 862 GraphicUsed by:873
Symbol 863 GraphicUsed by:873
Symbol 864 GraphicUsed by:873
Symbol 865 GraphicUsed by:873
Symbol 866 GraphicUsed by:873
Symbol 867 GraphicUsed by:873
Symbol 868 GraphicUsed by:873
Symbol 869 GraphicUsed by:873
Symbol 870 GraphicUsed by:873
Symbol 871 GraphicUsed by:873
Symbol 872 GraphicUsed by:873
Symbol 873 MovieClip {BenSamurai_fla.fuegonaranja_389}Uses:861 862 863 864 865 866 867 868 869 870 871 872Used by:874 878
Symbol 874 MovieClip {ShotEnemyAsset}Uses:860 132 873Used by:898
Symbol 875 GraphicUsed by:876
Symbol 876 MovieClipUses:875Used by:877
Symbol 877 MovieClipUses:876Used by:878
Symbol 878 MovieClip {ShotFriendlyAsset}Uses:877 873Used by:898
Symbol 879 BitmapUsed by:880
Symbol 880 GraphicUses:879Used by:881
Symbol 881 MovieClipUses:880Used by:891
Symbol 882 BitmapUsed by:883
Symbol 883 GraphicUses:882Used by:884
Symbol 884 MovieClipUses:883Used by:891
Symbol 885 BitmapUsed by:886
Symbol 886 GraphicUses:885Used by:887
Symbol 887 MovieClipUses:886Used by:891
Symbol 888 BitmapUsed by:889
Symbol 889 GraphicUses:888Used by:890
Symbol 890 MovieClipUses:889Used by:891
Symbol 891 MovieClip {assets.TransitionAsset}Uses:881 884 887 890Used by:898
Symbol 892 BitmapUsed by:893
Symbol 893 GraphicUses:892Used by:897
Symbol 894 GraphicUsed by:895
Symbol 895 MovieClipUses:603 894Used by:897
Symbol 896 EditableTextUses:645Used by:897
Symbol 897 MovieClip {LoaderLevelAsset}Uses:893 895 896Used by:898
Symbol 898 MovieClip {BenSamurai_fla._Resources_1}Uses:190 277 325 509 538 564 689 692 706 713 171 716 719 722 737 818 856 874 878 891 897 151Used by:Timeline

Instance Names

"hitArea_mc"Symbol 52 MovieClip {pared4brazosXXZZ} Frame 1Symbol 5 MovieClip
"secuencia_mc"Symbol 52 MovieClip {pared4brazosXXZZ} Frame 1Symbol 12 MovieClip {BenSamurai_fla.secuenciaXXZZ_431}
"puntajePowerUp_txt"Symbol 57 MovieClip {BenSamurai_fla._puntajepowerups_428} Frame 1Symbol 54 EditableText
"puntajePowerUp_mc"Symbol 58 MovieClip {assets.CoinMCAsset} Frame 1Symbol 57 MovieClip {BenSamurai_fla._puntajepowerups_428}
"text_txt"Symbol 82 MovieClip {BenSamurai_fla.ContinueBtnTxt_24} Frame 1Symbol 81 EditableText
"container_mc"Symbol 84 MovieClip {Continue1BtnAsset} Frame 1Symbol 82 MovieClip {BenSamurai_fla.ContinueBtnTxt_24}
"hitArea_mc"Symbol 84 MovieClip {Continue1BtnAsset} Frame 1Symbol 83 MovieClip {BenSamurai_fla._SquareGeneral_19}
"scoreLabel_txt"Symbol 95 MovieClip {BenSamurai_fla.ScoreWonRText_418} Frame 1Symbol 85 EditableText
"score_txt"Symbol 95 MovieClip {BenSamurai_fla.ScoreWonRText_418} Frame 1Symbol 86 EditableText
"txt1_txt"Symbol 95 MovieClip {BenSamurai_fla.ScoreWonRText_418} Frame 1Symbol 87 EditableText
"txt2_txt"Symbol 95 MovieClip {BenSamurai_fla.ScoreWonRText_418} Frame 1Symbol 88 EditableText
"txt3_txt"Symbol 95 MovieClip {BenSamurai_fla.ScoreWonRText_418} Frame 1Symbol 89 EditableText
"txt4_txt"Symbol 95 MovieClip {BenSamurai_fla.ScoreWonRText_418} Frame 1Symbol 90 EditableText
"t1_txt"Symbol 95 MovieClip {BenSamurai_fla.ScoreWonRText_418} Frame 1Symbol 91 EditableText
"t2_txt"Symbol 95 MovieClip {BenSamurai_fla.ScoreWonRText_418} Frame 1Symbol 92 EditableText
"t3_txt"Symbol 95 MovieClip {BenSamurai_fla.ScoreWonRText_418} Frame 1Symbol 93 EditableText
"t4_txt"Symbol 95 MovieClip {BenSamurai_fla.ScoreWonRText_418} Frame 1Symbol 94 EditableText
"titles_txt"Symbol 97 MovieClip {BenSamurai_fla.ObjectivesTitleTxt_419} Frame 1Symbol 96 EditableText
"continue_btn"Symbol 112 MovieClip {assets.LevelWonAsset} Frame 1Symbol 84 MovieClip {Continue1BtnAsset}
"scoreTxt_mc"Symbol 112 MovieClip {assets.LevelWonAsset} Frame 1Symbol 95 MovieClip {BenSamurai_fla.ScoreWonRText_418}
"objectivesTitle_mc"Symbol 112 MovieClip {assets.LevelWonAsset} Frame 1Symbol 97 MovieClip {BenSamurai_fla.ObjectivesTitleTxt_419}
"progress_txt"Symbol 123 MovieClip {BenSamurai_fla.ProgressText_410} Frame 1Symbol 122 EditableText
"progressBar_mc"Symbol 131 MovieClip {PreloaderAsset} Frame 1Symbol 121 MovieClip
"progress_mc"Symbol 131 MovieClip {PreloaderAsset} Frame 1Symbol 123 MovieClip {BenSamurai_fla.ProgressText_410}
"text_txt"Symbol 149 MovieClip {BenSamurai_fla.CREDITSTitleTxt_401} Frame 1Symbol 141 EditableText
"text1_txt"Symbol 149 MovieClip {BenSamurai_fla.CREDITSTitleTxt_401} Frame 1Symbol 144 EditableText
"scoreLabel_txt"Symbol 149 MovieClip {BenSamurai_fla.CREDITSTitleTxt_401} Frame 1Symbol 146 EditableText
"score_txt"Symbol 149 MovieClip {BenSamurai_fla.CREDITSTitleTxt_401} Frame 1Symbol 147 EditableText
"continue_btn"Symbol 151 MovieClip {assets.CreditosAsset} Frame 1Symbol 84 MovieClip {Continue1BtnAsset}
"creditsTitle_mc"Symbol 151 MovieClip {assets.CreditosAsset} Frame 1Symbol 149 MovieClip {BenSamurai_fla.CREDITSTitleTxt_401}
"progress_txt"Symbol 177 MovieClip {BenSamurai_fla.ProgressTextcopy_6} Frame 1Symbol 176 EditableText
"text_txt"Symbol 180 MovieClip {BenSamurai_fla.PlayBtnTxt_17} Frame 1Symbol 179 EditableText
"container_mc"Symbol 182 MovieClip {PlayBtnAsset} Frame 1Symbol 180 MovieClip {BenSamurai_fla.PlayBtnTxt_17}
"hitArea_mc"Symbol 182 MovieClip {PlayBtnAsset} Frame 1Symbol 181 MovieClip
"logoContainer_mc"Symbol 190 MovieClip {assets.MainMenuAsset} Frame 1Symbol 174 MovieClip
"play_btn"Symbol 190 MovieClip {assets.MainMenuAsset} Frame 1Symbol 182 MovieClip {PlayBtnAsset}
"titles_txt"Symbol 196 MovieClip {BenSamurai_fla.TutorialTitleTxt_25} Frame 1Symbol 191 EditableText
"text1_txt"Symbol 196 MovieClip {BenSamurai_fla.TutorialTitleTxt_25} Frame 1Symbol 192 EditableText
"txt_2"Symbol 196 MovieClip {BenSamurai_fla.TutorialTitleTxt_25} Frame 1Symbol 193 EditableText
"txt_2b"Symbol 196 MovieClip {BenSamurai_fla.TutorialTitleTxt_25} Frame 1Symbol 194 EditableText
"txt_2c"Symbol 196 MovieClip {BenSamurai_fla.TutorialTitleTxt_25} Frame 1Symbol 195 EditableText
"continue_btn"Symbol 277 MovieClip {assets.InstructionsCannonBoltAsset} Frame 1Symbol 84 MovieClip {Continue1BtnAsset}
"objectivesTitle_mc"Symbol 277 MovieClip {assets.InstructionsCannonBoltAsset} Frame 1Symbol 196 MovieClip {BenSamurai_fla.TutorialTitleTxt_25}
"text_txt"Symbol 309 MovieClip {BenSamurai_fla.PlayAgainBtnTxt_68} Frame 1Symbol 308 EditableText
"container_mc"Symbol 312 MovieClip {PlayAgain2BtnAsset} Frame 1Symbol 309 MovieClip {BenSamurai_fla.PlayAgainBtnTxt_68}
"hitArea_mc"Symbol 312 MovieClip {PlayAgain2BtnAsset} Frame 1Symbol 310 MovieClip
"text_txt"Symbol 314 MovieClip {BenSamurai_fla.MainMenuBtnTxt_72} Frame 1Symbol 313 EditableText
"container_mc"Symbol 315 MovieClip {MainMenu2BtnAsset} Frame 1Symbol 314 MovieClip {BenSamurai_fla.MainMenuBtnTxt_72}
"hitArea_mc"Symbol 315 MovieClip {MainMenu2BtnAsset} Frame 1Symbol 310 MovieClip
"titles_txt"Symbol 321 MovieClip {BenSamurai_fla.GameWonTitleTxt_73} Frame 1Symbol 319 EditableText
"text_txt"Symbol 321 MovieClip {BenSamurai_fla.GameWonTitleTxt_73} Frame 1Symbol 320 EditableText
"scoreLabel_txt"Symbol 324 MovieClip {BenSamurai_fla.ScoreWonText_74} Frame 1Symbol 322 EditableText
"score_txt"Symbol 324 MovieClip {BenSamurai_fla.ScoreWonText_74} Frame 1Symbol 323 EditableText
"playAgain_btn"Symbol 325 MovieClip {assets.GameWonAsset} Frame 1Symbol 312 MovieClip {PlayAgain2BtnAsset}
"mainMenu_btn"Symbol 325 MovieClip {assets.GameWonAsset} Frame 1Symbol 315 MovieClip {MainMenu2BtnAsset}
"gameWonTitle_mc"Symbol 325 MovieClip {assets.GameWonAsset} Frame 1Symbol 321 MovieClip {BenSamurai_fla.GameWonTitleTxt_73}
"scoreTxt_mc"Symbol 325 MovieClip {assets.GameWonAsset} Frame 1Symbol 324 MovieClip {BenSamurai_fla.ScoreWonText_74}
"BenSuriken_mc"Symbol 361 MovieClip {BenSamurai_fla._Idle_76} Frame 3Symbol 360 MovieClip {BenSamurai_fla.Ben_Shurikenea_88}
"BenSuriken_mc"Symbol 390 MovieClip {BenSamurai_fla.Ben_Torso_mc_98} Frame 3Symbol 382 MovieClip {BenSamurai_fla.Ben_Torso_Ani_03_107}
"ben3_mc"Symbol 399 MovieClip {BenSamurai_fla.Ben_corre_B_94} Frame 1Symbol 390 MovieClip {BenSamurai_fla.Ben_Torso_mc_98}
"ben2_mc"Symbol 413 MovieClip {BenSamurai_fla._Run_93} Frame 1Symbol 399 MovieClip {BenSamurai_fla.Ben_corre_B_94}
"BenSuriken_mc"Symbol 425 MovieClip {BenSamurai_fla.Ben_Torso_mc2_125} Frame 3Symbol 382 MovieClip {BenSamurai_fla.Ben_Torso_Ani_03_107}
"ben3_mc"Symbol 438 MovieClip {BenSamurai_fla.Ben_salta_119} Frame 1Symbol 425 MovieClip {BenSamurai_fla.Ben_Torso_mc2_125}
"ben2_mc"Symbol 439 MovieClip {BenSamurai_fla._Jump_118} Frame 1Symbol 438 MovieClip {BenSamurai_fla.Ben_salta_119}
"BenSuriken_mc"Symbol 445 MovieClip {BenSamurai_fla.Ben_Torso_02_mc3_136} Frame 3Symbol 382 MovieClip {BenSamurai_fla.Ben_Torso_Ani_03_107}
"ben3_mc"Symbol 446 MovieClip {BenSamurai_fla.Ben_agachau_134} Frame 1Symbol 445 MovieClip {BenSamurai_fla.Ben_Torso_02_mc3_136}
"ben2_mc"Symbol 447 MovieClip {BenSamurai_fla._Crouch_133} Frame 1Symbol 446 MovieClip {BenSamurai_fla.Ben_agachau_134}
"ben1_mc"Symbol 451 MovieClip {BenSamurai_fla._Hit_140} Frame 1Symbol 450 MovieClip {BenSamurai_fla.Ben_hit_141}
"ArmsLeft_mc"Symbol 496 MovieClip {BenSamurai_fla.Fourarms_Idle_150} Frame 1Symbol 470 MovieClip {BenSamurai_fla.Fourarms_brazos_izq_mc_151}
"ArmsRight_mc"Symbol 496 MovieClip {BenSamurai_fla.Fourarms_Idle_150} Frame 1Symbol 495 MovieClip {BenSamurai_fla.Fourarms_Torso_mc_160}
"FourArms2_mc"Symbol 497 MovieClip {BenSamurai_fla._Idle_149} Frame 1Symbol 496 MovieClip {BenSamurai_fla.Fourarms_Idle_150}
"ben_mc"Symbol 509 MovieClip {BenSamuraiAsset} Frame 1Symbol 361 MovieClip {BenSamurai_fla._Idle_76}
"LugarSuriken_mc"Symbol 509 MovieClip {BenSamuraiAsset} Frame 1Symbol 362 MovieClip
"hitAreaAttack_mc"Symbol 509 MovieClip {BenSamuraiAsset} Frame 1Symbol 362 MovieClip
"hitArea_mc"Symbol 509 MovieClip {BenSamuraiAsset} Frame 1Symbol 362 MovieClip
"ben_mc"Symbol 509 MovieClip {BenSamuraiAsset} Frame 2Symbol 413 MovieClip {BenSamurai_fla._Run_93}
"ben_mc"Symbol 509 MovieClip {BenSamuraiAsset} Frame 3Symbol 439 MovieClip {BenSamurai_fla._Jump_118}
"ben_mc"Symbol 509 MovieClip {BenSamuraiAsset} Frame 4Symbol 447 MovieClip {BenSamurai_fla._Crouch_133}
"ben_mc"Symbol 509 MovieClip {BenSamuraiAsset} Frame 5Symbol 451 MovieClip {BenSamurai_fla._Hit_140}
"ben_mc"Symbol 509 MovieClip {BenSamuraiAsset} Frame 6Symbol 459 MovieClip {BenSamurai_fla._Die_143}
"ben_mc"Symbol 509 MovieClip {BenSamuraiAsset} Frame 6Symbol 459 MovieClip {BenSamurai_fla._Die_143}
"ArmsLeft_mc"Symbol 528 MovieClip {BenSamurai_fla.Fourarms_camina_184} Frame 1Symbol 511 MovieClip {BenSamurai_fla.Fourarms_Brazos_Izq_mccopy_185}
"ArmsRight_mc"Symbol 528 MovieClip {BenSamurai_fla.Fourarms_camina_184} Frame 1Symbol 495 MovieClip {BenSamurai_fla.Fourarms_Torso_mc_160}
"FourArms2_mc"Symbol 529 MovieClip {BenSamurai_fla._Run_183} Frame 1Symbol 528 MovieClip {BenSamurai_fla.Fourarms_camina_184}
"FourArms_mc"Symbol 538 MovieClip {FourArmsAsset} Frame 1Symbol 497 MovieClip {BenSamurai_fla._Idle_149}
"hitAreaAttack_mc"Symbol 538 MovieClip {FourArmsAsset} Frame 1Symbol 362 MovieClip
"hitArea_mc"Symbol 538 MovieClip {FourArmsAsset} Frame 1Symbol 362 MovieClip
"FourArms_mc"Symbol 538 MovieClip {FourArmsAsset} Frame 2Symbol 529 MovieClip {BenSamurai_fla._Run_183}
"hitArea_mc"Symbol 564 MovieClip {CannonBoltAsset} Frame 1Symbol 362 MovieClip
"hitAreaAttack_mc"Symbol 564 MovieClip {CannonBoltAsset} Frame 1Symbol 362 MovieClip
"hitArea_mc"Symbol 573 MovieClip {HelpBtn} Frame 1Symbol 568 MovieClip
"anim_mc"Symbol 573 MovieClip {HelpBtn} Frame 2Symbol 570 MovieClip {BenSamurai_fla.HelpBtnOver_218}
"anim_mc"Symbol 573 MovieClip {HelpBtn} Frame 4Symbol 572 MovieClip {BenSamurai_fla.HelpBtnOut_221}
"muted_mc"Symbol 584 MovieClip {SndBtn} Frame 1Symbol 578 MovieClip
"hitArea_mc"Symbol 584 MovieClip {SndBtn} Frame 1Symbol 579 MovieClip
"anim_mc"Symbol 584 MovieClip {SndBtn} Frame 2Symbol 581 MovieClip {BenSamurai_fla.BtnOver_226}
"anim_mc"Symbol 584 MovieClip {SndBtn} Frame 4Symbol 583 MovieClip {BenSamurai_fla.BtnOut_229}
"barra_mc"Symbol 595 MovieClip {BenSamurai_fla.barradevida_230} Frame 1Symbol 594 MovieClip {BenSamurai_fla.barradevida_231}
"barra_mc"Symbol 609 MovieClip {BenSamurai_fla.BarradeTransformacion_234} Frame 1Symbol 607 MovieClip {BenSamurai_fla.barradedescarga_235}
"barra_mc"Symbol 609 MovieClip {BenSamurai_fla.BarradeTransformacion_234} Frame 2Symbol 608 MovieClip {BenSamurai_fla.barradecarga_241}
"barra_mc"Symbol 649 MovieClip {BenSamurai_fla.bosslife_255} Frame 1Symbol 642 MovieClip {BenSamurai_fla.barradevidabos_256}
"bossName_txt"Symbol 649 MovieClip {BenSamurai_fla.bosslife_255} Frame 1Symbol 646 EditableText
"numeroVida_txt"Symbol 654 MovieClip {BenSamurai_fla.Vidas_258} Frame 1Symbol 653 EditableText
"scoreLbl_txt"Symbol 657 MovieClip {BenSamurai_fla.puntaje_259} Frame 1Symbol 655 EditableText
"score_txt"Symbol 657 MovieClip {BenSamurai_fla.puntaje_259} Frame 1Symbol 656 EditableText
"alienSelection_txt"Symbol 688 MovieClip {BenSamurai_fla.elecciondepersonaje_260} Frame 1Symbol 680 EditableText
"help_btn"Symbol 689 MovieClip {assets.HUDAsset} Frame 1Symbol 573 MovieClip {HelpBtn}
"sound_btn"Symbol 689 MovieClip {assets.HUDAsset} Frame 1Symbol 584 MovieClip {SndBtn}
"barraDeVida_mc"Symbol 689 MovieClip {assets.HUDAsset} Frame 1Symbol 595 MovieClip {BenSamurai_fla.barradevida_230}
"barraTransformacion_mc"Symbol 689 MovieClip {assets.HUDAsset} Frame 1Symbol 609 MovieClip {BenSamurai_fla.BarradeTransformacion_234}
"personajeHud_mc"Symbol 689 MovieClip {assets.HUDAsset} Frame 1Symbol 636 MovieClip {BenSamurai_fla.personajeshud_242}
"bossFinal_mc"Symbol 689 MovieClip {assets.HUDAsset} Frame 1Symbol 649 MovieClip {BenSamurai_fla.bosslife_255}
"numeroVida_mc"Symbol 689 MovieClip {assets.HUDAsset} Frame 1Symbol 654 MovieClip {BenSamurai_fla.Vidas_258}
"score_mc"Symbol 689 MovieClip {assets.HUDAsset} Frame 1Symbol 657 MovieClip {BenSamurai_fla.puntaje_259}
"eleccion_mc"Symbol 689 MovieClip {assets.HUDAsset} Frame 1Symbol 688 MovieClip {BenSamurai_fla.elecciondepersonaje_260}
"levelindicator_txt"Symbol 691 MovieClip {BenSamurai_fla.levelindicatormove_275} Frame 1Symbol 690 EditableText
"levelIndicator_mc"Symbol 692 MovieClip {assets.LevelIndicatorAsset} Frame 1Symbol 691 MovieClip {BenSamurai_fla.levelindicatormove_275}
"levelIndicator2_mc"Symbol 692 MovieClip {assets.LevelIndicatorAsset} Frame 1Symbol 691 MovieClip {BenSamurai_fla.levelindicatormove_275}
"text_txt"Symbol 724 MovieClip {BenSamurai_fla.PlayAgainBtnTxt_296} Frame 1Symbol 723 EditableText
"container_mc"Symbol 725 MovieClip {PlayAgain1BtnAsset} Frame 1Symbol 724 MovieClip {BenSamurai_fla.PlayAgainBtnTxt_296}
"hitArea_mc"Symbol 725 MovieClip {PlayAgain1BtnAsset} Frame 1Symbol 83 MovieClip {BenSamurai_fla._SquareGeneral_19}
"text_txt"Symbol 727 MovieClip {BenSamurai_fla.MainMenuBtnTxt_298} Frame 1Symbol 726 EditableText
"container_mc"Symbol 728 MovieClip {MainMenu1BtnAsset} Frame 1Symbol 727 MovieClip {BenSamurai_fla.MainMenuBtnTxt_298}
"hitArea_mc"Symbol 728 MovieClip {MainMenu1BtnAsset} Frame 1Symbol 83 MovieClip {BenSamurai_fla._SquareGeneral_19}
"scoreTxt_mc"Symbol 730 MovieClip {BenSamurai_fla.ScoreText_299} Frame 1Symbol 324 MovieClip {BenSamurai_fla.ScoreWonText_74}
"text_txt"Symbol 733 MovieClip {BenSamurai_fla.GameLostTitleTxt_300} Frame 1Symbol 731 EditableText
"titles_txt"Symbol 733 MovieClip {BenSamurai_fla.GameLostTitleTxt_300} Frame 1Symbol 732 EditableText
"playAgain_btn"Symbol 737 MovieClip {assets.GameLostAsset} Frame 1Symbol 725 MovieClip {PlayAgain1BtnAsset}
"mainMenu_btn"Symbol 737 MovieClip {assets.GameLostAsset} Frame 1Symbol 728 MovieClip {MainMenu1BtnAsset}
"score_mc"Symbol 737 MovieClip {assets.GameLostAsset} Frame 1Symbol 730 MovieClip {BenSamurai_fla.ScoreText_299}
"gameLostTitle_mc"Symbol 737 MovieClip {assets.GameLostAsset} Frame 1Symbol 733 MovieClip {BenSamurai_fla.GameLostTitleTxt_300}
"text_txt"Symbol 744 MovieClip {BenSamurai_fla.InstructionsTitleTxt_303} Frame 1Symbol 738 EditableText
"text1_txt"Symbol 744 MovieClip {BenSamurai_fla.InstructionsTitleTxt_303} Frame 1Symbol 739 EditableText
"txt_2"Symbol 744 MovieClip {BenSamurai_fla.InstructionsTitleTxt_303} Frame 1Symbol 740 EditableText
"txt_2a"Symbol 744 MovieClip {BenSamurai_fla.InstructionsTitleTxt_303} Frame 1Symbol 741 EditableText
"txt_2b"Symbol 744 MovieClip {BenSamurai_fla.InstructionsTitleTxt_303} Frame 1Symbol 742 EditableText
"txt_2c"Symbol 744 MovieClip {BenSamurai_fla.InstructionsTitleTxt_303} Frame 1Symbol 743 EditableText
"ben3_mc"Symbol 787 MovieClip {BenSamurai_fla.Ben_corre_Inst_326} Frame 1Symbol 786 MovieClip
"ben2_mc"Symbol 788 MovieClip {BenSamurai_fla._RunInstr_325} Frame 1Symbol 787 MovieClip {BenSamurai_fla.Ben_corre_Inst_326}
"ben3_mc"Symbol 801 MovieClip {BenSamurai_fla.Ben_saltaI_335} Frame 1Symbol 786 MovieClip
"ben2_mc"Symbol 802 MovieClip {BenSamurai_fla._JumpI_334} Frame 1Symbol 801 MovieClip {BenSamurai_fla.Ben_saltaI_335}
"ben3_mc"Symbol 803 MovieClip {BenSamurai_fla.Ben_agachauI_337} Frame 1Symbol 786 MovieClip
"ben2_mc"Symbol 804 MovieClip {BenSamurai_fla._CrouchI_336} Frame 1Symbol 803 MovieClip {BenSamurai_fla.Ben_agachauI_337}
"ben3_mc"Symbol 807 MovieClip {BenSamurai_fla.Ben_corre_Bcopy_339} Frame 1Symbol 806 MovieClip {BenSamurai_fla.Ben_Torso_mccopy_340}
"ben2_mc"Symbol 808 MovieClip {BenSamurai_fla._Runcopy_338} Frame 1Symbol 807 MovieClip {BenSamurai_fla.Ben_corre_Bcopy_339}
"ben_mc"Symbol 809 MovieClip {BenSamurai_fla.teclas_mc_319} Frame 53Symbol 808 MovieClip {BenSamurai_fla._Runcopy_338}
"continue_btn"Symbol 818 MovieClip {assets.InstructionsAsset} Frame 1Symbol 84 MovieClip {Continue1BtnAsset}
"instructionsTitle_mc"Symbol 818 MovieClip {assets.InstructionsAsset} Frame 1Symbol 744 MovieClip {BenSamurai_fla.InstructionsTitleTxt_303}
"titles_txt"Symbol 823 MovieClip {BenSamurai_fla.TutorialTitle2Txt_350} Frame 1Symbol 819 EditableText
"text1_txt"Symbol 823 MovieClip {BenSamurai_fla.TutorialTitle2Txt_350} Frame 1Symbol 820 EditableText
"txt_2b"Symbol 823 MovieClip {BenSamurai_fla.TutorialTitle2Txt_350} Frame 1Symbol 821 EditableText
"txt_2c"Symbol 823 MovieClip {BenSamurai_fla.TutorialTitle2Txt_350} Frame 1Symbol 822 EditableText
"continue_btn"Symbol 856 MovieClip {assets.InstructionsFourArmsAsset} Frame 1Symbol 84 MovieClip {Continue1BtnAsset}
"objectivesTitle_mc"Symbol 856 MovieClip {assets.InstructionsFourArmsAsset} Frame 1Symbol 823 MovieClip {BenSamurai_fla.TutorialTitle2Txt_350}
"hitArea_mc"Symbol 874 MovieClip {ShotEnemyAsset} Frame 1Symbol 132 MovieClip
"loading_txt"Symbol 897 MovieClip {LoaderLevelAsset} Frame 1Symbol 896 EditableText

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS3.

Labels

"preloader"Frame 1
"resources"Frame 2
"game"Frame 3
"secuenciaUno"Symbol 12 MovieClip {BenSamurai_fla.secuenciaXXZZ_431} Frame 1
"secuenciaDos"Symbol 12 MovieClip {BenSamurai_fla.secuenciaXXZZ_431} Frame 2
"secuenciaTres"Symbol 12 MovieClip {BenSamurai_fla.secuenciaXXZZ_431} Frame 3
"secuenciaCuatro"Symbol 12 MovieClip {BenSamurai_fla.secuenciaXXZZ_431} Frame 4
"secuenciaCompletada"Symbol 12 MovieClip {BenSamurai_fla.secuenciaXXZZ_431} Frame 5
"idle"Symbol 52 MovieClip {pared4brazosXXZZ} Frame 1
"hit"Symbol 52 MovieClip {pared4brazosXXZZ} Frame 2
"hitIdle"Symbol 52 MovieClip {pared4brazosXXZZ} Frame 3
"destroyed"Symbol 52 MovieClip {pared4brazosXXZZ} Frame 4
"_up"Symbol 84 MovieClip {Continue1BtnAsset} Frame 1
"_over"Symbol 84 MovieClip {Continue1BtnAsset} Frame 2
"_down"Symbol 84 MovieClip {Continue1BtnAsset} Frame 3
"Start"Symbol 112 MovieClip {assets.LevelWonAsset} Frame 2
"End"Symbol 112 MovieClip {assets.LevelWonAsset} Frame 13
"Start"Symbol 151 MovieClip {assets.CreditosAsset} Frame 2
"End"Symbol 151 MovieClip {assets.CreditosAsset} Frame 17
"_up"Symbol 182 MovieClip {PlayBtnAsset} Frame 1
"_over"Symbol 182 MovieClip {PlayBtnAsset} Frame 2
"_down"Symbol 182 MovieClip {PlayBtnAsset} Frame 3
"Start"Symbol 190 MovieClip {assets.MainMenuAsset} Frame 2
"End"Symbol 190 MovieClip {assets.MainMenuAsset} Frame 133
"FadeInComplete"Symbol 190 MovieClip {assets.MainMenuAsset} Frame 134
"Start"Symbol 277 MovieClip {assets.InstructionsCannonBoltAsset} Frame 2
"End"Symbol 277 MovieClip {assets.InstructionsCannonBoltAsset} Frame 13
"_up"Symbol 312 MovieClip {PlayAgain2BtnAsset} Frame 1
"_over"Symbol 312 MovieClip {PlayAgain2BtnAsset} Frame 2
"_down"Symbol 312 MovieClip {PlayAgain2BtnAsset} Frame 3
"_up"Symbol 315 MovieClip {MainMenu2BtnAsset} Frame 1
"_over"Symbol 315 MovieClip {MainMenu2BtnAsset} Frame 2
"_down"Symbol 315 MovieClip {MainMenu2BtnAsset} Frame 3
"Start"Symbol 325 MovieClip {assets.GameWonAsset} Frame 2
"End"Symbol 325 MovieClip {assets.GameWonAsset} Frame 98
"idle"Symbol 361 MovieClip {BenSamurai_fla._Idle_76} Frame 1
"sword"Symbol 361 MovieClip {BenSamurai_fla._Idle_76} Frame 2
"shuriken"Symbol 361 MovieClip {BenSamurai_fla._Idle_76} Frame 3
"corre"Symbol 365 MovieClip {BenSamurai_fla.Ben_Espadol_mc_95} Frame 1
"espada"Symbol 365 MovieClip {BenSamurai_fla.Ben_Espadol_mc_95} Frame 2
"shuriken"Symbol 365 MovieClip {BenSamurai_fla.Ben_Espadol_mc_95} Frame 3
"run"Symbol 390 MovieClip {BenSamurai_fla.Ben_Torso_mc_98} Frame 1
"sword"Symbol 390 MovieClip {BenSamurai_fla.Ben_Torso_mc_98} Frame 2
"shuriken"Symbol 390 MovieClip {BenSamurai_fla.Ben_Torso_mc_98} Frame 3
"sword1"Symbol 390 MovieClip {BenSamurai_fla.Ben_Torso_mc_98} Frame 4
"run"Symbol 425 MovieClip {BenSamurai_fla.Ben_Torso_mc2_125} Frame 1
"sword"Symbol 425 MovieClip {BenSamurai_fla.Ben_Torso_mc2_125} Frame 2
"shuriken"Symbol 425 MovieClip {BenSamurai_fla.Ben_Torso_mc2_125} Frame 3
"sword1"Symbol 425 MovieClip {BenSamurai_fla.Ben_Torso_mc2_125} Frame 4
"sube"Symbol 438 MovieClip {BenSamurai_fla.Ben_salta_119} Frame 1
"baja"Symbol 438 MovieClip {BenSamurai_fla.Ben_salta_119} Frame 6
"run"Symbol 445 MovieClip {BenSamurai_fla.Ben_Torso_02_mc3_136} Frame 1
"sword"Symbol 445 MovieClip {BenSamurai_fla.Ben_Torso_02_mc3_136} Frame 2
"shuriken"Symbol 445 MovieClip {BenSamurai_fla.Ben_Torso_02_mc3_136} Frame 3
"sword1"Symbol 445 MovieClip {BenSamurai_fla.Ben_Torso_02_mc3_136} Frame 4
"idle"Symbol 470 MovieClip {BenSamurai_fla.Fourarms_brazos_izq_mc_151} Frame 1
"run"Symbol 470 MovieClip {BenSamurai_fla.Fourarms_brazos_izq_mc_151} Frame 2
"armsRight"Symbol 470 MovieClip {BenSamurai_fla.Fourarms_brazos_izq_mc_151} Frame 3
"armsLeft"Symbol 470 MovieClip {BenSamurai_fla.Fourarms_brazos_izq_mc_151} Frame 4
"idle"Symbol 495 MovieClip {BenSamurai_fla.Fourarms_Torso_mc_160} Frame 1
"run"Symbol 495 MovieClip {BenSamurai_fla.Fourarms_Torso_mc_160} Frame 2
"armsRight"Symbol 495 MovieClip {BenSamurai_fla.Fourarms_Torso_mc_160} Frame 3
"armsLeft"Symbol 495 MovieClip {BenSamurai_fla.Fourarms_Torso_mc_160} Frame 4
"idle"Symbol 509 MovieClip {BenSamuraiAsset} Frame 1
"run"Symbol 509 MovieClip {BenSamuraiAsset} Frame 2
"jump"Symbol 509 MovieClip {BenSamuraiAsset} Frame 3
"crouch"Symbol 509 MovieClip {BenSamuraiAsset} Frame 4
"hit"Symbol 509 MovieClip {BenSamuraiAsset} Frame 5
"die"Symbol 509 MovieClip {BenSamuraiAsset} Frame 6
"FourArms_idle"Symbol 509 MovieClip {BenSamuraiAsset} Frame 7
"FourArms_run"Symbol 509 MovieClip {BenSamuraiAsset} Frame 8
"CannonBolt_idle"Symbol 509 MovieClip {BenSamuraiAsset} Frame 9
"CannonBolt_run"Symbol 509 MovieClip {BenSamuraiAsset} Frame 10
"idle"Symbol 511 MovieClip {BenSamurai_fla.Fourarms_Brazos_Izq_mccopy_185} Frame 1
"run"Symbol 511 MovieClip {BenSamurai_fla.Fourarms_Brazos_Izq_mccopy_185} Frame 2
"armsRight"Symbol 511 MovieClip {BenSamurai_fla.Fourarms_Brazos_Izq_mccopy_185} Frame 3
"armsLeft"Symbol 511 MovieClip {BenSamurai_fla.Fourarms_Brazos_Izq_mccopy_185} Frame 4
"idle"Symbol 538 MovieClip {FourArmsAsset} Frame 1
"run"Symbol 538 MovieClip {FourArmsAsset} Frame 2
"hit"Symbol 538 MovieClip {FourArmsAsset} Frame 3
"BenSamurai_idle"Symbol 538 MovieClip {FourArmsAsset} Frame 4
"BenSamurai_run"Symbol 538 MovieClip {FourArmsAsset} Frame 5
"jump"Symbol 538 MovieClip {FourArmsAsset} Frame 6
"run"Symbol 564 MovieClip {CannonBoltAsset} Frame 1
"fast"Symbol 564 MovieClip {CannonBoltAsset} Frame 2
"test"Symbol 564 MovieClip {CannonBoltAsset} Frame 3
"idle"Symbol 564 MovieClip {CannonBoltAsset} Frame 4
"BenSamurai_idle"Symbol 564 MovieClip {CannonBoltAsset} Frame 5
"BenSamurai_run"Symbol 564 MovieClip {CannonBoltAsset} Frame 6
"hitidle"Symbol 564 MovieClip {CannonBoltAsset} Frame 7
"hitrun"Symbol 564 MovieClip {CannonBoltAsset} Frame 8
"attack"Symbol 564 MovieClip {CannonBoltAsset} Frame 9
"_up"Symbol 573 MovieClip {HelpBtn} Frame 1
"_over"Symbol 573 MovieClip {HelpBtn} Frame 2
"_down"Symbol 573 MovieClip {HelpBtn} Frame 3
"_out"Symbol 573 MovieClip {HelpBtn} Frame 4
"_up"Symbol 584 MovieClip {SndBtn} Frame 1
"_over"Symbol 584 MovieClip {SndBtn} Frame 2
"_down"Symbol 584 MovieClip {SndBtn} Frame 3
"_out"Symbol 584 MovieClip {SndBtn} Frame 4
"descarga_mc"Symbol 609 MovieClip {BenSamurai_fla.BarradeTransformacion_234} Frame 1
"carga_mc"Symbol 609 MovieClip {BenSamurai_fla.BarradeTransformacion_234} Frame 2
"caraBen"Symbol 636 MovieClip {BenSamurai_fla.personajeshud_242} Frame 1
"caraCuatroBrazos"Symbol 636 MovieClip {BenSamurai_fla.personajeshud_242} Frame 2
"caraCannonbolt"Symbol 636 MovieClip {BenSamurai_fla.personajeshud_242} Frame 3
"jefeUno_mc"Symbol 649 MovieClip {BenSamurai_fla.bosslife_255} Frame 1
"jefeDos_mc"Symbol 649 MovieClip {BenSamurai_fla.bosslife_255} Frame 2
"jefeTres_mc"Symbol 649 MovieClip {BenSamurai_fla.bosslife_255} Frame 3
"idle"Symbol 688 MovieClip {BenSamurai_fla.elecciondepersonaje_260} Frame 1
"cuatroBrazos"Symbol 688 MovieClip {BenSamurai_fla.elecciondepersonaje_260} Frame 2
"cannonBolt"Symbol 688 MovieClip {BenSamurai_fla.elecciondepersonaje_260} Frame 3
"Start"Symbol 692 MovieClip {assets.LevelIndicatorAsset} Frame 2
"End"Symbol 692 MovieClip {assets.LevelIndicatorAsset} Frame 22
"_up"Symbol 725 MovieClip {PlayAgain1BtnAsset} Frame 1
"_over"Symbol 725 MovieClip {PlayAgain1BtnAsset} Frame 2
"_down"Symbol 725 MovieClip {PlayAgain1BtnAsset} Frame 3
"_up"Symbol 728 MovieClip {MainMenu1BtnAsset} Frame 1
"_over"Symbol 728 MovieClip {MainMenu1BtnAsset} Frame 2
"_down"Symbol 728 MovieClip {MainMenu1BtnAsset} Frame 3
"Start"Symbol 737 MovieClip {assets.GameLostAsset} Frame 2
"End"Symbol 737 MovieClip {assets.GameLostAsset} Frame 13
"corre"Symbol 785 MovieClip {BenSamurai_fla.Ben_Espadol_mcI_327} Frame 1
"sube"Symbol 801 MovieClip {BenSamurai_fla.Ben_saltaI_335} Frame 1
"baja"Symbol 801 MovieClip {BenSamurai_fla.Ben_saltaI_335} Frame 6
"run"Symbol 806 MovieClip {BenSamurai_fla.Ben_Torso_mccopy_340} Frame 1
"Start"Symbol 818 MovieClip {assets.InstructionsAsset} Frame 2
"End"Symbol 818 MovieClip {assets.InstructionsAsset} Frame 21
"Start"Symbol 856 MovieClip {assets.InstructionsFourArmsAsset} Frame 2
"End"Symbol 856 MovieClip {assets.InstructionsFourArmsAsset} Frame 13
"idle"Symbol 874 MovieClip {ShotEnemyAsset} Frame 1
"destroyed"Symbol 874 MovieClip {ShotEnemyAsset} Frame 2
"idle"Symbol 878 MovieClip {ShotFriendlyAsset} Frame 1
"destroyed"Symbol 878 MovieClip {ShotFriendlyAsset} Frame 2
"Start"Symbol 891 MovieClip {assets.TransitionAsset} Frame 2
"End"Symbol 891 MovieClip {assets.TransitionAsset} Frame 29




http://swfchan.com/47/233332/info.shtml
Created: 14/3 -2020 07:12:15 Last modified: 7/1 -2024 23:53:01 Server time: 05/11 -2024 09:31:19