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

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

Blast Passage.swf

This is the info page for
Flash #136274

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


Text
PASSAGE

Click to start. Game starts in ## seconds

<p align="center"><font face="Agency FB" size="24" color="#000000" letterSpacing="0.000000" kerning="1"><b>Björnen styrs med piltagenterna på tangentbordet. </b></font></p><p align="center"><font face="Agency FB" size="24" color="#000000" letterSpacing="0.000000" kerning="1"><b>Tangenbordet är framför monitorn.</b></font></p><p align="center"></p><p align="center"></p><p align="center"></p><p align="center"></p>

<p align="right"><font face="Agency FB" size="28" color="#cccccc" letterSpacing="0.000000" kerning="1"><b>Total score:</b></font></p>

<p align="right"><font face="Agency FB" size="28" color="#cccccc" letterSpacing="0.000000" kerning="1"><b>Bonus:</b></font></p>

<p align="right"><font face="Agency FB" size="28" color="#cccccc" letterSpacing="0.000000" kerning="1"><b>Score:</b></font></p>

<p align="left"><font face="Agency FB" size="28" color="#cccccc" letterSpacing="0.000000" kerning="1"><b>250087</b></font></p>

<p align="left"><font face="Agency FB" size="28" color="#cccccc" letterSpacing="0.000000" kerning="1"><b>250087</b></font></p>

<p align="left"><font face="Agency FB" size="28" color="#cccccc" letterSpacing="0.000000" kerning="1"><b>250087</b></font></p>

<p align="center"><font face="Blocked" size="38" color="#6fd6ec" letterSpacing="0.000000" kerning="1">GAME OVER!</font></p>

<p align="right"><font face="Agency FB" size="28" color="#cccccc" letterSpacing="0.000000" kerning="1"><b>Bonus:</b></font></p>

<p align="left"><font face="Agency FB" size="28" color="#cccccc" letterSpacing="0.000000" kerning="1"><b>250087</b></font></p>

Mr. BomBear is stuck on
the shady side of Planet X
and he’s quickly running
out of oxygen. Blast a
passage for him through
the dangerous monsters
inside the planet to reach
the sunny side…good luck!

Press space to play!

12345678

Submit score

Play again

12345678

score:

Lives left:

10

<- Menu

<p align="right"><font face="Agency FB" size="18" color="#00d2d2" letterSpacing="0.000000" kerning="1"><b>9</b></font></p>

<p align="right"><font face="Agency FB" size="18" color="#00d2d2" letterSpacing="0.000000" kerning="1"><b>9</b></font></p>

<p align="right"><font face="Agency FB" size="18" color="#00d2d2" letterSpacing="0.000000" kerning="1"><b>9</b></font></p>

<p align="right"><font face="Agency FB" size="18" color="#00d2d2" letterSpacing="0.000000" kerning="1"><b>9</b></font></p>

<p align="center"><font face="Agency FB" size="22" color="#b5f9fb" letterSpacing="0.000000" kerning="1"><b>456789</b></font></p>

<p align="center"><font face="Bauhaus 93" size="10" color="#ffffff" letterSpacing="0.000000" kerning="1">100.0%</font></p>

<p align="center"><font face="Bauhaus 93" size="18" color="#333333" letterSpacing="0.000000" kerning="1">4:00</font></p>

<p align="center"><font face="Bauhaus 93" size="14" color="#ffffff" letterSpacing="0.000000" kerning="1">Score:</font></p>

FPS:

<p align="left"></p>

Click to focus!

This site does not support this game.
Please visit King.com to play.

ActionScript [AS3]

Section 1
//BombSheet (art.BombSheet) package art { import flash.display.*; public dynamic class BombSheet extends BitmapData { public function BombSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 2
//BulletSheet (art.BulletSheet) package art { import flash.display.*; public dynamic class BulletSheet extends BitmapData { public function BulletSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 3
//DeathAnimSheet (art.DeathAnimSheet) package art { import flash.display.*; public dynamic class DeathAnimSheet extends BitmapData { public function DeathAnimSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 4
//DeathSheet (art.DeathSheet) package art { import flash.display.*; public dynamic class DeathSheet extends BitmapData { public function DeathSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 5
//DemonSheet (art.DemonSheet) package art { import flash.display.*; public dynamic class DemonSheet extends BitmapData { public function DemonSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 6
//DoorSheet (art.DoorSheet) package art { import flash.display.*; public dynamic class DoorSheet extends BitmapData { public function DoorSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 7
//FireballSheet (art.FireballSheet) package art { import flash.display.*; public dynamic class FireballSheet extends BitmapData { public function FireballSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 8
//FireSheet (art.FireSheet) package art { import flash.display.*; public dynamic class FireSheet extends BitmapData { public function FireSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 9
//FireSheet2 (art.FireSheet2) package art { import flash.display.*; public dynamic class FireSheet2 extends BitmapData { public function FireSheet2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 10
//FloorSheet1 (art.FloorSheet1) package art { import flash.display.*; public dynamic class FloorSheet1 extends BitmapData { public function FloorSheet1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 11
//FloorSheet2 (art.FloorSheet2) package art { import flash.display.*; public dynamic class FloorSheet2 extends BitmapData { public function FloorSheet2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 12
//FloorSheet3 (art.FloorSheet3) package art { import flash.display.*; public dynamic class FloorSheet3 extends BitmapData { public function FloorSheet3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 13
//FloorSheet4 (art.FloorSheet4) package art { import flash.display.*; public dynamic class FloorSheet4 extends BitmapData { public function FloorSheet4(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 14
//FloorSheet5 (art.FloorSheet5) package art { import flash.display.*; public dynamic class FloorSheet5 extends BitmapData { public function FloorSheet5(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 15
//GhostSheet (art.GhostSheet) package art { import flash.display.*; public dynamic class GhostSheet extends BitmapData { public function GhostSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 16
//GruntSheet (art.GruntSheet) package art { import flash.display.*; public dynamic class GruntSheet extends BitmapData { public function GruntSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 17
//HouseSheet0 (art.HouseSheet0) package art { import flash.display.*; public dynamic class HouseSheet0 extends BitmapData { public function HouseSheet0(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 18
//HouseSheet1 (art.HouseSheet1) package art { import flash.display.*; public dynamic class HouseSheet1 extends BitmapData { public function HouseSheet1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 19
//HouseSheet2 (art.HouseSheet2) package art { import flash.display.*; public dynamic class HouseSheet2 extends BitmapData { public function HouseSheet2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 20
//HouseSheet3 (art.HouseSheet3) package art { import flash.display.*; public dynamic class HouseSheet3 extends BitmapData { public function HouseSheet3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 21
//LobberSheet (art.LobberSheet) package art { import flash.display.*; public dynamic class LobberSheet extends BitmapData { public function LobberSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 22
//PickupSheet (art.PickupSheet) package art { import flash.display.*; public dynamic class PickupSheet extends BitmapData { public function PickupSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 23
//PlayerSheet (art.PlayerSheet) package art { import flash.display.*; public dynamic class PlayerSheet extends BitmapData { public function PlayerSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 24
//SorcererSheet (art.SorcererSheet) package art { import flash.display.*; public dynamic class SorcererSheet extends BitmapData { public function SorcererSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 25
//SpecialSheet (art.SpecialSheet) package art { import flash.display.*; public dynamic class SpecialSheet extends BitmapData { public function SpecialSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 26
//TeleporterSheet (art.TeleporterSheet) package art { import flash.display.*; public dynamic class TeleporterSheet extends BitmapData { public function TeleporterSheet(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 27
//WallSheet1 (art.WallSheet1) package art { import flash.display.*; public dynamic class WallSheet1 extends BitmapData { public function WallSheet1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 28
//WallSheet2 (art.WallSheet2) package art { import flash.display.*; public dynamic class WallSheet2 extends BitmapData { public function WallSheet2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 29
//WallSheet3 (art.WallSheet3) package art { import flash.display.*; public dynamic class WallSheet3 extends BitmapData { public function WallSheet3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 30
//WallSheet4 (art.WallSheet4) package art { import flash.display.*; public dynamic class WallSheet4 extends BitmapData { public function WallSheet4(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package art
Section 31
//MainTimeline (blast_passage_adventures_fla.MainTimeline) package blast_passage_adventures_fla { import flash.display.*; import flash.events.*; import com.midasplayer.particle.*; import com.midasplayer.*; import adobe.utils.*; import flash.accessibility.*; import flash.errors.*; import flash.external.*; import flash.filters.*; import flash.geom.*; import flash.media.*; import flash.net.*; import flash.printing.*; import flash.profiler.*; import flash.sampler.*; import flash.system.*; import flash.text.*; import flash.ui.*; import flash.utils.*; import flash.xml.*; import src.*; public dynamic class MainTimeline extends MovieClip { public var mochi:String; public var bg:Sprite; public var mcKingLoader:DragonLoader; public var mcLoadLogoBg:MovieClip; public var bar:Sprite; public var holder:Sprite; public var particles:Main; public var game:BlastPassageStandAlone; public var game_name:String; public function MainTimeline(){ addFrameScript(0, frame1, 1, frame2); } public function preload(_arg1:Event):void{ bg = new Sprite(); bg.buttonMode = true; bg.name = "clickBg"; bg.graphics.beginFill(0, 0); bg.graphics.lineTo(stage.stageWidth, 0); bg.graphics.lineTo(stage.stageWidth, stage.stageHeight); bg.graphics.lineTo(0, stage.stageHeight); bg.graphics.lineTo(0, 0); bg.graphics.endFill(); bg.addEventListener(MouseEvent.CLICK, openKingPage); this.addChildAt(bg, this.getChildIndex(mcLoadLogoBg)); mcLoadLogoBg.x = ((stage.stageWidth / 2) - (mcLoadLogoBg.width / 2)); mcLoadLogoBg.y = ((stage.stageHeight / 2) - (mcLoadLogoBg.height / 2)); bar = new Sprite(); bar.graphics.beginFill(0xFFFFFF, 0); bar.x = (mcLoadLogoBg.x + 5); bar.y = (mcLoadLogoBg.y + 34); bar.graphics.drawRect(0, 0, 96, 5); bar.graphics.endFill(); this.addChild(bar); holder = new Sprite(); this.addChild(holder); holder.x = bar.x; holder.y = bar.y; particles = new Main(); particles.setEmitterClip(holder); this.addChild(particles); addEventListener(Event.ENTER_FRAME, onEnterFrame); } public function launchGame(_arg1):void{ mcKingLoader.destroy(); gotoAndStop(3); } function frame2(){ mcKingLoader.addEventListener(DragonLoader.LAUNCH_GAME, launchGame); mcKingLoader.init(game_name, mochi); } function frame1(){ stop(); game_name = "blast-adventure"; mochi = ""; stage.scaleMode = StageScaleMode.NO_SCALE; KingAPI.addEventListener(KingAPI.INITIALIZED_EVENT, preload); KingAPI.addEventListener(KingAPI.HOST_BANNED_EVENT, preload); KingAPI.init(game_name, root.loaderInfo.url); } public function onEnterFrame(_arg1:Event):void{ holder.x = (bar.x + bar.width); if (framesLoaded == totalFrames){ particles.kill(); this.removeChild(particles); removeEventListener(Event.ENTER_FRAME, onEnterFrame); bg.removeEventListener(MouseEvent.CLICK, openKingPage); this.removeChild(bar); if (!(KingAPI.isHome)){ gotoAndStop(2); } else { gotoAndStop(3); }; } else { bar.scaleX = (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal); mcLoadLogoBg.bar.scaleX = (1 - (stage.loaderInfo.bytesLoaded / stage.loaderInfo.bytesTotal)); }; } public function openKingPage(_arg1:Event):void{ KingAPI.openLoaderProgressLink(); } } }//package blast_passage_adventures_fla
Section 32
//mcFireLogo_5 (blast_passage_adventures_fla.mcFireLogo_5) package blast_passage_adventures_fla { import flash.display.*; public dynamic class mcFireLogo_5 extends MovieClip { public function mcFireLogo_5(){ addFrameScript(72, frame73); } function frame73(){ stop(); } } }//package blast_passage_adventures_fla
Section 33
//mcPlayBtn_8 (blast_passage_adventures_fla.mcPlayBtn_8) package blast_passage_adventures_fla { import flash.display.*; public dynamic class mcPlayBtn_8 extends MovieClip { public function mcPlayBtn_8(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package blast_passage_adventures_fla
Section 34
//Main (com.midasplayer.particle.Main) package com.midasplayer.particle { import flash.events.*; import flash.display.*; public class Main extends Sprite { private var maxSize:Number;// = 29 private var numParticles:int;// = 20 private var maxXVel:Number;// = 1 private var minYVel:Number;// = -1 private var maxAlpha:Number;// = 0.02 private var maxYVel:Number;// = 1 private var particles:Array; private var minXVel:Number;// = -1 private var minSize:Number;// = 12 private var minAlpha:Number;// = 0.01 private var emitter; public function Main(){ particles = new Array(); super(); addEventListener(Event.ENTER_FRAME, enterFrame); } public function setEmitterClip(_arg1):void{ emitter = _arg1; } public function kill():void{ removeEventListener(Event.ENTER_FRAME, enterFrame); var _local1:Number = 0; while (_local1 < particles.length) { particles[_local1].destroy(); _local1++; }; } private function randRange(_arg1:Number, _arg2:Number):Number{ var _local3:Number = ((Math.random() * (_arg2 - _arg1)) + _arg1); return (_local3); } private function createNewParticle():void{ var _local1:* = new Particle(spark, emitter, -10, -7, stage.stageWidth, stage.stageHeight); _local1.setVel(randRange(minXVel, maxXVel), randRange(minYVel, maxYVel)); _local1.setSize(randRange(minSize, maxSize)); particles.push(_local1); while (particles.length > numParticles) { _local1 = particles.shift(); _local1.destroy(); }; var _local2:Number = 0; while (_local2 < particles.length) { particles[_local2].update(); _local2++; }; } private function enterFrame(_arg1:Event){ createNewParticle(); } } }//package com.midasplayer.particle
Section 35
//Particle (com.midasplayer.particle.Particle) package com.midasplayer.particle { import flash.display.*; import flash.geom.*; public class Particle { private var _yVel:Number; private var _xVel:Number; private var _stageWidth:Number; private var _stageHeight:Number; private var _alphaDecr:Number;// = 0 private var clip:DisplayObject; public function Particle(_arg1:Class, _arg2:DisplayObjectContainer, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number){ _stageWidth = _arg5; _stageHeight = _arg6; clip = new (_arg1); _arg2.addChild(clip); clip.x = _arg3; clip.y = _arg4; } public function update(){ clip.x = (clip.x + _xVel); clip.y = (clip.y + _yVel); clip.alpha = (clip.alpha - _alphaDecr); } public function setSize(_arg1:Number){ clip.width = _arg1; clip.height = _arg1; } public function setColour(_arg1:Number){ var _local2:ColorTransform = new ColorTransform(); _local2.color = _arg1; clip.transform.colorTransform = _local2; } public function setAlphaDecr(_arg1:Number):void{ _alphaDecr = _arg1; } public function destroy():void{ clip.parent.removeChild(clip); clip = null; } public function setVel(_arg1:Number, _arg2:Number){ _xVel = _arg1; _yVel = _arg2; } } }//package com.midasplayer.particle
Section 36
//DragonLoader (com.midasplayer.DragonLoader) package com.midasplayer { import fl.transitions.easing.*; import flash.events.*; import fl.transitions.*; import flash.display.*; import flash.utils.*; import flash.media.*; public class DragonLoader extends MovieClip { public var m_fireLogoClip:MovieClip; private var oldFrameRate:int; private var m_glimmerTween:Tween; public var m_bannedSign:MovieClip; public var m_dragonClip:MovieClip; private var m_bg:Sprite; private var m_playBtnTween:Tween; public var m_fireLogoTween:Tween; private var m_glimmer:MovieClip; public var m_playBtn:MovieClip; private var m_sndBell:Sound; public static var LAUNCH_GAME:String = "launchGame"; public function DragonLoader(){ this.x = (this.y = 0); m_bannedSign.bg.width = stage.stageWidth; m_bannedSign.bg.height = stage.stageHeight; m_bannedSign.alpha = 0; m_bannedSign.addEventListener(MouseEvent.CLICK, onMainMovie); m_bannedSign.buttonMode = true; m_fireLogoClip.x = ((m_bannedSign.bg.width - m_fireLogoClip.width) - 90); m_fireLogoClip.y = (((m_bannedSign.bg.height / 2) - (m_fireLogoClip.height / 2)) - 60); m_fireLogoClip.visible = false; m_fireLogoClip.stop(); m_dragonClip.x = (m_bannedSign.bg.width - m_dragonClip.width); m_dragonClip.y = ((m_bannedSign.bg.height / 2) - (m_dragonClip.height / 2)); m_dragonClip.stop(); m_playBtn.buttonMode = true; m_playBtn.alpha = 0; m_sndBell = new sfxBell(); } public function destroy():void{ m_playBtn.removeEventListener(MouseEvent.ROLL_OVER, btnOver); m_playBtn.removeEventListener(MouseEvent.ROLL_OUT, btnOut); m_playBtn.removeEventListener(MouseEvent.MOUSE_DOWN, btnDown); m_playBtn.removeEventListener(MouseEvent.MOUSE_UP, launchGame); if (m_fireLogoTween != null){ m_fireLogoTween.removeEventListener(TweenEvent.MOTION_FINISH, logoInPlace); m_fireLogoTween = null; }; var _local1:Sprite = (this.parent.getChildByName("clickBg") as Sprite); this.parent.removeChild(_local1); this.parent.removeChild(this); } public function launchGame(_arg1:Event):void{ root.stage.frameRate = oldFrameRate; trace(LAUNCH_GAME); this.dispatchEvent(new Event(LAUNCH_GAME)); } public function showBannedScreen():void{ m_bannedSign.alpha = 1; } public function playLoaderMovie():void{ this.addChild(m_dragonClip); this.setChildIndex(m_dragonClip, 0); m_dragonClip.addEventListener(Event.ENTER_FRAME, animationDone); m_dragonClip.play(); } private function logoVisible(_arg1:Event):void{ if (m_fireLogoClip.currentFrame == m_fireLogoClip.totalFrames){ m_fireLogoClip.removeEventListener(Event.ENTER_FRAME, logoVisible); m_playBtnTween = new Tween(m_playBtn, "alpha", None.easeNone, 0, 1, 0.5, true); m_glimmer = new mcGlimmer(); m_glimmer.x = (m_fireLogoClip.x - m_glimmer.width); m_glimmer.y = (m_fireLogoClip.y + 112); this.addChild(m_glimmer); setTimeout(onGlimmerTmr, 1000, null); }; } public function init(_arg1:String, _arg2:String=""):void{ if (_arg2 != ""){ MochiBot.track(this, _arg2); }; oldFrameRate = root.stage.frameRate; root.stage.frameRate = 30; if (KingAPI.banned){ showBannedScreen(); } else { if (KingAPI.isHome){ launchGame(null); } else { playLoaderMovie(); }; }; } private function btnOut(_arg1:MouseEvent):void{ m_playBtn.gotoAndStop("idle"); } private function btnDown(_arg1:MouseEvent):void{ m_playBtn.gotoAndStop("down"); } private function glimmerDone(_arg1:Event):void{ m_glimmerTween.removeEventListener(TweenEvent.MOTION_FINISH, glimmerDone); this.removeChild(m_glimmer); } public function onMainMovie(_arg1:MouseEvent):void{ KingAPI.openLoaderMovieLink(); } private function btnOver(_arg1:MouseEvent):void{ m_playBtn.gotoAndStop("over"); } public function animationDone(_arg1:Event):void{ if (m_dragonClip.currentFrame == 80){ m_fireLogoClip.visible = true; m_fireLogoClip.play(); m_fireLogoTween = new Tween(m_fireLogoClip, "x", Regular.easeOut, m_fireLogoClip.x, (((stage.width / 2) - (m_dragonClip.width / 2)) - 51), 1, true); m_fireLogoTween.addEventListener(TweenEvent.MOTION_FINISH, logoInPlace); }; if (m_dragonClip.currentFrame == m_dragonClip.totalFrames){ m_dragonClip.removeEventListener(Event.ENTER_FRAME, animationDone); m_dragonClip.stop(); m_playBtn.x = ((stage.width / 2) - (m_playBtn.width / 2)); m_playBtn.y = (m_fireLogoClip.y + 210); m_playBtn.addEventListener(MouseEvent.ROLL_OVER, btnOver); m_playBtn.addEventListener(MouseEvent.ROLL_OUT, btnOut); m_playBtn.addEventListener(MouseEvent.MOUSE_DOWN, btnDown); m_playBtn.addEventListener(MouseEvent.MOUSE_UP, launchGame); }; } private function logoInPlace(_arg1:Event):void{ m_fireLogoClip.addEventListener(Event.ENTER_FRAME, logoVisible); } private function onGlimmerTmr(_arg1:Event):void{ var _local2:Number = (m_fireLogoClip.x - m_glimmer.width); var _local3:Number = ((m_fireLogoClip.x + m_fireLogoClip.width) - 80); m_glimmerTween = new Tween(m_glimmer, "x", None.easeNone, _local2, _local3, 0.5, true); m_glimmerTween.addEventListener(TweenEvent.MOTION_FINISH, glimmerDone); m_sndBell.play(); } } }//package com.midasplayer
Section 37
//KingAPI (com.midasplayer.KingAPI) package com.midasplayer { import flash.events.*; import flash.net.*; import flash.external.*; public class KingAPI { public static const LINK_TYPE_RIGHT_CLICK:String = "rightclick"; public static const LINK_TYPE_MONEY_GAME:String = "money_game"; public static const USER_TYPE_SUBSCRIPTION:int = 3; public static const LINK_TYPE_HIGHSCORES:String = "highscores"; public static const LINK_TYPE_SIGN:String = "sign"; public static const INITIALIZED_EVENT:String = "initialized"; public static const LINK_TYPE_OTHER_GAMES:String = "other_games"; public static const USER_TYPE_REGISTERED:int = 1; private static const SAK:String = "ggfd7sday923mdsfd8csfds34"; private static const loadHomeParametersURL:String = "http://www.king.com/servlet/FreeGameServlet?action=load"; public static const LINK_TYPE_LOADER_MOVIE:String = "loader_movie"; private static const bounceURL:String = "http://www.mygame.com/king/bounce.jsp"; public static const LINK_TYPE_PROTECT:String = "protect"; public static const LINK_TYPE_ADD_GAME:String = "add_game"; public static const USER_TYPE_GOLD:int = 2; public static const USER_TYPE_UNREGISTERED:int = 0; public static const HOST_BANNED_EVENT:String = "hostBanned"; private static const SK:String = "vf78hxcsjak77cxzhjkwad87s"; private static const loadCountURL:String = "http://www.mygame.com/king/loadcount.jsp"; public static const LINK_TYPE_LOADER_PROGRESS:String = "loader_progress"; private static var check:String = null; public static var gameName:String; public static var banned:Boolean = false; protected static var dispatcher:EventDispatcher; public static var isHome:Boolean = false; private static var sessionID:String; private static var iscore:int = 123; public static var fromURL:String; private static var SSK:String = "ng43ui54hy35tdsnd6f54rews"; private static function loadUrlErrorHandler(_arg1:Event):void{ trace(("Unable to load url: " + _arg1)); } public static function resetScore():void{ iscore = 123; check = null; } public static function openOfflineProtectionLink():void{ openKingPage(LINK_TYPE_PROTECT); } public static function init(_arg1:String, _arg2:String):void{ var so:SharedObject; var rnd1:Number; var rnd2:Number; var name = _arg1; var from = _arg2; gameName = name; fromURL = from; var loadCounter:URLLoader = new URLLoader(); var reqvars:URLVariables = new URLVariables(); reqvars.game = gameName; reqvars.from = fromURL; try { so = SharedObject.getLocal("sessionId"); if (so.data.sessionID == null){ rnd1 = Math.abs(Math.floor((Math.random() * 4294967295))); rnd2 = Math.abs(Math.floor((Math.random() * 4294967295))); so.data.sessionID = (rnd1.toString(16) + rnd2.toString(16)); so.flush(); }; sessionID = so.data.sessionID; } catch(e:Error) { sessionID = "error"; }; reqvars.session = sessionID; var request:URLRequest = new URLRequest(((loadCountURL + "?") + reqvars.toString())); loadCounter.addEventListener(Event.COMPLETE, loadCountHandler); loadCounter.addEventListener(IOErrorEvent.IO_ERROR, loadUrlErrorHandler); loadCounter.addEventListener(SecurityErrorEvent.SECURITY_ERROR, loadUrlErrorHandler); try { loadCounter.load(request); } catch(error:Error) { trace(("Unable to load loadcount url: " + loadCountURL)); trace(error.message); }; } private static function loadHomeParametersHandler(_arg1:Event):void{ var _local2:URLLoader = URLLoader(_arg1.target); trace(("loadCounter.data" + _local2.data)); } public static function submitInternalScore():void{ checkScore(); var _local1:int = ((iscore - 123) / 2); submitScore(_local1); } public static function openOtherGamesLink():void{ openKingPage(LINK_TYPE_OTHER_GAMES); } public static function openKingPage(_arg1:String, _arg2:String=null):void{ var _local3:URLVariables = new URLVariables(); _local3.game = gameName; _local3.from = fromURL; _local3.type = _arg1; _local3.session = sessionID; if (_arg2 != null){ _local3.redirect = _arg2; }; var _local4:String = "_blank"; if (isHome){ _local4 = "_top"; }; navigateToURL(new URLRequest(((bounceURL + "?") + _local3.toString())), _local4); } private static function loadCountHandler(_arg1:Event):void{ var vars:URLVariables; var event = _arg1; var loadCounter:URLLoader = URLLoader(event.target); trace(("loadCounter.data :" + loadCounter.data)); try { vars = new URLVariables(loadCounter.data); if (vars.h == "true"){ isHome = true; }; if (vars.b == "true"){ banned = true; dispatcher.dispatchEvent(new Event(HOST_BANNED_EVENT)); } else { dispatcher.dispatchEvent(new Event(INITIALIZED_EVENT)); }; trace((("::" + vars.h) + "::")); trace((("::" + vars.b) + "::")); } catch(e:Error) { trace(("Error reading data from loadcount url: " + e)); }; } public static function addEventListener(_arg1:String, _arg2:Function):void{ if (dispatcher == null){ dispatcher = new EventDispatcher(); }; dispatcher.addEventListener(_arg1, _arg2); } public static function openLoaderMovieLink():void{ openKingPage(LINK_TYPE_LOADER_MOVIE); } public static function removeEventListener(_arg1:String, _arg2:Function):void{ if (dispatcher == null){ return; }; dispatcher.removeEventListener(_arg1, _arg2); } public static function submitScore(_arg1:int):void{ var score = _arg1; var hash:String = md5.encrypt(((((score + ":") + gameName) + ":") + SSK)); try { if (isHome){ ExternalInterface.call("submitScore", score, hash); } else { openKingPage(LINK_TYPE_HIGHSCORES, ((((("game/" + gameName) + "/submit/") + score) + ":") + hash)); }; } catch(e:Error) { trace(e); }; } public static function submitLevel(_arg1:int):void{ var level = _arg1; var hash:String = md5.encrypt(((((level + ":") + gameName) + ":") + SSK)); try { if (isHome){ ExternalInterface.call("submitLevel", level, hash); }; } catch(e:Error) { trace(e); }; } public static function openMoneyLink(_arg1:String):void{ openKingPage(LINK_TYPE_MONEY_GAME, ("game/" + _arg1)); } public static function openHighscoresLink():void{ openKingPage(LINK_TYPE_HIGHSCORES, (("game/" + gameName) + "/highscores")); } public static function openSignLink():void{ if (!(isHome)){ openKingPage(LINK_TYPE_SIGN); }; } public static function openRightClickLink():void{ openKingPage(LINK_TYPE_RIGHT_CLICK); } private static function checkScore():void{ if (check != null){ if (check != md5.encrypt(((((iscore + ":") + gameName) + ":") + SK))){ SSK = "ng41ui54hy35tdsnd6f54rews"; }; }; } public static function addScore(_arg1:int):int{ checkScore(); var _local2:int = ((iscore - 123) / 2); _local2 = (_local2 + _arg1); iscore = ((_local2 * 2) + 123); check = md5.encrypt(((((iscore + ":") + gameName) + ":") + SK)); return (_local2); } public static function openLoaderProgressLink():void{ openKingPage(LINK_TYPE_LOADER_PROGRESS); } public static function openAddToWebsiteLink():void{ openKingPage(LINK_TYPE_ADD_GAME, "website_content.jsp"); } public static function submitAchievement(_arg1:String):void{ var achievement = _arg1; var hash:String = md5.encrypt(((((achievement + ":") + gameName) + ":") + SAK)); try { if (isHome){ ExternalInterface.call("submitAchievement", achievement, hash); }; } catch(e:Error) { trace(e); }; } } }//package com.midasplayer
Section 38
//md5 (com.midasplayer.md5) package com.midasplayer { public class md5 { public static const HEX_FORMAT_LOWERCASE:uint = 0; public static const HEX_FORMAT_UPPERCASE:uint = 1; public static const BASE64_PAD_CHARACTER_DEFAULT_COMPLIANCE:String = ""; public static const BASE64_PAD_CHARACTER_RFC_COMPLIANCE:String = "="; public static var hexcase:uint = 0; public static var b64pad:String = ""; public static function md5_gg(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn(((_arg2 & _arg4) | (_arg3 & ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function md5_cmn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number):Number{ return (safe_add(bit_rol(safe_add(safe_add(_arg2, _arg1), safe_add(_arg4, _arg6)), _arg5), _arg3)); } public static function binl_md5(_arg1:Array, _arg2:Number):Array{ var _local8:Number; var _local9:Number; var _local10:Number; var _local11:Number; _arg1[(_arg2 >> 5)] = (_arg1[(_arg2 >> 5)] | (128 << (_arg2 % 32))); _arg1[((((_arg2 + 64) >>> 9) << 4) + 14)] = _arg2; var _local3:Number = 1732584193; var _local4:Number = -271733879; var _local5:Number = -1732584194; var _local6:Number = 271733878; var _local7:Number = 0; while (_local7 < _arg1.length) { _local8 = _local3; _local9 = _local4; _local10 = _local5; _local11 = _local6; _local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 7, -680876936); _local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 1)], 12, -389564586); _local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 17, 606105819); _local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 3)], 22, -1044525330); _local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 7, -176418897); _local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 5)], 12, 1200080426); _local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 17, -1473231341); _local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 7)], 22, -45705983); _local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 7, 1770035416); _local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 9)], 12, -1958414417); _local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 17, -42063); _local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 11)], 22, -1990404162); _local3 = md5_ff(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 7, 1804603682); _local6 = md5_ff(_local6, _local3, _local4, _local5, _arg1[(_local7 + 13)], 12, -40341101); _local5 = md5_ff(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 17, -1502002290); _local4 = md5_ff(_local4, _local5, _local6, _local3, _arg1[(_local7 + 15)], 22, 1236535329); _local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 5, -165796510); _local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 6)], 9, -1069501632); _local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 14, 643717713); _local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 0)], 20, -373897302); _local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 5, -701558691); _local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 10)], 9, 38016083); _local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 14, -660478335); _local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 4)], 20, -405537848); _local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 5, 568446438); _local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 14)], 9, -1019803690); _local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 14, -187363961); _local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 8)], 20, 1163531501); _local3 = md5_gg(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 5, -1444681467); _local6 = md5_gg(_local6, _local3, _local4, _local5, _arg1[(_local7 + 2)], 9, -51403784); _local5 = md5_gg(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 14, 1735328473); _local4 = md5_gg(_local4, _local5, _local6, _local3, _arg1[(_local7 + 12)], 20, -1926607734); _local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 5)], 4, -378558); _local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 8)], 11, -2022574463); _local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 11)], 16, 1839030562); _local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 14)], 23, -35309556); _local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 1)], 4, -1530992060); _local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 4)], 11, 1272893353); _local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 7)], 16, -155497632); _local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 10)], 23, -1094730640); _local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 13)], 4, 681279174); _local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 0)], 11, -358537222); _local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 3)], 16, -722521979); _local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 6)], 23, 76029189); _local3 = md5_hh(_local3, _local4, _local5, _local6, _arg1[(_local7 + 9)], 4, -640364487); _local6 = md5_hh(_local6, _local3, _local4, _local5, _arg1[(_local7 + 12)], 11, -421815835); _local5 = md5_hh(_local5, _local6, _local3, _local4, _arg1[(_local7 + 15)], 16, 530742520); _local4 = md5_hh(_local4, _local5, _local6, _local3, _arg1[(_local7 + 2)], 23, -995338651); _local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 0)], 6, -198630844); _local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 7)], 10, 1126891415); _local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 14)], 15, -1416354905); _local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 5)], 21, -57434055); _local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 12)], 6, 1700485571); _local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 3)], 10, -1894986606); _local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 10)], 15, -1051523); _local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 1)], 21, -2054922799); _local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 8)], 6, 1873313359); _local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 15)], 10, -30611744); _local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 6)], 15, -1560198380); _local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 13)], 21, 1309151649); _local3 = md5_ii(_local3, _local4, _local5, _local6, _arg1[(_local7 + 4)], 6, -145523070); _local6 = md5_ii(_local6, _local3, _local4, _local5, _arg1[(_local7 + 11)], 10, -1120210379); _local5 = md5_ii(_local5, _local6, _local3, _local4, _arg1[(_local7 + 2)], 15, 718787259); _local4 = md5_ii(_local4, _local5, _local6, _local3, _arg1[(_local7 + 9)], 21, -343485551); _local3 = safe_add(_local3, _local8); _local4 = safe_add(_local4, _local9); _local5 = safe_add(_local5, _local10); _local6 = safe_add(_local6, _local11); _local7 = (_local7 + 16); }; return ([_local3, _local4, _local5, _local6]); } public static function str2rstr_utf16le(_arg1:String):String{ var _local2:String = ""; var _local3:Number = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + String.fromCharCode((_arg1.charCodeAt(_local3) & 0xFF), ((_arg1.charCodeAt(_local3) >>> 8) & 0xFF))); _local3++; }; return (_local2); } public static function hex_hmac_md5(_arg1:String, _arg2:String):String{ return (rstr2hex(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)))); } public static function binl2rstr(_arg1:Array):String{ var _local2:String = ""; var _local3:Number = 0; while (_local3 < (_arg1.length * 32)) { _local2 = (_local2 + String.fromCharCode(((_arg1[(_local3 >> 5)] >>> (_local3 % 32)) & 0xFF))); _local3 = (_local3 + 8); }; return (_local2); } public static function md5_ff(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn(((_arg2 & _arg3) | (~(_arg2) & _arg4)), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function md5_ii(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn((_arg3 ^ (_arg2 | ~(_arg4))), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function rstr2binl(_arg1:String):Array{ var _local2:Number = 0; var _local3:Array = new Array((_arg1.length >> 2)); _local2 = 0; while (_local2 < _local3.length) { _local3[_local2] = 0; _local2++; }; _local2 = 0; while (_local2 < (_arg1.length * 8)) { _local3[(_local2 >> 5)] = (_local3[(_local2 >> 5)] | ((_arg1.charCodeAt((_local2 / 8)) & 0xFF) << (_local2 % 32))); _local2 = (_local2 + 8); }; return (_local3); } public static function md5_vm_test():Boolean{ return ((hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72")); } public static function b64_md5(_arg1:String):String{ return (rstr2b64(rstr_md5(str2rstr_utf8(_arg1)))); } public static function any_hmac_md5(_arg1:String, _arg2:String, _arg3:String):String{ return (rstr2any(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)), _arg3)); } public static function hex_md5(_arg1:String):String{ return (rstr2hex(rstr_md5(str2rstr_utf8(_arg1)))); } public static function bit_rol(_arg1:Number, _arg2:Number):Number{ return (((_arg1 << _arg2) | (_arg1 >>> (32 - _arg2)))); } public static function encrypt(_arg1:String):String{ return (hex_md5(_arg1)); } public static function md5_hh(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number):Number{ return (md5_cmn(((_arg2 ^ _arg3) ^ _arg4), _arg1, _arg2, _arg5, _arg6, _arg7)); } public static function rstr2hex(_arg1:String):String{ var _local4:Number; var _local2:String = (hexcase) ? "0123456789ABCDEF" : "0123456789abcdef"; var _local3:String = ""; var _local5:Number = 0; while (_local5 < _arg1.length) { _local4 = _arg1.charCodeAt(_local5); _local3 = (_local3 + (_local2.charAt(((_local4 >>> 4) & 15)) + _local2.charAt((_local4 & 15)))); _local5++; }; return (_local3); } public static function any_md5(_arg1:String, _arg2:String):String{ return (rstr2any(rstr_md5(str2rstr_utf8(_arg1)), _arg2)); } public static function b64_hmac_md5(_arg1:String, _arg2:String):String{ return (rstr2b64(rstr_hmac_md5(str2rstr_utf8(_arg1), str2rstr_utf8(_arg2)))); } public static function rstr2b64(_arg1:String):String{ var _local6:Number; var _local7:Number; var _local2:String = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; var _local3:String = ""; var _local4:Number = _arg1.length; var _local5:Number = 0; while (_local5 < _local4) { _local6 = (((_arg1.charCodeAt(_local5) << 16) | (((_local5 + 1) < _local4)) ? (_arg1.charCodeAt((_local5 + 1)) << 8) : 0) | (((_local5 + 2) < _local4)) ? _arg1.charCodeAt((_local5 + 2)) : 0); _local7 = 0; while (_local7 < 4) { if (((_local5 * 8) + (_local7 * 6)) > (_arg1.length * 8)){ _local3 = (_local3 + b64pad); } else { _local3 = (_local3 + _local2.charAt(((_local6 >>> (6 * (3 - _local7))) & 63))); }; _local7++; }; _local5 = (_local5 + 3); }; return (_local3); } public static function safe_add(_arg1:Number, _arg2:Number):Number{ var _local3:Number = ((_arg1 & 0xFFFF) + (_arg2 & 0xFFFF)); var _local4:Number = (((_arg1 >> 16) + (_arg2 >> 16)) + (_local3 >> 16)); return (((_local4 << 16) | (_local3 & 0xFFFF))); } public static function str2rstr_utf8(_arg1:String):String{ var _local4:Number; var _local5:Number; var _local2:String = ""; var _local3:Number = -1; while (++_local3 < _arg1.length) { _local4 = _arg1.charCodeAt(_local3); _local5 = (((_local3 + 1) < _arg1.length)) ? _arg1.charCodeAt((_local3 + 1)) : 0; if ((((((((0xD800 <= _local4)) && ((_local4 <= 56319)))) && ((0xDC00 <= _local5)))) && ((_local5 <= 57343)))){ _local4 = ((65536 + ((_local4 & 1023) << 10)) + (_local5 & 1023)); _local3++; }; if (_local4 <= 127){ _local2 = (_local2 + String.fromCharCode(_local4)); } else { if (_local4 <= 2047){ _local2 = (_local2 + String.fromCharCode((192 | ((_local4 >>> 6) & 31)), (128 | (_local4 & 63)))); } else { if (_local4 <= 0xFFFF){ _local2 = (_local2 + String.fromCharCode((224 | ((_local4 >>> 12) & 15)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63)))); } else { if (_local4 <= 2097151){ _local2 = (_local2 + String.fromCharCode((240 | ((_local4 >>> 18) & 7)), (128 | ((_local4 >>> 12) & 63)), (128 | ((_local4 >>> 6) & 63)), (128 | (_local4 & 63)))); }; }; }; }; }; return (_local2); } public static function rstr_hmac_md5(_arg1:String, _arg2:String):String{ var _local3:Array = rstr2binl(_arg1); if (_local3.length > 16){ _local3 = binl_md5(_local3, (_arg1.length * 8)); }; var _local4:Array = new Array(16); var _local5:Array = new Array(16); var _local6:Number = 0; while (_local6 < 16) { _local4[_local6] = (_local3[_local6] ^ 909522486); _local5[_local6] = (_local3[_local6] ^ 1549556828); _local6++; }; var _local7:Array = binl_md5(_local4.concat(rstr2binl(_arg2)), (0x0200 + (_arg2.length * 8))); return (binl2rstr(binl_md5(_local5.concat(_local7), (0x0200 + 128)))); } public static function str2rstr_utf16be(_arg1:String):String{ var _local2:String = ""; var _local3:Number = 0; while (_local3 < _arg1.length) { _local2 = (_local2 + String.fromCharCode(((_arg1.charCodeAt(_local3) >>> 8) & 0xFF), (_arg1.charCodeAt(_local3) & 0xFF))); _local3++; }; return (_local2); } public static function rstr2any(_arg1:String, _arg2:String):String{ var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Array; var _local3:Number = _arg2.length; var _local4:Array = []; var _local9:Array = ((_arg1.length / 2) as Array); _local5 = 0; while (_local5 < _local9.length) { _local9[_local5] = ((_arg1.charCodeAt((_local5 * 2)) << 8) | _arg1.charCodeAt(((_local5 * 2) + 1))); _local5++; }; while (_local9.length > 0) { _local8 = []; _local7 = 0; _local5 = 0; while (_local5 < _local9.length) { _local7 = ((_local7 << 16) + _local9[_local5]); _local6 = Math.floor((_local7 / _local3)); _local7 = (_local7 - (_local6 * _local3)); if ((((_local8.length > 0)) || ((_local6 > 0)))){ _local8[_local8.length] = _local6; }; _local5++; }; _local4[_local4.length] = _local7; _local9 = _local8; }; var _local10:String = ""; _local5 = (_local4.length - 1); while (_local5 >= 0) { _local10 = (_local10 + _arg2.charAt(_local4[_local5])); _local5--; }; return (_local10); } public static function rstr_md5(_arg1:String):String{ return (binl2rstr(binl_md5(rstr2binl(_arg1), (_arg1.length * 8)))); } } }//package com.midasplayer
Section 39
//None (fl.transitions.easing.None) package fl.transitions.easing { public class None { public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); } } }//package fl.transitions.easing
Section 40
//Regular (fl.transitions.easing.Regular) package fl.transitions.easing { public class Regular { public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return ((((_arg3 * _arg1) * _arg1) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return (((((_arg3 / 2) * _arg1) * _arg1) + _arg2)); }; --_arg1; return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2)); } } }//package fl.transitions.easing
Section 41
//Tween (fl.transitions.Tween) package fl.transitions { import flash.display.*; import flash.events.*; import flash.utils.*; public class Tween extends EventDispatcher { private var _position:Number;// = NAN public var prevTime:Number;// = NAN public var prevPos:Number;// = NAN public var isPlaying:Boolean;// = false private var _fps:Number;// = NAN private var _time:Number;// = NAN public var begin:Number;// = NAN private var _finish:Number;// = NAN public var change:Number;// = NAN public var looping:Boolean;// = false private var _intervalID:uint;// = 0 public var func:Function; private var _timer:Timer;// = null private var _startTime:Number;// = NAN public var prop:String;// = "" private var _duration:Number;// = NAN public var obj:Object;// = null public var useSeconds:Boolean;// = false protected static var _mc:MovieClip = new MovieClip(); public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){ this.func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); }; super(); if (!(arguments.length)){ return; }; this.obj = _arg1; this.prop = _arg2; this.begin = _arg4; this.position = _arg4; this.duration = _arg6; this.useSeconds = _arg7; if ((_arg3 is Function)){ this.func = _arg3; }; this.finish = _arg5; this._timer = new Timer(100); this.start(); } public function continueTo(_arg1:Number, _arg2:Number):void{ this.begin = this.position; this.finish = _arg1; if (!(isNaN(_arg2))){ this.duration = _arg2; }; this.start(); } protected function startEnterFrame():void{ var _local1:Number; if (isNaN(this._fps)){ _mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true); } else { _local1 = (1000 / this._fps); this._timer.delay = _local1; this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true); this._timer.start(); }; this.isPlaying = true; } public function stop():void{ this.stopEnterFrame(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position)); } private function fixTime():void{ if (this.useSeconds){ this._startTime = (getTimer() - (this._time * 1000)); }; } public function set FPS(_arg1:Number):void{ var _local2:Boolean = this.isPlaying; this.stopEnterFrame(); this._fps = _arg1; if (_local2){ this.startEnterFrame(); }; } public function get finish():Number{ return ((this.begin + this.change)); } public function get duration():Number{ return (this._duration); } protected function stopEnterFrame():void{ if (isNaN(this._fps)){ _mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame); } else { this._timer.stop(); }; this.isPlaying = false; } public function set time(_arg1:Number):void{ this.prevTime = this._time; if (_arg1 > this.duration){ if (this.looping){ this.rewind((_arg1 - this._duration)); this.update(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position)); } else { if (this.useSeconds){ this._time = this._duration; this.update(); }; this.stop(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position)); }; } else { if (_arg1 < 0){ this.rewind(); this.update(); } else { this._time = _arg1; this.update(); }; }; } public function getPosition(_arg1:Number=NaN):Number{ if (isNaN(_arg1)){ _arg1 = this._time; }; return (this.func(_arg1, this.begin, this.change, this._duration)); } public function set finish(_arg1:Number):void{ this.change = (_arg1 - this.begin); } public function set duration(_arg1:Number):void{ this._duration = ((_arg1)<=0) ? Infinity : _arg1; } public function get position():Number{ return (this.getPosition(this._time)); } public function setPosition(_arg1:Number):void{ this.prevPos = this._position; if (this.prop.length){ this.obj[this.prop] = (this._position = _arg1); }; this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position)); } public function resume():void{ this.fixTime(); this.startEnterFrame(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position)); } public function fforward():void{ this.time = this._duration; this.fixTime(); } protected function onEnterFrame(_arg1:Event):void{ this.nextFrame(); } public function yoyo():void{ this.continueTo(this.begin, this.time); } public function nextFrame():void{ if (this.useSeconds){ this.time = ((getTimer() - this._startTime) / 1000); } else { this.time = (this._time + 1); }; } protected function timerHandler(_arg1:TimerEvent):void{ this.nextFrame(); _arg1.updateAfterEvent(); } public function get FPS():Number{ return (this._fps); } public function rewind(_arg1:Number=0):void{ this._time = _arg1; this.fixTime(); this.update(); } public function set position(_arg1:Number):void{ this.setPosition(_arg1); } public function get time():Number{ return (this._time); } private function update():void{ this.setPosition(this.getPosition(this._time)); } public function start():void{ this.rewind(); this.startEnterFrame(); this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position)); } public function prevFrame():void{ if (!(this.useSeconds)){ this.time = (this._time - 1); }; } } }//package fl.transitions
Section 42
//TweenEvent (fl.transitions.TweenEvent) package fl.transitions { import flash.events.*; public class TweenEvent extends Event { public var position:Number;// = NAN public var time:Number;// = NAN public static const MOTION_START:String = "motionStart"; public static const MOTION_STOP:String = "motionStop"; public static const MOTION_LOOP:String = "motionLoop"; public static const MOTION_CHANGE:String = "motionChange"; public static const MOTION_FINISH:String = "motionFinish"; public static const MOTION_RESUME:String = "motionResume"; public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){ super(_arg1, _arg4, _arg5); this.time = _arg2; this.position = _arg3; } override public function clone():Event{ return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable)); } } }//package fl.transitions
Section 43
//BombExplode (sound.BombExplode) package sound { import flash.media.*; public dynamic class BombExplode extends Sound { } }//package sound
Section 44
//DemonFire (sound.DemonFire) package sound { import flash.media.*; public dynamic class DemonFire extends Sound { } }//package sound
Section 45
//GameMusic (sound.GameMusic) package sound { import flash.media.*; public dynamic class GameMusic extends Sound { } }//package sound
Section 46
//HappyEndMusic (sound.HappyEndMusic) package sound { import flash.media.*; public dynamic class HappyEndMusic extends Sound { } }//package sound
Section 47
//HealthWarning (sound.HealthWarning) package sound { import flash.media.*; public dynamic class HealthWarning extends Sound { } }//package sound
Section 48
//HurtFire (sound.HurtFire) package sound { import flash.media.*; public dynamic class HurtFire extends Sound { } }//package sound
Section 49
//HurtMonster (sound.HurtMonster) package sound { import flash.media.*; public dynamic class HurtMonster extends Sound { } }//package sound
Section 50
//IntroMusic (sound.IntroMusic) package sound { import flash.media.*; public dynamic class IntroMusic extends Sound { } }//package sound
Section 51
//KickBomb (sound.KickBomb) package sound { import flash.media.*; public dynamic class KickBomb extends Sound { } }//package sound
Section 52
//LobberToss (sound.LobberToss) package sound { import flash.media.*; public dynamic class LobberToss extends Sound { } }//package sound
Section 53
//MonsterDeath (sound.MonsterDeath) package sound { import flash.media.*; public dynamic class MonsterDeath extends Sound { } }//package sound
Section 54
//MonsterSpawn (sound.MonsterSpawn) package sound { import flash.media.*; public dynamic class MonsterSpawn extends Sound { } }//package sound
Section 55
//OpenSecret (sound.OpenSecret) package sound { import flash.media.*; public dynamic class OpenSecret extends Sound { } }//package sound
Section 56
//PlantBomb (sound.PlantBomb) package sound { import flash.media.*; public dynamic class PlantBomb extends Sound { } }//package sound
Section 57
//TakeFood1 (sound.TakeFood1) package sound { import flash.media.*; public dynamic class TakeFood1 extends Sound { } }//package sound
Section 58
//TakeFood2 (sound.TakeFood2) package sound { import flash.media.*; public dynamic class TakeFood2 extends Sound { } }//package sound
Section 59
//TakeFood3 (sound.TakeFood3) package sound { import flash.media.*; public dynamic class TakeFood3 extends Sound { } }//package sound
Section 60
//TakeFood4 (sound.TakeFood4) package sound { import flash.media.*; public dynamic class TakeFood4 extends Sound { } }//package sound
Section 61
//TakeKey (sound.TakeKey) package sound { import flash.media.*; public dynamic class TakeKey extends Sound { } }//package sound
Section 62
//TakePowerup (sound.TakePowerup) package sound { import flash.media.*; public dynamic class TakePowerup extends Sound { } }//package sound
Section 63
//TakeTreasure1 (sound.TakeTreasure1) package sound { import flash.media.*; public dynamic class TakeTreasure1 extends Sound { } }//package sound
Section 64
//TakeTreasure2 (sound.TakeTreasure2) package sound { import flash.media.*; public dynamic class TakeTreasure2 extends Sound { } }//package sound
Section 65
//Teleport (sound.Teleport) package sound { import flash.media.*; public dynamic class Teleport extends Sound { } }//package sound
Section 66
//TimeWarning (sound.TimeWarning) package sound { import flash.media.*; public dynamic class TimeWarning extends Sound { } }//package sound
Section 67
//TreasureDeath (sound.TreasureDeath) package sound { import flash.media.*; public dynamic class TreasureDeath extends Sound { } }//package sound
Section 68
//UseKey (sound.UseKey) package sound { import flash.media.*; public dynamic class UseKey extends Sound { } }//package sound
Section 69
//UsePotion (sound.UsePotion) package sound { import flash.media.*; public dynamic class UsePotion extends Sound { } }//package sound
Section 70
//WinLevel (sound.WinLevel) package sound { import flash.media.*; public dynamic class WinLevel extends Sound { } }//package sound
Section 71
//Bomb (src.entity.bomb.Bomb) package src.entity.bomb { import src.player.*; import flash.utils.*; import src.entity.*; public class Bomb extends Mob { public var player:Player; private var ya:int;// = 0 private var xa:int;// = 0 private var lifeTime:int;// = 30 private var step:int;// = 0 private var lastKickTime:int;// = 0 private static var KICK_SPEED:int = 6; public function Bomb(_arg1:Player, _arg2:int, _arg3:int){ super(_arg2, _arg3); this.player = _arg1; this.x = _arg2; this.y = _arg3; slide = false; } override public function render():void{ var _local1:int = ((((step + level.alpha) * 3) / 8) & 3); if (_local1 == 2){ _local1 = 0; }; if (_local1 == 3){ _local1 = 2; }; drawImage(gr.bomb, _local1, 0, -8, (-8 - 2)); } override public function blocks(_arg1:GameEntity):Boolean{ if ((_arg1 is BomberMan)){ melee(BomberMan(_arg1)); return (true); }; return (true); } public function blowUp():void{ playSound("BombExplode"); player.activeBombs--; level.addEntity(new BombExplosion(this)); remove(); } override public function blocksBomb(_arg1:Bomb):Boolean{ return (true); } override public function melee(_arg1:BomberMan):Boolean{ if ((getTimer() - lastKickTime) > 200){ lastKickTime = getTimer(); playSound("KickBomb"); }; xa = (_arg1.xa * KICK_SPEED); ya = (_arg1.ya * KICK_SPEED); return (false); } override public function init():void{ player.activeBombs++; setAlwaysTick(); } override public function initialBurn(_arg1:Fire):Boolean{ blowUp(); return (true); } override public function tick():void{ if (((!((xa == 0))) || (!((ya == 0))))){ if (!(attemptMove(xa, ya))){ if (attemptMove(xa, 0)){ ya = 0; } else { if (attemptMove(0, ya)){ xa = 0; } else { xa = (ya = 0); }; }; }; }; step++; if (step == lifeTime){ blowUp(); }; } public function getPlayer():Player{ return (player); } } }//package src.entity.bomb
Section 72
//BombExplosion (src.entity.bomb.BombExplosion) package src.entity.bomb { import src.particle.*; import src.player.*; import src.entity.*; public class BombExplosion extends GameEntity { public var bomb:Bomb; private var step:int;// = 0 public function BombExplosion(_arg1:Bomb){ this.bomb = _arg1; this.x = _arg1.x; this.y = _arg1.y; } override public function init():void{ setAlwaysTick(); } override public function render():void{ var _local1:int = ((((step + level.alpha) * 3) / 8) + 3); drawImage(gr.bomb, _local1, 0, -8, (-8 - 2)); } override public function blocksBomb(_arg1:Bomb):Boolean{ return (true); } override public function tick():void{ var _local1:int; var _local2:int; var _local3:int; step++; if (step == 1){ _local1 = 0; while (_local1 < 16) { level.addParticle(new BombParticle((x * 2), (y * 2))); _local1++; }; level.camera.shake(); _local2 = (((x >> 4) * 16) + 8); _local3 = (((y >> 4) * 16) + 8); level.addEntity(new Fire(this, _local2, _local3, -1, getPlayer().firePower)); }; if (step == (3 * 3)){ remove(); }; } public function getPlayer():Player{ return (bomb.getPlayer()); } override public function burn(_arg1:Fire):Boolean{ if (_arg1.explosion == this){ return (false); }; return ((step < (3 * 2))); } } }//package src.entity.bomb
Section 73
//Fire (src.entity.bomb.Fire) package src.entity.bomb { import src.entity.*; import src.player.*; public class Fire extends GameEntity { private var hurtTime:int; public var explosion:BombExplosion; private var power:int; private var step:int;// = 0 private var dir:int; private var speed:Number; private var blowDelay:int;// = 1 private var slidePower:Number; private var life:int;// = 16 public function Fire(_arg1:BombExplosion, _arg2:int, _arg3:int, _arg4:int, _arg5:int){ hurtTime = (life - 4); speed = (((Math.random() * Math.random()) * 0.5) + 0.75); slidePower = ((Math.random() * 0.75) + 0.25); super(); this.explosion = _arg1; this.xRadius = 4; this.yRadius = 4; if ((((((_arg4 == 0)) || ((_arg4 == 2)))) || ((_arg4 == -1)))){ yRadius = 8; }; if ((((((_arg4 == 1)) || ((_arg4 == 3)))) || ((_arg4 == -1)))){ xRadius = 8; }; this.x = _arg2; this.y = _arg3; this.dir = _arg4; this.power = _arg5; layer = -1; } override public function blocksBomb(_arg1:Bomb):Boolean{ return ((step < hurtTime)); } override public function init():void{ setAlwaysTick(); } private function attemptFire(_arg1:Fire):Boolean{ var _local4:GameEntity; var _local2:Array = level.blockMap.getIntersectingEntity(_arg1); var _local3:int; while (_local3 < _local2.length) { _local4 = _local2[_local3]; if (_local4.initialBurn(this)){ return (false); }; _local3++; }; level.addEntity(_arg1); return (true); } override public function render():void{ var _local1:int; if (dir == -1){ _local1 = 2; }; if ((((dir == 0)) || ((dir == 2)))){ _local1 = 1; }; if ((((dir == 1)) || ((dir == 3)))){ _local1 = 6; }; if ((((power == 0)) || ((step < blowDelay)))){ if (dir == 0){ _local1 = 4; }; if (dir == 2){ _local1 = 0; }; if (dir == 1){ _local1 = 8; }; if (dir == 3){ _local1 = 5; }; }; var _local2:Number = 0; var _local3:Number = 0; if (dir == 0){ _local3 = -1; }; if (dir == 1){ _local2 = -1; }; if (dir == 2){ _local3 = 1; }; if (dir == 3){ _local2 = 1; }; var _local4:int = int(((((step * speed) * 18) / life) + 1)); var _local5:Number = (1 - (step / life)); _local5 = ((((_local5 * _local5) * 16) - 8) * slidePower); if ((((_local4 <= 18)) && ((_local4 > 0)))){ drawImage32x32(gr.fire2, (_local4 - 1), 0, (-16 + (_local2 * _local5)), ((-16 + (_local3 * _local5)) - ((step * 7) / life))); }; } public function getPlayer():Player{ return (explosion.getPlayer()); } override public function tick():void{ var _local1:int; var _local2:int; var _local3:Array; var _local4:int; var _local5:GameEntity; if ((((power > 0)) && ((step == blowDelay)))){ _local1 = x; _local2 = y; if ((((((dir == 0)) || ((dir == -1)))) && (level.fireTo((x >> 4), ((y >> 4) + 1))))){ attemptFire(new Fire(explosion, x, (_local2 + 16), 0, (power - 1))); }; if ((((((dir == 1)) || ((dir == -1)))) && (level.fireTo(((x >> 4) + 1), (y >> 4))))){ attemptFire(new Fire(explosion, (_local1 + 16), y, 1, (power - 1))); }; if ((((((dir == 2)) || ((dir == -1)))) && (level.fireTo((x >> 4), ((y >> 4) - 1))))){ attemptFire(new Fire(explosion, x, (_local2 - 16), 2, (power - 1))); }; if ((((((dir == 3)) || ((dir == -1)))) && (level.fireTo(((x >> 4) - 1), (y >> 4))))){ attemptFire(new Fire(explosion, (_local1 - 16), y, 3, (power - 1))); }; }; if (step < hurtTime){ _local3 = level.blockMap.getIntersectingEntity(this); _local4 = 0; while (_local4 < _local3.length) { _local5 = _local3[_local4]; _local5.burn(this); _local4++; }; }; step++; if (step == life){ remove(); }; } } }//package src.entity.bomb
Section 74
//Exit (src.entity.level.Exit) package src.entity.level { import src.entity.*; public class Exit extends GameEntity { public var toLevel:int; public function Exit(_arg1:int, _arg2:int, _arg3:int){ this.x = _arg1; this.y = _arg2; this.toLevel = _arg3; layer = -2; } override public function renderStatic():void{ drawStatic(gr.special, 0, 0); } override public function blocks(_arg1:GameEntity):Boolean{ var _local2:BomberMan; if ((_arg1 is BomberMan)){ _local2 = BomberMan(_arg1); _local2.exit(this); playSound("WinLevel"); }; return (false); } override public function remove():void{ clearStatic(); super.remove(); } override public function render():void{ } } }//package src.entity.level
Section 75
//Teleporter (src.entity.level.Teleporter) package src.entity.level { import src.entity.*; public class Teleporter extends GameEntity { var frames:Array; public var activateTime:int;// = 0 public var step:int;// = 0 public function Teleporter(_arg1:int, _arg2:int){ frames = new Array(0, 1, 0, 2); super(); this.x = _arg1; this.y = _arg2; layer = -2; } override public function blocks(_arg1:GameEntity):Boolean{ var _local2:BomberMan; var _local3:Array; var _local4:Array; var _local5:int; var _local6:GameEntity; var _local7:int; var _local8:Teleporter; var _local9:int; var _local10:int; var _local11:int; var _local12:int; if ((_arg1 is BomberMan)){ _local2 = BomberMan(_arg1); _local3 = level.getVisibleEntities(); _local4 = new Array(); _local5 = 0; while (_local5 < _local3.length) { _local6 = _local3[_local5]; if ((((_local6 is Teleporter)) && (!((_local6 == this))))){ _local4.push(Teleporter(_local6)); }; _local5++; }; if (_local4.length > 0){ _local7 = 0; while (_local7 < 10) { _local5 = random.nextInt(_local4.length); _local8 = _local4[_local5]; _local9 = ((random.nextInt(3) * 14) - 14); _local10 = ((random.nextInt(3) * 14) - 14); if (((!((_local9 == 0))) || (!((_local10 == 0))))){ _local11 = (_local8.x + _local9); _local12 = (_local8.y + _local10); if (((_local2.canMoveTo(_local11, _local12)) && (level.isFree(_local11, _local12, _local2)))){ _local8.activateTime = (activateTime = 10); _local2.teleport(_local11, _local12); playSound("Teleport"); return (false); }; }; _local7++; }; }; }; return (false); } override public function tick():void{ if (activateTime > 0){ activateTime--; }; step++; } override public function render():void{ var _local1:int; if ((activateTime % 2) == 1){ } else { _local1 = ((int(((step + level.alpha) * 3)) >> 3) % 6); if (_local1 >= 0){ drawImage16x32(gr.teleporter, _local1, 0, -8, (-8 - 10)); }; }; } } }//package src.entity.level
Section 76
//Trigger (src.entity.level.Trigger) package src.entity.level { import src.entity.*; public class Trigger extends GameEntity { var frames:Array; public var step:int;// = 0 public function Trigger(_arg1:int, _arg2:int){ frames = new Array(3, 0, 1, 0, 3, 2, -1, -1, 2); super(); this.x = _arg1; this.y = _arg2; layer = -2; } override public function blocks(_arg1:GameEntity):Boolean{ if ((_arg1 is BomberMan)){ remove(); level.trigger((x >> 4), (y >> 4)); playSound("OpenSecret"); }; return (false); } override public function tick():void{ step++; } override public function render():void{ var _local1:int = frames[((int(((step + level.alpha) * 3)) >> 3) % frames.length)]; if (_local1 >= 0){ drawImage(gr.special, _local1, 1, -8, -8); }; } } }//package src.entity.level
Section 77
//Bullet (src.entity.monster.Bullet) package src.entity.monster { import src.entity.*; public class Bullet extends GameEntity { private var tickCount:int;// = 0 public var yo:int; public var xo:int; public var yt:int;// = 0 public var xt:int;// = 0 public static var BULLET_DURATION:int = 15; public function Bullet(_arg1:int, _arg2:int, _arg3:int, _arg4:int){ this.xo = (this.x = _arg1); this.yo = (this.y = _arg2); this.xt = _arg3; this.yt = _arg4; } override public function render():void{ var _local1:int = ((tickCount * 8) / BULLET_DURATION); if (_local1 > 3){ _local1 = (3 - (_local1 - 4)); }; drawImage(gr.bullet, _local1, 0, -8, -14); } override public function init():void{ layer = 1; setAlwaysTick(); } override public function tick():void{ var _local1:Array; var _local2:int; tickCount++; x = int((xo + ((((xt - xo) * tickCount) * 1) / BULLET_DURATION))); y = int((yo + ((((yt - yo) * tickCount) * 1) / BULLET_DURATION))); updatePos(); if (tickCount == BULLET_DURATION){ _local1 = level.blockMap.getIntersectingEntity(this); _local2 = 0; while (_local2 < _local1.length) { _local1[_local2].monsterFireDamage(this, 3); _local2++; }; remove(); }; } } }//package src.entity.monster
Section 78
//Death (src.entity.monster.Death) package src.entity.monster { import src.entity.bomb.*; import src.entity.*; public class Death extends Monster { public var life:int;// = 200 public function Death(_arg1:int, _arg2:int){ super(_arg1, _arg2); meleeDamage = 1; meleeInterval = 0; } override public function melee(_arg1:BomberMan):Boolean{ level.monsterInteracted(); life = (life - 1); _arg1.hurt(1); if (life <= 0){ remove(); return (false); }; return (true); } override public function burn(_arg1:Fire):Boolean{ return (true); } override public function init():void{ super.init(); sheet = gr.death; scoreOnPotion = 10; } } }//package src.entity.monster
Section 79
//Demon (src.entity.monster.Demon) package src.entity.monster { public class Demon extends Monster { private var fireTime:int; private static var FIRE_INTERVAL:int = 60; public function Demon(_arg1:int, _arg2:int){ super(_arg1, _arg2); } override public function init():void{ super.init(); fireTime = random.nextInt(FIRE_INTERVAL); sheet = gr.demon; speed = 4; } override public function tick():void{ var _local1:FireBall; super.tick(); if (--fireTime < 0){ _local1 = new FireBall(x, y, dir); _local1.x = (_local1.x + (_local1.xa * 14)); _local1.y = (_local1.y + (_local1.ya * 14)); if (_local1.fitsIn(level)){ level.addEntity(_local1); playSound("DemonFire", 0.5); }; fireTime = FIRE_INTERVAL; }; } } }//package src.entity.monster
Section 80
//FireBall (src.entity.monster.FireBall) package src.entity.monster { import src.entity.*; public class FireBall extends Mob { public var ya:int;// = 0 public var xa:int;// = 0 private var dir:int; private var tickCount:int;// = 0 public function FireBall(_arg1:int, _arg2:int, _arg3:int){ super(_arg1, _arg2); this.dir = _arg3; if ((((((_arg3 == 0)) || ((_arg3 == 1)))) || ((_arg3 == 7)))){ ya--; }; if ((((((_arg3 == 3)) || ((_arg3 == 4)))) || ((_arg3 == 5)))){ ya++; }; if ((((((_arg3 == 1)) || ((_arg3 == 2)))) || ((_arg3 == 3)))){ xa--; }; if ((((((_arg3 == 5)) || ((_arg3 == 6)))) || ((_arg3 == 7)))){ xa++; }; } override public function melee(_arg1:BomberMan):Boolean{ if (((!(alive)) || (removed))){ return (false); }; return (meleed(_arg1)); } override public function render():void{ var _local1:int = 1; if (tickCount < 1){ _local1 = 0; }; if (tickCount >= ((3 * 20) - 1)){ _local1 = 2; }; drawImage(gr.fireball, (((dir % 2) * 3) + _local1), (dir / 2), -8, -8); } override public function init():void{ slide = false; setAlwaysTick(); } override public function tick():void{ var _local1:int; while (_local1 < 3) { if (!(attemptMove(xa, ya))){ remove(); return; }; if (removed){ return; }; _local1++; }; if (tickCount++ == (3 * 20)){ remove(); }; } override public function meleed(_arg1:BomberMan):Boolean{ if (((!(alive)) || (removed))){ return (false); }; level.monsterInteracted(); _arg1.getPlayer().hurt(10); remove(); return (false); } } }//package src.entity.monster
Section 81
//Ghost (src.entity.monster.Ghost) package src.entity.monster { import src.entity.*; public class Ghost extends Monster { public function Ghost(_arg1:int, _arg2:int){ super(_arg1, _arg2); hurtOnMeleed = true; meleeDamage = 15; } override public function init():void{ super.init(); sheet = gr.ghost; } override public function melee(_arg1:BomberMan):Boolean{ if (((!(alive)) || (removed))){ return (false); }; super.melee(_arg1); remove(); return (false); } override public function meleed(_arg1:BomberMan):Boolean{ if (((!(alive)) || (removed))){ return (false); }; super.melee(_arg1); remove(); return (false); } } }//package src.entity.monster
Section 82
//Grunt (src.entity.monster.Grunt) package src.entity.monster { public class Grunt extends Monster { public function Grunt(_arg1:int, _arg2:int){ super(_arg1, _arg2); } override public function init():void{ super.init(); sheet = gr.grunt; speed = 4; } } }//package src.entity.monster
Section 83
//House (src.entity.monster.House) package src.entity.monster { import src.entity.*; import src.player.*; import src.particle.*; import src.entity.pickup.*; import src.entity.bomb.*; import flash.display.*; public class House extends GameEntity { private var xSlice:int;// = 0 private var ySliceSize:int;// = 0 private var ySlice:int;// = 0 private var xSliceSize:int;// = 0 private var spawnInterval:int;// = 60 private var ySliceOffs:int;// = 0 private var spawnTime:int;// = 0 private var damage:int;// = 0 private var bmd:BitmapData; private var type:int;// = 0 private var xSliceOffs:int;// = 0 public function House(_arg1:int, _arg2:int, _arg3:int){ this.type = _arg3; this.x = _arg1; this.y = _arg2; layer = 0; } override public function initialBurn(_arg1:Fire):Boolean{ level.monsterInteracted(); damage = (damage + 2); var _local2:int; while (_local2 < 2) { level.addParticle(new HouseDeathParticle((x * 2), (y * 2))); _local2++; }; if (damage >= 3){ _local2 = 0; while (_local2 < 20) { level.addParticle(new HouseDeathParticle((x * 2), (y * 2))); _local2++; }; _arg1.getPlayer().addScore(25); remove(); if (random.nextInt(2) == 0){ level.addEntity(new Powerup(x, y, random.nextInt(2))); }; }; renderStatic(); return (true); } override public function remove():void{ super.remove(); clearStatic(); } override public function potionActivated(_arg1:Player):void{ damage = (damage + 2); if (damage >= 3){ remove(); }; } override public function blocks(_arg1:GameEntity):Boolean{ if (_arg1 == this){ return (false); }; return (true); } override public function render():void{ xSlice = damage; gr.drawCustom(bmd, (xSlice * xSliceSize), (ySlice * ySliceSize), xSliceSize, ySliceSize, ((x * 2) + xSliceOffs), ((y * 2) + ySliceOffs)); } override public function init():void{ xSlice = 0; ySlice = 0; var _local1:int = 3; var _local2:int = 1; xSliceOffs = -10; ySliceOffs = -10; if (type == 0){ bmd = gr.house0; }; if (type == 1){ bmd = gr.house3; _local2 = 2; xSortDir = -1; }; if (type == 2){ bmd = gr.house2; }; if (type == 3){ bmd = gr.house3; ySlice = 1; _local2 = 2; }; if (type == 4){ bmd = gr.house1; xSliceOffs = (xSliceOffs - 4); }; xSliceSize = (bmd.width / _local1); ySliceSize = (bmd.height / _local2); xSliceOffs = (xSliceOffs - (xSliceSize - 32)); ySliceOffs = (ySliceOffs - (ySliceSize - 32)); spawnTime = random.nextInt(spawnInterval); } override public function tick():void{ if (!(level.hasPlayer())){ return; }; if (--spawnTime <= 0){ attemptSpawn(); spawnTime = spawnInterval; }; } private function attemptSpawn():void{ var _local1:int = ((random.nextInt(3) * 12) - 12); var _local2:int = ((random.nextInt(3) * 12) - 12); var _local3:Monster; if (type == 0){ _local3 = new Ghost((x + _local1), (y + _local2)); }; if (type == 1){ _local3 = new Grunt((x + _local1), (y + _local2)); }; if (type == 2){ _local3 = new Sorcerer((x + _local1), (y + _local2)); }; if (type == 3){ _local3 = new Demon((x + _local1), (y + _local2)); }; if (type == 4){ _local3 = new Lobber((x + _local1), (y + _local2)); }; if (_local3.fitsIn(level)){ level.addEntity(_local3); playSound("MonsterSpawn", 0.8); }; } } }//package src.entity.monster
Section 84
//Lobber (src.entity.monster.Lobber) package src.entity.monster { import src.entity.*; public class Lobber extends Monster { private var fireTime:int; private static var FIRE_INTERVAL:int = 25; public function Lobber(_arg1:int, _arg2:int){ super(_arg1, _arg2); } override public function init():void{ super.init(); fleeDistance = (2 * 16); stationaryDistance = (3 * 16); fireTime = random.nextInt(FIRE_INTERVAL); speed = 2; sheet = gr.lobber; } override public function tick():void{ var _local1:BomberMan; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:Bullet; super.tick(); if (--fireTime < 0){ fireTime = FIRE_INTERVAL; _local1 = level.getNearestBomberMan(this); if (_local1 != null){ _local2 = (_local1.x + (_local1.xxa * Bullet.BULLET_DURATION)); _local3 = (_local1.y + (_local1.yya * Bullet.BULLET_DURATION)); _local4 = ((x - _local2) / 4); _local5 = ((y - _local3) / 4); if (((_local4 * _local4) + (_local5 * _local5)) < (((6 * 4) * 6) * 4)){ _local6 = new Bullet(x, y, _local2, _local3); level.addEntity(_local6); playSound("LobberToss", 0.5); }; }; }; } } }//package src.entity.monster
Section 85
//Monster (src.entity.monster.Monster) package src.entity.monster { import src.entity.bomb.*; import src.entity.*; import src.player.*; import src.particle.*; import flash.display.*; public class Monster extends Mob { protected var meleeDamage:int;// = 5 protected var scoreOnPotion:int;// = 0 protected var speed:int;// = 3 protected var stationaryDistance:int;// = 0 protected var step:int;// = 0 protected var dir:int;// = 0 private var move:Boolean;// = true protected var meleeInterval:int;// = 10 protected var wanderTime:int;// = 0 protected var blocksFire:Boolean;// = false protected var hurtOnMeleed:Boolean;// = false protected var sheet:BitmapData; protected var ss:int;// = 0 protected var meleeDelay:int;// = 0 protected var killValue:int;// = 5 protected var fleeDistance:int;// = 0 public static var firstMonster:Monster = null; public function Monster(_arg1:int, _arg2:int){ super(_arg1, _arg2); xRadius = (yRadius = 6); if (firstMonster == null){ firstMonster = this; }; } override public function potionActivated(_arg1:Player):void{ if (scoreOnPotion > 0){ _arg1.addScore(scoreOnPotion); }; remove(); } override public function remove():void{ playSound("MonsterDeath"); var _local1:int; while (_local1 < 20) { level.addParticle(new EnemyDeathParticle((x * 2), (y * 2))); _local1++; }; level.monsterInteracted(); super.remove(); } override public function burn(_arg1:Fire):Boolean{ _arg1.getPlayer().addScore(killValue); remove(); return (blocksFire); } override public function init():void{ step = random.nextInt(16); dir = random.nextInt(8); } override public function render():void{ var _local1:int = ((int(((step + level.alpha) * 3)) / 8) & 1); drawImage(sheet, (((dir % 2) * 2) + _local1), (dir / 2), -8, -9); } override public function melee(_arg1:BomberMan):Boolean{ if (meleeDelay > 0){ return (true); }; meleeDelay = meleeInterval; _arg1.hurt(meleeDamage); level.monsterInteracted(); return (true); } override public function tick():void{ ss = (ss + 3); while ((((ss >= speed)) && (!(removed)))) { ss = (ss - 3); performTick(); }; } private function performTick():void{ var _local4:int; var _local5:int; if (meleeDelay > 0){ meleeDelay--; }; var _local1:BomberMan = level.getNearestBomberMan(this); if (wanderTime > 0){ wanderTime--; }; if (((!((_local1 == null))) && (((step % 4) == 0)))){ _local4 = ((_local1.x - x) / 8); _local5 = ((_local1.y - y) / 8); move = true; if ((((fleeDistance > 0)) && ((((_local4 * _local4) + (_local5 * _local5)) < ((fleeDistance * fleeDistance) >> 4))))){ _local4 = -(_local4); _local5 = -(_local5); } else { if ((((stationaryDistance > 0)) && ((((_local4 * _local4) + (_local5 * _local5)) < ((stationaryDistance * stationaryDistance) >> 4))))){ move = false; }; }; if (wanderTime == 0){ if ((((_local5 < 0)) && ((_local4 == 0)))){ dir = 0; }; if ((((_local5 < 0)) && ((_local4 < 0)))){ dir = 1; }; if ((((_local5 == 0)) && ((_local4 < 0)))){ dir = 2; }; if ((((_local5 > 0)) && ((_local4 < 0)))){ dir = 3; }; if ((((_local5 > 0)) && ((_local4 == 0)))){ dir = 4; }; if ((((_local5 > 0)) && ((_local4 > 0)))){ dir = 5; }; if ((((_local5 == 0)) && ((_local4 > 0)))){ dir = 6; }; if ((((_local5 < 0)) && ((_local4 > 0)))){ dir = 7; }; }; }; var _local2:int; var _local3:int; if ((((((dir == 1)) || ((dir == 2)))) || ((dir == 3)))){ _local2 = -1; }; if ((((((dir == 5)) || ((dir == 6)))) || ((dir == 7)))){ _local2 = 1; }; if ((((((dir == 0)) || ((dir == 1)))) || ((dir == 7)))){ _local3 = -1; }; if ((((((dir == 3)) || ((dir == 4)))) || ((dir == 5)))){ _local3 = 1; }; step++; if (((!((_local1 == null))) && (move))){ if (((!(attemptMove(_local2, _local3))) && ((wanderTime == 0)))){ dir = (((dir + random.nextInt(5)) - 2) & 7); wanderTime = 11; }; }; updatePos(); } override public function meleed(_arg1:BomberMan):Boolean{ level.monsterInteracted(); if (hurtOnMeleed){ return (melee(_arg1)); }; return (true); } } }//package src.entity.monster
Section 86
//Sorcerer (src.entity.monster.Sorcerer) package src.entity.monster { import src.entity.*; import src.entity.bomb.*; public class Sorcerer extends Monster { private var blinkTime:int; public var blink:Boolean;// = false private static var BLINK_INTERVAL:int = 13; public function Sorcerer(_arg1:int, _arg2:int){ super(_arg1, _arg2); } override public function meleed(_arg1:BomberMan):Boolean{ if (!(blink)){ super.meleed(_arg1); }; return (true); } override public function melee(_arg1:BomberMan):Boolean{ if (!(blink)){ super.melee(_arg1); }; return (true); } override public function render():void{ var _local1:int = ((int(((step + level.alpha) * 3)) / 8) & 1); drawImage(sheet, _local1, (blink) ? 1 : 0, -8, -8); } override public function init():void{ super.init(); blinkTime = random.nextInt(BLINK_INTERVAL); sheet = gr.sorcerer; speed = 4; } override public function tick():void{ super.tick(); if (--blinkTime < 0){ blink = !(blink); blinkTime = BLINK_INTERVAL; }; } override public function burn(_arg1:Fire):Boolean{ if (!(blink)){ return (super.burn(_arg1)); }; return (false); } } }//package src.entity.monster
Section 87
//Food (src.entity.pickup.Food) package src.entity.pickup { import src.entity.bomb.*; import src.entity.*; import src.level.*; public class Food extends Pickup { private var value:int; public function Food(_arg1:int, _arg2:int, _arg3:int){ super(_arg1, _arg2); blowUp = (_arg3 == 3); this.value = _arg3; xImage = _arg3; yImage = 1; } override public function getParticleType():int{ return (1); } override public function take(_arg1:BomberMan):Boolean{ _arg1.getPlayer().addHealth(getValue(level)); playSound(("TakeFood" + (value + 1)), 0.7); return (true); } public function getValue(_arg1:Level):int{ return (((value + 1) * _arg1.getFoodValue())); } override protected function burned(_arg1:Fire):void{ } } }//package src.entity.pickup
Section 88
//Key (src.entity.pickup.Key) package src.entity.pickup { import src.entity.*; public class Key extends Pickup { public function Key(_arg1:int, _arg2:int){ super(_arg1, _arg2); blowUp = false; blockFire = false; } override public function take(_arg1:BomberMan):Boolean{ if (!(_arg1.getPlayer().canGetKey())){ return (false); }; _arg1.addKey(); playSound("TakeKey"); return (true); } } }//package src.entity.pickup
Section 89
//Pickup (src.entity.pickup.Pickup) package src.entity.pickup { import src.particle.*; import src.entity.bomb.*; import src.entity.*; public class Pickup extends GameEntity { public var blockPassage:Boolean;// = true public var blockFire:Boolean;// = true public var yImage:int; public var xImage:int; public var blowUp:Boolean;// = true public function Pickup(_arg1:int, _arg2:int){ this.x = _arg1; this.y = _arg2; layer = -2; } public function take(_arg1:BomberMan):Boolean{ return (true); } override public function initialBurn(_arg1:Fire):Boolean{ var _local2:int; if (blowUp){ playSound("TreasureDeath"); _local2 = 0; while (_local2 < 16) { level.addParticle(new BurnPowerupParticle((x * 2), (y * 2))); _local2++; }; burned(_arg1); remove(); }; return (blockFire); } protected function burned(_arg1:Fire):void{ } override public function remove():void{ super.remove(); clearStatic(); } override public function blocks(_arg1:GameEntity):Boolean{ if (_arg1 == this){ return (false); }; if ((_arg1 is BomberMan)){ melee(BomberMan(_arg1)); return (false); }; return (blockPassage); } public function getParticleType():int{ return (0); } override public function melee(_arg1:BomberMan):Boolean{ var _local2:int; if (take(_arg1)){ _local2 = 0; while (_local2 < 16) { level.addParticle(new PickupParticle((x * 2), (y * 2), getParticleType(), level.getRandomBomberMan())); _local2++; }; remove(); }; return (false); } override public function renderStatic():void{ drawStatic(gr.pickup, xImage, yImage); } override public function render():void{ } } }//package src.entity.pickup
Section 90
//Potion (src.entity.pickup.Potion) package src.entity.pickup { import src.entity.bomb.*; import src.entity.*; public class Potion extends Pickup { public function Potion(_arg1:int, _arg2:int, _arg3:int){ super(_arg1, _arg2); blowUp = (_arg3 == 0); xImage = (_arg3 + 1); yImage = 0; } override protected function burned(_arg1:Fire):void{ level.activatePotion(_arg1.getPlayer()); } override public function take(_arg1:BomberMan):Boolean{ if (!(_arg1.getPlayer().canGetPowerup())){ return (false); }; playSound("TakePowerup"); _arg1.getPlayer().addPotion(); return (true); } } }//package src.entity.pickup
Section 91
//Powerup (src.entity.pickup.Powerup) package src.entity.pickup { import src.entity.bomb.*; import src.entity.*; public class Powerup extends Pickup { private var type:int; public function Powerup(_arg1:int, _arg2:int, _arg3:int){ super(_arg1, _arg2); this.type = _arg3; xImage = _arg3; yImage = 2; blowUp = true; blockPassage = false; } override protected function burned(_arg1:Fire):void{ super.burned(_arg1); } override public function take(_arg1:BomberMan):Boolean{ if (!(_arg1.getPlayer().canGetPowerup())){ return (false); }; playSound("TakePowerup"); if (type == 0){ _arg1.getPlayer().maxBombs++; } else { if (type == 1){ _arg1.getPlayer().firePower++; }; }; return (true); } } }//package src.entity.pickup
Section 92
//Treasure (src.entity.pickup.Treasure) package src.entity.pickup { import src.entity.*; public class Treasure extends Pickup { private var value:int; public function Treasure(_arg1:int, _arg2:int, _arg3:int){ super(_arg1, _arg2); blowUp = false; this.value = _arg3; xImage = _arg3; yImage = 3; } public function getValue():int{ return (((value + 1) * 50)); } override public function getParticleType():int{ return (2); } override public function take(_arg1:BomberMan):Boolean{ playSound(("TakeTreasure" + (value + 1)), 0.5); _arg1.getPlayer().addScore(getValue()); return (true); } } }//package src.entity.pickup
Section 93
//BomberMan (src.entity.BomberMan) package src.entity { import src.player.*; import src.entity.bomb.*; import src.entity.level.*; import flash.utils.*; import src.particle.*; import src.entity.monster.*; public class BomberMan extends Mob { public var yya:int; public var animation:TeleportAnimation; public var ya:int; private var step:int;// = 0 private var dir:int;// = 0 private var player:Player; public var color:int;// = 0 public var xxa:int; public var xa:int; private var lastHurtTime:int;// = 0 private static var ALLOW_DIAGONAL_MOVEMENT:Boolean = true; public function BomberMan(_arg1:int, _arg2:int, _arg3:Player){ super(_arg1, _arg2); this.player = _arg3; this.color = color; } public function die():void{ var _local1:DeathAnim = new DeathAnim(this, player); level.addEntity(_local1); level.camera.add(_local1); remove(); } private function attemptBomb(_arg1:int, _arg2:int):Boolean{ var _local6:GameEntity; if (!(level.isFree((_arg1 >> 4), (_arg2 >> 4)))){ return (false); }; var _local3:Bomb = new Bomb(player, (((_arg1 >> 4) * 16) + 8), (((_arg2 >> 4) * 16) + 8)); var _local4:Array = level.blockMap.getIntersectingEntity(_local3); var _local5:int; while (_local5 < _local4.length) { _local6 = _local4[_local5]; if (((!((_local6 == this))) && (_local6.blocksBomb(_local3)))){ return (false); }; _local5++; }; playSound("PlantBomb"); level.addEntity(_local3); return (true); } override public function blocks(_arg1:GameEntity):Boolean{ if (animation != null){ return (false); }; _arg1.melee(this); return (true); } override public function render():void{ if (animation != null){ animation.render(); return; }; var _local1:int = ((step / 8) & 3); if (_local1 == 2){ _local1 = 0; }; if (_local1 == 3){ _local1 = 2; }; if (((int(((player.invulnTime + level.alpha) * 2)) / 4) & 1) == 0){ drawImage47x50(gr.player, (((dir % 2) * 3) + _local1), (dir / 2), -8, ((-16 - 8) - 4)); }; } override public function canMoveTo(_arg1:int, _arg2:int):Boolean{ if (level.camera == null){ return (true); }; return (level.camera.fits(this, _arg1, _arg2)); } override public function tick():void{ var _local1:int; while (_local1 < 3) { performTick(); if (_local1 > 0){ player.controller.tick(); }; _local1++; }; } override public function burn(_arg1:Fire):Boolean{ if (player.hitByFire()){ playSound("HurtFire"); }; return (false); } private function performTick():void{ if (animation != null){ animation.tick(); return; }; var _local1:Boolean; var _local2:Boolean = player.controller.buttons[Controller.BUTTON_DOWN]; var _local3:Boolean = player.controller.buttons[Controller.BUTTON_RIGHT]; var _local4:Boolean = player.controller.buttons[Controller.BUTTON_UP]; var _local5:Boolean = player.controller.buttons[Controller.BUTTON_LEFT]; var _local6:Boolean = player.controller.old[Controller.BUTTON_DOWN]; var _local7:Boolean = player.controller.old[Controller.BUTTON_RIGHT]; var _local8:Boolean = player.controller.old[Controller.BUTTON_UP]; var _local9:Boolean = player.controller.old[Controller.BUTTON_LEFT]; if (ALLOW_DIAGONAL_MOVEMENT){ if (((((((_local4) || (_local2))) || (_local3))) || (_local5))){ if (((!(_local6)) && (_local2))){ ya = 1; }; if (((!(_local7)) && (_local3))){ xa = 1; }; if (((!(_local8)) && (_local4))){ ya = -1; }; if (((!(_local9)) && (_local5))){ xa = -1; }; if (((!(_local2)) && (!(_local4)))){ ya = 0; }; if (((!(_local5)) && (!(_local3)))){ xa = 0; }; if ((((((xa == -1)) && (!(_local5)))) || ((((xa == 1)) && (!(_local3)))))){ if (_local5){ xa = -1; }; if (_local3){ xa = 1; }; }; if ((((((ya == -1)) && (!(_local4)))) || ((((ya == 1)) && (!(_local2)))))){ if (_local4){ ya = -1; }; if (_local2){ ya = 1; }; }; _local1 = ((!((xa == 0))) || (!((ya == 0)))); if (xa == 1){ dir = 0; }; if (ya == -1){ dir = 2; }; if (xa == -1){ dir = 4; }; if (ya == 1){ dir = 6; }; if ((((xa == 1)) && ((ya == -1)))){ dir = 1; }; if ((((ya == -1)) && ((xa == -1)))){ dir = 3; }; if ((((xa == -1)) && ((ya == 1)))){ dir = 5; }; if ((((ya == 1)) && ((xa == 1)))){ dir = 7; }; }; } else { xa = 0; ya = 0; if (((((((_local4) || (_local2))) || (_local3))) || (_local5))){ _local1 = true; if ((((dir == 0)) && (!(_local2)))){ _local1 = false; }; if ((((dir == 1)) && (!(_local3)))){ _local1 = false; }; if ((((dir == 2)) && (!(_local4)))){ _local1 = false; }; if ((((dir == 3)) && (!(_local5)))){ _local1 = false; }; if (((((!(_local6)) || (!(_local1)))) && (_local2))){ dir = 0; }; if (((((!(_local7)) || (!(_local1)))) && (_local3))){ dir = 1; }; if (((((!(_local8)) || (!(_local1)))) && (_local4))){ dir = 2; }; if (((((!(_local9)) || (!(_local1)))) && (_local5))){ dir = 3; }; }; xa = 0; ya = 0; if (_local1){ if (dir == 0){ ya = 1; }; if (dir == 1){ xa = 1; }; if (dir == 2){ ya = -1; }; if (dir == 3){ xa = -1; }; }; }; xxa = 0; yya = 0; if (_local1){ step++; level.playerMoved(); if (attemptMove(xa, ya)){ xxa = xa; yya = ya; }; }; updatePos(); if (((player.controller.isTyped(Controller.BUTTON_FIRE)) && (player.canBomb()))){ attemptBomb(x, y); player.controller.old[Controller.BUTTON_FIRE] = true; }; if (((player.controller.isTyped(Controller.BUTTON_SPECIAL)) && ((player.potions > 0)))){ player.potions--; level.activatePotion(player); playSound("UsePotion"); player.controller.old[Controller.BUTTON_SPECIAL] = true; }; } public function getPlayer():Player{ return (player); } public function hurt(_arg1:int):void{ if ((((_arg1 < 100)) && (((getTimer() - lastHurtTime) > 200)))){ lastHurtTime = getTimer(); playSound("HurtMonster"); }; var _local2:int; while (_local2 < _arg1) { level.addParticle(new HurtPlayerParticle((x * 2), (y * 2))); _local2 = (_local2 + 50); }; player.hurt(_arg1); } public function teleport(_arg1:int, _arg2:int):void{ animation = new TeleportAnimation(this, _arg1, _arg2); } public function hasKey():Boolean{ return ((player.keys > 0)); } public function exit(_arg1:Exit):void{ var _local2:ExitAnim = new ExitAnim(this, player, _arg1.x, _arg1.y); level.addEntity(_local2); level.camera.add(_local2); player.setExit(_arg1.toLevel); remove(); } public function removeKey():void{ player.keys--; } public function addKey():void{ player.keys++; } override public function monsterFireDamage(_arg1:Bullet, _arg2:int):void{ hurt(_arg2); level.monsterInteracted(); } } }//package src.entity
Section 94
//DeathAnim (src.entity.DeathAnim) package src.entity { import src.player.*; import src.particle.*; public class DeathAnim extends GameEntity { private var deathTime:int;// = 0 public function DeathAnim(_arg1:BomberMan, _arg2:Player){ _arg2.setAnimation(this); x = _arg1.x; y = _arg1.y; deathTime = -15; } override public function tick():void{ level.addParticle(new HurtPlayerParticle((x * 2), (y * 2))); deathTime++; if (deathTime == 21){ remove(); }; } override public function render():void{ var _local2:int; var _local3:int; var _local1:int = (((deathTime + level.alpha) * 3) / 8); if (_local1 > 4){ _local1 = 4; }; if (_local1 < 0){ drawImage47x50(gr.player, 0, 3, -8, ((-16 - 8) - 4)); } else { if (_local1 < 0){ _local1 = 0; }; _local2 = (310 / 5); _local3 = (60 / 1); drawCustom(gr.deathAnim, _local1, 0, _local2, _local3, -14, -21); }; } } }//package src.entity
Section 95
//ExitAnim (src.entity.ExitAnim) package src.entity { import src.player.*; public class ExitAnim extends GameEntity { private var xTarget:int; private var xStart:int; private var exitTime:int;// = 0 var frame:Array; private var yStart:int; private var yTarget:int; public function ExitAnim(_arg1:BomberMan, _arg2:Player, _arg3:int, _arg4:int){ frame = new Array(1, 2, 5, 4, 8, 7, 10, 11); super(); _arg2.setAnimation(this); xStart = (x = _arg1.x); yStart = (y = _arg1.y); this.xTarget = _arg3; this.yTarget = _arg4; } override public function render():void{ var _local1:int = int((((exitTime + level.alpha) * 3) / 2)); var _local2:int = (_local1 % 8); drawImage47x50(gr.player, (((_local2 % 2) * 3) + 0), (_local2 / 2), -8, ((-16 - 8) - 4)); } override public function tick():void{ exitTime++; x = (xStart + (((xTarget - xStart) * exitTime) / 64)); y = (yStart + (((yTarget - yStart) * exitTime) / 64)); if (exitTime == 21){ remove(); }; } } }//package src.entity
Section 96
//GameEntity (src.entity.GameEntity) package src.entity { import src.level.*; import flash.display.*; import src.entity.bomb.*; import src.player.*; import src.entity.monster.*; import src.*; import src.math.*; public class GameEntity { public var level:Level; public var xOld:int; public var id:int; public var xRadius:int;// = 4 protected var random:MtRandom; public var depth:int;// = 0 public var xPrev:int; public var yPrev:int; public var alive:Boolean;// = true public var layer:int;// = 0 public var removed:Boolean;// = false public var yRadius:int;// = 4 public var yOld:int; public var xSortDir:int;// = 1 public var x:int; public var y:int; public var gr:GraphicsContext; private static var cid:int = 0; public function GameEntity(){ id = cid++; super(); } public function drawImage32x32(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:Number, _arg5:Number):void{ var _local6:int = int((((xPrev * 2) + (((x - xPrev) * 2) * level.alpha)) + (_arg4 * 2))); var _local7:int = int((((yPrev * 2) + (((y - yPrev) * 2) * level.alpha)) + (_arg5 * 2))); gr.drawSprite32x32(_arg1, _arg2, _arg3, _local6, _local7); } public function potionActivated(_arg1:Player):void{ } public function remove():void{ if (removed){ return; }; removed = true; level.blockMap.remove(this); level.removeEntity(this); } public function init():void{ } public function meleed(_arg1:BomberMan):Boolean{ return (true); } public function blocks(_arg1:GameEntity):Boolean{ return (false); } public function render():void{ } public function drawImage47x50(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ var _local6:int = int(((xPrev * 2) + (((x - xPrev) * 2) * level.alpha))); var _local7:int = int(((yPrev * 2) + (((y - yPrev) * 2) * level.alpha))); gr.drawSprite47x50(_arg1, _arg2, _arg3, (_local6 + (_arg4 * 2)), (_local7 + (_arg5 * 2))); } public function tick():void{ } public function renderStatic():void{ } public function clearStatic():void{ var _local1:int = (x >> 4); var _local2:int = (y >> 4); level.updateImages(_local1, _local2, _local1, _local2); } public function initialBurn(_arg1:Fire):Boolean{ return (burn(_arg1)); } public function playSound(_arg1:String, _arg2:Number=1):void{ var _local3:Number = (x - (level.camera.x + (level.camera.width / 2))); var _local4:Number = (_local3 / 200); if (_local4 < -1){ _local4 = -1; }; if (_local4 > 1){ _local4 = 1; }; BlastPassage.sound.get(_arg1).stop(); BlastPassage.sound.get(_arg1).play(_arg2, _local4); } public function monsterFireDamage(_arg1:Bullet, _arg2:int):void{ } public function setLevel(_arg1:Level):void{ this.level = _arg1; random = _arg1.nextRandom(); _arg1.blockMap.insert(this); gr = _arg1.getGraphicsContext(); init(); xOld = x; yOld = y; xPrev = x; yPrev = y; } public function doTick():void{ xPrev = x; yPrev = y; tick(); } public function setAlwaysTick():void{ level.setAlwaysTick(this); } public function burn(_arg1:Fire):Boolean{ return (false); } public function updatePos():void{ if (removed){ return; }; level.blockMap.moved(this); } public function drawCustom(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):void{ var _local8:int = int(((xPrev * 2) + (((x - xPrev) * 2) * level.alpha))); var _local9:int = int(((yPrev * 2) + (((y - yPrev) * 2) * level.alpha))); gr.drawCustom(_arg1, (_arg2 * _arg4), (_arg3 * _arg4), _arg4, _arg5, (_local8 + (_arg6 * 2)), (_local9 + (_arg7 * 2))); } public function blocksBomb(_arg1:Bomb):Boolean{ return (false); } public function drawStatic(_arg1:BitmapData, _arg2:int, _arg3:int):void{ var _local4:int = (x >> 4); var _local5:int = (y >> 4); level.updateImages(_local4, _local5, _local4, _local5); gr.drawFloorImage(_arg1, _arg2, _arg3, _local4, _local5); } public function melee(_arg1:BomberMan):Boolean{ return (true); } public function drawImage16x32(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ var _local6:int = int(((xPrev * 2) + (((x - xPrev) * 2) * level.alpha))); var _local7:int = int(((yPrev * 2) + (((y - yPrev) * 2) * level.alpha))); gr.drawSprite16x32(_arg1, _arg2, _arg3, (_local6 + (_arg4 * 2)), (_local7 + (_arg5 * 2))); } public function calcDepth():void{ depth = (((16 * 32) + (((((layer + 1) * 16) * 32) + y) * 32)) + (x * xSortDir)); } public function drawImage(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ var _local6:int = int(((xPrev * 2) + (((x - xPrev) * 2) * level.alpha))); var _local7:int = int(((yPrev * 2) + (((y - yPrev) * 2) * level.alpha))); gr.drawSprite(_arg1, _arg2, _arg3, (_local6 + (_arg4 * 2)), (_local7 + (_arg5 * 2))); } public function drawHouseImage(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ var _local6:int = int((x * 2)); var _local7:int = int((y * 2)); gr.drawSprite(_arg1, _arg2, _arg3, _local6, _local7); } } }//package src.entity
Section 97
//Mob (src.entity.Mob) package src.entity { import src.level.*; public class Mob extends GameEntity { protected var slide:Boolean;// = true public function Mob(_arg1:int, _arg2:int){ this.x = _arg1; this.y = _arg2; } override public function blocks(_arg1:GameEntity):Boolean{ if (_arg1 == this){ return (false); }; var _local2:Boolean = true; if ((_arg1 is BomberMan)){ _local2 = meleed(BomberMan(_arg1)); }; return (_local2); } public function fitsIn(_arg1:Level):Boolean{ this.level = _arg1; if (!(_arg1.isFree(x, y, this))){ return (false); }; if (!(canMoveTo(x, y))){ return (false); }; var _local2:Array = _arg1.blockMap.getIntersecting(x, y, xRadius, yRadius); return ((_local2.length == 0)); } protected function couldMove(_arg1:int, _arg2:int):Boolean{ var _local5:GameEntity; if (!(level.isFree((x + _arg1), (y + _arg2), this))){ return (false); }; if (!(canMoveTo((x + _arg1), (y + _arg2)))){ return (false); }; var _local3:Array = level.blockMap.getIntersecting((x + _arg1), (y + _arg2), xRadius, yRadius); var _local4:int; while (_local4 < _local3.length) { _local5 = _local3[_local4]; if ((((((((xOld >= ((_local5.x - xRadius) - _local5.xRadius))) && ((yOld >= ((_local5.y - yRadius) - _local5.yRadius))))) && ((xOld <= ((_local5.x + xRadius) + _local5.xRadius))))) && ((yOld <= ((_local5.y + yRadius) + _local5.yRadius))))){ } else { if (((!((_local5 == this))) && (_local5.blocks(this)))){ return (false); }; }; _local4++; }; return (true); } public function canMoveTo(_arg1:int, _arg2:int):Boolean{ return (true); } public function attemptMove(_arg1:int, _arg2:int):Boolean{ if ((((_arg1 == 0)) && ((_arg2 == 0)))){ return (true); }; if ((((_arg1 == 0)) || ((_arg2 == 0)))){ if (_attemptMove(_arg1, _arg2)){ return (true); }; if (!(slide)){ return (false); }; if (_arg1 == 0){ if (couldMove(-6, _arg2)){ return (_attemptMove(-1, 0)); }; if (couldMove(6, _arg2)){ return (_attemptMove(1, 0)); }; return (false); } else { if (couldMove(_arg1, -6)){ return (_attemptMove(0, -1)); }; if (couldMove(_arg1, 6)){ return (_attemptMove(0, 1)); }; return (false); }; }; if (_attemptMove(_arg1, _arg2)){ return (true); }; if (!(slide)){ return (false); }; var _local3:Boolean; _local3 = ((_local3) || (_attemptMove(_arg1, 0))); _local3 = ((_local3) || (_attemptMove(0, _arg2))); return (_local3); } private function _attemptMove(_arg1:int, _arg2:int):Boolean{ if (!(couldMove(_arg1, _arg2))){ return (false); }; x = (x + _arg1); y = (y + _arg2); return (true); } } }//package src.entity
Section 98
//TeleportAnimation (src.entity.TeleportAnimation) package src.entity { public class TeleportAnimation { private var bomberMan:BomberMan; public var time:int;// = 0 var frame:Array; private var yo:int; private var xo:int; private var yt:int; private var xt:int; private static var ANIM_DURATION:Number = 40; public function TeleportAnimation(_arg1:BomberMan, _arg2:int, _arg3:int){ frame = new Array(1, 2, 5, 4, 8, 7, 10, 11); super(); this.bomberMan = _arg1; this.xo = _arg1.x; this.yo = _arg1.y; this.xt = _arg2; this.yt = _arg3; } public function render():void{ var _local1:int = (time / 2); var _local2:int = (_local1 % 8); bomberMan.drawImage47x50(bomberMan.gr.player, (((_local2 % 2) * 3) + 0), (_local2 / 2), -8, ((-16 - 8) - 4)); } public function tick():void{ time++; var _local1:Number = (time / ANIM_DURATION); _local1 = ((_local1 * 1.2) - 0.2); if (_local1 < 0){ _local1 = 0; }; if (_local1 > 1){ _local1 = 1; }; _local1 = (((_local1 * _local1) + _local1) / 2); bomberMan.x = int((xo + ((xt - xo) * _local1))); bomberMan.y = int((yo + ((yt - yo) * _local1))); if (time == ANIM_DURATION){ bomberMan.animation = null; }; } } }//package src.entity
Section 99
//AirTube (src.gui.AirTube) package src.gui { import flash.display.*; public class AirTube extends MovieClip { public var airTube:MovieClip; public var light:MovieClip; } }//package src.gui
Section 100
//ButtonListener (src.gui.ButtonListener) package src.gui { public interface ButtonListener { function buttonToggled(_arg1:int, _arg2:Boolean):Boolean; } }//package src.gui
Section 101
//Gui (src.gui.Gui) package src.gui { import flash.display.*; import src.*; import src.player.*; import src.screen.game.*; import flash.utils.*; import flash.text.*; public class Gui extends MovieClip implements ButtonListener { public var scoreLabel:TextField; private var lBombs:int;// = 0 private var lScore:int;// = 0 private var lKeys:int;// = 0 public var bombs:TextField; public var score:TextField; private var lHealth:int;// = 0 private var lWarn:int;// = -1 public var soundButton:GuiButton; private var lPotions:int;// = 0 private var blastPassage:BlastPassage; public var musicButton:GuiButton; public var oxygenLabel:TextField; public var timeMeter:MovieClip; public var potions:TextField; public var pauseButton:GuiButton; private var lRot:Number;// = 0 public var time:TextField; private var lAirFrame:int;// = -999 private var lFire:int;// = 0 public var airMeter:MovieClip; public var quitButton:GuiButton; private var lSeconds:Number;// = 0 public var keys:TextField; public var fires:TextField; private var gameScreen:GameScreen; public function Gui(){ bombs.text = "0"; fires.text = "0"; keys.text = "0"; potions.text = "0"; score.text = "0"; musicButton.init(this, 0); soundButton.init(this, 1); quitButton.init(this, 2); pauseButton.init(this, 3); airMeter.light.gotoAndStop(1); airMeter.light.ll.gotoAndStop(1); airMeter.airTube.gotoAndStop(1); } public function buttonToggled(_arg1:int, _arg2:Boolean):Boolean{ if (blastPassage != null){ if (_arg1 == 0){ blastPassage.introButtons.musicButton.setPressed(_arg2); BlastPassage.music.fadeTo((_arg2) ? 0 : 1, 200); return (true); }; if (_arg1 == 1){ blastPassage.introButtons.soundButton.setPressed(_arg2); BlastPassage.sound.fadeTo((_arg2) ? 0 : 1, 200); return (true); }; if ((((_arg1 == 2)) && (_arg2))){ return (blastPassage.abortGame()); }; if (_arg1 == 3){ if (_arg2){ blastPassage.pauseGame(); } else { blastPassage.unpauseGame(); }; return (true); }; return (false); }; return (false); } public function init(_arg1:BlastPassage):void{ this.blastPassage = _arg1; } public function animateLight():void{ var _local2:Number; var _local1:int; if (gameScreen.player.getHealth() < (Player.MAX_HEALTH / 8)){ _local1 = 1; }; if ((((_local1 == lWarn)) && ((_local1 == 0)))){ return; }; lWarn = _local1; if (_local1 == 0){ airMeter.light.gotoAndStop(1); airMeter.light.ll.gotoAndStop(1); } else { _local2 = ((Math.sin((getTimer() / 100)) * 0.5) + 0.5); airMeter.light.gotoAndStop((int((_local2 * 100)) + 1)); airMeter.light.ll.gotoAndStop((int((_local2 * 3)) + 1)); }; } public function reset():void{ pauseButton.setPressed(false); quitButton.setPressed(false); } public function update():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:Number; var _local9:int; var _local10:String; if (gameScreen.player != null){ _local1 = (gameScreen.player.maxBombs - Player.START_BOMBS); _local2 = (gameScreen.player.firePower - Player.START_FIRE); _local3 = gameScreen.player.keys; _local4 = gameScreen.player.potions; _local5 = gameScreen.player.score; _local6 = gameScreen.player.getHealth(); if (_local1 != lBombs){ bombs.text = ("" + (lBombs = _local1)); }; if (_local2 != lFire){ fires.text = ("" + (lFire = _local2)); }; if (_local3 != lKeys){ keys.text = ("" + (lKeys = _local3)); }; if (_local4 != lPotions){ potions.text = ("" + (lPotions = _local4)); }; if (_local5 != lScore){ score.text = ("" + (lScore = _local5)); }; if (_local6 != lHealth){ oxygenLabel.text = (((("" + int((_local6 / 10))) + ".") + ((lHealth = _local6) % 10)) + "%"); }; _local7 = int((((gameScreen.remainingTicks + BlastPassage.TICKS_PER_SECOND) - 1) / BlastPassage.TICKS_PER_SECOND)); if (_local7 != lSeconds){ lSeconds = _local7; _local10 = (int((_local7 / 60)) + ":"); _local7 = (_local7 % 60); time.text = ((_local10 + ((_local7 < 10)) ? "0" : "") + _local7); }; _local8 = int(((1 - (gameScreen.remainingTicks / GameScreen.GAME_TIME)) * 180)); if (_local8 < 0){ _local8 = 0; }; if (_local8 > 180){ _local8 = 180; }; if (_local8 != lRot){ timeMeter.arrow.rotation = -((lRot = _local8)); }; _local9 = int(((((1000 - gameScreen.player.getHealth()) / 1000) * 96) + 4)); if (_local9 != lAirFrame){ airMeter.airTube.gotoAndStop(((lAirFrame = _local9) + 1)); }; animateLight(); }; } public function setScreen(_arg1:GameScreen):void{ this.gameScreen = _arg1; } } }//package src.gui
Section 102
//GuiButton (src.gui.GuiButton) package src.gui { import flash.events.*; import flash.utils.*; import flash.display.*; public class GuiButton extends MovieClip { private var id:int; private var animPos:Number;// = 0 private var lastTime:int;// = 0 private var animDir:int;// = -1 private var gui:ButtonListener; private var animating:Boolean;// = false public function GuiButton(){ gotoAndStop(1); addEventListener(MouseEvent.MOUSE_DOWN, click); mouseEnabled = true; useHandCursor = true; buttonMode = true; tabEnabled = false; } public function setPressed(_arg1:Boolean):void{ animDir = (_arg1) ? 1 : -1; animPos = (_arg1) ? 1 : 0; gotoAndStop(int(((animPos * 5) + 1))); } public function animate(_arg1:Event):void{ var _local2:int = getTimer(); var _local3:int = (_local2 - lastTime); lastTime = _local2; animPos = (animPos + ((animDir * _local3) / 170)); if (animPos < 0){ animPos = 0; animating = false; removeEventListener(Event.ENTER_FRAME, animate); }; if (animPos > 1){ animPos = 1; animating = false; removeEventListener(Event.ENTER_FRAME, animate); }; gotoAndStop(int(((animPos * 5) + 1))); } public function click(_arg1:MouseEvent):void{ toggle(); } public function init(_arg1:ButtonListener, _arg2:int):void{ this.gui = _arg1; this.id = _arg2; } public function toggle():void{ if (gui == null){ return; }; if (!(gui.buttonToggled(id, (animDir == -1)))){ return; }; animDir = -(animDir); if (!(animating)){ lastTime = getTimer(); addEventListener(Event.ENTER_FRAME, animate); animating = true; }; } } }//package src.gui
Section 103
//IntroButton (src.gui.IntroButton) package src.gui { import flash.events.*; import flash.display.*; public class IntroButton extends MovieClip { private var gui:ButtonListener; private var id:int; public function IntroButton(){ addEventListener(MouseEvent.MOUSE_DOWN, click); mouseEnabled = true; useHandCursor = true; buttonMode = true; tabEnabled = false; alpha = 0; } public function init(_arg1:ButtonListener, _arg2:int):void{ this.gui = _arg1; this.id = _arg2; } public function click(_arg1:MouseEvent):void{ if (gui != null){ gui.buttonToggled(id, true); }; } } }//package src.gui
Section 104
//IntroMusicButton (src.gui.IntroMusicButton) package src.gui { public dynamic class IntroMusicButton extends GuiButton { } }//package src.gui
Section 105
//IntroOffButton (src.gui.IntroOffButton) package src.gui { public dynamic class IntroOffButton extends GuiButton { } }//package src.gui
Section 106
//IntroSoundButton (src.gui.IntroSoundButton) package src.gui { public dynamic class IntroSoundButton extends GuiButton { } }//package src.gui
Section 107
//LevelButton (src.gui.LevelButton) package src.gui { import flash.display.*; public class LevelButton { public var bestScore:int;// = 0 public var exits:Array; public var mc:MovieClip; public var id:int; public var won:Boolean;// = false public var exitsRevealed:Array; public var dirTo:Array; public var revealed:Boolean;// = false public var paths:Array; public function LevelButton(_arg1:int, _arg2:MovieClip){ exits = new Array(4); exitsRevealed = new Array(4); paths = new Array(4); dirTo = new Array(32); super(); this.id = _arg1; this.mc = _arg2; _arg2.gotoAndStop(2); var _local3:int; while (_local3 < 4) { exitsRevealed[_local3] = false; _local3++; }; } public function hide():void{ mc.visible = false; revealed = false; } public function reveal():void{ mc.visible = true; revealed = true; } public function reset():void{ mc.gotoAndStop(2); var _local1:int; while (_local1 < 4) { exitsRevealed[_local1] = false; _local1++; }; won = false; revealed = false; bestScore = 0; } public function newScore(_arg1:int):void{ if (_arg1 > bestScore){ bestScore = _arg1; }; } public function setExit(_arg1:int, _arg2:LevelButton):void{ exits[_arg1] = _arg2; dirTo[_arg2.id] = _arg1; } public function win():void{ reveal(); won = true; mc.gotoAndStop(1); var _local1:int; while (_local1 < 4) { if (exits[_local1] != null){ paths[_local1].visible = true; exitsRevealed[_local1] = true; exits[_local1].reveal(); }; _local1++; }; } public function setPath(_arg1:int, _arg2:MovieClip):void{ paths[_arg1] = _arg2; } } }//package src.gui
Section 108
//LevelChooser (src.gui.LevelChooser) package src.gui { import flash.display.*; import com.midasplayer.*; import src.*; import flash.events.*; import flash.ui.*; import src.player.*; import flash.utils.*; import flash.text.*; public class LevelChooser extends MovieClip implements ButtonListener { private var walkStartTime:int;// = 0 private var lives:int;// = 5 private var currentLevel:LevelButton; private var lastLevel:LevelButton; private var score:int;// = 0 public var playAgainShower:MovieClip; public var planet:MovieClip; public var kingButton:IntroButton; public var bear:MovieClip; private var gameLost:Boolean;// = false public var highscoreShower:MovieClip; private var walkXFirst:Boolean;// = false private var gameWon:Boolean;// = false private var bp:BlastPassageStandAlone; private var animStart:int;// = -1 public var livesText:TextField; private var levelButtons:Array; public var scoreText:TextField; private var paths:Array; public var spaceToPlay:TextField; public var menuButton:IntroButton; private var walking:Boolean;// = false private static const DOWN:int = 1; private static const LEFT:int = 2; private static const STARTING_LIVES:int = 5; private static const UP:int = 0; private static const RIGHT:int = 3; public function LevelChooser(){ levelButtons = new Array(13); paths = new Array(14); super(); var _local1:int; while (_local1 < 13) { levelButtons[_local1] = new LevelButton(_local1, planet[("lvl" + _local1)]); _local1++; }; _local1 = 0; while (_local1 < 14) { paths[_local1] = planet[("p" + _local1)]; _local1++; }; bear = planet.bear; addPath(4, LEFT, 6, UP, 5); addPath(5, DOWN, 7, UP, 6); addPath(6, DOWN, 8, UP, 7); addPath(7, LEFT, 9, RIGHT, 9); addPath(7, DOWN, 10, UP, 10); addPath(10, LEFT, 11, RIGHT, 12); addPath(0, DOWN, 2, UP, 0); addPath(2, LEFT, 1, RIGHT, 1); addPath(2, RIGHT, 3, LEFT, 2); addPath(1, DOWN, 4, UP, 3); addPath(3, DOWN, 5, UP, 4); addPath(4, DOWN, 6, RIGHT, 5); addPath(5, RIGHT, 7, UP, 6); addPath(6, DOWN, 8, LEFT, 7); addPath(7, LEFT, 9, UP, 9); addPath(7, DOWN, 10, RIGHT, 10); addPath(8, DOWN, 11, LEFT, 11); addPath(8, RIGHT, 9, LEFT, 8); addPath(10, DOWN, 11, RIGHT, 12); addPath(11, DOWN, 12, UP, 13); visible = false; menuButton.init(this, 0); kingButton.init(this, 1); highscoreShower.button.init(this, 2); playAgainShower.button.init(this, 3); reset(); } public function checkMove(_arg1:int):Boolean{ if (currentLevel.exits[_arg1] == null){ return (false); }; if (!(currentLevel.paths[_arg1].visible)){ return (false); }; lastLevel = currentLevel; currentLevel = currentLevel.exits[_arg1]; walking = true; walkStartTime = getTimer(); var _local2:int = lastLevel.dirTo[currentLevel.id]; walkXFirst = (((_local2 == LEFT)) || ((_local2 == RIGHT))); return (true); } public function levelWon(_arg1:int):void{ spaceToPlay.visible = false; currentLevel.win(); currentLevel.newScore(bp.gameScreen.player.score); recalcScore(); if (currentLevel == levelButtons[(levelButtons.length - 1)]){ gameWon = true; }; } public function checkPlayLevel():void{ bp.playLevel(currentLevel.id); } private function animateLose():void{ if (animStart < 0){ animStart = getTimer(); }; var _local1:Number = (((getTimer() - animStart) / 1000) - 0.4); var _local2:int = int(((_local1 * 24) + 26)); if (_local2 > 33){ _local2 = 33; }; if (_local2 < 26){ _local2 = 25; }; if (_local2 >= 25){ playAgainShower.visible = true; }; bear.gotoAndStop(_local2); } private function animateWin():void{ if (animStart < 0){ animStart = getTimer(); }; var _local1:Number = ((getTimer() - animStart) / 1000); var _local2:Number = ((_local1 - 0.3) / 4); if (_local2 < 0){ _local2 = 0; }; if (_local2 > 1){ _local2 = 1; }; if (_local2 >= 0.8){ highscoreShower.visible = true; playAgainShower.visible = true; }; _local2 = (0.5 - (Math.cos((_local2 * Math.PI)) * 0.5)); planet.rotation = (_local2 * 180); bear.rotation = -(planet.rotation); planet.y = (235 + (_local2 * 260)); var _local3:int = int((((_local1 * 24) % 16) + 10)); bear.gotoAndStop(_local3); } public function hide():void{ removeEventListener(Event.ENTER_FRAME, advanceTime); stage.removeEventListener(KeyboardEvent.KEY_DOWN, bp.keyDown); stage.removeEventListener(KeyboardEvent.KEY_UP, bp.keyUp); visible = false; bp.removeChild(bp.introButtons); bp.introButtons.y = (bp.introButtons.y + 284); } public function levelLost():void{ lives--; if (lives == 0){ gameLost = true; }; livesText.text = ("" + lives); } public function reveal(_arg1:int):void{ levelButtons[_arg1].reveal(); } public function reset():void{ score = 0; spaceToPlay.visible = true; var _local1:int; while (_local1 < 13) { levelButtons[_local1].reset(); levelButtons[_local1].hide(); _local1++; }; _local1 = 0; while (_local1 < 14) { paths[_local1].visible = false; _local1++; }; bear.gotoAndStop(1); reveal(0); currentLevel = levelButtons[0]; bear.x = currentLevel.mc.x; bear.y = currentLevel.mc.y; lives = LevelChooser.STARTING_LIVES; recalcScore(); livesText.text = ("" + lives); gameWon = false; gameLost = false; animStart = -1; planet.rotation = (0 * 180); bear.rotation = -(planet.rotation); planet.y = (235 + (0 * 260)); highscoreShower.visible = false; playAgainShower.visible = false; } public function win(_arg1:int):void{ levelButtons[_arg1].win(); } private function addPath(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ levelButtons[_arg1].setExit(_arg2, levelButtons[_arg3]); levelButtons[_arg3].setExit(_arg4, levelButtons[_arg1]); levelButtons[_arg1].setPath(_arg2, paths[_arg5]); levelButtons[_arg3].setPath(_arg4, paths[_arg5]); } public function recalcScore():void{ score = 0; var _local1:int; while (_local1 < 13) { score = (score + levelButtons[_local1].bestScore); _local1++; }; scoreText.text = ("" + score); highscoreShower.scoreText.text = ("" + score); } public function advanceTime(_arg1:Event):void{ bp.controller.tick(); BlastPassage.music.update(); BlastPassage.sound.update(); if (gameWon){ animateWin(); return; }; if (gameLost){ animateLose(); return; }; if (walking){ updateWalkAnim(); return; }; if (bp.controller.isTyped(Controller.BUTTON_UP)){ checkMove(UP); }; if (bp.controller.isTyped(Controller.BUTTON_DOWN)){ checkMove(DOWN); }; if (bp.controller.isTyped(Controller.BUTTON_LEFT)){ checkMove(LEFT); }; if (bp.controller.isTyped(Controller.BUTTON_RIGHT)){ checkMove(RIGHT); }; if (((bp.controller.isTyped(Controller.BUTTON_FIRE)) || (bp.controller.isTyped(Controller.BUTTON_SPECIAL)))){ checkPlayLevel(); }; } public function updateWalkAnim():void{ var _local1:int = (lastLevel.mc.x - currentLevel.mc.x); var _local2:int = (lastLevel.mc.y - currentLevel.mc.y); var _local3:int = (getTimer() - walkStartTime); var _local4:int = (int((_local3 / 100)) % 2); var _local5:Number = (_local3 / 5); var _local6:Boolean; var _local7:int; if (walkXFirst){ if ((((_local5 < Math.abs(_local1))) && (!((_local1 == 0))))){ _local5 = (_local5 / Math.abs(_local1)); bear.x = (lastLevel.mc.x - (_local1 * _local5)); bear.y = lastLevel.mc.y; _local7 = ((_local1 < 0)) ? RIGHT : LEFT; } else { _local5 = ((_local5 - Math.abs(_local1)) / Math.abs(_local2)); if ((((_local5 >= 1)) || ((_local2 == 0)))){ _local6 = true; }; bear.x = currentLevel.mc.x; bear.y = (lastLevel.mc.y - (_local2 * _local5)); _local7 = ((_local2 < 0)) ? DOWN : UP; }; } else { if ((((_local5 < Math.abs(_local2))) && (!((_local2 == 0))))){ _local5 = (_local5 / Math.abs(_local2)); bear.x = lastLevel.mc.x; bear.y = (lastLevel.mc.y - (_local2 * _local5)); _local7 = ((_local2 < 0)) ? DOWN : UP; } else { _local5 = ((_local5 - Math.abs(_local2)) / Math.abs(_local1)); if ((((_local5 >= 1)) || ((_local1 == 0)))){ _local6 = true; }; bear.x = (lastLevel.mc.x - (_local1 * _local5)); bear.y = currentLevel.mc.y; _local7 = ((_local1 < 0)) ? RIGHT : LEFT; }; }; if (_local7 == DOWN){ _local4 = (_local4 + 2); }; if (_local7 == LEFT){ _local4 = (_local4 + 4); }; if (_local7 == UP){ _local4 = (_local4 + 6); }; if (_local7 == RIGHT){ _local4 = (_local4 + 8); }; bear.gotoAndStop(_local4); if (_local6){ bear.gotoAndStop(1); bear.x = currentLevel.mc.x; bear.y = currentLevel.mc.y; walking = false; }; } public function show(_arg1:BlastPassageStandAlone):void{ BlastPassage.music.stopAll(); this.bp = _arg1; addEventListener(Event.ENTER_FRAME, advanceTime); visible = true; stage.addEventListener(KeyboardEvent.KEY_DOWN, _arg1.keyDown); stage.addEventListener(KeyboardEvent.KEY_UP, _arg1.keyUp); stage.focus = _arg1; Mouse.show(); _arg1.addChild(_arg1.introButtons); _arg1.introButtons.y = (_arg1.introButtons.y - 284); } public function buttonToggled(_arg1:int, _arg2:Boolean):Boolean{ if (_arg1 == 0){ bp.backToMainMenu(); }; if (_arg1 == 1){ KingAPI.openHighscoresLink(); }; if (_arg1 == 2){ KingAPI.submitScore(score); }; if (_arg1 == 3){ bp.backToMainMenu(); }; return (true); } } }//package src.gui
Section 109
//BlockMap (src.level.BlockMap) package src.level { import src.entity.*; public class BlockMap { public var ly0:int; public var ly1:int; public var width:int; public var entityGrid:Array; public var lx0:int; public var lx1:int; public var height:int; public var slot2:BlockSlot; public var slot:BlockSlot; public static var SCALE:int = 64; public function BlockMap(_arg1:int, _arg2:int){ var _local4:int; super(); slot = new BlockSlot(this); slot2 = new BlockSlot(this); this.width = (_arg1 / SCALE); this.height = (_arg2 / SCALE); if (width == 0){ width = 1; }; if (height == 0){ height = 1; }; entityGrid = new Array(width); var _local3:int; while (_local3 < width) { entityGrid[_local3] = new Array(height); _local4 = 0; while (_local4 < height) { entityGrid[_local3][_local4] = new Array(); _local4++; }; _local3++; }; } public function remove(_arg1:GameEntity):void{ getSlot(_arg1.xOld, _arg1.yOld).remove(_arg1); } public function clear():void{ var _local2:int; var _local1:int; while (_local1 < width) { _local2 = 0; while (_local2 < height) { entityGrid[_local1][_local2] = new Array(); _local2++; }; _local1++; }; } public function getIntersecting(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Array{ var _local12:Array; var _local13:int; var _local14:int; var _local15:GameEntity; var _local5:int = (_arg1 - _arg3); var _local6:int = (_arg2 - _arg4); var _local7:int = (_arg1 + _arg3); var _local8:int = (_arg2 + _arg4); var _local9:Array = new Array(); var _local10:BlockSlot = slot.init((_local5 - 16), (_local6 - 16)); var _local11:BlockSlot = slot2.init((_local7 + 16), (_local8 + 16)); lx0 = _local10.xSlot; ly0 = _local10.ySlot; lx1 = _local11.xSlot; ly1 = _local11.ySlot; _arg1 = _local10.xSlot; while (_arg1 <= _local11.xSlot) { _arg2 = _local10.ySlot; while (_arg2 <= _local11.ySlot) { _local12 = entityGrid[_arg1][_arg2]; _local13 = _local12.length; _local14 = 0; while (_local14 < _local13) { _local15 = _local12[_local14]; if (!(((((((((_local15.removed) || (((_local15.x + _local15.xRadius) < _local5)))) || (((_local15.y + _local15.yRadius) < _local6)))) || (((_local15.x - _local15.xRadius) > _local7)))) || (((_local15.y - _local15.yRadius) > _local8))))){ _local9.push(_local15); }; _local14++; }; _arg2++; }; _arg1++; }; return (_local9); } public function getIntersectingEntity(_arg1:GameEntity):Array{ return (getIntersecting(_arg1.x, _arg1.y, _arg1.xRadius, _arg1.yRadius)); } public function getEntities(_arg1:int, _arg2:int, _arg3:int, _arg4:int, _arg5:Array=null):Array{ var _local9:int; var _local10:Array; var _local11:int; var _local12:int; var _local13:GameEntity; if (_arg5 == null){ _arg5 = new Array(); }; var _local6:BlockSlot = slot.init(_arg1, _arg2); var _local7:BlockSlot = slot2.init(_arg3, _arg4); lx0 = _local6.xSlot; ly0 = _local6.ySlot; lx1 = _local7.xSlot; ly1 = _local7.ySlot; var _local8:int = _local6.xSlot; while (_local8 <= _local7.xSlot) { _local9 = _local6.ySlot; while (_local9 <= _local7.ySlot) { _local10 = entityGrid[_local8][_local9]; _local11 = _local10.length; _local12 = 0; while (_local12 < _local11) { _local13 = _local10[_local12]; if (!(((((((((_local13.removed) || (((_local13.x + _local13.xRadius) < _arg1)))) || (((_local13.y + _local13.yRadius) < _arg2)))) || (((_local13.x - _local13.xRadius) > _arg3)))) || (((_local13.y - _local13.yRadius) > _arg4))))){ _arg5.push(_local13); }; _local12++; }; _local9++; }; _local8++; }; return (_arg5); } public function insert(_arg1:GameEntity):void{ getSlot(_arg1.x, _arg1.y).add(_arg1); _arg1.xOld = _arg1.x; _arg1.yOld = _arg1.y; } public function moved(_arg1:GameEntity):void{ var _local2:BlockSlot = slot.init(_arg1.xOld, _arg1.yOld); var _local3:BlockSlot = slot2.init(_arg1.x, _arg1.y); _arg1.xOld = _arg1.x; _arg1.yOld = _arg1.y; if (_local2.equals(_local3)){ return; }; _local2.remove(_arg1); _local3.add(_arg1); } private function getSlot(_arg1:int, _arg2:int):BlockSlot{ return (slot.init(_arg1, _arg2)); } } }//package src.level
Section 110
//BlockSlot (src.level.BlockSlot) package src.level { import src.entity.*; public class BlockSlot { public var xSlot:int; public var ySlot:int; public var blockMap:BlockMap; public function BlockSlot(_arg1:BlockMap){ this.blockMap = _arg1; } public function init(_arg1:int, _arg2:int):BlockSlot{ xSlot = (_arg1 / BlockMap.SCALE); ySlot = (_arg2 / BlockMap.SCALE); if (xSlot < 0){ xSlot = 0; }; if (ySlot < 0){ ySlot = 0; }; if (xSlot >= blockMap.width){ xSlot = (blockMap.width - 1); }; if (ySlot >= blockMap.height){ ySlot = (blockMap.height - 1); }; return (this); } public function add(_arg1:GameEntity):void{ if ((((xSlot >= 0)) && ((ySlot >= 0)))){ blockMap.entityGrid[xSlot][ySlot].push(_arg1); }; } public function remove(_arg1:GameEntity):void{ if ((((xSlot >= 0)) && ((ySlot >= 0)))){ blockMap.entityGrid[xSlot][ySlot].splice(blockMap.entityGrid[xSlot][ySlot].indexOf(_arg1), 1); }; } public function equals(_arg1:BlockSlot):Boolean{ return ((((_arg1.xSlot == xSlot)) && ((_arg1.ySlot == ySlot)))); } } }//package src.level
Section 111
//DownloadLevelLoader (src.level.DownloadLevelLoader) package src.level { import src.*; public class DownloadLevelLoader extends LevelLoader { private var levelDatas:LevelData; public function DownloadLevelLoader(_arg1:BlastPassage){ levelDatas = new LevelData(); super(_arg1); } override public function loadLevel(_arg1:GraphicsContext, _arg2:int, _arg3:String, _arg4:int):Level{ return (super.loadLevel(_arg1, _arg2, levelDatas.levels[(_arg2 - 1)], _arg4)); } } }//package src.level
Section 112
//FileLevelLoader (src.level.FileLevelLoader) package src.level { import flash.net.*; import src.*; import flash.events.*; public class FileLevelLoader extends LevelLoader { private var levelData:String; private var bp:BlastPassage; private var myLoader:URLLoader; public function FileLevelLoader(_arg1:BlastPassage){ super(_arg1); this.bp = _arg1; myLoader = new URLLoader(new URLRequest("test.dat")); myLoader.addEventListener("complete", levelLoaded); } override public function loadLevel(_arg1:GraphicsContext, _arg2:int, _arg3:String, _arg4:int):Level{ return (super.loadLevel(_arg1, _arg2, this.levelData, _arg4)); } function levelLoaded(_arg1:Event):void{ var _local2:String = String(myLoader.data); this.levelData = _local2; bp.levelsLoaded(); } } }//package src.level
Section 113
//GameCamera (src.level.GameCamera) package src.level { import src.entity.*; public class GameCamera { private var entities:Array; private var level:Level; public var width:int; public var xx:Number; public var yi:int; public var yyLast:Number; private var shakeLevel:int;// = 0 public var yy:Number; public var height:int; public var xi:int; public var xxLast:Number; public var x:int; public var y:int; public function GameCamera(_arg1:Level, _arg2:int, _arg3:int){ entities = new Array(); super(); this.level = _arg1; this.width = _arg2; this.height = _arg3; xxLast = (xx = (x = (((_arg1.xStart * 16) + 8) - (_arg2 / 2)))); yyLast = (yy = (y = (((_arg1.yStart * 16) + 8) - (_arg3 / 2)))); if (x < 0){ x = 0; }; if (y < 0){ y = 0; }; if (x > ((_arg1.width * 16) - _arg2)){ x = ((_arg1.width * 16) - _arg2); }; if (y > ((_arg1.height * 16) - _arg3)){ y = ((_arg1.height * 16) - _arg3); }; } public function fits(_arg1:GameEntity, _arg2:int, _arg3:int):Boolean{ return ((((((((_arg2 >= (x + _arg1.xRadius))) && ((_arg3 >= (y + _arg1.yRadius))))) && ((_arg2 <= ((x + width) - _arg1.xRadius))))) && ((_arg3 <= ((y + height) - _arg1.yRadius))))); } public function shake():void{ shakeLevel = (shakeLevel + 24); if (shakeLevel > 60){ shakeLevel = 60; }; } public function tick():void{ xxLast = xx; yyLast = yy; var _local1:int; while (_local1 < 3) { performTick(); _local1++; }; } public function add(_arg1:GameEntity):void{ entities.push(_arg1); } public function performTick():void{ var _local3:int; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:GameEntity; if (shakeLevel > 0){ shakeLevel--; }; var _local1:int; var _local2:int; if (entities.length != 0){ _local3 = 1000000; _local4 = -1000000; _local5 = 1000000; _local6 = -1000000; _local7 = 0; while (_local7 < entities.length) { _local8 = entities[_local7]; if (_local8.removed){ var _temp1 = _local7; _local7 = (_local7 - 1); entities.splice(_temp1, 1); } else { if (_local8.x < _local3){ _local3 = _local8.x; }; if (_local8.x > _local4){ _local4 = _local8.x; }; if (_local8.y < _local5){ _local5 = _local8.y; }; if (_local8.y > _local6){ _local6 = _local8.y; }; }; _local7++; }; _local1 = (((_local3 + _local4) / 2) - (width / 2)); _local2 = (((_local5 + _local6) / 2) - (height / 2)); } else { _local1 = (((level.xStart * 16) + 8) - (width / 2)); _local2 = (((level.yStart * 16) + 8) - (height / 2)); }; xx = (xx + ((_local1 - xx) / 8)); yy = (yy + ((_local2 - yy) / 8)); x = int(xx); y = int(yy); if (x < 0){ x = 0; }; if (y < 0){ y = 0; }; if (x > ((level.width * 16) - width)){ x = ((level.width * 16) - width); }; if (y > ((level.height * 16) - height)){ y = ((level.height * 16) - height); }; } public function lerp(_arg1:Number):void{ xi = int(((xxLast * 2) + (((xx - xxLast) * _arg1) * 2))); yi = int(((yyLast * 2) + (((yy - yyLast) * _arg1) * 2))); if (xi < 0){ xi = 0; }; if (yi < 0){ yi = 0; }; if (xi > (((level.width * 16) - width) * 2)){ xi = (((level.width * 16) - width) * 2); }; if (yi > (((level.height * 16) - height) * 2)){ yi = (((level.height * 16) - height) * 2); }; if (shakeLevel > 0){ xi = (xi + (((Math.random() - Math.random()) * shakeLevel) * 0.2)); yi = (yi + (((Math.random() - Math.random()) * shakeLevel) * 0.2)); }; } public function shakeMax():void{ shakeLevel = 70; } } }//package src.level
Section 114
//Level (src.level.Level) package src.level { import src.math.*; import src.particle.*; import src.entity.*; import src.entity.monster.*; import src.entity.level.*; import src.entity.pickup.*; import flash.display.*; import src.player.*; import src.*; public class Level { public var potionTime:int;// = 0 private var particleLayer:Sprite; private var bomberMen:Array; public var blockMap:BlockMap; private var totalTreasure:int;// = 0 private var noMoveTime:int;// = 0 public var wallType:int;// = 2 public var camera:GameCamera; private var toAdd:Array; public var height:int; public var foodValue:int;// = 20 public var floorColor:int;// = 6 public var wallColor:int;// = 13 private var totalHealth:int;// = 0 private var entities:Array; public var random:MtRandom; public var width:int; public var xStart:int; private var alwaysTick:Array; public var map:Array; public var alpha:Number; private var toRemove:Array; public var yStart:int; public var gr:GraphicsContext; public var floorType:int;// = 2 private var seed:int; private var noMonsterInteractionTime:int;// = 0 public var levelNum:int;// = 1 public var randomAccesses:int;// = 0 public static var AUTO_DOOR_OPEN_TIME:int = 1800; public static var WALL_CHARS:String = "#%&"; public static var AUTO_WALL_TO_EXIT_TIME:int = 12000; public function Level(_arg1:int, _arg2:int, _arg3:int){ entities = new Array(); bomberMen = new Array(); alwaysTick = new Array(); toAdd = new Array(); toRemove = new Array(); random = new MtRandom(42); super(); this.seed = _arg3; random.setSeed(_arg3); this.width = _arg1; this.height = _arg2; blockMap = new BlockMap((_arg1 * 16), (_arg2 * 16)); } public function getNearestBomberMan(_arg1:GameEntity):BomberMan{ var _local5:BomberMan; var _local6:int; var _local7:int; var _local8:int; var _local2:BomberMan; var _local3:int; var _local4:int; while (_local4 < bomberMen.length) { _local5 = bomberMen[_local4]; _local6 = (_local5.x - _arg1.x); _local7 = (_local5.y - _arg1.y); _local8 = ((_local6 * _local6) + (_local7 * _local7)); if ((((_local2 == null)) || ((_local8 < _local3)))){ _local3 = _local8; _local2 = _local5; }; _local4++; }; return (_local2); } public function getGraphicsContext():GraphicsContext{ return (gr); } public function calcHealth():int{ return (totalHealth); } public function removeEntity(_arg1:GameEntity):void{ if ((_arg1 is BomberMan)){ bomberMen.splice(bomberMen.indexOf(_arg1), 1); }; _arg1.alive = false; toRemove.push(_arg1); } public function hasPlayer():Boolean{ return ((bomberMen.length > 0)); } public function tick():void{ var _local4:int; var _local5:GameEntity; if (bomberMen.length > 0){ noMonsterInteractionTime++; noMoveTime++; if ((((noMonsterInteractionTime == AUTO_DOOR_OPEN_TIME)) && (!(hasKey())))){ unlockAll(); }; if (noMonsterInteractionTime == (AUTO_DOOR_OPEN_TIME * 2)){ unlockAll(); }; if (noMoveTime == AUTO_WALL_TO_EXIT_TIME){ exitAll(); }; }; if (potionTime > 0){ potionTime--; }; var _local1:Array = blockMap.getEntities(camera.x, camera.y, (camera.x + camera.width), (camera.y + camera.height)); var _local2:int; while (_local2 < alwaysTick.length) { _local4 = _local1.indexOf(alwaysTick[_local2]); if (_local4 >= 0){ _local1.splice(_local4, 1); }; _local1.push(alwaysTick[_local2]); _local2++; }; var _local3:int; while (_local3 < _local1.length) { _local5 = _local1[_local3]; if (!(_local5.removed)){ _local5.doTick(); }; _local3++; }; _local3 = 0; while (_local3 < toAdd.length) { toAdd[_local3].renderStatic(); _local3++; }; entities = entities.concat(toAdd); _local2 = 0; while (_local2 < toRemove.length) { _local4 = entities.indexOf(toRemove[_local2]); if (_local4 >= 0){ entities.splice(_local4, 1); }; _local4 = alwaysTick.indexOf(toRemove[_local2]); if (_local4 >= 0){ alwaysTick.splice(_local4, 1); }; _local2++; }; toRemove = new Array(); toAdd = new Array(); } public function updateImages(_arg1:int, _arg2:int, _arg3:int, _arg4:int):void{ var _local5:int; var _local6:int; var _local7:BitmapData; var _local9:int; var _local10:String; var _local11:String; var _local12:String; var _local13:String; var _local14:String; if (_arg1 < 0){ _arg1 = 0; }; if (_arg2 < 0){ _arg2 = 0; }; if (_arg3 >= width){ _arg3 = (width - 1); }; if (_arg4 >= height){ _arg4 = (height - 1); }; var _local8:int = _arg1; while (_local8 <= _arg3) { _local9 = _arg2; while (_local9 <= _arg4) { _local10 = getTile(_local8, _local9); gr.drawFloorImage(gr.floor, _local8, _local9, _local8, _local9); if (wallType == 2){ if (_local10 == "%"){ _local5 = (2 + (_local8 % 2)); _local6 = 0; _local7 = gr.wall; if (WALL_CHARS.indexOf(getTile(_local8, (_local9 + 1))) < 0){ _local6 = (_local6 + 1); }; gr.drawFloorImage(_local7, _local5, _local6, _local8, _local9); } else { if (_local10 == "C"){ _local5 = 4; _local6 = 0; _local7 = gr.wall; gr.drawFloorImage(_local7, _local5, _local6, _local8, _local9); } else { if (WALL_CHARS.indexOf(_local10) >= 0){ _local5 = (0 + (_local8 % 2)); _local6 = 0; _local7 = gr.wall; if (WALL_CHARS.indexOf(getTile(_local8, (_local9 + 1))) < 0){ _local6 = (_local6 + 1); }; gr.drawFloorImage(_local7, _local5, _local6, _local8, _local9); }; }; }; } else { if (_local10 == "%"){ _local5 = 0; _local6 = 4; _local7 = gr.wall; if (WALL_CHARS.indexOf(getTile((_local8 - 1), _local9)) >= 0){ _local5 = (_local5 + 1); }; if (WALL_CHARS.indexOf(getTile(_local8, (_local9 - 1))) >= 0){ _local5 = (_local5 + 2); }; if (WALL_CHARS.indexOf(getTile((_local8 + 1), _local9)) >= 0){ _local5 = (_local5 + 4); }; if (WALL_CHARS.indexOf(getTile(_local8, (_local9 + 1))) >= 0){ _local5 = (_local5 + 8); }; gr.drawFloorImage(_local7, _local5, _local6, _local8, _local9); } else { if (_local10 == "C"){ _local5 = 0; _local6 = 5; _local7 = gr.wall; gr.drawFloorImage(_local7, _local5, _local6, _local8, _local9); } else { if (WALL_CHARS.indexOf(_local10) >= 0){ _local5 = 0; _local6 = ((_local8 + _local9) % 4); _local7 = gr.wall; if (WALL_CHARS.indexOf(getTile((_local8 - 1), _local9)) >= 0){ _local5 = (_local5 + 1); }; if (WALL_CHARS.indexOf(getTile(_local8, (_local9 - 1))) >= 0){ _local5 = (_local5 + 2); }; if (WALL_CHARS.indexOf(getTile((_local8 + 1), _local9)) >= 0){ _local5 = (_local5 + 4); }; if (WALL_CHARS.indexOf(getTile(_local8, (_local9 + 1))) >= 0){ _local5 = (_local5 + 8); }; gr.drawFloorImage(_local7, _local5, _local6, _local8, _local9); }; }; }; }; if (_local10 == "-"){ _local11 = getTile(_local8, (_local9 + 1)); _local12 = getTile(_local8, (_local9 - 1)); _local13 = getTile((_local8 - 1), _local9); _local14 = getTile((_local8 + 1), _local9); _local5 = 1; _local6 = 0; if ((((_local11 == "-")) && ((_local14 == "-")))){ _local5 = 2; } else { if ((((_local11 == "-")) && ((_local13 == "-")))){ _local5 = 0; } else { if ((((_local12 == "-")) && ((_local14 == "-")))){ _local5 = 0; } else { if ((((_local12 == "-")) && ((_local13 == "-")))){ _local5 = 2; } else { if ((((_local12 == "-")) || ((_local11 == "-")))){ _local5 = 3; } else { if ((((_local13 == "-")) || ((_local14 == "-")))){ _local5 = 1; } else { if ((((_local12 == "#")) || ((_local11 == "#")))){ _local5 = 3; } else { if ((((_local13 == "#")) || ((_local14 == "#")))){ _local5 = 1; }; }; }; }; }; }; }; }; gr.drawFloorImage(gr.door, _local5, _local6, _local8, _local9); }; _local9++; }; _local8++; }; } public function exitAll():void{ var _local2:int; var _local1:int; while (_local1 < width) { _local2 = 0; while (_local2 < height) { if (WALL_CHARS.indexOf(getTile(_local1, _local2)) >= 0){ addEntity(new Exit(((_local1 * 16) + 8), ((_local2 * 16) + 8), 0)); setTile(_local1, _local2, " "); }; _local2++; }; _local1++; }; } public function setParticleLayer(_arg1:Sprite):void{ this.particleLayer = _arg1; } private function getTile(_arg1:int, _arg2:int):String{ if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= width)))) || ((_arg2 >= height)))){ return (" "); }; return (map[(_arg1 + (_arg2 * width))]); } public function setData(_arg1:Array):void{ var _local3:int; var _local4:int; var _local5:GameEntity; random.setSeed(seed); toAdd = new Array(); toRemove = new Array(); entities = new Array(); bomberMen = new Array(); alwaysTick = new Array(); blockMap.clear(); this.map = _arg1; totalHealth = 0; totalTreasure = 0; var _local2:int; while (_local2 < _arg1.length) { _local3 = (_local2 % width); _local4 = (_local2 / width); _local5 = null; if (_arg1[_local2] == "."){ _local5 = new Ghost(((_local3 * 16) + 8), ((_local4 * 16) + 8)); }; if (_arg1[_local2] == ","){ _local5 = new Grunt(((_local3 * 16) + 8), ((_local4 * 16) + 8)); }; if (_arg1[_local2] == ";"){ _local5 = new Sorcerer(((_local3 * 16) + 8), ((_local4 * 16) + 8)); }; if (_arg1[_local2] == ":"){ _local5 = new Demon(((_local3 * 16) + 8), ((_local4 * 16) + 8)); }; if (_arg1[_local2] == "*"){ _local5 = new Lobber(((_local3 * 16) + 8), ((_local4 * 16) + 8)); }; if (_arg1[_local2] == "'"){ _local5 = new Death(((_local3 * 16) + 8), ((_local4 * 16) + 8)); }; if (_arg1[_local2] == "1"){ _local5 = new House(((_local3 * 16) + 8), ((_local4 * 16) + 8), 0); }; if (_arg1[_local2] == "2"){ _local5 = new House(((_local3 * 16) + 8), ((_local4 * 16) + 8), 1); }; if (_arg1[_local2] == "3"){ _local5 = new House(((_local3 * 16) + 8), ((_local4 * 16) + 8), 2); }; if (_arg1[_local2] == "4"){ _local5 = new House(((_local3 * 16) + 8), ((_local4 * 16) + 8), 3); }; if (_arg1[_local2] == "5"){ _local5 = new House(((_local3 * 16) + 8), ((_local4 * 16) + 8), 4); }; if (_arg1[_local2] == "K"){ _local5 = new Key(((_local3 * 16) + 8), ((_local4 * 16) + 8)); }; if (_arg1[_local2] == "$"){ _local5 = new Treasure(((_local3 * 16) + 8), ((_local4 * 16) + 8), 0); }; if (_arg1[_local2] == "£"){ _local5 = new Treasure(((_local3 * 16) + 8), ((_local4 * 16) + 8), 1); }; if (_arg1[_local2] == "a"){ _local5 = new Food(((_local3 * 16) + 8), ((_local4 * 16) + 8), 0); }; if (_arg1[_local2] == "b"){ _local5 = new Food(((_local3 * 16) + 8), ((_local4 * 16) + 8), 1); }; if (_arg1[_local2] == "c"){ _local5 = new Food(((_local3 * 16) + 8), ((_local4 * 16) + 8), 2); }; if (_arg1[_local2] == "d"){ _local5 = new Food(((_local3 * 16) + 8), ((_local4 * 16) + 8), 3); }; if (_arg1[_local2] == "!"){ _local5 = new Potion(((_local3 * 16) + 8), ((_local4 * 16) + 8), 0); }; if (_arg1[_local2] == "?"){ _local5 = new Potion(((_local3 * 16) + 8), ((_local4 * 16) + 8), 1); }; if (_arg1[_local2] == "/"){ _local5 = new Teleporter(((_local3 * 16) + 8), ((_local4 * 16) + 8)); }; if (_arg1[_local2] == ">"){ _local5 = new Exit(((_local3 * 16) + 8), ((_local4 * 16) + 8), 0); }; if (_arg1[_local2] == "x"){ _local5 = new Exit(((_local3 * 16) + 8), ((_local4 * 16) + 8), 1); }; if (_arg1[_local2] == "X"){ _local5 = new Exit(((_local3 * 16) + 8), ((_local4 * 16) + 8), 2); }; if (_arg1[_local2] == "Y"){ _local5 = new Exit(((_local3 * 16) + 8), ((_local4 * 16) + 8), 3); }; if (_arg1[_local2] == "="){ _local5 = new Trigger(((_local3 * 16) + 8), ((_local4 * 16) + 8)); }; if (_local5 != null){ if ((_local5 is Food)){ totalHealth = (totalHealth + Food(_local5).getValue(this)); }; if ((_local5 is Treasure)){ totalTreasure = (totalTreasure + Treasure(_local5).getValue()); }; addEntity(_local5); }; if (_local5 != null){ _arg1[_local2] = " "; }; _local2++; }; updateImages(0, 0, width, height); } public function nextRandom():MtRandom{ randomAccesses++; return (random); } private function setTile(_arg1:int, _arg2:int, _arg3:String):void{ if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= width)))) || ((_arg2 >= height)))){ return; }; map[(_arg1 + (_arg2 * width))] = _arg3; updateImages((_arg1 - 1), (_arg2 - 1), (_arg1 + 1), (_arg2 + 1)); var _local4:Array = blockMap.getEntities(((_arg1 * 16) - 16), ((_arg2 * 16) - 16), ((_arg1 * 16) + 32), ((_arg2 * 16) + 32)); var _local5:int; while (_local5 < _local4.length) { GameEntity(_local4[_local5]).renderStatic(); _local5++; }; } public function getVisibleEntities():Array{ var _local1:int; return (blockMap.getEntities((camera.x - _local1), (camera.y - _local1), (((camera.x + camera.width) - 16) + _local1), ((camera.y + camera.height) + _local1))); } public function isFree(_arg1:int, _arg2:int, _arg3:Mob=null):Boolean{ var _local9:String; var _local10:int; if (_arg3 == null){ if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= width)))) || ((_arg2 >= height)))){ return (false); }; _local9 = getTile(_arg1, _arg2); return ((((_local9 == " ")) || ((_local9 == "C")))); }; var _local4:int = ((_arg1 - 4) >> 4); var _local5:int = ((_arg2 + 4) >> 4); var _local6:int = ((_arg2 - 4) >> 4); var _local7:int = ((_arg1 + 4) >> 4); if (_local4 < 0){ _local4 = 0; }; if (_local6 < 0){ _local6 = 0; }; if (_local4 >= width){ _local4 = (width - 1); }; if (_local6 >= height){ _local6 = (height - 1); }; var _local8:int = _local4; while (_local8 <= _local7) { _local10 = _local6; while (_local10 <= _local5) { if (getTile(_local8, _local10) == "-"){ //unresolved if //unresolved if _arg3.playSound("UseKey"); noMonsterInteractionTime = 0; BomberMan(_arg3).removeKey(); unlock(_local8, _local10); } else { _local9 = getTile(_local8, _local10); if (((!((_local9 == " "))) && (!((_local9 == "C"))))){ return (false); }; }; _local10++; }; _local8++; }; return (true); } public function unlockAll():void{ var _local2:int; var _local1:int; while (_local1 < width) { _local2 = 0; while (_local2 < height) { if (getTile(_local1, _local2) == "-"){ setTile(_local1, _local2, " "); }; _local2++; }; _local1++; }; } public function setCamera(_arg1:GameCamera):void{ this.camera = _arg1; } public function addParticle(_arg1:Particle):void{ particleLayer.addChild(_arg1); } public function unlock(_arg1:int, _arg2:int):void{ if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= width)))) || ((_arg2 >= height)))){ return; }; if (getTile(_arg1, _arg2) == "-"){ setTile(_arg1, _arg2, " "); unlock((_arg1 - 1), _arg2); unlock((_arg1 + 1), _arg2); unlock(_arg1, (_arg2 - 1)); unlock(_arg1, (_arg2 + 1)); }; } public function unlockTriggerWall(_arg1:int, _arg2:int):void{ if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= width)))) || ((_arg2 >= height)))){ return; }; if (getTile(_arg1, _arg2) == "&"){ setTile(_arg1, _arg2, " "); unlockTriggerWall((_arg1 - 1), _arg2); unlockTriggerWall((_arg1 + 1), _arg2); unlockTriggerWall(_arg1, (_arg2 - 1)); unlockTriggerWall(_arg1, (_arg2 + 1)); }; } public function monsterInteracted():void{ noMonsterInteractionTime = 0; } public function trigger(_arg1:int, _arg2:int):void{ var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local3:int = -1; var _local4:int = -1; var _local5:int; var _local6:int; while (_local6 < height) { _local7 = 0; while (_local7 < width) { if (map[(_local7 + (_local6 * width))] == "&"){ _local8 = (_local7 - _arg1); _local9 = (_local6 - _arg2); _local10 = ((_local8 * _local8) + (_local9 * _local9)); if ((((_local3 < 0)) || ((_local10 < _local3)))){ _local3 = _local10; _local4 = _local5; }; }; _local5++; _local7++; }; _local6++; }; if (_local4 >= 0){ unlockTriggerWall((_local4 % width), (_local4 / width)); }; } public function setAlwaysTick(_arg1:GameEntity):void{ alwaysTick.push(_arg1); } public function renderSprites(_arg1:GameCamera):void{ if (potionTime > 0){ return; }; var _local2:int = 16; var _local3:Array = blockMap.getEntities(((_arg1.xi / 2) - _local2), ((_arg1.yi / 2) - _local2), ((((_arg1.xi / 2) + _arg1.width) - 16) + _local2), (((_arg1.yi / 2) + _arg1.height) + _local2)); var _local4:int; while (_local4 < _local3.length) { GameEntity(_local3[_local4]).calcDepth(); _local4++; }; _local3.sortOn("depth"); var _local5:int; while (_local5 < _local3.length) { _local3[_local5].render(); _local5++; }; } public function getRandomBomberMan():BomberMan{ if (bomberMen.length == 0){ return (null); }; return (bomberMen[0]); } public function getEntityById(_arg1:int):GameEntity{ var _local2:int; while (_local2 < entities.length) { if (entities[_local2].id == _arg1){ return (entities[_local2]); }; _local2++; }; return (null); } public function fireTo(_arg1:int, _arg2:int):Boolean{ if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= width)))) || ((_arg2 >= height)))){ return (false); }; var _local3:String = getTile(_arg1, _arg2); if (_local3 == "%"){ setTile(_arg1, _arg2, "C"); return (false); }; return ((((_local3 == " ")) || ((_local3 == "C")))); } public function playerMoved():void{ noMoveTime = 0; } private function hasKey():Boolean{ var _local1:int; while (_local1 < bomberMen.length) { if (bomberMen[_local1].hasKey()){ return (true); }; _local1++; }; return (false); } public function renderJustBombermenSprites(_arg1:GameCamera):void{ if (potionTime > 0){ return; }; var _local2:int = 16; var _local3:Array = blockMap.getEntities(((_arg1.xi / 2) - _local2), ((_arg1.yi / 2) - _local2), ((((_arg1.xi / 2) + _arg1.width) - 16) + _local2), (((_arg1.yi / 2) + _arg1.height) + _local2)); var _local4:int; while (_local4 < _local3.length) { GameEntity(_local3[_local4]).calcDepth(); _local4++; }; _local3.sortOn("depth"); var _local5:int; while (_local5 < _local3.length) { if ((((_local3[_local5] is BomberMan)) || ((_local3[_local5] is DeathAnim)))){ _local3[_local5].render(); }; _local5++; }; } public function addEntity(_arg1:GameEntity):void{ if ((_arg1 is BomberMan)){ bomberMen.push(BomberMan(_arg1)); }; toAdd.push(_arg1); _arg1.setLevel(this); } public function paintTiles():void{ gr.setFloorType(floorType); gr.setWallType(wallType); } public function updateAllImages():void{ updateImages(0, 0, width, height); } public function calcTreasure():int{ return (totalTreasure); } public function getFoodValue():int{ return (foodValue); } public function activatePotion(_arg1:Player):void{ camera.shakeMax(); potionTime = 6; var _local2:int = 16; var _local3:Array = blockMap.getEntities((camera.x - _local2), (camera.y - _local2), (((camera.x + camera.width) - 16) + _local2), ((camera.y + camera.height) + _local2)); var _local4:int; while (_local4 < _local3.length) { _local3[_local4].potionActivated(_arg1); _local4++; }; } public function getLevelString(_arg1:int=-1):String{ if (_arg1 == -1){ _arg1 = levelNum; }; var _local2:String = " LEVEL "; if (_arg1 < 0){ _local2 = (_local2 + "???"); } else { if (_arg1 < 10){ _local2 = (_local2 + " "); }; if (_arg1 < 100){ _local2 = (_local2 + " "); }; _local2 = (_local2 + _arg1); }; return (_local2); } } }//package src.level
Section 115
//LevelData (src.level.LevelData) package src.level { public class LevelData { public var levels:Array; public function LevelData(){ levels = new Array(13); super(); levels[0] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "8\n") + "1\n") + "58\n") + "52\n") + "32\n") + "32\n") + "################################\n") + "#$$ #$ c c - .!.d#\n") + "#$ # - ....#\n") + "# # d # .£.$#\n") + "# . # ; #....#\n") + "# # ; ; #£ #\n") + "# 1 # 2 ####### ;3 #£ #\n") + "#. . # #$ $# #a#\n") + "# #$ # # 5 ; ##\n") + "# # # d # #\n") + "# # #$ 2 # 3 ; #\n") + "# b # c # # ;; #\n") + "# # #c #### 2 # #\n") + "# # #$ $# # K #\n") + "# # # $$ # 2 # #\n") + "# # # $'.$ # $# #\n") + "# #$ # $*.$ # # c#\n") + "# # 4 # $$ # # #\n") + "# # :: #$ $# # #\n") + "# # 4: #### # c # b #\n") + "# . # c# # #\n") + "# . # 4 $# # #\n") + "# # : d # # #\n") + "## ..1 . # # : :$# #\n") + "#a# . #$ cc $# :: #,,,,#\n") + "# £# 1 ####### :4 # ,2 #\n") + "# £# # ,, #\n") + "#;;;;# : # #\n") + "#$;£; # d : # #\n") + "#;;;; - # $#\n") + "#d;!; - K $#> $$#\n") + "################################\n") + ""); levels[1] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "3\n") + "15\n") + "18\n") + "38\n") + "32\n") + "32\n") + "################################\n") + "# #K £d#\n") + "# ££ .1. # . . . £#\n") + "# ££ 1.. #$$ . . a#\n") + "# #'$ . . Ka#\n") + "###### ######## £#\n") + "#.... #%c% % ## £?#\n") + "#%%%%# % # %*% % #########\n") + "# 1# #% %!%#%# #$ $ bb#\n") + "# ##### #%#% %c# # ,b#\n") + "# c# %*% %#%# #$ , #\n") + "# ## ## %*% % # , #\n") + "# £# % % % ## ####%## #\n") + "# £# #####%#£ #£ #*£# #\n") + "# a#* #£ # *% # a#\n") + "# $# # #######-- #\n") + "# $#* # # %a# - #\n") + "# a# # , 2 , %a# % - #\n") + "# £# ## #######-- ,#\n") + "# £# #£ 2 , 2 #* #* # #\n") + "# ## ## #£ % £# #\n") + "# c# #d ,,,,, #####%# , #\n") + "# ##### ############ ,a#\n") + "# 1# # ,,,,#c #\n") + "#%%%%# # 2 ,,,,#c , , #\n") + "#.... # ,,,,# #\n") + "######## # 2 ,,,,- #\n") + "# # ,,,,- , , #\n") + "# ££ 1.. # ,,,,# #\n") + "# ££ .1. # > ,,,,#c #\n") + "# # ,,,,#c c c #\n") + "################################\n") + ""); levels[2] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "16\n") + "20\n") + "17\n") + "51\n") + "32\n") + "32\n") + "################################\n") + "#££££££#. ...'.. - #\n") + "#£ b£#.########## .... - ..c#\n") + "#£b £#.#.. .. - .... - .. #\n") + "#£ b £# #.####.# - ..K- ...#\n") + "#££££££#...... .# ---- .. - ...#\n") + "#%%%%%%########## - .. - ..K#\n") + "# : : ::: ::: - . - c#\n") + "# a # :&&&&#&&&: - ---- #\n") + "# : :&c c& : - - #\n") + "# 4 &= =&: - - #\n") + "# # 4 ::& & #-- -----###\n") + "# a :&c c&: - c - bb#\n") + "# : &&&$ &&& --#-- .... #\n") + "# 4* : & $& : # .... #\n") + "# #$ & : # . #\n") + "# # 4 # $# # K---#\n") + "# 4 % a #--###########---- .#\n") + "# # #; # . ..#\n") + "# # # # #;K # .# . #\n") + "# a # #££# #;; # #K--#\n") + "# * a #;;# #3; #--##- #\n") + "# # % * #;;#b b#;; 3# -''- #\n") + "# #;;######; # ---- #\n") + "# # * #;;; 3 #b b#\n") + "# % K # # ; 3 # . .. #\n") + "#%% % # # .... #\n") + "# # # * # d ###### . . #\n") + "# #%%## # 1..... #\n") + "# % # # > .1......#\n") + "#? % d# $ $ $ # .1......#\n") + "################################\n") + ""); levels[3] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "27\n") + "1\n") + "6\n") + "27\n") + "32\n") + "32\n") + "################################\n") + "#£ £ #$££ £$#c d#\n") + "# : 4 :: # . ! $# #\n") + "# K # £# #\n") + "# : 4 # 1 # #\n") + "# # .. # = #\n") + "#££££########### 1 #a a#\n") + "# # # . . ##&&&&&##\n") + "#4 : # 4 # # ..... #\n") + "# # # . # ..... #\n") + "# # # # # ..... #\n") + "# : # # & # #\n") + "# # : # ::::& # $ #\n") + "# # :&&&&&&###### #\n") + "# 4 # :&$$ $ #\n") + "# : # :&$ 1 #\n") + "# # :& $ 1 #\n") + "##########&&& = 1 #\n") + "# - :& 1 #\n") + "# 2 - :&$ #\n") + "# - :&$$ #\n") + "# , - :&&&&&&##############\n") + "# , - ::::& a d #\n") + "# 2 , - & a 2 2 #\n") + "# ------#aab d 2 #\n") + "# $ , # #\n") + "#$ ,, # 2 d2 d 2 #\n") + "# > 2 2 # 2 #\n") + "# $ ,, # d 2 d#\n") + "# $ # 2 d 2 #\n") + "# $ # #\n") + "################################\n") + ""); levels[4] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "6\n") + "3\n") + "36\n") + "11\n") + "32\n") + "32\n") + "################################\n") + "#> #d# ;;;; #* K#\n") + "# -d# #*#*# #\n") + "#---d# #*# #! #\n") + "# # £# £# # # #*####\n") + "#----# ; #*# * *#\n") + "# # # ; 3 ; # #### #\n") + "#----# £ ; ;; #* * **#\n") + "# # ;;########\n") + "# £ ' ;;#£ ; #\n") + "# ; d# ;; #\n") + "# # £ ;; ;;;; ; #\n") + "# ; £ # 3 ; #\n") + "# ; £# 3 #\n") + "# ; ;; # £# #\n") + "# ; ;; £# d #\n") + "# #£ ; ;; ;;;;; ;; #\n") + "# ; #£ ' ;; 3 #\n") + "# ;; 3 £ #\n") + "# 3 £ 3 # #\n") + "# £ ; d # ### #\n") + "# # ;; # #:&=$#\n") + "# ; 3 ;;;;; 3c#:& #\n") + "# ; 3 cc#:&$=#\n") + "# 3 3 £# ' c###:& #\n") + "# # cc#:::&=$#\n") + "# #£ ; £ #####:&&& #\n") + "##%%# ;;;; #:::::& = #\n") + "# ' % ;; #&&&&&& =#\n") + "#'''% = $ = = #\n") + "#K' # $ = $ =K#\n") + "################################\n") + ""); levels[5] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "6\n") + "26\n") + "49\n") + "59\n") + "32\n") + "32\n") + "################################\n") + "# a £ £ a £ a £ #\n") + "#£ .. #### #\n") + "# #### .. ##b ## . 1 £#\n") + "#£ ##::## .. 1 # / # . £#\n") + "# #:4c:# .. & # .. #\n") + "# #:c4:& $ ..&& ## 1 . #\n") + "# ##::&& ..&&&# .£#\n") + "# ##&& &&## . #\n") + "# 1 = &&,,## #### . #\n") + "#a... &,K2,# = ## /## . #\n") + "# . 1 #,2c,# #= b# #\n") + "#£ ##,,## $ #----# $ #\n") + "# $ #### ## >## #\n") + "# .. ...= #### a#\n") + "#a #### .. .. . 1 #\n") + "# ##b ## .. $ ... .. #\n") + "# # 3;;# . &&&# .. . #\n") + "#£# ;; & &&''## 1 . a#\n") + "# ##; && &'cc'# #\n") + "#a ###& 1 #'cc'# . #\n") + "# = .. ##''## &&## . #\n") + "# .. ####= &&::## . #\n") + "# .. .. &:c4:# .£#\n") + "#£ . &&## . 1 $&:4c:# £#\n") + "# . && ## .. ##::## £#\n") + "# & # $ . #### #\n") + "# # =# 1... .. #\n") + "#£ ## ## .... 1.. #\n") + "# #### #\n") + "# £ £ a £ a ££ a £ #\n") + "################################\n") + ""); levels[6] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "2\n") + "2\n") + "49\n") + "56\n") + "32\n") + "32\n") + "################################\n") + "# #c . 1 $$$£ a#\n") + "# , . #\n") + "# # . 1 #\n") + "########## ########## ####### #\n") + "#......... , ,,2# #\n") + "#......... , # #\n") + "##### ########## #########a,#, #\n") + "#b$ #b ,, . . .. .. # # #\n") + "#c #K , . . ..a # ,#, #\n") + "# ################# # ,#\n") + "# , --# #c 1# # #$ #\n") + "# - . £ , #c # # #$ #\n") + "# .- # #. # # # # # #$ #\n") + "# - ,. .. # # # #b #\n") + "#1 - # , $ .. . # # # #\n") + "# - . .. # # # # #\n") + "# . - # #. # # # ,# #1 #\n") + "# - . c # $ # # # #\n") + "# --# $$£# #$$# # #\n") + "# $$############ , #£$# # #\n") + "# #####1 # #$$#b # .#\n") + "# .£#-----2 . ## ####### #..#\n") + "#c #$£ - ,,, # # .#\n") + "#### ##$$> - ,,, # #. #\n") + "# #$£ - ,,,. . # # .#\n") + "# . , #-----2 , # K # #\n") + "# #####1 cb#b £#. #\n") + "# ####################### #\n") + "#b2 . ,,,,, # $#\n") + "#ac # , c$ 1 ,,,,,, a#\n") + "################################\n") + ""); levels[7] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "15\n") + "15\n") + "58\n") + "52\n") + "32\n") + "32\n") + "################################\n") + "#d ! £ /#aK#/ % ,,, % 4#\n") + "# 2 K #1.# % ,,, % #\n") + "# #..# % %a #\n") + "#---------- £#..#%%%%%%%%%%%%%#\n") + "# ........- #..#$ % % #\n") + "# 1 .d ..- #££#;; % £ % ;;#\n") + "# . . .. .- d# #;; % d % ;;#\n") + "#------.$.- # #;; % K % ;;#\n") + "# ,,,- ..- # #$ % % #\n") + "# ,d,-. .- # #%%%%%%%%%----#\n") + "# ,,,- 1.- 2 # # a% - #\n") + "# -. .- # # % ,,, - #\n") + "#/ - - 5# #4 % ,,, - /#\n") + "############### ###############\n") + "#/....£ £...1a#\n") + "# 1...£ £....K#\n") + "############### ###############\n") + "#> - ,,, % 4# #2 - - /#\n") + "# - ,,, % # # - - #\n") + "# - %a # # 1 - 3 -,,, #\n") + "#----%%%%%%%%%# # -; -,d, #\n") + "# % % $# # -;;;-,,, #\n") + "#;; % £ % ;;# # -;d ------#\n") + "#;; % ' % ;;# #d -;;; ; #\n") + "#;; % K % ;;#££# -; ;$;;3 #\n") + "# % % $#..# - ;;;;; #\n") + "#%%%%%%%%%%%%%#..#£ ----------#\n") + "# a% % #..# #\n") + "# % ,,, % #.1# 1 #\n") + "#4 % ,,, % /#Ka#/ £ ! d#\n") + "################################\n") + ""); levels[8] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "3\n") + "10\n") + "41\n") + "8\n") + "32\n") + "32\n") + "################################\n") + "# .. .. # c 1 c :: £#\n") + "# . c ..& 1 1 : :#\n") + "# .. & = 1 : b: :#\n") + "# c.. ..& 1 1 #: #\n") + "# c..# c 1 c $#$: #\n") + "# . . . ################ ###::#\n") + "# /# ---- $#$: #\n") + "######### ---- -''- ---- #:: #\n") + "# #c# -''- -''- -''- :b: :#\n") + "# - -''- ---- -''- : #\n") + "# #c# ---- ---- : £#\n") + "# ##########################\n") + "# #/ #:: £ , #:: £ # #\n") + "# # #:: £ 2, #:: £ #dK!Kd#\n") + "# # #:::#,,,,#:::# # #\n") + "## ## # ::#,,2,# ::# # #\n") + "#, , ,# £ ::# ,, £ ::# # * * #\n") + "# , , # £ # , £ # /#*5*5*#\n") + "#, , ,####################5 5 5#\n") + "# , , $$$ $ $$$ $ #\n") + "# , #\n") + "# , , 2 2 #\n") + "# , 2 2 #########\n") + "# ,,, ,,,, #/ a*a #\n") + "# , ,,,,,,,,,,,,,, # a*a #\n") + "# ,,,, ,,, #aaa*$ #\n") + "# 2 2 #****$ #\n") + "# 2 2 #aa$$$ #\n") + "# # > #\n") + "# $$ $ $$ $ $$ # #\n") + "################################\n") + ""); levels[9] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "2\n") + "28\n") + "57\n") + "63\n") + "32\n") + "32\n") + "################################\n") + "#£->>-£# # #\n") + "#£->>-£# d%d%d%d% % 2 ,,,, 2 #\n") + "# ---- # # , ,,, , #\n") + "# ############ ,,, ,,,, #\n") + "# # , #** # 2 , #\n") + "# ---- #, , % *# #\n") + "#£-' -£# $$ ##%###########%###\n") + "#£- '-£# $$ # # #\n") + "###%#### , , # ,,,,,,, % $$ #\n") + "# % # # $ $ #\n") + "# 1 ################## $ $ #\n") + "# 1 # #* * # $$ #\n") + "# # ! ; # # #\n") + "# 1 # 3 3 % ** ####%###\n") + "# # ## ; # # #\n") + "####%### ;;# ##%### #\n") + "# .... # ;; ;# #b b# ,, #\n") + "# .... # ## ; # b # ,,, #\n") + "# .... # 3 3 #b % ,,, #\n") + "# .... # ! # bb # #\n") + "# K K # #b b# #\n") + "############################--##\n") + "#$..$..$..$..$..$..$..$..$#,,,,#\n") + "#.........................#,,,,#\n") + "###&&&&&&&&&&&&&&&&&&&&&###,,,,#\n") + "#c 1 £ 1 =K#,, #\n") + "# £ 1 £ =# #\n") + "# ################# #\n") + "# & , ,2, ,, , 2 #\n") + "#c & , , , ,2 , ,,, d#\n") + "################################\n") + ""); levels[10] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "3\n") + "16\n") + "2\n") + "3\n") + "32\n") + "32\n") + "################################\n") + "# #b # b#\n") + "# 4 # ... - ... #\n") + "# #%#%#%#%#%#%# # .K. - .K. #\n") + "# %'%5%5%'%5%5%:::# ... - ... #\n") + "# #%#%#%#%#%#%#: # d#d #\n") + "# %5%£%$%d%£%5%:4 ##---###---##\n") + "# #%#%#%#%#%#%# :# d#d #\n") + "# %5%d%K%K%$%'%: :# ... - ... #\n") + "# #%#%#%#%#%#%#:4:# .K. - .K. #\n") + "# %'%£%K%K%£%5%: # ... - ... #\n") + "# #%#%#%#%#%#%# #b # b#\n") + "# %'%$%d%£%$%5% ##---###---##\n") + "# #%#%#%#%#%#%# # #\n") + "# %5%'%5%5%'%'% # ::: #\n") + "# #%#%#%#%#%#%# - ::: #\n") + "# - ::: #\n") + "# # ::: #\n") + "# # #\n") + "###########################---##\n") + "# ># ::::: b# ::::: # #\n") + "# # ::::: # ::::: # 1 1 #\n") + "# # ####### # ####### # #\n") + "# # £# # £# # ... #\n") + "# # * # * # * # * # 1.1.#\n") + "# # * # * # * # * #.....#\n") + "# # # # # # #\n") + "# £#£ # £#£ # £# #\n") + "# ####### # ####### # ######-###\n") + "# ::::: # ::::: # ::::: #\n") + "# ::::: # ::::: b# ::::: #\n") + "################################\n") + ""); levels[11] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "2\n") + "2\n") + "48\n") + "7\n") + "32\n") + "32\n") + "################################\n") + "# , bb#;;;% % ££#\n") + "# 2 #;3;% % c££#\n") + "# 2 , 2 #;;;% % ££#\n") + "# , ##### ######\n") + "###### # ;;; ;;; #\n") + "# # ##### ##### ;3; ;3; #\n") + "# . - # % % # ;;; ;;; #\n") + "# # #;;;% % $ #%%%%%%%%%%#\n") + "# 1 ### ##;3;% % £b #\n") + "#. #'# #;;;% % $ #%%%%%%%%%%#\n") + "# # # % % # #\n") + "# $ # # ##### ##### $ c #\n") + "#! . # # # # £££c #\n") + "# £ # # # , ############\n") + "#d. # #d , # #\n") + "# . # # b#c . 1 . #\n") + "# £ # # # # #\n") + "# . # # # ## ## ## ##\n") + "#d $ # # ##### ##### # .# #\n") + "# # # % % # # # #\n") + "# 1 .#'# #£ % %;;;# 1 # # 1 #\n") + "# ### ##£b % %;3;# # # #\n") + "# . # #$ % %;;;# # # #\n") + "# - # % % #. . . #\n") + "# # ##### ##### . #\n") + "###### # #\n") + "# # . #\n") + "# 3 - K £ £ K #\n") + "# > 1 c # 1 c 1 #\n") + "# # $ $ dd#\n") + "################################\n") + ""); levels[12] = ((((((((((((((((((((((((((((((((((((((("noname\n" + "23\n") + "17\n") + "48\n") + "7\n") + "32\n") + "32\n") + "################################\n") + "# ; 33 # #,,,,# #£d**** #\n") + "# ;# > #,2,,- ####### #\n") + "#a£# #$a#33# #,,,,# #\n") + "#### #### #####,,,,##### # # #\n") + "# ;# #bbbb# # # # #\n") + "# ; ; # K / # # #*#\n") + "# # # #### #££££# # # # #\n") + "#$a# #a£#33#####,,,,#####%% # #\n") + "#### #### 3 ;#,,2,#aK . # # #\n") + "#; #,,,,#££ .# #-#\n") + "# ; ################c# #\n") + "# # # # #. *#;;;# / # ### #\n") + "#a£# #$a#; # K$#;3;# # #\n") + "#### #### # . #;;;#' # #####\n") + "# ; # ####&&&##-## #'''#\n") + "# 3 # = # # #'K'#\n") + "# ; #####%%#### # # #'''#\n") + "###### ' %: a a# ###### #%# #\n") + "#$,,,##### 4: # b#$$.1 ;. #'#\n") + "#b,,, # : #######!£;.;.; # #\n") + "##,,,### # ####'# #d£ ; 3 .#'#\n") + "# , # # # ##########-#\n") + "# /, '########## # #3.;1 # #\n") + "# , ,#K. a - # 5 #.;..$ #\n") + "#' 2 ########## # K*#;1.# ##\n") + "# 2$ #K. . - #*a #..$ $.#\n") + "# a, ########## # 5 #.# #;.#\n") + "# , - # *#c $;.1#\n") + "# a$/ ####### ## ## #..3 #\n") + "# ' #a a a#\n") + "################################\n") + ""); } } }//package src.level
Section 116
//LevelLoader (src.level.LevelLoader) package src.level { import src.*; public class LevelLoader { private var bp:BlastPassage; public function LevelLoader(_arg1:BlastPassage){ this.bp = _arg1; _arg1.levelsLoaded(); } public function loadLevel(_arg1:GraphicsContext, _arg2:int, _arg3:String, _arg4:int):Level{ var _local17:String; var _local18:int; var _local5:Array = _arg3.split("\n"); var _local6:int; var _temp1 = _local6; _local6 = (_local6 + 1); var _local7:String = _local5[_temp1]; var _temp2 = _local6; _local6 = (_local6 + 1); var _local8:int = parseInt(_local5[_temp2]); var _temp3 = _local6; _local6 = (_local6 + 1); var _local9:int = parseInt(_local5[_temp3]); var _temp4 = _local6; _local6 = (_local6 + 1); var _local10:int = parseInt(_local5[_temp4]); var _temp5 = _local6; _local6 = (_local6 + 1); var _local11:int = parseInt(_local5[_temp5]); var _temp6 = _local6; _local6 = (_local6 + 1); var _local12:int = parseInt(_local5[_temp6]); var _temp7 = _local6; _local6 = (_local6 + 1); var _local13:int = parseInt(_local5[_temp7]); var _local14:Array = new Array(); var _local15:int; while (_local15 < _local13) { var _temp8 = _local6; _local6 = (_local6 + 1); _local17 = _local5[_temp8]; if (_local17 == null){ _local17 = ""; }; _local18 = 0; while (_local18 < _local12) { if (_local17.length < _local18){ _local14.push(" "); } else { _local14.push(_local17.charAt(_local18)); }; _local18++; }; _local15++; }; var _local16:Level = new Level(_local12, _local13, _arg4); _local16.gr = _arg1; _local16.xStart = _local8; _local16.yStart = _local9; _local16.floorColor = (_local10 % 64); _local16.wallColor = (_local11 % 64); _local16.levelNum = _arg2; _local16.floorType = (int((int(((_arg2 * 423981221) + ((_arg2 * _arg2) * 74872111))) / 0xFFFF)) % 5); _local16.wallType = (int((int(((_arg2 * 439871221) + ((_arg2 * _arg2) * 74872111))) / 0xFFFF)) % 4); if (_local16.floorType < 0){ _local16.floorType = (_local16.floorType + 5); }; if (_local16.wallType < 0){ _local16.wallType = (_local16.wallType + 4); }; _local16.paintTiles(); _local16.setData(_local14); return (_local16); } } }//package src.level
Section 117
//MtRandom (src.math.MtRandom) package src.math { import flash.utils.*; public class MtRandom { private var mti:uint; private var mt:Array; public var accesses:int;// = 0 public static var MATRIX_A:uint = 2567483615; public static var UPPER_MASK:uint = 2147483648; public static var LOWER_MASK:uint = 2147483647; public static var M:int = 397; public static var N:int = 624; private static var mag01:Array = [uint(0), uint(MATRIX_A)]; public function MtRandom(_arg1:uint=0){ mti = (N + 1); super(); if (_arg1 == 0){ _arg1 = getTimer(); }; mt = new Array(N); init_genrand(_arg1); } public function nextInt(_arg1:uint):uint{ return (((genrand_int32() & 2147483647) % _arg1)); } private function init_genrand(_arg1:uint):void{ var _local2:uint; var _local3:uint; mt[0] = uint(_arg1); mti = 1; while (mti < N) { _local2 = (mt[(mti - 1)] ^ (mt[(mti - 1)] >>> 30)); _local3 = uint((_local2 * 1289)); _local3 = uint((_local3 * 1406077)); _local3 = uint((_local3 + mti)); mt[mti] = _local3; mti++; }; } public function nextFloat():Number{ return ((next(24) / 16777216)); } public function nextDouble():Number{ return ((next(24) / 16777216)); } private function genrand_int32():uint{ var _local1:Number; var _local2:uint; accesses++; if (mti >= N){ if (mti == (N + 1)){ init_genrand(5489); }; _local2 = 0; while (_local2 < (N - M)) { _local1 = ((mt[_local2] & UPPER_MASK) | (mt[(_local2 + 1)] & LOWER_MASK)); mt[_local2] = ((mt[(_local2 + M)] ^ (_local1 >>> 1)) ^ mag01[uint((_local1 & 1))]); _local2++; }; while (_local2 < (N - 1)) { _local1 = ((mt[_local2] & UPPER_MASK) | (mt[(_local2 + 1)] & LOWER_MASK)); mt[_local2] = ((mt[(_local2 + (M - N))] ^ (_local1 >>> 1)) ^ mag01[uint((_local1 & 1))]); _local2++; }; _local1 = ((mt[(N - 1)] & UPPER_MASK) | (mt[0] & LOWER_MASK)); mt[(N - 1)] = ((mt[(M - 1)] ^ (_local1 >>> 1)) ^ mag01[uint((_local1 & 1))]); mti = 0; }; _local1 = mt[mti++]; _local1 = (_local1 ^ (_local1 >>> 11)); _local1 = (_local1 ^ ((_local1 << 7) & 2636928640)); _local1 = (_local1 ^ ((_local1 << 15) & 4022730752)); _local1 = (_local1 ^ (_local1 >>> 18)); return (uint(_local1)); } public function setSeed(_arg1:uint):void{ init_genrand(_arg1); } private function next(_arg1:uint):uint{ return ((genrand_int32() & ((uint(1) << _arg1) - uint(1)))); } } }//package src.math
Section 118
//BombParticle (src.particle.BombParticle) package src.particle { import flash.utils.*; import flash.events.*; import flash.geom.*; import flash.display.*; public class BombParticle extends Particle { private var xa:Number; private var ya:Number; private var lifeTime:Number;// = 1 private var floatSpeed:Number;// = 1 private var startTime:uint; private var yp:Number; private var xp:Number; public function BombParticle(_arg1:Number, _arg2:Number){ this.xp = _arg1; this.yp = _arg2; var _local3:Number = ((Math.random() * Math.PI) * 2); var _local4:Number = (((Math.random() + Math.random()) * 32) * 3); xa = (Math.cos(_local3) * _local4); ya = ((Math.sin(_local3) * _local4) * 0.8); x = (x + (xa / 3)); y = (y + (ya / 3)); lifeTime = (((Math.random() * Math.random()) + 0.4) * 0.8); floatSpeed = ((Math.random() * Math.random()) + 0.4); rotation = (Math.random() * 360); startTime = getTimer(); addEventListener(Event.ENTER_FRAME, advanceTime); advanceTime(null); gotoAndStop(1); var _local5:Number = 1; var _local6:Number = 1; var _local7:Number = 1; var _local8:Number = Math.random(); this.cacheAsBitmap = true; transform.colorTransform = new ColorTransform((_local5 * _local8), (_local6 * _local8), (_local7 * _local8)); blendMode = BlendMode.ADD; } public function advanceTime(_arg1:Event):void{ var _local2:Number; _local2 = ((getTimer() - startTime) / 1000); if (_local2 > lifeTime){ removeEventListener(Event.ENTER_FRAME, advanceTime); parent.removeChild(this); }; var _local3:Number = Math.sqrt(_local2); x = (xp + (xa * _local3)); y = ((yp + (ya * _local3)) - ((_local3 * 6) * floatSpeed)); var _local4:Number = (((_local2 / lifeTime) * 2) - 1); if (_local4 < 0){ _local4 = 0; }; alpha = ((1 - _local4) * (1 - _local4)); } } }//package src.particle
Section 119
//BurnPowerupParticle (src.particle.BurnPowerupParticle) package src.particle { import flash.utils.*; import flash.events.*; import flash.geom.*; import flash.display.*; public class BurnPowerupParticle extends Particle { private var xa:Number; private var ya:Number; private var lifeTime:Number;// = 1 private var floatSpeed:Number;// = 1 private var startTime:uint; private var yp:Number; private var xp:Number; public function BurnPowerupParticle(_arg1:Number, _arg2:Number){ var _local7:Number; super(); this.xp = _arg1; this.yp = _arg2; var _local3:Number = ((Math.random() * Math.PI) * 2); var _local4:Number = ((((Math.random() + Math.random()) * 32) * 3) + 5); xa = (Math.cos(_local3) * _local4); ya = ((Math.sin(_local3) * _local4) * 0.8); x = (x + (xa / 3)); y = (y + (ya / 3)); lifeTime = (((Math.random() * Math.random()) + 0.4) * 0.8); floatSpeed = ((Math.random() * Math.random()) + 0.4); scaleX = (scaleY = ((Math.random() * 2) + 1)); rotation = (Math.random() * 360); startTime = getTimer(); addEventListener(Event.ENTER_FRAME, advanceTime); advanceTime(null); gotoAndStop(1); var _local5:Number = Math.random(); var _local6:Number = (Math.random() * _local5); _local7 = (Math.random() * _local7); var _local8:Number = ((Math.random() * 0.5) + 0.5); this.cacheAsBitmap = true; transform.colorTransform = new ColorTransform((_local5 * _local8), (_local6 * _local8), (_local7 * _local8)); blendMode = BlendMode.HARDLIGHT; } public function advanceTime(_arg1:Event):void{ var _local2:Number; _local2 = ((getTimer() - startTime) / 1000); if (_local2 > lifeTime){ removeEventListener(Event.ENTER_FRAME, advanceTime); parent.removeChild(this); }; var _local3:Number = _local2; x = (xp + (xa * _local3)); y = ((yp + (ya * _local3)) - ((_local3 * 6) * floatSpeed)); var _local4:Number = (((_local2 / lifeTime) * 2) - 1); if (_local4 < 0){ _local4 = 0; }; alpha = ((1 - _local4) * (1 - _local4)); } } }//package src.particle
Section 120
//EnemyDeathParticle (src.particle.EnemyDeathParticle) package src.particle { import flash.utils.*; import flash.events.*; import flash.geom.*; public class EnemyDeathParticle extends Particle { private var xa:Number; private var ya:Number; private var lifeTime:Number;// = 1 private var floatSpeed:Number;// = 1 private var startTime:uint; private var yp:Number; private var xp:Number; public function EnemyDeathParticle(_arg1:Number, _arg2:Number){ this.xp = _arg1; this.yp = _arg2; var _local3:Number = ((Math.random() * Math.PI) * 2); var _local4:Number = ((((Math.random() + Math.random()) * 64) + 1) * 1.2); xa = (Math.cos(_local3) * _local4); ya = ((Math.sin(_local3) * _local4) * 0.8); x = (x + (xa / 5)); y = (y + (ya / 5)); lifeTime = (((Math.random() * Math.random()) + 0.4) * 0.85); floatSpeed = ((Math.random() * Math.random()) + 0.4); rotation = (Math.random() * 360); startTime = getTimer(); addEventListener(Event.ENTER_FRAME, advanceTime); advanceTime(null); gotoAndStop(1); var _local5:Number = 1; var _local6:Number = 1; var _local7:Number = 1; var _local8:Number = (Math.random() * 0.2); transform.colorTransform = new ColorTransform((_local5 * _local8), (_local6 * _local8), (_local7 * _local8)); } public function advanceTime(_arg1:Event):void{ var _local2:Number = ((getTimer() - startTime) / 1000); if (_local2 > lifeTime){ removeEventListener(Event.ENTER_FRAME, advanceTime); parent.removeChild(this); }; x = (xp + (xa * Math.sqrt(_local2))); y = (yp + (ya * Math.sqrt(_local2))); var _local3:Number = (((_local2 / lifeTime) * 2) - 1); if (_local3 < 0){ _local3 = 0; }; alpha = ((1 - _local3) * (1 - _local3)); } } }//package src.particle
Section 121
//HouseDeathParticle (src.particle.HouseDeathParticle) package src.particle { import flash.utils.*; import flash.events.*; import flash.geom.*; public class HouseDeathParticle extends Particle { private var xa:Number; private var ya:Number; private var lifeTime:Number;// = 1 private var floatSpeed:Number;// = 1 private var startTime:uint; private var yp:Number; private var xp:Number; public function HouseDeathParticle(_arg1:Number, _arg2:Number){ this.xp = ((_arg1 + (Math.random() * 16)) - 8); this.yp = ((_arg2 + (Math.random() * 16)) - 8); var _local3:Number = ((Math.random() * Math.PI) * 2); var _local4:Number = (((((Math.random() + Math.random()) * 64) + 1) * 1.4) / 2); xa = (Math.cos(_local3) * _local4); ya = ((Math.sin(_local3) * _local4) * 0.8); x = (x + (xa / 5)); y = (y + (ya / 5)); scaleX = (scaleY = ((Math.random() * 2) + 1)); lifeTime = ((((Math.random() * Math.random()) + 0.4) * 0.85) * 2); floatSpeed = ((Math.random() * Math.random()) + 0.4); rotation = (Math.random() * 360); startTime = getTimer(); addEventListener(Event.ENTER_FRAME, advanceTime); advanceTime(null); gotoAndStop(1); var _local5:Number = 1; var _local6:Number = 1; var _local7:Number = 1; var _local8:Number = (Math.random() * 0.2); this.cacheAsBitmap = true; transform.colorTransform = new ColorTransform((_local5 * _local8), (_local6 * _local8), (_local7 * _local8)); } public function advanceTime(_arg1:Event):void{ var _local2:Number = ((getTimer() - startTime) / 1000); if (_local2 > lifeTime){ removeEventListener(Event.ENTER_FRAME, advanceTime); parent.removeChild(this); }; x = (xp + (xa * Math.sqrt(_local2))); y = (yp + (ya * Math.sqrt(_local2))); var _local3:Number = (((_local2 / lifeTime) * 2) - 1); if (_local3 < 0){ _local3 = 0; }; alpha = ((1 - _local3) * (1 - _local3)); } } }//package src.particle
Section 122
//HurtPlayerParticle (src.particle.HurtPlayerParticle) package src.particle { import flash.utils.*; import flash.events.*; import flash.geom.*; import src.entity.*; public class HurtPlayerParticle extends Particle { private var xa:Number; private var spinSpeed:Number;// = 0 private var ya:Number; private var lifeTime:Number;// = 1 private var floatSpeed:Number;// = 1 private var startTime:uint; private var spinOffset:Number;// = 0 private var yp:Number; private var xp:Number; private var bomberMan:BomberMan; public function HurtPlayerParticle(_arg1:Number, _arg2:Number){ this.xp = ((_arg1 + (Math.random() * 32)) - 16); this.yp = (((_arg2 + (Math.random() * 24)) - 12) - 24); var _local3:Number = ((Math.random() * Math.PI) * 2); var _local4:Number = ((Math.random() + Math.random()) * 32); this.bomberMan = bomberMan; xa = (Math.cos(_local3) * _local4); ya = ((Math.sin(_local3) * _local4) * 0.8); x = (x + (xa / 3)); y = (y + (ya / 3)); lifeTime = (((Math.random() * Math.random()) + 0.4) * 0.8); floatSpeed = (((Math.random() * Math.random()) + 0.4) * 2); rotation = (Math.random() * 360); startTime = getTimer(); addEventListener(Event.ENTER_FRAME, advanceTime); advanceTime(null); gotoAndStop(4); var _local5:Number = 1; var _local6:Number = 1; var _local7:Number = 1; var _local8:Number = ((Math.random() * 0.5) + 0.5); transform.colorTransform = new ColorTransform((_local5 * _local8), (_local6 * _local8), (_local7 * _local8)); } public function advanceTime(_arg1:Event):void{ var _local2:Number = ((getTimer() - startTime) / 1000); if (_local2 > lifeTime){ removeEventListener(Event.ENTER_FRAME, advanceTime); parent.removeChild(this); }; x = ((xp + ((xa * Math.sqrt(_local2)) * 0.2)) + (Math.sin((spinOffset + (spinSpeed * _local2))) * 5)); y = ((yp + ((ya * Math.sqrt(_local2)) * 0.2)) - (((_local2 * _local2) * 64) * floatSpeed)); var _local3:Number = (((_local2 / lifeTime) * 2) - 1); if (_local3 < 0){ _local3 = 0; }; alpha = (((1 - _local3) * (1 - _local3)) * 0.8); } } }//package src.particle
Section 123
//Particle (src.particle.Particle) package src.particle { import flash.display.*; public class Particle extends MovieClip { } }//package src.particle
Section 124
//PickupParticle (src.particle.PickupParticle) package src.particle { import flash.utils.*; import flash.events.*; import flash.display.*; import flash.geom.*; import src.entity.*; public class PickupParticle extends Particle { private var xa:Number; private var spinSpeed:Number;// = 0 private var ya:Number; private var lifeTime:Number;// = 1 private var floatSpeed:Number;// = 1 private var startTime:uint; private var spinOffset:Number;// = 0 private var yp:Number; private var xp:Number; private var bomberMan:BomberMan; public function PickupParticle(_arg1:Number, _arg2:Number, _arg3:int, _arg4:BomberMan){ this.xp = _arg1; this.yp = _arg2; var _local5:Number = ((Math.random() * Math.PI) * 2); var _local6:Number = ((Math.random() + Math.random()) * 32); this.bomberMan = _arg4; xa = (Math.cos(_local5) * _local6); ya = ((Math.sin(_local5) * _local6) * 0.8); x = (x + (xa / 3)); y = (y + (ya / 3)); lifeTime = (((Math.random() * Math.random()) + 0.4) * 0.8); floatSpeed = ((Math.random() * Math.random()) + 0.4); rotation = (Math.random() * 360); startTime = getTimer(); addEventListener(Event.ENTER_FRAME, advanceTime); advanceTime(null); gotoAndStop(1); var _local7:Number = 1; var _local8:Number = 1; var _local9:Number = 0; var _local10:Number = ((Math.random() * 0.5) + 0.5); if (_arg3 > 0){ _local7 = 1; _local8 = 1; _local9 = 1; _local10 = ((Math.random() * 0.1) + 0.9); rotation = ((Math.random() * 30) - 15); gotoAndStop((_arg3 + 1)); if (_arg3 == 2){ spinOffset = ((Math.random() * Math.PI) * 2); spinSpeed = 10; }; } else { blendMode = BlendMode.ADD; }; transform.colorTransform = new ColorTransform((_local7 * _local10), (_local8 * _local10), (_local9 * _local10)); } public function advanceTime(_arg1:Event):void{ var _local2:Number = ((getTimer() - startTime) / 1000); if (_local2 > lifeTime){ removeEventListener(Event.ENTER_FRAME, advanceTime); parent.removeChild(this); }; x = (xp + (xa * Math.sqrt(_local2))); y = ((yp + (ya * Math.sqrt(_local2))) - (((_local2 * _local2) * 64) * floatSpeed)); scaleX = Math.cos((spinOffset + (spinSpeed * _local2))); var _local3:Number = (((_local2 / lifeTime) * 2) - 1); if (_local3 < 0){ _local3 = 0; }; alpha = ((1 - _local3) * (1 - _local3)); } } }//package src.particle
Section 125
//Controller (src.player.Controller) package src.player { public class Controller { public var buttons:Array; public var old:Array; public static var BUTTON_FIRE:int = 4; public static var BUTTON_SPECIAL:int = 5; public static var BUTTON_RIGHT:int = 1; public static var BUTTON_LEFT:int = 3; public static var BUTTON_DOWN:int = 2; public static var BUTTON_UP:int = 0; public function Controller(){ buttons = new Array(8); old = new Array(8); super(); var _local1:int; while (_local1 < 8) { old[_local1] = (buttons[_local1] = false); _local1++; }; } public function isTyped(_arg1:int):Boolean{ return (((!(old[_arg1])) && (buttons[_arg1]))); } public function tick():void{ var _local1:int; while (_local1 < 8) { old[_local1] = buttons[_local1]; _local1++; }; } } }//package src.player
Section 126
//KeyboardController (src.player.KeyboardController) package src.player { import flash.ui.*; public class KeyboardController extends Controller { private var isKeyDown:Array; private var mapList:Array; private var keyMappings:Array; public function KeyboardController(){ keyMappings = new Array(0x0100); isKeyDown = new Array(0x0100); mapList = new Array(); super(); bind(Keyboard.UP, BUTTON_UP); bind(Keyboard.LEFT, BUTTON_LEFT); bind(Keyboard.RIGHT, BUTTON_RIGHT); bind(Keyboard.DOWN, BUTTON_DOWN); bind(Keyboard.NUMPAD_8, BUTTON_UP); bind(Keyboard.NUMPAD_4, BUTTON_LEFT); bind(Keyboard.NUMPAD_6, BUTTON_RIGHT); bind(Keyboard.NUMPAD_2, BUTTON_DOWN); bind("W".charCodeAt(0), BUTTON_UP); bind("A".charCodeAt(0), BUTTON_LEFT); bind("D".charCodeAt(0), BUTTON_RIGHT); bind("S".charCodeAt(0), BUTTON_DOWN); bind(Keyboard.SPACE, BUTTON_FIRE); bind(Keyboard.ENTER, BUTTON_SPECIAL); var _local1:int; while (_local1 < 0x0100) { isKeyDown[_local1] = false; _local1++; }; } public function toggleKey(_arg1:uint, _arg2:Boolean):void{ isKeyDown[_arg1] = _arg2; } public function releaseAllKeys():void{ var _local1:int; while (_local1 < 0x0100) { isKeyDown[_local1] = false; _local1++; }; } override public function tick():void{ var _local2:int; super.tick(); var _local1:int; while (_local1 < 8) { buttons[_local1] = false; _local1++; }; _local1 = 0; while (_local1 < mapList.length) { _local2 = keyMappings[mapList[_local1]]; buttons[_local2] = ((buttons[_local2]) || (isKeyDown[mapList[_local1]])); _local1++; }; } public function bind(_arg1:int, _arg2:int):void{ keyMappings[_arg1] = _arg2; mapList.push(_arg1); } } }//package src.player
Section 127
//Player (src.player.Player) package src.player { import src.screen.game.*; import src.entity.*; import src.*; import src.math.*; public class Player { public var potions:int;// = 0 public var random:MtRandom; private var animation:GameEntity;// = null public var bomberMan:BomberMan; public var hurtTick:int; public var maxBombs:int; public var score:int; public var invulnTime:int; public var controller:Controller; private var health:int; public var activeBombs:int;// = 0 public var exitToLevel:int;// = -1 public var firePower:int; public var keys:int;// = 0 private var gameScreen:GameScreen; private static const WARNING_CUTOFF:Number = 100; public static var MAX_INVENTORY:int = 11; public static var START_FIRE:int = 2; public static var START_BOMBS:int = 2; public static var MAX_HEALTH:int = 1000; public function Player(_arg1:GameScreen){ controller = new Controller(); maxBombs = START_BOMBS; firePower = START_FIRE; super(); this.gameScreen = _arg1; random = _arg1.nextRandom(); health = MAX_HEALTH; } public function setAnimation(_arg1:GameEntity):void{ animation = _arg1; } private function getPowerupCount():int{ return (((maxBombs - START_BOMBS) + (firePower - START_FIRE))); } public function isAlive():Boolean{ return (!((bomberMan == null))); } public function hurt(_arg1:int, _arg2:Boolean=true):void{ if (health <= 0){ return; }; if ((((health >= WARNING_CUTOFF)) && (((health - _arg1) < WARNING_CUTOFF)))){ BlastPassage.sound.get("HealthWarning").play(); }; health = (health - _arg1); if (health <= 0){ health = 0; bomberMan.die(); } else { if (_arg2){ }; }; } public function addPotion():void{ potions++; } public function reset():void{ exitToLevel = -1; invulnTime = 0; hurtTick = 0; health = MAX_HEALTH; } public function canBomb():Boolean{ if (activeBombs >= maxBombs){ return (false); }; return (true); } public function needsPowerup():Boolean{ return ((random.nextInt(MAX_INVENTORY) > getPowerupCount())); } public function canGetKey():Boolean{ return (true); } public function hitByFire():Boolean{ if (invulnTime == 0){ if (maxBombs > START_BOMBS){ maxBombs--; }; if (firePower > START_FIRE){ firePower--; }; bomberMan.hurt(100); invulnTime = 60; return (true); }; return (false); } public function canGetPowerup():Boolean{ return (true); } public function setExit(_arg1:int):void{ exitToLevel = _arg1; } public function getHealth():int{ return (health); } public function tick():void{ if (activeBombs < 0){ activeBombs = 0; }; controller.tick(); if (animation != null){ if (animation.removed){ animation = null; } else { return; }; }; if (exitToLevel >= 0){ return; }; if (((((controller.isTyped(Controller.BUTTON_FIRE)) && (!(isAlive())))) && (gameScreen.maySpawnWithinLevel()))){ spawn(false); controller.old[Controller.BUTTON_FIRE] = true; }; if (!(isAlive())){ return; }; if (invulnTime > 0){ invulnTime--; }; hurtTick++; if (hurtTick == BlastPassage.TICKS_PER_SECOND){ hurt(1, false); hurtTick = 0; }; if (bomberMan.removed){ bomberMan = null; }; } public function addScore(_arg1:int):void{ score = (score + _arg1); } public function addHealth(_arg1:int):void{ health = (health + _arg1); if (health > MAX_HEALTH){ health = MAX_HEALTH; }; } public function setController(_arg1:Controller):void{ this.controller = _arg1; } public function getStatus():int{ if (animation != null){ return (0); }; if (!(isAlive())){ return (-1); }; return ((exitToLevel + 1)); } private function spawn(_arg1:Boolean):void{ var _local3:BomberMan; var _local4:int; var _local5:int; bomberMan = null; var _local2:int; while ((((_local2 < 16)) && ((bomberMan == null)))) { _local3 = gameScreen.level.getRandomBomberMan(); if (_local3 == null){ bomberMan = new BomberMan(((gameScreen.level.xStart * 16) + 8), ((gameScreen.level.yStart * 16) + 8), this); } else { _local4 = (random.nextInt(32) - 16); _local5 = (random.nextInt(32) - 16); bomberMan = new BomberMan((_local3.x + _local4), (_local3.y + _local5), this); }; if (!(bomberMan.fitsIn(gameScreen.level))){ bomberMan = null; }; _local2++; }; if (bomberMan != null){ hurtTick = 0; if (!(_arg1)){ }; gameScreen.camera.add(bomberMan); gameScreen.level.addEntity(bomberMan); }; } public function newLevel():void{ activeBombs = 0; if (exitToLevel != -1){ exitToLevel = -1; } else { if (!(gameScreen.maySpawnWithinLevel())){ }; }; spawn(true); } } }//package src.player
Section 128
//RecorderController (src.player.RecorderController) package src.player { public class RecorderController extends Controller { private var fullString:String;// = "" private var lastKey:int;// = 0 private var run:int;// = 0 private var controller:Controller; private var encodedString:String;// = "" public static const BASE_64_CHARS:String = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_"; public function RecorderController(_arg1:Controller){ this.controller = _arg1; buttons = _arg1.buttons; old = _arg1.old; } public function flush():String{ var _local1:String = (encodedString + BASE_64_CHARS.charAt(run)); encodedString = ""; lastKey = 0; run = 0; return (_local1); } override public function isTyped(_arg1:int):Boolean{ return (controller.isTyped(_arg1)); } public function flushIfLongerThan(_arg1:int):String{ if (encodedString.length >= _arg1){ return (flush()); }; return (null); } override public function tick():void{ controller.tick(); var _local1:int; var _local2:int; while (_local2 < 6) { _local1 = (_local1 + (controller.buttons[_local2] << _local2)); _local2++; }; fullString = (fullString + BASE_64_CHARS.charAt(_local1)); if ((((_local1 == lastKey)) && ((run < 63)))){ run++; } else { encodedString = (encodedString + BASE_64_CHARS.charAt(run)); encodedString = (encodedString + BASE_64_CHARS.charAt(_local1)); lastKey = _local1; run = 1; }; } public static function decode(_arg1:String):String{ var _local5:int; var _local6:int; var _local2:String = ""; var _local3:int; var _local4:int; while (_local4 < _arg1.length) { var _temp1 = _local4; _local4 = (_local4 + 1); _local5 = BASE_64_CHARS.indexOf(_arg1.charAt(_temp1)); _local6 = 0; while (_local6 < _local5) { _local2 = (_local2 + BASE_64_CHARS.charAt(_local3)); _local6++; }; if (_local4 < _arg1.length){ var _temp2 = _local4; _local4 = (_local4 + 1); _local3 = BASE_64_CHARS.indexOf(_arg1.charAt(_temp2)); }; }; return (_local2); } } }//package src.player
Section 129
//ReplayController (src.player.ReplayController) package src.player { public class ReplayController extends Controller { private var data:String; private var dp:int;// = 0 public function ReplayController(_arg1:String){ this.data = _arg1; } override public function tick():void{ super.tick(); var _local1:int = RecorderController.BASE_64_CHARS.indexOf(data.charAt(dp++)); var _local2:int; while (_local2 < 8) { buttons[_local2] = (((_local1 >> _local2) & 1) == 1); _local2++; }; } } }//package src.player
Section 130
//GameScreen (src.screen.game.GameScreen) package src.screen.game { import src.*; import src.level.*; import src.math.*; import src.player.*; import src.screen.*; public class GameScreen extends Screen { public var level:Level; protected var startLevel:int;// = 1 private var gameHasBeenStarted:Boolean;// = false private var levelData:String; public var remainingTicks:int; public var player:Player; public var camera:GameCamera; private var levelNum:int;// = 0 private var doAbort:Boolean;// = false private var seed:int; private var tickCount:int;// = 0 protected var levelLoader:LevelLoader;// = null public static var GAME_TIME:int = ((BlastPassage.TICKS_PER_SECOND * 60) * 4); public function GameScreen(_arg1:LevelLoader, _arg2:int, _arg3:String, _arg4:int){ remainingTicks = GAME_TIME; super(); this.levelLoader = _arg1; this.levelData = _arg3; this.levelNum = _arg2; this.seed = _arg4; } public function reset():void{ remainingTicks = GAME_TIME; player.reset(); doAbort = false; } override public function init():void{ nextLevel(); blastPassage.getGraphicsContext().fill(0); } override public function render(_arg1:Number):void{ if (level == null){ return; }; var _local2:Boolean = (player.getHealth() <= 0); camera.lerp(_arg1); blastPassage.particleLayer.x = (-(camera.xi) - BlastPassage.GAME_AREA_WIDTH); blastPassage.particleLayer.y = (-(camera.yi) - BlastPassage.GAME_AREA_HEIGHT); level.alpha = _arg1; if (level.potionTime > 0){ gr.fill(0xFFFFFF); } else { gr.prepare(camera.xi, camera.yi); if (_local2){ gr.fill(0xE0E0E0); level.renderJustBombermenSprites(camera); } else { level.renderSprites(camera); }; }; renderSidePanel(_arg1); } public function nextLevel():void{ level = null; if (((BlastPassage.DEBUG_MODE) && (BlastPassage.REPLAY_MODE))){ }; level = levelLoader.loadLevel(gr, levelNum, levelData, seed); camera = new GameCamera(level, BlastPassage.GAME_AREA_WIDTH, BlastPassage.GAME_AREA_HEIGHT); level.setCamera(camera); level.setParticleLayer(blastPassage.particleLayer); blastPassage.setScreen(new LevelTitleScreen(this)); if (player != null){ player.newLevel(); }; blastPassage.levelStarted(levelNum); BlastPassage.music.stopAll(); BlastPassage.music.get("GameMusic").loop(); } override public function tick():void{ var _local4:int; if (level == null){ return; }; if (doAbort){ blastPassage.doAbort(); blastPassage.gameAborted(); }; if (((!((player == null))) && ((player.exitToLevel == -1)))){ remainingTicks--; if (remainingTicks == (BlastPassage.TICKS_PER_SECOND * 10)){ BlastPassage.sound.get("TimeWarning").play(); }; if (remainingTicks == 0){ blastPassage.outOfTime(); }; }; var _local1:Boolean = true; var _local2:Boolean = true; var _local3:int = 9999; if (player != null){ player.tick(); _local4 = player.getStatus(); if (_local4 >= 0){ _local1 = false; }; if (_local4 == 0){ _local2 = false; }; if (_local4 > 0){ if (_local4 < _local3){ _local3 = _local4; }; }; }; if (!(_local1)){ gameHasBeenStarted = true; }; if (((_local1) && (gameHasBeenStarted))){ allDead(); }; if (((((_local2) && (gameHasBeenStarted))) && (!(_local1)))){ allCompleted(level.levelNum); }; camera.tick(); level.tick(); tickCount++; } public function maySpawnWithinLevel():Boolean{ return (true); } protected function allCompleted(_arg1:int):void{ blastPassage.levelWon(); } public function abortGame():Boolean{ if (level == null){ return (false); }; if (doAbort == true){ return (false); }; doAbort = true; return (true); } protected function allDead():void{ blastPassage.playerDead(); } public function nextRandom():MtRandom{ return (level.nextRandom()); } public function renderSidePanel(_arg1:Number):void{ } } }//package src.screen.game
Section 131
//LevelTitleScreen (src.screen.game.LevelTitleScreen) package src.screen.game { import src.screen.*; public class LevelTitleScreen extends Screen { private var timeLeft:int;// = 20 private var gameScreen:GameScreen; public function LevelTitleScreen(_arg1:GameScreen){ this.gameScreen = _arg1; } override public function shadowTick():void{ gameScreen.shadowTick(); } override public function render(_arg1:Number):void{ gameScreen.renderSidePanel(_arg1); } override public function tick():void{ gameScreen.shadowTick(); if (--timeLeft <= 0){ blastPassage.setScreen(gameScreen); }; } } }//package src.screen.game
Section 132
//Screen (src.screen.Screen) package src.screen { import src.*; public class Screen { public var gr:GraphicsContext; protected var skipped:Boolean;// = false private var initialized:Boolean;// = false protected var blastPassage:BlastPassage; public function shadowTick():void{ } public function removed():void{ } public function render(_arg1:Number):void{ } public function init():void{ } public function setBlastPassage(_arg1:BlastPassage):void{ if (initialized){ return; }; initialized = true; this.blastPassage = _arg1; this.gr = _arg1.getGraphicsContext(); init(); } public function tick():void{ } public function skip():void{ skipped = true; } } }//package src.screen
Section 133
//ManagedSound (src.sound.ManagedSound) package src.sound { import flash.media.*; public class ManagedSound { public var activeSounds:Array; private var manager:SoundManager; private var ClassReference:Class; public function ManagedSound(_arg1:SoundManager, _arg2:Class){ activeSounds = new Array(); super(); this.manager = _arg1; this.ClassReference = _arg2; } public function stop():void{ var _local1:int; while (_local1 < activeSounds.length) { activeSounds[_local1].stop(); _local1++; }; } public function play(_arg1:Number=1, _arg2:Number=0):ManagedSoundChannel{ var _local3:SoundChannel = new ClassReference().play(0, 0, new SoundTransform(_arg1, _arg2)); return (new ManagedSoundChannel(manager, this, _local3)); } public function loop(_arg1:Number=1, _arg2:Number=0):ManagedSoundChannel{ var _local3:SoundChannel = new ClassReference().play(0, 999999999, new SoundTransform(_arg1, _arg2)); return (new ManagedSoundChannel(manager, this, _local3)); } public function fadeToAndStop(_arg1:Number, _arg2:Number):void{ var _local3:int; while (_local3 < activeSounds.length) { activeSounds[_local3].fadeToAndStop(_arg1, _arg2); _local3++; }; } public function isPlaying():Boolean{ return ((activeSounds.length > 0)); } public function update():void{ var _local1:int; while (_local1 < activeSounds.length) { activeSounds[_local1].update(); _local1++; }; } public function fadeTo(_arg1:Number, _arg2:Number):void{ var _local3:int; while (_local3 < activeSounds.length) { activeSounds[_local3].fadeTo(_arg1, _arg2); _local3++; }; } public function panTo(_arg1:Number, _arg2:Number):void{ var _local3:int; while (_local3 < activeSounds.length) { activeSounds[_local3].panTo(_arg1, _arg2); _local3++; }; } public function setPan(_arg1:Number):void{ var _local2:int; while (_local2 < activeSounds.length) { activeSounds[_local2].setPan(_arg1); _local2++; }; } public function setVolume(_arg1:Number):void{ var _local2:int; while (_local2 < activeSounds.length) { activeSounds[_local2].setVolume(_arg1); _local2++; }; } } }//package src.sound
Section 134
//ManagedSoundChannel (src.sound.ManagedSoundChannel) package src.sound { import flash.events.*; import flash.media.*; import flash.utils.*; public class ManagedSoundChannel { private var fadeStartVolume:Number;// = -1 private var channel:SoundChannel; private var fadeEndVolume:Number;// = -1 private var targetVolume:Number; private var targetPan:Number; private var sound:ManagedSound; private var stopAfterFade:Boolean;// = false private var panEndTime:Number;// = -1 private var fadeEndTime:Number;// = -1 private var manager:SoundManager; private var playing:Boolean;// = true private var panStartTime:Number;// = -1 private var fadeStartTime:Number;// = -1 private var panEndVolume:Number;// = -1 private var panStartVolume:Number;// = -1 public function ManagedSoundChannel(_arg1:SoundManager, _arg2:ManagedSound, _arg3:SoundChannel){ this.manager = _arg1; this.sound = _arg2; this.channel = _arg3; _arg2.activeSounds.push(this); if (_arg3 == null){ soundComplete(null); return; }; _arg3.addEventListener(Event.SOUND_COMPLETE, soundComplete); targetVolume = _arg3.soundTransform.volume; targetPan = _arg3.soundTransform.pan; update(); } public function stop():void{ if (!(playing)){ return; }; if (channel == null){ return; }; channel.stop(); soundComplete(null); } public function update():void{ var _local1:Number; if (!(playing)){ return; }; if (fadeStartTime >= 0){ _local1 = ((getTimer() - fadeStartTime) / (fadeEndTime - fadeStartTime)); if (_local1 < 0){ _local1 = 0; }; if (_local1 > 1){ _local1 = 1; }; targetVolume = (fadeStartVolume + ((fadeEndVolume - fadeStartVolume) * _local1)); targetVolume = (targetVolume * targetVolume); if (_local1 == 1){ fadeStartTime = -1; }; if ((((_local1 == 1)) && (stopAfterFade))){ stop(); }; }; if (panStartTime >= 0){ _local1 = ((getTimer() - panStartTime) / (panEndTime - panStartTime)); if (_local1 < 0){ _local1 = 0; }; if (_local1 > 1){ _local1 = 1; }; targetPan = (panStartVolume + ((panEndVolume - panStartVolume) * _local1)); if (_local1 == 1){ panStartTime = -1; }; }; var _local2:Number = (targetVolume * manager.volume); var _local3:Number = targetPan; if (channel == null){ return; }; if (((!((_local2 == channel.soundTransform.volume))) || (!((_local3 == channel.soundTransform.pan))))){ channel.soundTransform = new SoundTransform(_local2, _local3); }; } public function panTo(_arg1:Number, _arg2:Number):void{ if (!(playing)){ return; }; panStartVolume = targetPan; panEndVolume = _arg1; panStartTime = getTimer(); panEndTime = (getTimer() + _arg2); } public function fadeTo(_arg1:Number, _arg2:Number):void{ if (!(playing)){ return; }; fadeStartVolume = Math.sqrt(targetVolume); fadeEndVolume = Math.sqrt(_arg1); fadeStartTime = getTimer(); fadeEndTime = (getTimer() + _arg2); stopAfterFade = false; } public function setPan(_arg1:Number):void{ if (!(playing)){ return; }; if (channel == null){ return; }; channel.soundTransform.pan = _arg1; panStartTime = -1; update(); } public function fadeToAndStop(_arg1:Number, _arg2:Number):void{ if (!(playing)){ return; }; fadeTo(_arg1, _arg2); stopAfterFade = true; } public function setVolume(_arg1:Number):void{ if (!(playing)){ return; }; stopAfterFade = false; this.targetVolume = _arg1; fadeStartTime = -1; update(); } public function soundComplete(_arg1:Event):void{ if (!(playing)){ return; }; sound.activeSounds.splice(sound.activeSounds.indexOf(this), 1); playing = false; } public function isPlaying():Boolean{ return (playing); } } }//package src.sound
Section 135
//SoundManager (src.sound.SoundManager) package src.sound { import flash.utils.*; public class SoundManager { private var fadeStartVolume:Number;// = -1 private var lastTime:Number;// = -1 private var managedSounds:Array; private var fadeEndTime:Number;// = -1 private var fadeStartTime:Number;// = -1 private var fadeEndVolume:Number;// = -1 public var volume:Number;// = 1 private var managedSoundMap:Object; public function SoundManager(){ managedSoundMap = new Object(); managedSounds = new Array(); super(); } public function update():void{ var _local3:Number; var _local1:Number = getTimer(); if (lastTime < 0){ lastTime = _local1; }; if (fadeStartTime >= 0){ _local3 = ((getTimer() - fadeStartTime) / (fadeEndTime - fadeStartTime)); if (_local3 < 0){ _local3 = 0; }; if (_local3 > 1){ _local3 = 1; }; volume = (fadeStartVolume + ((fadeEndVolume - fadeStartVolume) * _local3)); volume = (volume * volume); if (_local3 == 1){ fadeStartTime = -1; }; }; var _local2:int; while (_local2 < managedSounds.length) { managedSounds[_local2].update(); _local2++; }; } public function stopAll():void{ var _local1:int; while (_local1 < managedSounds.length) { managedSounds[_local1].stop(); _local1++; }; } public function get(_arg1:String):ManagedSound{ var _local2:Class; if (managedSoundMap[_arg1] == null){ _local2 = (getDefinitionByName(("sound." + _arg1)) as Class); if (_local2 == null){ throw (new Error(("Failed to find sound " + _arg1))); }; managedSoundMap[_arg1] = new ManagedSound(this, _local2); managedSounds.push(managedSoundMap[_arg1]); }; return (managedSoundMap[_arg1]); } public function fadeTo(_arg1:Number, _arg2:Number):void{ fadeStartVolume = Math.sqrt(volume); fadeEndVolume = Math.sqrt(_arg1); fadeStartTime = getTimer(); fadeEndTime = (getTimer() + _arg2); } public function setVolume(_arg1:Number):void{ this.volume = _arg1; fadeStartTime = -1; } } }//package src.sound
Section 136
//GameDataParser (src.util.GameDataParser) package src.util { import flash.xml.*; public class GameDataParser { public var levelNum:int; public var timeLimit:int;// = 600 public var gameType:String; public var cardList:String; public var textMappings:Object; public var randomSeed:int; public var gameMode:String; public var playerType:String; public var levelData:String; public function parse(_arg1:String):void{ var _local2:XMLDocument = new XMLDocument(_arg1); textMappings = new Object(); var _local3:Array = _local2.firstChild.childNodes; randomSeed = parseInt(_local2.firstChild.attributes.randomseed); cardList = new String(_local2.firstChild.attributes.cards); playerType = new String(_local2.firstChild.attributes.playerType); gameMode = new String(_local2.firstChild.attributes.mode); timeLimit = parseInt(_local2.firstChild.attributes.timelimit); var _local4:int; while (_local4 < _local3.length) { if (_local3[_local4].nodeName == "id"){ }; if (_local3[_local4].nodeName == "levelnum"){ levelNum = parseInt(_local3[_local4].firstChild.nodeValue); }; if (_local3[_local4].nodeName == "game"){ gameType = new String(_local3[_local4].attributes.type); }; if (_local3[_local4].nodeName == "text"){ if ((((_local3[_local4].firstChild == null)) || ((_local3[_local4].firstChild == undefined)))){ textMappings[_local3[_local4].attributes.id] = (("[xx" + _local3[_local4].attributes.id) + "xx]"); } else { textMappings[_local3[_local4].attributes.id] = new String(_local3[_local4].firstChild.nodeValue); }; TextMappings.set(_local3[_local4].attributes.id, textMappings[_local3[_local4].attributes.id]); }; if (_local3[_local4].nodeName == "level"){ levelData = (textMappings[_local3[_local4].attributes.id] = new String(_local3[_local4].firstChild.nodeValue)); }; _local4++; }; } } }//package src.util
Section 137
//ReplayData (src.util.ReplayData) package src.util { import src.player.*; public class ReplayData { public static const data:String = <data> <entry id="1" time="2009-05-13 13:41:16"><![CDATA[933,_0o291l8Pc34cc38fo983o686a32ii6j63316332i6c4l0u1o938rcDeocie6u6s3=0]]></entry> <entry id="2" time="2009-05-13 13:41:24"><![CDATA[933,0s3ecu6el6x2c0A498_89a6bo9lr6b693b699b696p3r3bc9f8u9cb3362r1l0943=0]]></entry> <entry id="3" time="2009-05-13 13:41:31"><![CDATA[933,04u6lm669m96xm66cefc38M961r3lj3h61399p919h616991Y0G4rc6s3c6s94663=0]]></entry> <entry id="4" time="2009-05-13 13:41:39"><![CDATA[933,06_6l260l1u93p3o6cc4cc9o9839c1oh6p399p696p693199616061l230_0o4i63=0]]></entry> <entry id="5" time="2009-05-13 13:41:46"><![CDATA[933,06626632c6um3i32l361c96b32c6i0fgc4lcf6S2r664i2l391G93p39683occcs3=0]]></entry> <entry id="6" time="2009-05-13 13:41:53"><![CDATA[933,0s3cG89c943cf632f664u038393199fp9bfj633296cm66f4uc9460S2c331_1993=0]]></entry> <entry id="7" time="2009-05-13 13:42:03"><![CDATA[933,083oc8i99p699p399p393b32u1o0_064rcu4ocl8_8x931_1f332c694M2M331c93=0]]></entry> <entry id="8" time="2009-05-13 13:42:10"><![CDATA[933,0899_99b33f139ibi9i890r2l3xb39383oc86a3e6c6s9o386ci436i4i6f4icr63=0]]></entry> <entry id="9" time="2009-05-13 13:42:22"><![CDATA[933,0692V0l8_931r3ij31M3329031i0M83098P9f1333296rm666m66Y2Y331_168u93=0]]></entry> <entry id="10" time="2009-05-13 13:42:31"><![CDATA[933,09i1l998cco83g6h61f3cj93J230_0c4u0f8i938Acu8i93p6o389oc8rcr4fcfs3=0]]></entry> <entry id="11" time="2009-05-13 13:42:41"><![CDATA[933,0s3cS8r0G163cb3p6968399p3o983c_cr436_6D4666k346c6s9c_c6890A2o3Sb3=0]]></entry> <entry id="12" time="2009-05-13 13:42:47"><![CDATA[933,0bor6j339j3i626i92A3r1c9lb32i331u9o8393pcbfp99i89968lcc869c13h633=0]]></entry> <entry id="13" time="2009-05-13 13:42:56"><![CDATA[933,03xj9h993b336j3h6163J0_034lcVs6cAs6c9s6ccs6c64J6D4f692l3f938fc343=0]]></entry> <entry id="14" time="2009-05-13 13:43:06"><![CDATA[933,04u6Vs68lcr4l0Y1o3r2c6f4A6f2i3613968l9i1i9ubir3p6968ici8f9fp99983=0]]></entry> <entry id="15" time="2009-05-13 13:43:12"><![CDATA[933,08i9fb33D2ia39op699b63c2636hc1c33238o9lbfa68ro9p39Ab336j939j62r33=0]]></entry> <entry id="16" time="2009-05-13 13:43:21"><![CDATA[933,033j3i6296Y4i09cJ6icce3u3s6cre6u3s3cMec6x066f038x9Ab93cj61l9ip693=0]]></entry> <entry id="17" time="2009-05-13 13:43:27"><![CDATA[933,09lblr39ob93ijf39b6r3j333b93r2l6P460c43cis6c9s6899Ap3h91ih9j33i23=0]]></entry> <entry id="18" time="2009-05-13 13:43:39"><![CDATA[933,02S0r4ccG869ip69Mbx392i361P9c8ic_c3e329931_392o6om666e3cAe36Aco43=0]]></entry> <entry id="19" time="2009-05-13 13:43:49"><![CDATA[933,06c4i632V3x296f2c3_339Jb336ic2V3c29i6236Mefu6ecu6e6u6ei4ucl8P9f13=0]]></entry> <entry id="20" time="2009-05-13 13:43:59"><![CDATA[933,01i3Aj63_36j636j9362_26634_4ucPs38fo986o6899c1r392G169c1c29664Ms3=0]]></entry> <entry id="21" time="2009-05-13 13:44:06"><![CDATA[933,0s64r6l293r296946cM436lm669m963e96f46c366230_0l46cM43662f36h3p393=0]]></entry> <entry id="22" time="2009-05-13 13:44:19"><![CDATA[933,0998lci86931J9A8ccle62ri3j33f1_1i0J2c634M0_0Y1l8ocAe36i2o6_6Ye6u3=0]]></entry> <entry id="23" time="2009-05-13 13:44:31"><![CDATA[933,0e9u9e6u9e666eru9ec6f2P33bir6bir6b6961_1_1S0_0c13332A6V4lcl4lc_c3=0]]></entry> <entry id="24" time="2009-05-13 13:44:41"><![CDATA[933,0cus3k349k643k94663m36_230u8V9cp696p999362f6_0l8_8693p98ioc8x0d=0]]></entry> <entry id="25" time="2009-05-13 13:44:41"><![CDATA[782,5034=5034]]></entry> </data> .toString(); public static var playData:String = ""; public static var startLevel:int = 0; public static var logData:Array = new Array(); public static function checkLog(_arg1:int, _arg2:String):void{ var _local3:String = logData[_arg1]; if (((!((_local3 == null))) && (!((_local3 == _arg2))))){ trace(("Expected: " + _local3)); trace((" Got: " + _local3)); }; } public static function parseReplayData():void{ var _local3:String; var _local1:Array = data.split("\n"); var _local2:int; while (_local2 < _local1.length) { _local3 = _local1[_local2]; if (_local3.indexOf("933,") > 0){ _local3 = _local3.substring((_local3.indexOf("933,") + 4)); _local3 = _local3.substring(0, _local3.indexOf("=0")); trace(_local3); playData = (playData + RecorderController.decode(_local3)); }; _local2++; }; } } }//package src.util
Section 138
//TextMappings (src.util.TextMappings) package src.util { public class TextMappings { public static var mappings:Object = new Object(); public static function set(_arg1:String, _arg2:String):void{ mappings[_arg1] = _arg2; } public static function get(_arg1:String):String{ if (mappings[_arg1] == undefined){ return ((("[" + _arg1) + "]")); }; return (mappings[_arg1]); } } }//package src.util
Section 139
//BlastPassage (src.BlastPassage) package src { import src.sound.*; import src.util.*; import src.particle.*; import src.gui.*; import flash.display.*; import flash.events.*; import flash.text.*; import flash.utils.*; import src.player.*; import src.level.*; import flash.external.*; import flash.ui.*; import flash.system.*; import src.screen.game.*; import src.screen.*; public class BlastPassage extends MovieClip { private var recorderController:RecorderController; private var lastTime:Number;// = -1 private var lastX:Number;// = 0 public var pauseWithoutFocus:Boolean;// = false protected var outro:Outro; public var logField:TextField; public var controller:KeyboardController; public var fpsMeter:TextField; private var frames:int; protected var isIntroOver:Boolean;// = false private var screenCover:ScreenCover; private var paused:Boolean;// = false private var mouseHidden:Boolean;// = false private var lastY:Number;// = 0 protected var gdp:GameDataParser; protected var levelLoader:LevelLoader; public var gui:Gui; public var gameHolder:MovieClip; public var focusNagger:MovieClip; private var lastFade:Number;// = -1 private var lastMouseUpdateTime:int;// = 0 private var areLevelsLoaded:Boolean;// = false private var hasSentQuit:Boolean;// = false protected var deathAnimTicks:int;// = -1 protected var hasSentGameEnd:Boolean;// = false private var fps:int; private var gr:GraphicsContext; private var screen:Screen; public var DEBUG_XML:String; public var intro:Intro; public var introButtons:IntroButtons; private var focused:Boolean;// = false private var tickCount:int;// = 0 public var particleLayer:Sprite; public var gameScreen:GameScreen; public static const DEBUG_VERY_VERBOSE:Boolean = false; public static const DEBUG_MODE:Boolean = false; public static const REPLAY_MODE:Boolean = false; public static var GAME_AREA_WIDTH:int = 248; private static var MAX_TICKS_PER_FRAME:int = 10; public static var PLAYDATA_CMD_SCORE:int = 782; public static var PLAYDATA_CMD_DATA:int = 933; public static var PLAYDATA_CMD_ABORT:int = 799; public static var GAME_AREA_HEIGHT:int = 232; public static var sound:SoundManager = new SoundManager(); public static var music:SoundManager = new SoundManager(); public static var TICKS_PER_SECOND:int = 20; public function BlastPassage(){ DEBUG_XML = <gamedata randomseed="742908561"> <text id="instructions_1">Styr BomBj&#x00f6;rn med piltangenterna.</text> <text id="click_to_focus">Klicka f&#x00f6;r att spela!</text> <text id="total_score">Totalpo&#x00e4;ng</text> <text id="click_to_start">Klicka f&#x00f6;r att starta. Spelet startar om [0] sekunder.</text> <text id="score">Po&#x00e4;ng</text> <text id="instructions_8">Samla nycklar f&#x00f6;r att &#x00f6;ppna d&#x00f6;rrar, och anv&#x00e4;nd utg&#x00e5;ngen f&#x00f6;r att klara niv&#x00e5;n.</text> <text id="game_won">DU KLARADE DET!</text> <text id="instructions_9">KLICKA F&#x00d6;R ATT B&#x00d6;RJA SPELA!</text> <text id="instructions_6">Plocka upp trolldryck n&#x00e4;r du kan.</text> <text id="instructions_7">Anv&#x00e4;nd trolldryck med Enter, den f&#x00f6;rst&#x00f6;r alla fiender p&#x00e5; sk&#x00e4;rmen.</text> <text id="bonus_time">Tidsbonus</text> <text id="instructions_4">Bomber kan skada dig och f&#x00f6;rst&#x00f6;ra specialf&#x00f6;rem&#x00e5;l.</text> <text id="instructions_5">Syre &#x00e4;r h&#x00e4;lsa. Samla syrgastuber f&#x00f6;r att fylla p&#x00e5; ditt f&#x00f6;rr&#x00e5;d.</text> <text id="instructions_2">Sl&#x00e4;pp bomber med mellanslagstangenten.</text> <text id="instructions_3">Spr&#x00e4;ng fiendernas hus f&#x00f6;r att f&#x00e5; specialf&#x00f6;rem&#x00e5;l.</text> <text id="out_of_time">SLUT P&#x00c5; TID!</text> <text id="game_over">SPELET &#x00c4;R SLUT!</text> <text id="time">Tid</text> <text id="game_ends_in">Spelet slutar om [0] sekunder.</text> <text id="out_of_oxygen">SLUT P&#x00c5; SYRE!</text> <text id="game_quit">DU AVSLUTADE SPELET</text> <text id="bonus_life">Syrebonus</text> <levelnum>3</levelnum><level>noname 16 20 17 51 32 32 ################################ #££££££#. ...'.. - # #£ b£#.########## .... - ..c# #£b £#.#.. .. - .... - .. # #£ b £# #.####.# - ..K- ...# #££££££#...... .# ---- .. - ...# #%%%%%%########## - .. - ..K# # : : ::: ::: - . - c# # a # :&&&&#&&&: - ---- # # : :& & : - - # # 4 &= =&: - - # # # 4 ::& & #-- -----### # a :& &: - c - bb# # : &&&$ &&& --#-- .... # # 4* : & $& : # .... # # #$ & : # . # # # 4 # $# # K---# # 4 % a #--###########---- .# # # #; # . ..# # # # # #;K # .# . # # a # #££# #;; # #K--# # * a #;;# #3; #--##- # # # % * #;;#b b#;; 3# -''- # # #;;######; # ---- # # # * #;;; 3 #b b# # % K # # ; 3 # . .. # #%% % # # .... # # # # * # d ###### . . # # #%%## # 1..... # # % # # > .1......# #? % d# $ $ $ # .1......# ################################ </level></gamedata> .toString(); controller = new KeyboardController(); recorderController = new RecorderController(controller); gdp = new GameDataParser(); super(); addEventListener(Event.ACTIVATE, getFocus); addEventListener(Event.DEACTIVATE, loseFocus); fpsMeter.visible = DEBUG_MODE; logField.visible = false; logField.appendText("BlastPassage()\n"); if (((DEBUG_MODE) && (REPLAY_MODE))){ ReplayData.parseReplayData(); }; stage.stageFocusRect = false; logField.appendText("Parse gamedata\n"); getGameData(gdp); gui.init(this); gui.scoreLabel.text = (TextMappings.get("score") + ":"); logField.appendText("Create graphics\n"); gr = new GraphicsContext((GAME_AREA_WIDTH * 2), (GAME_AREA_HEIGHT * 2)); particleLayer = new Sprite(); var bmp:Bitmap = new Bitmap(gr.bm); screenCover = new ScreenCover(); gameHolder.addChild(bmp); gameHolder.addChild(particleLayer); gameHolder.addChild(screenCover); bmp.x = (bmp.x - GAME_AREA_WIDTH); bmp.y = (bmp.y - GAME_AREA_HEIGHT); screenCover.x = (screenCover.x - GAME_AREA_WIDTH); screenCover.y = (screenCover.y - GAME_AREA_HEIGHT); particleLayer.x = (particleLayer.x - GAME_AREA_WIDTH); particleLayer.y = (particleLayer.y - GAME_AREA_HEIGHT); gameHolder.x = (gameHolder.x + GAME_AREA_WIDTH); gameHolder.y = (gameHolder.y + GAME_AREA_HEIGHT); lastTime = getTimer(); logField.appendText("Load level \n"); try { if (((DEBUG_MODE) && (!(REPLAY_MODE)))){ levelLoader = new FileLevelLoader(this); } else { levelLoader = new LevelLoader(this); }; } catch(e) { logField.appendText(e); logField.visible = true; }; particleLayer.mouseChildren = false; particleLayer.mouseEnabled = false; gameHolder.mouseChildren = false; gameHolder.mouseEnabled = false; focusNagger.text.text = TextMappings.get("click_to_focus"); introButtons = new IntroButtons(this); introButtons.x = 320; introButtons.y = 240; startup(); } public function gameAborted():void{ var _local1:int; var _local2:int; endGame(Outro.GAME_ABORTED, _local1, _local2); } public function doAbort():void{ try { ExternalInterface.call("playData", (((PLAYDATA_CMD_DATA + ",") + recorderController.flush()) + "=0")); ExternalInterface.call("playData", ((((PLAYDATA_CMD_ABORT + ",") + gameScreen.player.score) + "=") + gameScreen.player.score)); } catch(e) { }; } public function pauseGame(_arg1:Event=null):void{ controller.releaseAllKeys(); Mouse.show(); paused = true; } public function levelWon():void{ var _local1:int = (int(((gameScreen.remainingTicks * 1000) / GameScreen.GAME_TIME)) + 1000); var _local2:int = gameScreen.player.getHealth(); endGame(Outro.GAME_WON, _local1, _local2); } public function updateFade(_arg1:Number):void{ if (_arg1 < 0){ _arg1 = 0; }; if (_arg1 > 1){ _arg1 = 1; }; if (_arg1 == lastFade){ return; }; lastFade = _arg1; screenCover.visible = !((_arg1 == 0)); screenCover.alpha = (_arg1 * _arg1); var _local2:Number = 1; var _local3:Number = (1 - (_arg1 * (_local2 + 1))); if (_local3 < 0){ _local3 = 0; }; if (_local3 > 1){ _local3 = 1; }; _local3 = (((1 - ((1 - _local3) * (1 - _local3))) * 0.995) + 0.005); var _local4:Number = (1 - ((_arg1 * (_local2 + 1)) - _local2)); if (_local4 < 0){ _local4 = 0; }; if (_local4 > 1){ _local4 = 1; }; _local4 = (1 - ((1 - _local4) * (1 - _local4))); gameHolder.scaleY = _local3; gameHolder.scaleX = _local4; } public function unpauseGame(_arg1:Event=null):void{ paused = false; } public function togglePauseGame(_arg1:Event=null):void{ if (!(paused)){ pauseGame(_arg1); } else { unpauseGame(_arg1); }; } public function sendQuit():void{ if (!(hasSentQuit)){ trace("Quit!"); try { fscommand("gameQuit"); } catch(e) { }; hasSentQuit = true; }; } public function stopGame():void{ removeEventListener(Event.ENTER_FRAME, advanceTime); Mouse.show(); stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDown); stage.removeEventListener(KeyboardEvent.KEY_UP, keyUp); gameScreen = null; setScreen(null); } public function levelEnded():void{ try { ExternalInterface.call("playData", (((PLAYDATA_CMD_DATA + ",") + recorderController.flush()) + "=0")); ExternalInterface.call("playData", ((((PLAYDATA_CMD_SCORE + ",") + gameScreen.player.score) + "=") + gameScreen.player.score)); } catch(e) { }; } public function playerDead():void{ var _local1:int; var _local2:int; endGame(Outro.OUT_OF_LIFE, _local1, _local2); } public function keyDown(_arg1:KeyboardEvent):void{ controller.toggleKey(_arg1.keyCode, true); } public function getFocus(_arg1:Event):void{ focusNagger.visible = false; focused = true; } public function setScreen(_arg1:Screen):void{ if (screen != null){ screen.removed(); }; screen = _arg1; if (screen != null){ screen.setBlastPassage(this); }; } protected function getGameData(_arg1:GameDataParser):void{ var oa:Object; var gameData:String; var gdp = _arg1; try { oa = ExternalInterface.call("getGameData"); if ((((oa == null)) || (!(oa.success)))){ } else { gameData = oa.message; gdp.parse(gameData); }; } catch(e) { logField.appendText(e); logField.visible = true; }; if (DEBUG_MODE){ gdp.parse(DEBUG_XML); }; } public function getGraphicsContext():GraphicsContext{ return (gr); } public function outOfTime():void{ var _local1:int; var _local2:int = gameScreen.player.getHealth(); endGame(Outro.OUT_OF_TIME, _local1, _local2); } protected function showInstructions():void{ isIntroOver = false; intro = new Intro(this); intro.x = 320; intro.y = 240; addChild(intro); addChild(introButtons); } public function loseFocus(_arg1:Event):void{ focusNagger.visible = true; controller.releaseAllKeys(); focused = false; } public function addParticle(_arg1:Particle):void{ particleLayer.addChild(_arg1); } public function abortGame():Boolean{ if (gameScreen != null){ if (paused){ unpauseGame(); }; return (gameScreen.abortGame()); }; return (false); } public function checkStartGame():void{ if (((!(isIntroOver)) || (!(areLevelsLoaded)))){ return; }; startGame(); } public function levelsLoaded():void{ areLevelsLoaded = true; checkStartGame(); } public function keyUp(_arg1:KeyboardEvent):void{ controller.toggleKey(_arg1.keyCode, false); } public function introOver():void{ isIntroOver = true; removeChild(introButtons); checkStartGame(); } public function updateMouseVisibility():void{ var _local1:Boolean = (mouseX < ((GAME_AREA_WIDTH * 2) + gameHolder.x)); if (((!((lastX == mouseX))) || (!((lastY == mouseY))))){ lastX = mouseX; lastY = mouseY; lastMouseUpdateTime = getTimer(); }; var _local2:Boolean = ((_local1) && (((getTimer() - lastMouseUpdateTime) > 1000))); if (((!((_local2 == mouseHidden))) || (((tickCount % 20) == 0)))){ mouseHidden = _local2; if (_local2){ Mouse.hide(); } else { Mouse.show(); }; }; } public function endGame(_arg1:int, _arg2:int, _arg3:int):void{ var winType = _arg1; var timeBonus = _arg2; var lifeBonus = _arg3; setScreen(null); outro = new Outro(this, winType, timeBonus, lifeBonus); addChild(outro); outro.visible = false; deathAnimTicks = 0; gameScreen.player.score = (gameScreen.player.score + timeBonus); gameScreen.player.score = (gameScreen.player.score + lifeBonus); if (!(hasSentGameEnd)){ levelEnded(); try { fscommand("gameEnd", ("" + gameScreen.player.score)); } catch(e) { }; hasSentGameEnd = true; }; } public function advanceTime(_arg1:Event):void{ var aa:Number; var e = _arg1; BlastPassage.music.update(); BlastPassage.sound.update(); var now:Number = getTimer(); if (lastTime < 0){ lastTime = now; }; var msPerTick:Number = (1000 / TICKS_PER_SECOND); if (((DEBUG_MODE) && (REPLAY_MODE))){ msPerTick = (msPerTick / 20); }; var ticksThisFrame:int; while ((now - lastTime) > msPerTick) { if (((!(paused)) && (((focused) || (!(pauseWithoutFocus)))))){ if (deathAnimTicks >= 0){ deathAnimTicks++; if ((((deathAnimTicks == (20 + (5 * 20)))) || (((!((outro == null))) && (outro.shouldSkip))))){ sendQuit(); }; }; ticksThisFrame = (ticksThisFrame + 1); if (ticksThisFrame < MAX_TICKS_PER_FRAME){ if (screen != null){ screen.tick(); }; }; if (isIntroOver){ tickCount++; }; if ((tickCount % TICKS_PER_SECOND) == 0){ fps = frames; fpsMeter.text = ("FPS: " + fps); frames = 0; }; }; lastTime = (lastTime + msPerTick); }; updateMouseVisibility(); var alpha:Number = ((now - lastTime) / msPerTick); if (((((!(focused)) && (pauseWithoutFocus))) || (paused))){ alpha = 1; }; if (screen != null){ screen.render(alpha); }; if (deathAnimTicks >= 0){ updateFade(((deathAnimTicks + alpha) / 18)); if (deathAnimTicks >= 20){ outro.visible = true; aa = (((deathAnimTicks + alpha) - 20) / 10); if (aa > 1){ aa = 1; }; outro.alpha = Math.sqrt(aa); }; } else { updateFade(0); }; frames++; var str:String = recorderController.flushIfLongerThan(64); try { if (str != null){ ExternalInterface.call("playData", (((PLAYDATA_CMD_DATA + ",") + str) + "=0")); }; } catch(e) { }; gui.update(); } public function startGame():void{ try { fscommand("gameStart"); } catch(e) { }; addEventListener(Event.ENTER_FRAME, advanceTime); stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDown); stage.addEventListener(KeyboardEvent.KEY_UP, keyUp); gameScreen = new GameScreen(levelLoader, gdp.levelNum, gdp.levelData, gdp.randomSeed); gui.setScreen(gameScreen); setScreen(gameScreen); gameScreen.player = new Player(gameScreen); if (((REPLAY_MODE) && (DEBUG_MODE))){ gameScreen.player.setController(new ReplayController(ReplayData.playData)); } else { gameScreen.player.setController(recorderController); }; gameScreen.player.newLevel(); } protected function startup():void{ showInstructions(); } public function levelStarted(_arg1:int):void{ } } }//package src
Section 140
//BlastPassageStandAlone (src.BlastPassageStandAlone) package src { import src.level.*; import src.util.*; import com.midasplayer.*; import src.gui.*; import flash.display.*; public class BlastPassageStandAlone extends BlastPassage implements ButtonListener { public var levelPicker:LevelChooser; public var TEXT_MAPPINGS:String; public var introScreen:MovieClip; public function BlastPassageStandAlone(){ TEXT_MAPPINGS = <gamedata randomseed="1887208361"> <text id="bonus_life">Oxygen bonus</text> <text id="bonus_time">Time bonus</text> <text id="click_to_focus">Click to focus!</text> <text id="click_to_start">Click to start. Game starts in [0] seconds.</text> <text id="game_ends_in">The game ends in [0] seconds.</text> <text id="game_over">GAME OVER!</text> <text id="game_quit">GAME QUIT!</text> <text id="game_won">YOU MADE IT!</text> <text id="instructions_1">Control the space bear with your arrow keys.</text> <text id="instructions_2">Drop bombs by pressing space bar.\n</text> <text id="instructions_3">Bomb the enemies nests to get powerups\n</text> <text id="instructions_4">Bombs can hurt yourself and destroy powerups.</text> <text id="instructions_5">Oxygen equals health. Collect tubes to replenish your supply.\n</text> <text id="instructions_6">Collect potions when possible.\n</text> <text id="instructions_7">Use potions with Enter, destroying all enemies on the screen.</text> <text id="instructions_8">Collect keys to open doors, and exit to complete the level.\n</text> <text id="instructions_9">CLICK TO START PLAYING!</text> <text id="out_of_oxygen">OUT OF OXYGEN!</text> <text id="out_of_time">OUT OF TIME!</text> <text id="score">Score</text> <text id="time">Time</text> <text id="total_score">Total score</text> </gamedata> ; super(); levelLoader = new DownloadLevelLoader(this); pauseWithoutFocus = true; } override public function introOver():void{ isIntroOver = true; removeChild(introButtons); levelPicker.show(this); } override public function sendQuit():void{ removeChild(outro); outro = null; deathAnimTicks = -1; gui.reset(); stopGame(); levelPicker.show(this); stage.focus = this; } override public function endGame(_arg1:int, _arg2:int, _arg3:int):void{ super.endGame(_arg1, _arg2, _arg3); if (_arg1 == Outro.GAME_WON){ levelPicker.levelWon((_arg2 + _arg3)); } else { levelPicker.levelLost(); }; } override public function startGame():void{ removeChild(introScreen); isIntroOver = false; showInstructions(); } override protected function getGameData(_arg1:GameDataParser):void{ _arg1.parse(TEXT_MAPPINGS); } public function backToMainMenu():void{ levelPicker.hide(); addChild(introScreen); levelPicker.reset(); } override protected function startup():void{ introScreen.highscoreButton.init(this, 1000); introScreen.moneyButton.init(this, 1001); introScreen.homepageButton.init(this, 1002); introScreen.moreGamesButton.init(this, 1003); introScreen.startButton.init(this, 1); introScreen.kingButton.init(this, 1004); } public function buttonToggled(_arg1:int, _arg2:Boolean):Boolean{ if (_arg1 == 1000){ KingAPI.openHighscoresLink(); }; if (_arg1 == 1001){ KingAPI.openMoneyLink("blast-passage"); }; if (_arg1 == 1002){ KingAPI.openAddToWebsiteLink(); }; if (_arg1 == 1003){ KingAPI.openOtherGamesLink(); }; if (_arg1 == 1004){ KingAPI.openSignLink(); }; getFocus(null); if (_arg1 == 1){ startGame(); }; return (true); } public function playLevel(_arg1:int):void{ gdp.levelNum = (_arg1 + 1); levelPicker.hide(); super.startGame(); } } }//package src
Section 141
//GraphicsContext (src.GraphicsContext) package src { import flash.display.*; import art.*; import flash.geom.*; public class GraphicsContext { private var r2:Rectangle; private var r3:Rectangle; public var bullet:BitmapData; private var p:Point; public var floor:BitmapData; public var ghost:BitmapData; public var house0:BitmapData; public var house1:BitmapData; public var house2:BitmapData; public var house3:BitmapData; private var r4:Rectangle; private var yCam:int; public var teleporter:BitmapData; public var orgWall1:BitmapData; public var orgWall2:BitmapData; public var orgWall3:BitmapData; public var orgWall4:BitmapData; public var sorcerer:BitmapData; public var bomb:BitmapData; public var deathAnim:BitmapData; public var background:BitmapData; public var grunt:BitmapData; private var rc:Rectangle; public var fireball:BitmapData; public var fire:BitmapData; private var yo:int; public var special:BitmapData; public var fire2:BitmapData; public var door:BitmapData; private var xCam:int; private var height:int; public var bm:BitmapData; private var width:int; public var wall:BitmapData; public var player:BitmapData; public var orgFloors:Array; public var lobber:BitmapData; public var death:BitmapData; private var xo:int; private var r:Rectangle; public var demon:BitmapData; public var pickup:BitmapData; public function GraphicsContext(_arg1:int, _arg2:int){ var _local4:BitmapData; var _local5:BitmapData; var _local6:Bitmap; var _local7:int; var _local8:int; var _local9:int; var _local10:int; var _local11:int; var _local12:int; orgFloors = [new FloorSheet1(32, 32), new FloorSheet2(32, 32), new FloorSheet3(32, 32), new FloorSheet4(32, 32), new FloorSheet5(32, 32)]; orgWall1 = new WallSheet1(32, 32); orgWall2 = new WallSheet2(32, 32); orgWall3 = new WallSheet3(32, 32); orgWall4 = new WallSheet4(32, 32); door = new DoorSheet(32, 32); pickup = new PickupSheet(32, 32); special = new SpecialSheet(32, 32); house0 = new HouseSheet0(64, 64); house1 = new HouseSheet1(64, 64); house2 = new HouseSheet2(64, 64); house3 = new HouseSheet3(64, 64); grunt = new GruntSheet(32, 32); ghost = new GhostSheet(32, 32); demon = new DemonSheet(32, 32); death = new DeathSheet(32, 32); lobber = new LobberSheet(32, 32); sorcerer = new SorcererSheet(32, 32); fireball = new FireballSheet(32, 32); bullet = new BulletSheet(32, 32); player = new PlayerSheet(32, 64); deathAnim = new DeathAnimSheet(32, 64); bomb = new BombSheet(32, 32); fire = new FireSheet(32, 32); fire2 = new FireSheet2(32, 32); teleporter = new TeleporterSheet(32, 50); r = new Rectangle(0, 0, 32, 32); r2 = new Rectangle(0, 0, 32, 64); r3 = new Rectangle(0, 0, 47, 50); r4 = new Rectangle(0, 0, 64, 64); rc = new Rectangle(0, 0, 1, 1); p = new Point(0, 0); super(); this.width = _arg1; this.height = _arg2; background = new BitmapData((32 * 32), (32 * 32), false, 0); bm = new BitmapData(_arg1, _arg2, false, 0); var _local3:int; while (_local3 < 5) { _local4 = orgFloors[_local3]; _local5 = new BitmapData((32 * 32), (32 * 32), false, 0); _local6 = new Bitmap(_local4); _local7 = 0; while (_local7 < ((32 * 32) / _local4.height)) { _local8 = 0; while (_local8 < ((32 * 32) / _local4.width)) { _local9 = (_local8 * _local4.width); _local10 = (_local7 * _local4.height); _local11 = 1; _local12 = 1; if ((_local8 % 2) == 1){ _local11 = -1; _local9 = (_local9 + _local6.width); }; if ((_local7 % 2) == 1){ _local12 = -1; _local10 = (_local10 + _local6.height); }; _local5.draw(_local6, new Matrix(_local11, 0, 0, _local12, _local9, _local10)); _local8++; }; _local7++; }; orgFloors[_local3] = _local5; _local3++; }; } public function fill(_arg1:int):void{ bm.fillRect(new Rectangle(0, 0, width, height), _arg1); } public function drawSprite32x32(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ p.x = (_arg4 - xCam); p.y = (_arg5 - yCam); r4.x = (_arg2 * 64); r4.y = (_arg3 * 64); bm.copyPixels(_arg1, r4, p); } public function prepare(_arg1:int, _arg2:int):void{ this.xCam = _arg1; this.yCam = _arg2; xo = -((_arg1 & 31)); yo = -((_arg2 & 31)); bm.copyPixels(background, new Rectangle(_arg1, _arg2, width, height), new Point(0, 0)); } public function setFloorType(_arg1:int):void{ floor = orgFloors[_arg1]; } public function drawSprite16x32(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ p.x = (_arg4 - xCam); p.y = (_arg5 - yCam); r2.x = (_arg2 * 32); r2.y = (_arg3 * 64); bm.copyPixels(_arg1, r2, p); } public function drawFloorImageOffs(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):void{ p.x = ((_arg4 * 32) + _arg6); p.y = ((_arg5 * 32) + _arg7); r.x = (_arg2 * 32); r.y = (_arg3 * 32); background.copyPixels(_arg1, r, p); } public function drawFloorImage(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ p.x = (_arg4 * 32); p.y = (_arg5 * 32); r.x = (_arg2 * 32); r.y = (_arg3 * 32); background.copyPixels(_arg1, r, p); } public function drawSprite(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ p.x = (_arg4 - xCam); p.y = (_arg5 - yCam); r.x = (_arg2 * 32); r.y = (_arg3 * 32); bm.copyPixels(_arg1, r, p); } public function drawSprite47x50(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int):void{ p.x = ((_arg4 - xCam) - 8); p.y = ((_arg5 - yCam) + 18); r3.x = (_arg2 * 47); r3.y = (_arg3 * 50); bm.copyPixels(_arg1, r3, p); } public function setWallType(_arg1:int):void{ if (_arg1 == 0){ wall = orgWall1; }; if (_arg1 == 1){ wall = orgWall2; }; if (_arg1 == 2){ wall = orgWall3; }; if (_arg1 == 3){ wall = orgWall4; }; } public function colorize(_arg1:BitmapData, _arg2:BitmapData, _arg3:int):void{ var _local4:Number = ((_arg3 & 3) / 3); var _local5:Number = (((_arg3 >> 2) & 3) / 3); var _local6:Number = (((_arg3 >> 4) & 3) / 3); var _local7:Number = (((_local4 * 0.3) + (_local5 * 0.59)) + (_local6 * 0.1)); _local4 = (_local4 + ((_local7 - _local4) * 0.4)); _local5 = (_local5 + ((_local7 - _local5) * 0.4)); _local6 = (_local6 + ((_local7 - _local6) * 0.4)); _arg1.draw(_arg2, new Matrix(), new ColorTransform(_local4, _local5, _local6, 1, 0, 0, 0, 0)); } public function drawCustom(_arg1:BitmapData, _arg2:int, _arg3:int, _arg4:int, _arg5:int, _arg6:int, _arg7:int):void{ rc.width = _arg4; rc.height = _arg5; rc.x = _arg2; rc.y = _arg3; p.x = (_arg6 - xCam); p.y = (_arg7 - yCam); bm.copyPixels(_arg1, rc, p); } } }//package src
Section 142
//Intro (src.Intro) package src { import flash.utils.*; import flash.events.*; import src.util.*; import flash.display.*; import flash.text.*; public class Intro extends MovieClip { private var hasPlayedNextMusic:Boolean;// = false public var textField:TextField; private var startTime:int;// = 0 public var clickToStartText:TextField; private var blastPassage:BlastPassage; private var lastFrame:int;// = -1 private static const INTRO_TIME:int = 59900; private static const TEXT_FRAMES:Array = [1, 73, 133, 258, 350, 413, 461, 510, 565]; private static const FRAME_COUNT:int = 599; public function Intro(_arg1:BlastPassage){ this.blastPassage = _arg1; startTime = getTimer(); addEventListener(Event.ENTER_FRAME, advanceTime); addEventListener(MouseEvent.MOUSE_DOWN, clicked); BlastPassage.music.get("IntroMusic").play(); advanceTime(null); } public function clicked(_arg1:MouseEvent):void{ close(); } public function advanceTime(_arg1:Event):void{ BlastPassage.music.update(); BlastPassage.sound.update(); var _local2:int = int((((getTimer() - startTime) / 1000) * 10)); if (_local2 > FRAME_COUNT){ _local2 = FRAME_COUNT; }; if (_local2 == lastFrame){ return; }; var _local3:int = ((INTRO_TIME - (getTimer() - startTime)) / 1000); if ((((((INTRO_TIME / 1000) - _local3) > 19)) && (!(hasPlayedNextMusic)))){ BlastPassage.music.get("GameMusic").loop(); hasPlayedNextMusic = true; }; clickToStartText.visible = ((_local2 % 10) < 6); clickToStartText.text = TextMappings.get("click_to_start").split("[0]").join(_local3); lastFrame = _local2; gotoAndStop((_local2 + 1)); var _local4:int; var _local5:int; while (_local5 < TEXT_FRAMES.length) { if (TEXT_FRAMES[_local5] <= (_local2 + 1)){ _local4++; }; _local5++; }; var _local6:String = TextMappings.get(("instructions_" + _local4)); if (_local4 == TEXT_FRAMES.length){ _local6 = ("\r\r\r" + _local6); }; textField.text = _local6; if (_local3 == 0){ close(); }; } public function close():void{ stage.focus = blastPassage; removeEventListener(Event.ENTER_FRAME, advanceTime); removeEventListener(MouseEvent.MOUSE_DOWN, clicked); parent.removeChild(this); blastPassage.introOver(); } } }//package src
Section 143
//IntroButtons (src.IntroButtons) package src { import src.gui.*; import flash.display.*; public class IntroButtons extends MovieClip implements ButtonListener { public var quitButton:GuiButton; private var blastPassage:BlastPassage; public var musicButton:GuiButton; public var soundButton:GuiButton; public function IntroButtons(_arg1:BlastPassage){ this.blastPassage = _arg1; musicButton.init(this, 0); soundButton.init(this, 1); if (quitButton != null){ quitButton.init(this, 2); }; } public function buttonToggled(_arg1:int, _arg2:Boolean):Boolean{ if (blastPassage != null){ if (_arg1 == 0){ BlastPassage.music.fadeTo((_arg2) ? 0 : 1, 200); blastPassage.gui.musicButton.setPressed(_arg2); return (true); }; if (_arg1 == 1){ BlastPassage.sound.fadeTo((_arg2) ? 0 : 1, 200); blastPassage.gui.soundButton.setPressed(_arg2); return (true); }; return (false); }; return (false); } } }//package src
Section 144
//Outro (src.Outro) package src { import flash.utils.*; import flash.events.*; import src.util.*; import flash.text.*; import flash.display.*; public class Outro extends MovieClip { public var topTitle:TextField; private var blinkTime:int;// = 0 public var totalScoreTitle:TextField; private var startTime:int;// = 0 public var bonusTitle2:TextField; private var lastTime:int; public var bonus:TextField; public var score:TextField; public var scoreTitle:TextField; private var happyEnding:Boolean;// = true public var shouldSkip:Boolean;// = false public var outroBear:MovieClip; public var bonus2:TextField; public var totalScore:TextField; public var bonusTitle:TextField; public static var OUT_OF_LIFE:int = 2; public static var OUT_OF_TIME:int = 1; public static var GAME_WON:int = 0; public static var GAME_ABORTED:int = 3; public function Outro(_arg1:BlastPassage, _arg2:int, _arg3:int, _arg4:int){ BlastPassage.music.stopAll(); lastTime = getTimer(); advanceTime(null); addEventListener(Event.ENTER_FRAME, advanceTime); this.happyEnding = (_arg2 == GAME_WON); if (happyEnding){ BlastPassage.music.get("HappyEndMusic").play(); } else { BlastPassage.music.get("HappyEndMusic").play(); }; score.text = ("" + _arg1.gameScreen.player.score); bonus.text = ("" + _arg3); bonus2.text = ("" + _arg4); totalScore.text = ("" + ((_arg1.gameScreen.player.score + _arg3) + _arg4)); scoreTitle.text = (TextMappings.get("score") + ":"); bonusTitle.text = (TextMappings.get("bonus_time") + ":"); bonusTitle2.text = (TextMappings.get("bonus_life") + ":"); totalScoreTitle.text = (TextMappings.get("total_score") + ":"); if (_arg2 == GAME_WON){ topTitle.text = TextMappings.get("game_won"); } else { if (_arg2 == OUT_OF_TIME){ topTitle.text = TextMappings.get("out_of_time"); } else { if (_arg2 == OUT_OF_LIFE){ topTitle.text = TextMappings.get("out_of_oxygen"); } else { if (_arg2 == GAME_ABORTED){ topTitle.text = TextMappings.get("game_quit"); }; }; }; }; addEventListener(MouseEvent.MOUSE_DOWN, clicked); startTime = getTimer(); } public function advanceTime(_arg1:Event):void{ var _local3:int; var _local2:int = getTimer(); while ((_local2 - lastTime) >= 0) { lastTime = (lastTime + 100); if (blinkTime != 0){ blinkTime++; if (blinkTime > 3){ blinkTime = -30; }; }; if ((((blinkTime == 0)) && ((Math.random() < 0.05)))){ blinkTime = 1; }; _local3 = 0; if (blinkTime > 0){ _local3 = blinkTime; if (_local3 == 3){ _local3 = 1; }; }; outroBear.gotoAndStop((_local3 + (happyEnding) ? 1 : 4)); }; } public function clicked(_arg1:MouseEvent):void{ if ((getTimer() - startTime) > 500){ shouldSkip = true; }; } } }//package src
Section 145
//ScreenCover (src.ScreenCover) package src { import flash.display.*; public dynamic class ScreenCover extends MovieClip { } }//package src
Section 146
//libGlow (libGlow) package { import flash.display.*; public dynamic class libGlow extends MovieClip { } }//package
Section 147
//mcGlimmer (mcGlimmer) package { import flash.display.*; public dynamic class mcGlimmer extends MovieClip { } }//package
Section 148
//MochiBot (MochiBot) package { import flash.system.*; import flash.net.*; import flash.display.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:Sprite, _arg2:String):MochiBot{ if (Security.sandboxType == "localWithFile"){ return (null); }; var _local3:MochiBot = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); var _local4:String = "http://core.mochibot.com/my/core.swf"; var _local5:URLVariables = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; var _local6:String = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; var _local7:URLRequest = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; var _local8:Loader = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 149
//music (music) package { import src.gui.*; public dynamic class music extends GuiButton { } }//package
Section 150
//pause (pause) package { import src.gui.*; public dynamic class pause extends GuiButton { } }//package
Section 151
//power (power) package { import src.gui.*; public dynamic class power extends GuiButton { } }//package
Section 152
//sfxBell (sfxBell) package { import flash.media.*; public dynamic class sfxBell extends Sound { } }//package
Section 153
//sound (sound) package { import src.gui.*; public dynamic class sound extends GuiButton { } }//package
Section 154
//spark (spark) package { import flash.display.*; public dynamic class spark extends MovieClip { public function spark(){ addFrameScript(22, frame23); } function frame23(){ gotoAndStop("loop"); } } }//package

Library Items

Symbol 1 Sound {sound.UsePotion}
Symbol 2 Sound {sound.WinLevel}
Symbol 3 Sound {sound.UseKey}
Symbol 4 Sound {sound.Teleport}
Symbol 5 Sound {sound.OpenSecret}
Symbol 6 Sound {sound.TakePowerup}
Symbol 7 Sound {sound.PlantBomb}
Symbol 8 Sound {sound.TakeTreasure1}
Symbol 9 Sound {sound.TakeTreasure2}
Symbol 10 Sound {sound.TakeFood4}
Symbol 11 Sound {sound.TakeFood3}
Symbol 12 Sound {sound.TakeFood2}
Symbol 13 Sound {sound.TakeFood1}
Symbol 14 Sound {sound.TakeKey}
Symbol 15 Sound {sound.TreasureDeath}
Symbol 16 Sound {sound.MonsterSpawn}
Symbol 17 Sound {sound.MonsterDeath}
Symbol 18 Sound {sound.TimeWarning}
Symbol 19 Sound {sound.HealthWarning}
Symbol 20 Sound {sound.LobberToss}
Symbol 21 Sound {sound.KickBomb}
Symbol 22 Sound {sound.HurtMonster}
Symbol 23 Sound {sound.HurtFire}
Symbol 24 Sound {sfxBell}
Symbol 25 Sound {sound.DemonFire}
Symbol 26 Sound {sound.BombExplode}
Symbol 27 Sound {sound.GameMusic}
Symbol 28 Sound {sound.IntroMusic}
Symbol 29 Sound {sound.HappyEndMusic}
Symbol 30 Bitmap {art.WallSheet3}
Symbol 31 Bitmap {art.SorcererSheet}
Symbol 32 Bitmap {art.TeleporterSheet}
Symbol 33 Bitmap {art.LobberSheet}
Symbol 34 Bitmap {art.BulletSheet}
Symbol 35 Bitmap {art.SpecialSheet}
Symbol 36 Bitmap {art.HouseSheet3}
Symbol 37 Bitmap {art.HouseSheet2}
Symbol 38 Bitmap {art.HouseSheet1}
Symbol 39 Bitmap {art.PickupSheet}
Symbol 40 Bitmap {art.DemonSheet}
Symbol 41 Bitmap {art.FireballSheet}
Symbol 42 Bitmap {art.GruntSheet}
Symbol 43 Bitmap {art.HouseSheet0}
Symbol 44 Bitmap {art.GhostSheet}
Symbol 45 Bitmap {art.DoorSheet}
Symbol 46 Bitmap {art.FloorSheet5}
Symbol 47 Bitmap {art.FloorSheet4}
Symbol 48 Bitmap {art.FloorSheet3}
Symbol 49 Bitmap {art.FloorSheet2}
Symbol 50 Bitmap {art.FloorSheet1}
Symbol 51 Bitmap {art.FireSheet}
Symbol 52 Bitmap {art.DeathSheet}
Symbol 53 Bitmap {art.FireSheet2}
Symbol 54 Bitmap {art.BombSheet}
Symbol 55 Bitmap {art.DeathAnimSheet}
Symbol 56 Bitmap {art.PlayerSheet}
Symbol 57 Bitmap {art.WallSheet4}
Symbol 58 Bitmap {art.WallSheet2}
Symbol 59 Bitmap {art.WallSheet1}
Symbol 60 BitmapUsed by:61
Symbol 61 GraphicUses:60Used by:106
Symbol 62 BitmapUsed by:63
Symbol 63 GraphicUses:62Used by:106
Symbol 64 BitmapUsed by:65
Symbol 65 GraphicUses:64Used by:106
Symbol 66 BitmapUsed by:67
Symbol 67 GraphicUses:66Used by:106
Symbol 68 BitmapUsed by:69
Symbol 69 GraphicUses:68Used by:106
Symbol 70 BitmapUsed by:71
Symbol 71 GraphicUses:70Used by:106
Symbol 72 BitmapUsed by:73
Symbol 73 GraphicUses:72Used by:106
Symbol 74 BitmapUsed by:75
Symbol 75 GraphicUses:74Used by:106
Symbol 76 BitmapUsed by:77
Symbol 77 GraphicUses:76Used by:106
Symbol 78 BitmapUsed by:79
Symbol 79 GraphicUses:78Used by:106
Symbol 80 BitmapUsed by:81
Symbol 81 GraphicUses:80Used by:106
Symbol 82 BitmapUsed by:83
Symbol 83 GraphicUses:82Used by:106
Symbol 84 BitmapUsed by:85
Symbol 85 GraphicUses:84Used by:106
Symbol 86 BitmapUsed by:87
Symbol 87 GraphicUses:86Used by:106
Symbol 88 BitmapUsed by:89
Symbol 89 GraphicUses:88Used by:106
Symbol 90 BitmapUsed by:91
Symbol 91 GraphicUses:90Used by:106
Symbol 92 BitmapUsed by:93
Symbol 93 GraphicUses:92Used by:106
Symbol 94 BitmapUsed by:95
Symbol 95 GraphicUses:94Used by:106
Symbol 96 BitmapUsed by:97
Symbol 97 GraphicUses:96Used by:106
Symbol 98 BitmapUsed by:99
Symbol 99 GraphicUses:98Used by:106
Symbol 100 BitmapUsed by:101
Symbol 101 GraphicUses:100Used by:106
Symbol 102 BitmapUsed by:103
Symbol 103 GraphicUses:102Used by:106
Symbol 104 BitmapUsed by:105
Symbol 105 GraphicUses:104Used by:106
Symbol 106 MovieClip {spark}Uses:61 63 65 67 69 71 73 75 77 79 81 83 85 87 89 91 93 95 97 99 101 103 105
Symbol 107 BitmapUsed by:108
Symbol 108 GraphicUses:107Used by:109
Symbol 109 MovieClip {libGlow}Uses:108
Symbol 110 BitmapUsed by:111
Symbol 111 GraphicUses:110Used by:112
Symbol 112 MovieClip {mcGlimmer}Uses:111
Symbol 113 GraphicUsed by:278
Symbol 114 GraphicUsed by:115
Symbol 115 MovieClipUses:114Used by:278
Symbol 116 GraphicUsed by:278
Symbol 117 FontUsed by:118 120 127 302 303 304 305 306 307 325 326 445 446 449 451 453 455 456 457 458 460 539 540 541 542 543 556
Symbol 118 TextUses:117Used by:278
Symbol 119 GraphicUsed by:278
Symbol 120 EditableTextUses:117Used by:278
Symbol 121 BitmapUsed by:122
Symbol 122 GraphicUses:121Used by:278
Symbol 123 BitmapUsed by:124
Symbol 124 GraphicUses:123Used by:278
Symbol 125 GraphicUsed by:126
Symbol 126 MovieClipUses:125Used by:278
Symbol 127 EditableTextUses:117Used by:278
Symbol 128 BitmapUsed by:129
Symbol 129 GraphicUses:128Used by:144 151 278
Symbol 130 GraphicUsed by:131
Symbol 131 MovieClipUses:130Used by:144 151 278
Symbol 132 BitmapUsed by:133
Symbol 133 GraphicUses:132Used by:278
Symbol 134 BitmapUsed by:135
Symbol 135 GraphicUses:134Used by:278
Symbol 136 GraphicUsed by:137
Symbol 137 MovieClipUses:136Used by:278
Symbol 138 BitmapUsed by:139
Symbol 139 GraphicUses:138Used by:144 278
Symbol 140 BitmapUsed by:141
Symbol 141 GraphicUses:140Used by:278 443
Symbol 142 BitmapUsed by:143
Symbol 143 GraphicUses:142Used by:278 443
Symbol 144 MovieClipUses:129 131 139Used by:278
Symbol 145 BitmapUsed by:146
Symbol 146 GraphicUses:145Used by:278 443
Symbol 147 BitmapUsed by:148
Symbol 148 GraphicUses:147Used by:278 443
Symbol 149 BitmapUsed by:150 233 234
Symbol 150 GraphicUses:149Used by:278 443
Symbol 151 MovieClipUses:129 131Used by:278
Symbol 152 BitmapUsed by:153
Symbol 153 GraphicUses:152Used by:278
Symbol 154 BitmapUsed by:155
Symbol 155 GraphicUses:154Used by:278
Symbol 156 BitmapUsed by:157
Symbol 157 GraphicUses:156Used by:278
Symbol 158 BitmapUsed by:159
Symbol 159 GraphicUses:158Used by:278
Symbol 160 BitmapUsed by:161
Symbol 161 GraphicUses:160Used by:278 443
Symbol 162 BitmapUsed by:163
Symbol 163 GraphicUses:162Used by:278
Symbol 164 BitmapUsed by:165
Symbol 165 GraphicUses:164Used by:278 443
Symbol 166 BitmapUsed by:167
Symbol 167 GraphicUses:166Used by:278
Symbol 168 BitmapUsed by:169
Symbol 169 GraphicUses:168Used by:278
Symbol 170 BitmapUsed by:171
Symbol 171 GraphicUses:170Used by:278
Symbol 172 BitmapUsed by:173
Symbol 173 GraphicUses:172Used by:278
Symbol 174 BitmapUsed by:175
Symbol 175 GraphicUses:174Used by:278
Symbol 176 BitmapUsed by:177
Symbol 177 GraphicUses:176Used by:178
Symbol 178 MovieClipUses:177Used by:278
Symbol 179 BitmapUsed by:180
Symbol 180 GraphicUses:179Used by:278
Symbol 181 BitmapUsed by:182
Symbol 182 GraphicUses:181Used by:278
Symbol 183 BitmapUsed by:184
Symbol 184 GraphicUses:183Used by:278
Symbol 185 BitmapUsed by:186
Symbol 186 GraphicUses:185Used by:278
Symbol 187 BitmapUsed by:188
Symbol 188 GraphicUses:187Used by:278
Symbol 189 BitmapUsed by:190
Symbol 190 GraphicUses:189Used by:278
Symbol 191 BitmapUsed by:192
Symbol 192 GraphicUses:191Used by:278
Symbol 193 BitmapUsed by:194
Symbol 194 GraphicUses:193Used by:278
Symbol 195 BitmapUsed by:196
Symbol 196 GraphicUses:195Used by:278
Symbol 197 BitmapUsed by:198
Symbol 198 GraphicUses:197Used by:278
Symbol 199 BitmapUsed by:200
Symbol 200 GraphicUses:199Used by:278
Symbol 201 BitmapUsed by:202
Symbol 202 GraphicUses:201Used by:278
Symbol 203 BitmapUsed by:204
Symbol 204 GraphicUses:203Used by:278
Symbol 205 BitmapUsed by:206
Symbol 206 GraphicUses:205Used by:278
Symbol 207 BitmapUsed by:208
Symbol 208 GraphicUses:207Used by:278
Symbol 209 BitmapUsed by:210
Symbol 210 GraphicUses:209Used by:278
Symbol 211 BitmapUsed by:212
Symbol 212 GraphicUses:211Used by:278
Symbol 213 BitmapUsed by:214
Symbol 214 GraphicUses:213Used by:278
Symbol 215 BitmapUsed by:216
Symbol 216 GraphicUses:215Used by:278
Symbol 217 BitmapUsed by:218
Symbol 218 GraphicUses:217Used by:278
Symbol 219 BitmapUsed by:220
Symbol 220 GraphicUses:219Used by:278 443
Symbol 221 BitmapUsed by:222
Symbol 222 GraphicUses:221Used by:278 443
Symbol 223 BitmapUsed by:224
Symbol 224 GraphicUses:223Used by:278
Symbol 225 BitmapUsed by:226
Symbol 226 GraphicUses:225Used by:278
Symbol 227 BitmapUsed by:228
Symbol 228 GraphicUses:227Used by:278
Symbol 229 BitmapUsed by:230
Symbol 230 GraphicUses:229Used by:278
Symbol 231 BitmapUsed by:232
Symbol 232 GraphicUses:231Used by:278
Symbol 233 GraphicUses:149Used by:278
Symbol 234 GraphicUses:149Used by:278
Symbol 235 BitmapUsed by:236
Symbol 236 GraphicUses:235Used by:278
Symbol 237 BitmapUsed by:238
Symbol 238 GraphicUses:237Used by:278
Symbol 239 BitmapUsed by:240
Symbol 240 GraphicUses:239Used by:241
Symbol 241 MovieClipUses:240Used by:278
Symbol 242 BitmapUsed by:243
Symbol 243 GraphicUses:242Used by:278
Symbol 244 BitmapUsed by:245
Symbol 245 GraphicUses:244Used by:278
Symbol 246 BitmapUsed by:247
Symbol 247 GraphicUses:246Used by:278
Symbol 248 BitmapUsed by:249
Symbol 249 GraphicUses:248Used by:278
Symbol 250 BitmapUsed by:251
Symbol 251 GraphicUses:250Used by:278
Symbol 252 BitmapUsed by:253
Symbol 253 GraphicUses:252Used by:278
Symbol 254 BitmapUsed by:255
Symbol 255 GraphicUses:254Used by:278
Symbol 256 BitmapUsed by:257
Symbol 257 GraphicUses:256Used by:278
Symbol 258 BitmapUsed by:259
Symbol 259 GraphicUses:258Used by:278
Symbol 260 BitmapUsed by:261
Symbol 261 GraphicUses:260Used by:278
Symbol 262 BitmapUsed by:263
Symbol 263 GraphicUses:262Used by:278
Symbol 264 BitmapUsed by:265
Symbol 265 GraphicUses:264Used by:278
Symbol 266 BitmapUsed by:267
Symbol 267 GraphicUses:266Used by:278
Symbol 268 BitmapUsed by:269
Symbol 269 GraphicUses:268Used by:278
Symbol 270 BitmapUsed by:271
Symbol 271 GraphicUses:270Used by:278
Symbol 272 BitmapUsed by:273
Symbol 273 GraphicUses:272Used by:278
Symbol 274 BitmapUsed by:275
Symbol 275 GraphicUses:274Used by:278
Symbol 276 BitmapUsed by:277
Symbol 277 GraphicUses:276Used by:278
Symbol 278 MovieClip {src.Intro}Uses:113 115 116 118 119 120 122 124 126 127 129 131 133 135 137 139 141 143 144 146 148 150 151 153 155 157 159 161 163 165 167 169 171 173 175 178 180 182 184 186 188 190 192 194 196 198 200 202 204 206 208 210 212 214 216 218 220 222 224 226 228 230 232 233 234 236 238 241 243 245 247 249 251 253 255 257 259 261 263 265 267 269 271 273 275 277
Symbol 279 BitmapUsed by:280
Symbol 280 GraphicUses:279Used by:291
Symbol 281 BitmapUsed by:282
Symbol 282 GraphicUses:281Used by:291
Symbol 283 BitmapUsed by:284
Symbol 284 GraphicUses:283Used by:291
Symbol 285 BitmapUsed by:286
Symbol 286 GraphicUses:285Used by:291
Symbol 287 BitmapUsed by:288
Symbol 288 GraphicUses:287Used by:291
Symbol 289 BitmapUsed by:290
Symbol 290 GraphicUses:289Used by:291
Symbol 291 MovieClip {src.gui.IntroOffButton}Uses:280 282 284 286 288 290
Symbol 292 BitmapUsed by:293
Symbol 293 GraphicUses:292Used by:300
Symbol 294 BitmapUsed by:295
Symbol 295 GraphicUses:294Used by:300
Symbol 296 BitmapUsed by:297
Symbol 297 GraphicUses:296Used by:300
Symbol 298 BitmapUsed by:299
Symbol 299 GraphicUses:298Used by:300
Symbol 300 MovieClip {src.particle.Particle}Uses:293 295 297 299
Symbol 301 GraphicUsed by:327
Symbol 302 EditableTextUses:117Used by:327
Symbol 303 EditableTextUses:117Used by:327
Symbol 304 EditableTextUses:117Used by:327
Symbol 305 EditableTextUses:117Used by:327
Symbol 306 EditableTextUses:117Used by:327
Symbol 307 EditableTextUses:117Used by:327
Symbol 308 FontUsed by:309
Symbol 309 EditableTextUses:308Used by:327
Symbol 310 BitmapUsed by:311
Symbol 311 GraphicUses:310Used by:324
Symbol 312 BitmapUsed by:313
Symbol 313 GraphicUses:312Used by:324
Symbol 314 BitmapUsed by:315
Symbol 315 GraphicUses:314Used by:324
Symbol 316 BitmapUsed by:317
Symbol 317 GraphicUses:316Used by:324
Symbol 318 BitmapUsed by:319
Symbol 319 GraphicUses:318Used by:324
Symbol 320 BitmapUsed by:321
Symbol 321 GraphicUses:320Used by:324
Symbol 322 BitmapUsed by:323
Symbol 323 GraphicUses:322Used by:324
Symbol 324 MovieClipUses:311 313 315 317 319 321 323Used by:327
Symbol 325 EditableTextUses:117Used by:327
Symbol 326 EditableTextUses:117Used by:327
Symbol 327 MovieClip {src.Outro}Uses:301 302 303 304 305 306 307 309 324 325 326
Symbol 328 GraphicUsed by:329  Timeline
Symbol 329 MovieClip {src.ScreenCover}Uses:328
Symbol 330 BitmapUsed by:331
Symbol 331 GraphicUses:330Used by:342
Symbol 332 BitmapUsed by:333
Symbol 333 GraphicUses:332Used by:342
Symbol 334 BitmapUsed by:335
Symbol 335 GraphicUses:334Used by:342
Symbol 336 BitmapUsed by:337
Symbol 337 GraphicUses:336Used by:342
Symbol 338 BitmapUsed by:339
Symbol 339 GraphicUses:338Used by:342
Symbol 340 BitmapUsed by:341
Symbol 341 GraphicUses:340Used by:342
Symbol 342 MovieClip {src.gui.IntroSoundButton}Uses:331 333 335 337 339 341Used by:356
Symbol 343 BitmapUsed by:344
Symbol 344 GraphicUses:343Used by:355
Symbol 345 BitmapUsed by:346
Symbol 346 GraphicUses:345Used by:355
Symbol 347 BitmapUsed by:348
Symbol 348 GraphicUses:347Used by:355
Symbol 349 BitmapUsed by:350
Symbol 350 GraphicUses:349Used by:355
Symbol 351 BitmapUsed by:352
Symbol 352 GraphicUses:351Used by:355
Symbol 353 BitmapUsed by:354
Symbol 354 GraphicUses:353Used by:355
Symbol 355 MovieClip {src.gui.IntroMusicButton}Uses:344 346 348 350 352 354Used by:356
Symbol 356 MovieClip {src.IntroButtons}Uses:355 342
Symbol 357 GraphicUsed by:358
Symbol 358 MovieClip {src.gui.IntroButton}Uses:357Used by:452 454 462 560
Symbol 359 GraphicUsed by:360
Symbol 360 MovieClipUses:359Used by:444
Symbol 361 BitmapUsed by:362
Symbol 362 GraphicUses:361Used by:366
Symbol 363 BitmapUsed by:364
Symbol 364 GraphicUses:363Used by:365
Symbol 365 MovieClipUses:364Used by:366
Symbol 366 MovieClipUses:362 365Used by:444
Symbol 367 GraphicUsed by:368
Symbol 368 MovieClipUses:367Used by:444
Symbol 369 GraphicUsed by:370
Symbol 370 MovieClipUses:369Used by:444
Symbol 371 GraphicUsed by:372
Symbol 372 MovieClipUses:371Used by:444
Symbol 373 GraphicUsed by:374 375
Symbol 374 MovieClipUses:373Used by:444
Symbol 375 MovieClipUses:373Used by:444
Symbol 376 GraphicUsed by:377
Symbol 377 MovieClipUses:376Used by:444
Symbol 378 GraphicUsed by:379
Symbol 379 MovieClipUses:378Used by:444
Symbol 380 GraphicUsed by:381
Symbol 381 MovieClipUses:380Used by:444
Symbol 382 GraphicUsed by:383
Symbol 383 MovieClipUses:382Used by:444
Symbol 384 GraphicUsed by:385
Symbol 385 MovieClipUses:384Used by:444
Symbol 386 GraphicUsed by:387
Symbol 387 MovieClipUses:386Used by:444
Symbol 388 GraphicUsed by:389
Symbol 389 MovieClipUses:388Used by:444
Symbol 390 GraphicUsed by:391
Symbol 391 MovieClipUses:390Used by:444
Symbol 392 GraphicUsed by:393
Symbol 393 MovieClipUses:392Used by:444
Symbol 394 GraphicUsed by:395
Symbol 395 MovieClipUses:394Used by:398
Symbol 396 GraphicUsed by:397
Symbol 397 MovieClipUses:396Used by:398
Symbol 398 MovieClipUses:395 397Used by:444
Symbol 399 BitmapUsed by:400
Symbol 400 GraphicUses:399Used by:443
Symbol 401 BitmapUsed by:402
Symbol 402 GraphicUses:401Used by:443
Symbol 403 BitmapUsed by:404
Symbol 404 GraphicUses:403Used by:443
Symbol 405 BitmapUsed by:406
Symbol 406 GraphicUses:405Used by:443
Symbol 407 BitmapUsed by:408
Symbol 408 GraphicUses:407Used by:443
Symbol 409 BitmapUsed by:410
Symbol 410 GraphicUses:409Used by:443
Symbol 411 BitmapUsed by:412
Symbol 412 GraphicUses:411Used by:443
Symbol 413 BitmapUsed by:414
Symbol 414 GraphicUses:413Used by:443
Symbol 415 BitmapUsed by:416
Symbol 416 GraphicUses:415Used by:443
Symbol 417 BitmapUsed by:418
Symbol 418 GraphicUses:417Used by:443
Symbol 419 BitmapUsed by:420
Symbol 420 GraphicUses:419Used by:443
Symbol 421 BitmapUsed by:422
Symbol 422 GraphicUses:421Used by:443
Symbol 423 BitmapUsed by:424
Symbol 424 GraphicUses:423Used by:443
Symbol 425 BitmapUsed by:426
Symbol 426 GraphicUses:425Used by:443
Symbol 427 BitmapUsed by:428
Symbol 428 GraphicUses:427Used by:443
Symbol 429 BitmapUsed by:430
Symbol 430 GraphicUses:429Used by:443
Symbol 431 BitmapUsed by:432
Symbol 432 GraphicUses:431Used by:443
Symbol 433 BitmapUsed by:434
Symbol 434 GraphicUses:433Used by:443
Symbol 435 BitmapUsed by:436
Symbol 436 GraphicUses:435Used by:443
Symbol 437 BitmapUsed by:438
Symbol 438 GraphicUses:437Used by:443
Symbol 439 BitmapUsed by:440
Symbol 440 GraphicUses:439Used by:443
Symbol 441 BitmapUsed by:442
Symbol 442 GraphicUses:441Used by:443
Symbol 443 MovieClipUses:150 220 222 165 161 148 146 141 143 400 402 404 406 408 410 412 414 416 418 420 422 424 426 428 430 432 434 436 438 440 442Used by:444
Symbol 444 MovieClipUses:360 366 368 370 372 374 375 377 379 381 383 385 387 389 391 393 398 443Used by:462
Symbol 445 TextUses:117Used by:462
Symbol 446 EditableTextUses:117Used by:462
Symbol 447 GraphicUsed by:448
Symbol 448 MovieClipUses:447Used by:462 560
Symbol 449 EditableTextUses:117Used by:452
Symbol 450 GraphicUsed by:452 454 462
Symbol 451 TextUses:117Used by:452
Symbol 452 MovieClipUses:449 450 451 358Used by:462
Symbol 453 TextUses:117Used by:454
Symbol 454 MovieClipUses:450 453 358Used by:462
Symbol 455 EditableTextUses:117Used by:462
Symbol 456 TextUses:117Used by:462
Symbol 457 TextUses:117Used by:462
Symbol 458 EditableTextUses:117Used by:462
Symbol 459 GraphicUsed by:461
Symbol 460 TextUses:117Used by:461
Symbol 461 MovieClipUses:459 460Used by:462
Symbol 462 MovieClip {src.gui.LevelChooser}Uses:444 445 446 448 452 454 450 455 456 457 458 461 358Used by:561
Symbol 463 ShapeTweeningUsed by:468
Symbol 464 BitmapUsed by:466 467
Symbol 465 BitmapUsed by:466 467
Symbol 466 GraphicUses:464 465Used by:468
Symbol 467 GraphicUses:464 465Used by:468
Symbol 468 MovieClipUses:463 466 467Used by:477
Symbol 469 BitmapUsed by:470
Symbol 470 GraphicUses:469Used by:475
Symbol 471 BitmapUsed by:472
Symbol 472 GraphicUses:471Used by:475
Symbol 473 BitmapUsed by:474
Symbol 474 GraphicUses:473Used by:475
Symbol 475 MovieClipUses:470 472 474Used by:476
Symbol 476 MovieClipUses:475Used by:477
Symbol 477 MovieClip {src.gui.AirTube}Uses:468 476Used by:548
Symbol 478 BitmapUsed by:479
Symbol 479 GraphicUses:478Used by:548
Symbol 480 BitmapUsed by:481
Symbol 481 GraphicUses:480Used by:482
Symbol 482 MovieClipUses:481Used by:548
Symbol 483 BitmapUsed by:484
Symbol 484 GraphicUses:483Used by:485
Symbol 485 MovieClipUses:484Used by:548
Symbol 486 BitmapUsed by:487
Symbol 487 GraphicUses:486Used by:488
Symbol 488 MovieClipUses:487Used by:548
Symbol 489 BitmapUsed by:490
Symbol 490 GraphicUses:489Used by:491
Symbol 491 MovieClipUses:490Used by:548
Symbol 492 BitmapUsed by:493
Symbol 493 GraphicUses:492Used by:498
Symbol 494 BitmapUsed by:495
Symbol 495 GraphicUses:494Used by:498
Symbol 496 BitmapUsed by:497
Symbol 497 GraphicUses:496Used by:498
Symbol 498 MovieClip {power}Uses:493 495 497Used by:548
Symbol 499 BitmapUsed by:500
Symbol 500 GraphicUses:499Used by:511
Symbol 501 BitmapUsed by:502
Symbol 502 GraphicUses:501Used by:511
Symbol 503 BitmapUsed by:504
Symbol 504 GraphicUses:503Used by:511
Symbol 505 BitmapUsed by:506
Symbol 506 GraphicUses:505Used by:511
Symbol 507 BitmapUsed by:508
Symbol 508 GraphicUses:507Used by:511
Symbol 509 BitmapUsed by:510
Symbol 510 GraphicUses:509Used by:511
Symbol 511 MovieClip {music}Uses:500 502 504 506 508 510Used by:548
Symbol 512 BitmapUsed by:513
Symbol 513 GraphicUses:512Used by:524
Symbol 514 BitmapUsed by:515
Symbol 515 GraphicUses:514Used by:524
Symbol 516 BitmapUsed by:517
Symbol 517 GraphicUses:516Used by:524
Symbol 518 BitmapUsed by:519
Symbol 519 GraphicUses:518Used by:524
Symbol 520 BitmapUsed by:521
Symbol 521 GraphicUses:520Used by:524
Symbol 522 BitmapUsed by:523
Symbol 523 GraphicUses:522Used by:524
Symbol 524 MovieClip {sound}Uses:513 515 517 519 521 523Used by:548
Symbol 525 BitmapUsed by:526
Symbol 526 GraphicUses:525Used by:531
Symbol 527 BitmapUsed by:528
Symbol 528 GraphicUses:527Used by:531
Symbol 529 BitmapUsed by:530
Symbol 530 GraphicUses:529Used by:531
Symbol 531 MovieClip {pause}Uses:526 528 530Used by:548
Symbol 532 BitmapUsed by:533
Symbol 533 GraphicUses:532Used by:534
Symbol 534 MovieClipUses:533Used by:538
Symbol 535 BitmapUsed by:537
Symbol 536 BitmapUsed by:537
Symbol 537 GraphicUses:535 536Used by:538
Symbol 538 MovieClipUses:534 537Used by:548
Symbol 539 EditableTextUses:117Used by:548
Symbol 540 EditableTextUses:117Used by:548
Symbol 541 EditableTextUses:117Used by:548
Symbol 542 EditableTextUses:117Used by:548
Symbol 543 EditableTextUses:117Used by:548
Symbol 544 FontUsed by:545 546 547
Symbol 545 EditableTextUses:544Used by:548
Symbol 546 EditableTextUses:544Used by:548
Symbol 547 EditableTextUses:544Used by:548
Symbol 548 MovieClip {src.gui.Gui}Uses:479 482 485 488 491 498 511 524 531 477 538 539 540 541 542 543 545 546 547Used by:561
Symbol 549 GraphicUsed by:561
Symbol 550 MovieClipUsed by:561
Symbol 551 FontUsed by:552
Symbol 552 EditableTextUses:551Used by:561
Symbol 553 FontUsed by:554
Symbol 554 EditableTextUses:553Used by:561
Symbol 555 GraphicUsed by:557
Symbol 556 EditableTextUses:117Used by:557
Symbol 557 MovieClipUses:555 556Used by:561
Symbol 558 BitmapUsed by:559
Symbol 559 GraphicUses:558Used by:560
Symbol 560 MovieClipUses:559 358 448Used by:561
Symbol 561 MovieClip {src.BlastPassageStandAlone}Uses:549 550 548 552 554 462 557 560Used by:Timeline
Symbol 562 BitmapUsed by:563
Symbol 563 GraphicUses:562Used by:566
Symbol 564 GraphicUsed by:565
Symbol 565 MovieClipUses:564Used by:566
Symbol 566 MovieClipUses:563 565Used by:Timeline
Symbol 567 VideoUsed by:569
Symbol 568 SoundUsed by:569
Symbol 569 MovieClipUses:567 568Used by:584
Symbol 570 VideoUsed by:571
Symbol 571 MovieClip {blast_passage_adventures_fla.mcFireLogo_5}Uses:570Used by:584
Symbol 572 GraphicUsed by:573
Symbol 573 MovieClipUses:572Used by:576
Symbol 574 FontUsed by:575
Symbol 575 EditableTextUses:574Used by:576
Symbol 576 MovieClipUses:573 575Used by:584
Symbol 577 BitmapUsed by:578
Symbol 578 GraphicUses:577Used by:583
Symbol 579 BitmapUsed by:580
Symbol 580 GraphicUses:579Used by:583
Symbol 581 BitmapUsed by:582
Symbol 582 GraphicUses:581Used by:583
Symbol 583 MovieClip {blast_passage_adventures_fla.mcPlayBtn_8}Uses:578 580 582Used by:584
Symbol 584 MovieClip {com.midasplayer.DragonLoader}Uses:569 571 576 583Used by:Timeline

Instance Names

"mcLoadLogoBg"Frame 1Symbol 566 MovieClip
"mcKingLoader"Frame 2Symbol 584 MovieClip {com.midasplayer.DragonLoader}
"game"Frame 3Symbol 561 MovieClip {src.BlastPassageStandAlone}
"clickToStartText"Symbol 278 MovieClip {src.Intro} Frame 1Symbol 120 EditableText
"textField"Symbol 278 MovieClip {src.Intro} Frame 1Symbol 127 EditableText
"totalScoreTitle"Symbol 327 MovieClip {src.Outro} Frame 1Symbol 302 EditableText
"bonusTitle"Symbol 327 MovieClip {src.Outro} Frame 1Symbol 303 EditableText
"scoreTitle"Symbol 327 MovieClip {src.Outro} Frame 1Symbol 304 EditableText
"score"Symbol 327 MovieClip {src.Outro} Frame 1Symbol 305 EditableText
"bonus"Symbol 327 MovieClip {src.Outro} Frame 1Symbol 306 EditableText
"totalScore"Symbol 327 MovieClip {src.Outro} Frame 1Symbol 307 EditableText
"topTitle"Symbol 327 MovieClip {src.Outro} Frame 1Symbol 309 EditableText
"outroBear"Symbol 327 MovieClip {src.Outro} Frame 1Symbol 324 MovieClip
"bonusTitle2"Symbol 327 MovieClip {src.Outro} Frame 1Symbol 325 EditableText
"bonus2"Symbol 327 MovieClip {src.Outro} Frame 1Symbol 326 EditableText
"musicButton"Symbol 356 MovieClip {src.IntroButtons} Frame 1Symbol 355 MovieClip {src.gui.IntroMusicButton}
"soundButton"Symbol 356 MovieClip {src.IntroButtons} Frame 1Symbol 342 MovieClip {src.gui.IntroSoundButton}
"bg"Symbol 444 MovieClip Frame 1Symbol 360 MovieClip
"p0"Symbol 444 MovieClip Frame 1Symbol 368 MovieClip
"p1"Symbol 444 MovieClip Frame 1Symbol 370 MovieClip
"p3"Symbol 444 MovieClip Frame 1Symbol 372 MovieClip
"p5"Symbol 444 MovieClip Frame 1Symbol 374 MovieClip
"p7"Symbol 444 MovieClip Frame 1Symbol 375 MovieClip
"p11"Symbol 444 MovieClip Frame 1Symbol 377 MovieClip
"p13"Symbol 444 MovieClip Frame 1Symbol 379 MovieClip
"p12"Symbol 444 MovieClip Frame 1Symbol 381 MovieClip
"p10"Symbol 444 MovieClip Frame 1Symbol 383 MovieClip
"p9"Symbol 444 MovieClip Frame 1Symbol 385 MovieClip
"p6"Symbol 444 MovieClip Frame 1Symbol 387 MovieClip
"p4"Symbol 444 MovieClip Frame 1Symbol 389 MovieClip
"p2"Symbol 444 MovieClip Frame 1Symbol 391 MovieClip
"p8"Symbol 444 MovieClip Frame 1Symbol 393 MovieClip
"lvl0"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"lvl1"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"lvl2"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"lvl3"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"lvl4"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"lvl5"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"lvl6"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"lvl7"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"lvl9"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"lvl10"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"lvl11"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"lvl8"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"lvl12"Symbol 444 MovieClip Frame 1Symbol 398 MovieClip
"bear"Symbol 444 MovieClip Frame 1Symbol 443 MovieClip
"scoreText"Symbol 452 MovieClip Frame 1Symbol 449 EditableText
"button"Symbol 452 MovieClip Frame 1Symbol 358 MovieClip {src.gui.IntroButton}
"button"Symbol 454 MovieClip Frame 1Symbol 358 MovieClip {src.gui.IntroButton}
"planet"Symbol 462 MovieClip {src.gui.LevelChooser} Frame 1Symbol 444 MovieClip
"spaceToPlay"Symbol 462 MovieClip {src.gui.LevelChooser} Frame 1Symbol 446 EditableText
"highscoreShower"Symbol 462 MovieClip {src.gui.LevelChooser} Frame 1Symbol 452 MovieClip
"playAgainShower"Symbol 462 MovieClip {src.gui.LevelChooser} Frame 1Symbol 454 MovieClip
"scoreText"Symbol 462 MovieClip {src.gui.LevelChooser} Frame 1Symbol 455 EditableText
"livesText"Symbol 462 MovieClip {src.gui.LevelChooser} Frame 1Symbol 458 EditableText
"kingButton"Symbol 462 MovieClip {src.gui.LevelChooser} Frame 1Symbol 358 MovieClip {src.gui.IntroButton}
"menuButton"Symbol 462 MovieClip {src.gui.LevelChooser} Frame 1Symbol 358 MovieClip {src.gui.IntroButton}
"ll"Symbol 476 MovieClip Frame 1Symbol 475 MovieClip
"airTube"Symbol 477 MovieClip {src.gui.AirTube} Frame 1Symbol 468 MovieClip
"light"Symbol 477 MovieClip {src.gui.AirTube} Frame 1Symbol 476 MovieClip
"arrow"Symbol 538 MovieClip Frame 1Symbol 534 MovieClip
"quitButton"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 498 MovieClip {power}
"musicButton"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 511 MovieClip {music}
"soundButton"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 524 MovieClip {sound}
"pauseButton"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 511 MovieClip {music}
"pauseButton"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 531 MovieClip {pause}
"airMeter"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 477 MovieClip {src.gui.AirTube}
"timeMeter"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 538 MovieClip
"potions"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 539 EditableText
"keys"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 540 EditableText
"fires"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 541 EditableText
"bombs"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 542 EditableText
"score"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 543 EditableText
"oxygenLabel"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 545 EditableText
"time"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 546 EditableText
"scoreLabel"Symbol 548 MovieClip {src.gui.Gui} Frame 1Symbol 547 EditableText
"text"Symbol 557 MovieClip Frame 1Symbol 556 EditableText
"highscoreButton"Symbol 560 MovieClip Frame 1Symbol 358 MovieClip {src.gui.IntroButton}
"moneyButton"Symbol 560 MovieClip Frame 1Symbol 358 MovieClip {src.gui.IntroButton}
"homepageButton"Symbol 560 MovieClip Frame 1Symbol 358 MovieClip {src.gui.IntroButton}
"moreGamesButton"Symbol 560 MovieClip Frame 1Symbol 358 MovieClip {src.gui.IntroButton}
"startButton"Symbol 560 MovieClip Frame 1Symbol 358 MovieClip {src.gui.IntroButton}
"kingButton"Symbol 560 MovieClip Frame 1Symbol 358 MovieClip {src.gui.IntroButton}
"gameHolder"Symbol 561 MovieClip {src.BlastPassageStandAlone} Frame 1Symbol 550 MovieClip
"gui"Symbol 561 MovieClip {src.BlastPassageStandAlone} Frame 1Symbol 548 MovieClip {src.gui.Gui}
"fpsMeter"Symbol 561 MovieClip {src.BlastPassageStandAlone} Frame 1Symbol 552 EditableText
"logField"Symbol 561 MovieClip {src.BlastPassageStandAlone} Frame 1Symbol 554 EditableText
"levelPicker"Symbol 561 MovieClip {src.BlastPassageStandAlone} Frame 1Symbol 462 MovieClip {src.gui.LevelChooser}
"focusNagger"Symbol 561 MovieClip {src.BlastPassageStandAlone} Frame 1Symbol 557 MovieClip
"introScreen"Symbol 561 MovieClip {src.BlastPassageStandAlone} Frame 1Symbol 560 MovieClip
"bar"Symbol 566 MovieClip Frame 1Symbol 565 MovieClip
"bg"Symbol 576 MovieClip Frame 1Symbol 573 MovieClip
"m_dragonClip"Symbol 584 MovieClip {com.midasplayer.DragonLoader} Frame 1Symbol 569 MovieClip
"m_fireLogoClip"Symbol 584 MovieClip {com.midasplayer.DragonLoader} Frame 1Symbol 571 MovieClip {blast_passage_adventures_fla.mcFireLogo_5}
"m_bannedSign"Symbol 584 MovieClip {com.midasplayer.DragonLoader} Frame 1Symbol 576 MovieClip
"m_playBtn"Symbol 584 MovieClip {com.midasplayer.DragonLoader} Frame 1Symbol 583 MovieClip {blast_passage_adventures_fla.mcPlayBtn_8}

Special Tags

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

Labels

"loop"Symbol 106 MovieClip {spark} Frame 10
"idle"Symbol 583 MovieClip {blast_passage_adventures_fla.mcPlayBtn_8} Frame 1
"over"Symbol 583 MovieClip {blast_passage_adventures_fla.mcPlayBtn_8} Frame 2
"down"Symbol 583 MovieClip {blast_passage_adventures_fla.mcPlayBtn_8} Frame 3




http://swfchan.com/28/136274/info.shtml
Created: 9/2 -2019 06:04:36 Last modified: 9/2 -2019 06:04:36 Server time: 15/05 -2024 19:43:43