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

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

run-bolt-run.swf

This is the info page for
Flash #114142

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


Text
Be careful, you're not
invincible!
Don't give up!

You've successfully helped
Bolt save Penny!
Play again and collect all
coins!

You've completed the
level! Proceed onto the
next...

Help Bolt rescue Penny!
Use the LEFT and RIGHT arrow keys
to move
Press the X key to jump.
Press the Z key to attack.

000000

ActionScript [AS3]

Section 1
//GoButton_35 (BoltGame_fla.GoButton_35) package BoltGame_fla { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.geom.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.net.*; import flash.system.*; import flash.ui.*; public dynamic class GoButton_35 extends MovieClip { public function GoButton_35(){ addFrameScript(4, frame5, 10, frame11); } function frame5(){ this.stop(); } function frame11(){ this.stop(); } } }//package BoltGame_fla
Section 2
//HealthBar_2 (BoltGame_fla.HealthBar_2) package BoltGame_fla { import flash.display.*; public dynamic class HealthBar_2 extends MovieClip { public var barMask:MovieClip; } }//package BoltGame_fla
Section 3
//MusicButton_8 (BoltGame_fla.MusicButton_8) package BoltGame_fla { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.geom.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.net.*; import flash.system.*; import flash.ui.*; public dynamic class MusicButton_8 extends MovieClip { public var statusOff:MovieClip; public var statusOn:MovieClip; public function MusicButton_8(){ addFrameScript(4, frame5, 10, frame11); } function frame5(){ this.stop(); } function frame11(){ this.stop(); } } }//package BoltGame_fla
Section 4
//PauseButton_11 (BoltGame_fla.PauseButton_11) package BoltGame_fla { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.geom.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.net.*; import flash.system.*; import flash.ui.*; public dynamic class PauseButton_11 extends MovieClip { public function PauseButton_11(){ addFrameScript(4, frame5, 10, frame11); } function frame5(){ this.stop(); } function frame11(){ this.stop(); } } }//package BoltGame_fla
Section 5
//PlayButton_37 (BoltGame_fla.PlayButton_37) package BoltGame_fla { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.geom.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.net.*; import flash.system.*; import flash.ui.*; public dynamic class PlayButton_37 extends MovieClip { public function PlayButton_37(){ addFrameScript(4, frame5, 10, frame11); } function frame5(){ this.stop(); } function frame11(){ this.stop(); } } }//package BoltGame_fla
Section 6
//ReplayButton_40 (BoltGame_fla.ReplayButton_40) package BoltGame_fla { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.geom.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.net.*; import flash.system.*; import flash.ui.*; public dynamic class ReplayButton_40 extends MovieClip { public function ReplayButton_40(){ addFrameScript(4, frame5, 10, frame11); } function frame5(){ this.stop(); } function frame11(){ this.stop(); } } }//package BoltGame_fla
Section 7
//RetryButton_42 (BoltGame_fla.RetryButton_42) package BoltGame_fla { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.geom.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.net.*; import flash.system.*; import flash.ui.*; public dynamic class RetryButton_42 extends MovieClip { public function RetryButton_42(){ addFrameScript(4, frame5, 10, frame11); } function frame5(){ this.stop(); } function frame11(){ this.stop(); } } }//package BoltGame_fla
Section 8
//SoundButton_4 (BoltGame_fla.SoundButton_4) package BoltGame_fla { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.geom.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.net.*; import flash.system.*; import flash.ui.*; public dynamic class SoundButton_4 extends MovieClip { public var statusOff:MovieClip; public var statusOn:MovieClip; public function SoundButton_4(){ addFrameScript(4, frame5, 10, frame11); } function frame5(){ this.stop(); } function frame11(){ this.stop(); } } }//package BoltGame_fla
Section 9
//Coin (collectibles.Coin) package collectibles { public class Coin extends Collectible { public function Coin():void{ addFrameScript(3, frame4, 13, frame14); } override public function collected():void{ if (!this.isCollected){ PlayerStats.addPoints(275); this.gotoAndPlay("collected"); this.isCollected = true; SoundManager.playSound("Sound_Coin"); }; } function frame14(){ this.die(); } function frame4(){ this.gotoAndPlay("idle"); } } }//package collectibles
Section 10
//Collectible (collectibles.Collectible) package collectibles { public class Collectible extends GameObject { public var isCollected:Boolean;// = false public function Collectible():void{ isCollected = false; super(); } public function collected():void{ if (!this.isCollected){ trace("hit!"); this.gotoAndPlay("collected"); this.isCollected = true; }; } public function reset():void{ this.isCollected = false; this.gotoAndPlay("idle"); this.visible = true; } public function die():void{ this.stop(); this.visible = false; } override public function update():void{ var _local1:Boolean; _local1 = Util.isWithinRange(this.x, this.y, BoltGame.objMgr.bolt.x, BoltGame.objMgr.bolt.y, 55); if (_local1){ this.collected(); }; } } }//package collectibles
Section 11
//Exit (collectibles.Exit) package collectibles { public class Exit extends Collectible { public function Exit():void{ } override public function collected():void{ if (((!(this.isCollected)) && (BoltGame.isPlaying))){ trace("Next Level!"); this.gotoAndPlay("collected"); this.isCollected = true; BoltGame.world.levelComplete(); }; } } }//package collectibles
Section 12
//Enemy (enemy.Enemy) package enemy { public class Enemy extends Character { public var chaseCountMax:int;// = 20 public var hitpoints:int;// = 100 public var dead:Boolean;// = false public var attackCount:int;// = 0 public var chaseCount:int;// = 0 public var minChaseRange:Number;// = 30 public var aggroRange:Number;// = 300 public function Enemy():void{ aggroRange = 300; chaseCount = 0; chaseCountMax = 20; minChaseRange = 30; attackCount = 0; hitpoints = 100; dead = false; super(); this.speed = 5; } public function getHit():void{ this.hitpoints = (this.hitpoints - 34); this.attackCount = -50; if (this.hitpoints <= 0){ this.setState("die"); this.playAnim("die"); PlayerStats.addPoints(750); SoundManager.playSound("Sound_GruntDie"); } else { this.setState("get_hit"); this.playAnim("get_hit"); SoundManager.playSound("Sound_GruntHit"); }; } public function die():void{ this.visible = false; this.stop(); } public function procAttack():void{ } override public function update():void{ var _local1:Number; if (this.state == "idle"){ this.vx = 0; _local1 = (this.x - BoltGame.objMgr.bolt.x); if (Math.abs(_local1) <= this.aggroRange){ this.setState("chase"); }; } else { if (this.state == "chase"){ if (this.chaseCount < this.chaseCountMax){ _local1 = (this.x - BoltGame.objMgr.bolt.x); if (Math.abs(_local1) > this.minChaseRange){ if (_local1 < 0){ this.walkRight(); } else { this.walkLeft(); }; this.chaseCount++; } else { if (Util.isWithinRange(this.x, this.y, BoltGame.objMgr.bolt.x, BoltGame.objMgr.bolt.y, 100)){ this.chaseCount = 0; this.vx = 0; if (this.attackCount >= 70){ this.setState("attack"); this.playAnim("attack"); }; }; }; } else { this.chaseCount = 0; }; } else { if (this.state == "attack"){ this.vx = 0; this.attackCount = 0; } else { if (this.state == "get_hit"){ } else { if (this.state == "die"){ }; }; }; }; }; this.attackCount++; this.updatePhysics(); } override public function moveOnTiles(_arg1:Number, _arg2:Number):Object{ var _local3:Object; var _local4:int; var _local5:int; var _local6:int; var _local7:int; var _local8:int; var _local9:Object; _local3 = new Object(); _local3.x = false; _local3.y = false; _local4 = Math.floor((this.x / BoltGame.tileWidth)); _local5 = Math.floor((this.y / BoltGame.tileHeight)); _local6 = Math.floor((_arg1 / BoltGame.tileWidth)); _local7 = Math.floor((_arg2 / BoltGame.tileHeight)); _local8 = BoltGame.world.tileMap.map[(_local7 + 1)][_local6]; if (this.dead){ _local3.x = true; _local3.y = true; if (this.y >= 3000){ this.visible = false; return (_local3); }; return (_local3); }; if (_local8 == 2){ this.dead = true; _local3.x = true; _local3.y = true; return (_local3); }; _local9 = this.getCorners(_arg1, this.y); if (_arg1 > this.x){ if (((!((_local9.upRight == 0))) || (!((_local9.downRight == 0))))){ this.x = (((_local4 + 1) * BoltGame.tileWidth) - this.halfWidth); } else { _local3.x = true; }; } else { if (_arg1 < this.x){ if (((!((_local9.upLeft == 0))) || (!((_local9.downLeft == 0))))){ this.x = ((_local4 * BoltGame.tileWidth) + this.halfWidth); } else { _local3.x = true; }; }; }; _local9 = this.getCorners(this.x, _arg2); if (_arg2 < this.y){ if (((!((_local9.upLeft == 0))) || (!((_local9.upRight == 0))))){ this.y = ((_local5 * BoltGame.tileHeight) + this.halfHeight); this.vy = 0; } else { _local3.y = true; }; } else { if (_arg2 > this.y){ if (((!((_local9.downLeft == 0))) || (!((_local9.downRight == 0))))){ this.y = (((_local5 + 1) * BoltGame.tileHeight) - this.halfHeight); this.vy = 0; this.isJumping = false; } else { this.isJumping = true; _local3.y = true; }; }; }; return (_local3); } public function setState(_arg1:String):void{ this.state = _arg1; } } }//package enemy
Section 13
//Grunt (enemy.Grunt) package enemy { import flash.display.*; import flash.geom.*; public class Grunt extends Enemy { public var hitBox:MovieClip; public function Grunt():void{ addFrameScript(12, frame13, 25, frame26, 34, frame35, 64, frame65, 67, frame68, 72, frame73, 78, frame79); this.speed = 4; this.state = "idle"; this.aggroRange = 200; this.minChaseRange = 64; this.ay = BoltGame.gravity; } function frame13(){ this.gotoAndPlay("idle"); } function frame35(){ this.setState("idle"); this.setAnim("idle"); } function frame26(){ this.gotoAndPlay("walk"); } function frame68(){ SoundManager.playSound("Sound_GruntWhoosh"); } function frame65(){ this.die(); } function frame73(){ this.procAttack(); } function frame79(){ this.setState("idle"); this.setAnim("idle"); } override public function updatePhysics():void{ var _local1:Number; var _local2:Number; var _local3:Object; var _local4:Object; this.vx = (this.vx + ax); this.vy = (this.vy + ay); _local1 = (this.x + this.vx); _local2 = (this.y + this.vy); _local3 = this.moveOnTiles(_local1, _local2); _local4 = this.moveOnObjs(_local1, _local2); if (((_local3.x) && (_local4.x))){ this.x = _local1; } else { this.idle(); }; if (((_local3.y) && (_local4.y))){ this.y = _local2; }; } override public function procAttack():void{ var _local1:Point; var _local2:Character; var _local3:Point; var _local4:Boolean; _local1 = new Point(this.hitBox.x, this.hitBox.y); _local1 = this.localToGlobal(_local1); _local2 = BoltGame.objMgr.bolt; _local3 = new Point(_local2.x, _local2.y); _local3 = BoltGame.objMgr.foreground.localToGlobal(_local3); _local4 = Util.isWithinRange(_local1.x, _local1.y, _local3.x, _local3.y, (30 + _local2.halfWidth)); if (_local4){ _local2.getHit(); }; } override public function playAnim(_arg1:String):void{ if (_arg1 == "idle"){ if (((((!((this.curAnim == "get_hit"))) && (!((this.curAnim == "die"))))) && (!((this.curAnim == "attack"))))){ this.setAnim(_arg1); }; } else { this.setAnim(_arg1); }; } override public function walkLeft():void{ if (this.curAnim != "bite"){ this.vx = -(this.speed); this.scaleX = 1; this.playAnim("walk"); }; } override public function setAnim(_arg1:String):void{ if (this.curAnim != _arg1){ this.gotoAndPlay(_arg1); this.curAnim = _arg1; }; } override public function walkRight():void{ if (this.curAnim != "bite"){ this.vx = this.speed; this.scaleX = -1; this.playAnim("walk"); }; } override public function idle():void{ this.vx = 0; this.playAnim("idle"); } } }//package enemy
Section 14
//Helicopter (enemy.Helicopter) package enemy { import flash.display.*; import flash.geom.*; public class Helicopter extends Enemy { public var hitBox:MovieClip; public function Helicopter():void{ addFrameScript(6, frame7, 26, frame27, 75, frame76); this.scaleX = -1; } override public function getHit():void{ } function frame27(){ SoundManager.playSound("Sound_Rocket"); } function frame7(){ this.gotoAndPlay("idle"); } override public function update():void{ var _local1:Point; var _local2:Character; var _local3:Point; var _local4:Boolean; if (this.attackCount >= 80){ if (Util.isWithinRange(this.x, this.y, BoltGame.objMgr.bolt.x, BoltGame.objMgr.bolt.y, 500)){ this.procAttack(); }; } else { this.attackCount++; }; _local1 = new Point(this.hitBox.x, this.hitBox.y); _local1 = this.localToGlobal(_local1); _local2 = BoltGame.objMgr.bolt; _local3 = new Point(_local2.x, _local2.y); _local3 = BoltGame.objMgr.foreground.localToGlobal(_local3); _local4 = Util.isWithinRange(_local1.x, _local1.y, _local3.x, _local3.y, (15 + _local2.halfWidth)); if (_local4){ this.setState("idle"); this.setAnim("idle"); this.gotoAndPlay("idle"); this.attackCount = 0; BoltGame.objMgr.addExplosion(_local2.x, _local2.y); _local2.getHit(); }; } function frame76(){ this.setState("idle"); this.setAnim("idle"); this.dummyExplosion(); } override public function procAttack():void{ this.attackCount = 0; this.gotoAndPlay("attack"); } public function dummyExplosion():void{ } } }//package enemy
Section 15
//Thrower (enemy.Thrower) package enemy { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.geom.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.net.*; import flash.system.*; import flash.ui.*; public dynamic class Thrower extends MovieClip { public var hitBox:MovieClip; public function Thrower(){ addFrameScript(4, frame5, 20, frame21, 25, frame26, 30, frame31, 38, frame39, 40, frame41); } function frame26(){ this.setState("idle"); this.setAnim("idle"); } function frame5(){ this.stop(); } function frame21(){ this.gotoAndPlay("walk"); } function frame31(){ this.die(); } function frame41(){ this.setState("idle"); this.setAnim("idle"); } function frame39(){ this.procAttack(); } } }//package enemy
Section 16
//Floater (environment.Floater) package environment { import flash.geom.*; public class Floater extends GameObject { public var range:Number; public var startPoint:Point; public var endPoint:Point; public var type:String; public function Floater(_arg1:Number=0, _arg2:Number=0, _arg3:String="horizontal", _arg4:Number=0, _arg5:Number=2):void{ this.x = _arg1; this.y = _arg2; this.type = _arg3; this.range = _arg4; this.startPoint = new Point(this.x, this.y); this.endPoint = new Point((this.x + this.range), (this.y + this.range)); if (this.type == "horizontal"){ this.vx = _arg5; } else { if (this.type == "vertical"){ this.vy = _arg5; }; }; } public function testPoint(_arg1:Number, _arg2:Number):Boolean{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Boolean; _local3 = this.x; _local4 = (this.x + 64); _local5 = this.y; _local6 = (this.y + 64); _local7 = (((((((_arg1 > _local3)) && ((_arg1 < _local4)))) && ((_arg2 > _local5)))) && ((_arg2 < _local6))); return (_local7); } override public function updatePhysics():void{ } override public function update():void{ var _local1:Number; var _local2:Number; _local1 = (this.x + this.vx); _local2 = (this.y + this.vy); if (this.type == "horizontal"){ if ((((_local1 <= this.startPoint.x)) || ((_local1 >= this.endPoint.x)))){ this.vx = -(this.vx); _local1 = (this.x + this.vx); }; } else { if (this.type == "vertical"){ if ((((_local2 <= this.startPoint.y)) || ((_local2 >= this.endPoint.y)))){ this.vy = -(this.vy); _local2 = (this.y + this.vy); }; }; }; this.x = _local1; this.y = _local2; } } }//package environment
Section 17
//FloatingPlatform (environment.FloatingPlatform) package environment { public class FloatingPlatform extends Floater { public function FloatingPlatform(_arg1:Number=0, _arg2:Number=0, _arg3:String="horizontal", _arg4:Number=0, _arg5:Number=2):void{ super(_arg1, _arg2, _arg3, _arg4, _arg5); } } }//package environment
Section 18
//Strong (fl.transitions.easing.Strong) package fl.transitions.easing { public class Strong { public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = ((_arg1 / _arg4) - 1); return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2)); } public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / _arg4); return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); } public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ _arg1 = (_arg1 / (_arg4 / 2)); if (_arg1 < 1){ return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2)); }; _arg1 = (_arg1 - 2); return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2)); } } }//package fl.transitions.easing
Section 19
//Tween (fl.transitions.Tween) package fl.transitions { import flash.events.*; import flash.display.*; 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 public var begin:Number;// = NAN private var _fps:Number;// = NAN private var _time:Number;// = NAN public var change:Number;// = NAN private var _finish: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){ isPlaying = false; obj = null; prop = ""; func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ return ((((_arg3 * _arg1) / _arg4) + _arg2)); }; begin = NaN; change = NaN; useSeconds = false; prevTime = NaN; prevPos = NaN; looping = false; _duration = NaN; _time = NaN; _fps = NaN; _position = NaN; _startTime = NaN; _intervalID = 0; _finish = NaN; _timer = null; 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(); } 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; _local2 = 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 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 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(); }; }; } protected function stopEnterFrame():void{ if (isNaN(this._fps)){ _mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame); } else { this._timer.stop(); }; this.isPlaying = false; } 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 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 get position():Number{ return (this.getPosition(this._time)); } 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 20
//TweenEvent (fl.transitions.TweenEvent) package fl.transitions { import flash.events.*; public class TweenEvent extends Event { public var time:Number;// = NAN public var position: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){ time = NaN; position = NaN; 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 21
//EndScreen (gui.EndScreen) package gui { import flash.events.*; import flash.display.*; import fl.transitions.easing.*; import fl.transitions.*; public class EndScreen extends Sprite { public var fadeInTween:Tween; public var fadeOutTween:Tween; public var replayButton:MovieClip; public function EndScreen():void{ this.replayButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOver_Replay); this.replayButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOut_Replay); this.replayButton.addEventListener(MouseEvent.MOUSE_UP, mouseUp_Replay); this.replayButton.buttonMode = true; } public function fadeInDone(_arg1:Event):void{ this.fadeInTween.removeEventListener(TweenEvent.MOTION_FINISH, this.fadeInDone); this.replayButton.visible = true; } public function mouseUp_Replay(_arg1:Event):void{ this.replayButton.visible = false; this.fadeOut(); BoltGame.world.startGame(); } public function fadeOut():void{ this.fadeOutTween = new Tween(this, "alpha", Strong.easeOut, 1, 0, 1.4, true); this.fadeOutTween.addEventListener(TweenEvent.MOTION_FINISH, this.fadeOutDone); } public function mouseOut_Replay(_arg1:Event):void{ this.replayButton.gotoAndPlay("up"); } public function fadeIn():void{ this.visible = true; this.fadeInTween = new Tween(this, "alpha", Strong.easeOut, 0, 1, 1.4, true); this.fadeInTween.addEventListener(TweenEvent.MOTION_FINISH, this.fadeInDone); } public function fadeOutDone(_arg1:Event):void{ this.visible = false; this.fadeOutTween.removeEventListener(TweenEvent.MOTION_FINISH, this.fadeOutDone); } public function mouseOver_Replay(_arg1:Event):void{ this.replayButton.gotoAndPlay("over"); } } }//package gui
Section 22
//HUD (gui.HUD) package gui { import flash.events.*; import flash.display.*; import fl.transitions.easing.*; import flash.text.*; public class HUD extends Sprite { public var healthBar:MovieClip; public var soundButton:MovieClip; public var pointsText:TextField; public var musicButton:MovieClip; public var pauseButton:MovieClip; public function HUD():void{ this.pauseButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverPause); this.pauseButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutPause); this.pauseButton.addEventListener(MouseEvent.MOUSE_UP, mouseUpPause); this.pauseButton.buttonMode = true; this.soundButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOver_Sound); this.soundButton.addEventListener(MouseEvent.MOUSE_UP, mouseUp_Sound); this.soundButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOut_Sound); this.soundButton.statusOn.visible = true; this.soundButton.statusOff.visible = false; this.soundButton.statusOn.mouseEnabled = false; this.soundButton.statusOff.mouseEnabled = false; this.soundButton.buttonMode = true; this.musicButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOver_Music); this.musicButton.addEventListener(MouseEvent.MOUSE_UP, mouseUp_Music); this.musicButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOut_Music); this.musicButton.statusOn.visible = true; this.musicButton.statusOff.visible = false; this.musicButton.statusOn.mouseEnabled = false; this.musicButton.statusOff.mouseEnabled = false; this.musicButton.buttonMode = true; } public function mouseOutPause(_arg1:Event):void{ this.pauseButton.gotoAndPlay("up"); } public function mouseUp_Sound(_arg1:Event):void{ this.soundButton.gotoAndStop("down"); SoundManager.soundStatus = !(SoundManager.soundStatus); if (SoundManager.soundStatus){ this.soundButton.statusOn.visible = true; this.soundButton.statusOff.visible = false; } else { this.soundButton.statusOn.visible = false; this.soundButton.statusOff.visible = true; }; } public function mouseUp_Music(_arg1:Event):void{ this.musicButton.gotoAndStop("down"); SoundManager.musicStatus = !(SoundManager.musicStatus); if (SoundManager.musicStatus){ SoundManager.resumeBackgroundMusic(); this.musicButton.statusOn.visible = true; this.musicButton.statusOff.visible = false; } else { SoundManager.stopBackgroundMusic(); this.musicButton.statusOn.visible = false; this.musicButton.statusOff.visible = true; }; } public function mouseOver_Sound(_arg1:Event):void{ this.soundButton.gotoAndPlay("over"); } public function mouseOverPause(_arg1:Event):void{ this.pauseButton.gotoAndPlay("over"); } public function mouseOver_Music(_arg1:Event):void{ this.musicButton.gotoAndPlay("over"); } public function mouseOut_Sound(_arg1:Event):void{ this.soundButton.gotoAndPlay("up"); } public function mouseOut_Music(_arg1:Event):void{ this.musicButton.gotoAndPlay("up"); } public function mouseUpPause(_arg1:Event):void{ BoltGame.world.pause(); } public function updateHPBar():void{ var _local1:Number; var _local2:Number; var _local3:Number; _local1 = 158; _local2 = -158; _local3 = (BoltGame.objMgr.bolt.hitpoints / 100); this.healthBar.barMask.x = (_local2 + (_local1 * _local3)); } } }//package gui
Section 23
//IntroScreen (gui.IntroScreen) package gui { import flash.events.*; import flash.display.*; import fl.transitions.easing.*; import fl.transitions.*; public class IntroScreen extends Sprite { public var startButton:MovieClip; public var introScreenTween:Tween; public var isReady:Boolean;// = true public function IntroScreen():void{ isReady = true; super(); this.startButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverStart); this.startButton.addEventListener(MouseEvent.MOUSE_UP, mouseUpStart); this.startButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutStart); this.startButton.buttonMode = true; } public function mouseUpStart(_arg1:Event):void{ this.proceed(); } public function mouseOutStart(_arg1:Event):void{ this.startButton.gotoAndPlay("up"); } public function proceed():void{ this.isReady = false; this.startButton.visible = false; this.introScreenTween = new Tween(this, "x", Strong.easeOut, 0, 700, 2, true); BoltGame.world.startGame(); } public function mouseOverStart(_arg1:Event):void{ this.startButton.gotoAndPlay("over"); } } }//package gui
Section 24
//NextLevelScreen (gui.NextLevelScreen) package gui { import flash.events.*; import flash.display.*; import fl.transitions.easing.*; import fl.transitions.*; public class NextLevelScreen extends Sprite { public var nextButton:MovieClip; public var fadeInTween:Tween; public var fadeOutTween:Tween; public var isReady:Boolean;// = false public function NextLevelScreen():void{ isReady = false; super(); this.nextButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverNext); this.nextButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutNext); this.nextButton.addEventListener(MouseEvent.MOUSE_UP, mouseUpNext); this.nextButton.visible = false; this.nextButton.buttonMode = true; } public function mouseOutNext(_arg1:Event):void{ this.nextButton.gotoAndPlay("up"); } public function fadeInDone(_arg1:Event):void{ this.fadeInTween.removeEventListener(TweenEvent.MOTION_FINISH, this.fadeInDone); this.nextButton.visible = true; this.isReady = true; } public function fadeOut():void{ this.fadeOutTween = new Tween(this, "alpha", Strong.easeOut, 1, 0, 1.4, true); this.fadeOutTween.addEventListener(TweenEvent.MOTION_FINISH, this.fadeOutDone); } public function mouseUpNext(_arg1:Event):void{ this.proceed(); } public function mouseOverNext(_arg1:Event):void{ this.nextButton.gotoAndPlay("over"); } public function proceed():void{ this.nextButton.visible = false; this.fadeOut(); BoltGame.world.nextLevel(); this.isReady = false; } public function fadeIn():void{ this.visible = true; this.fadeInTween = new Tween(this, "alpha", Strong.easeOut, 0, 1, 1.4, true); this.fadeInTween.addEventListener(TweenEvent.MOTION_FINISH, this.fadeInDone); } public function fadeOutDone(_arg1:Event):void{ this.fadeOutTween.removeEventListener(TweenEvent.MOTION_FINISH, this.fadeOutDone); this.visible = false; } } }//package gui
Section 25
//PauseScreen (gui.PauseScreen) package gui { import flash.events.*; import flash.display.*; import fl.transitions.easing.*; import fl.transitions.*; public class PauseScreen extends Sprite { public var fadeInTween:Tween; public var fadeOutTween:Tween; public var resumeButton:MovieClip; public function PauseScreen():void{ this.resumeButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverResume); this.resumeButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutResume); this.resumeButton.addEventListener(MouseEvent.MOUSE_UP, mouseUpResume); this.resumeButton.buttonMode = true; } public function fadeInDone(_arg1:Event):void{ this.fadeInTween.removeEventListener(TweenEvent.MOTION_FINISH, this.fadeInDone); this.resumeButton.visible = true; } public function fadeOut():void{ this.visible = false; } public function mouseUpResume(_arg1:Event):void{ this.proceed(); } public function mouseOverResume(_arg1:Event):void{ this.resumeButton.gotoAndPlay("over"); } public function proceed():void{ BoltGame.world.pause(); } public function fadeIn():void{ this.visible = true; } public function fadeOutDone(_arg1:Event):void{ this.fadeOutTween.removeEventListener(TweenEvent.MOTION_FINISH, this.fadeOutDone); this.visible = false; } public function mouseOutResume(_arg1:Event):void{ this.resumeButton.gotoAndPlay("up"); } } }//package gui
Section 26
//RetryScreen (gui.RetryScreen) package gui { import flash.events.*; import flash.display.*; import fl.transitions.easing.*; import fl.transitions.*; public class RetryScreen extends Sprite { public var fadeInTween:Tween; public var fadeOutTween:Tween; public var retryButton:MovieClip; public function RetryScreen():void{ this.retryButton.addEventListener(MouseEvent.MOUSE_OVER, mouseOverRetry); this.retryButton.addEventListener(MouseEvent.MOUSE_OUT, mouseOutRetry); this.retryButton.addEventListener(MouseEvent.MOUSE_UP, mouseUpRetry); this.retryButton.visible = false; this.retryButton.buttonMode = true; } public function fadeInDone(_arg1:Event):void{ this.fadeInTween.removeEventListener(TweenEvent.MOTION_FINISH, this.fadeInDone); this.retryButton.visible = true; } public function mouseOverRetry(_arg1:Event):void{ this.retryButton.gotoAndPlay("over"); } public function fadeOut():void{ this.fadeOutTween = new Tween(this, "alpha", Strong.easeOut, 1, 0, 1, true); this.fadeOutTween.addEventListener(TweenEvent.MOTION_FINISH, this.fadeOutDone); } public function mouseUpRetry(_arg1:Event):void{ this.proceed(); } public function proceed():void{ this.retryButton.visible = false; this.fadeOut(); BoltGame.world.retry(); } public function fadeIn():void{ if (this.fadeOutTween != null){ this.fadeOutTween.removeEventListener(TweenEvent.MOTION_FINISH, this.fadeOutDone); }; this.visible = true; this.fadeInTween = new Tween(this, "alpha", Strong.easeOut, 0, 1, 1, true); this.fadeInTween.addEventListener(TweenEvent.MOTION_FINISH, this.fadeInDone); } public function mouseOutRetry(_arg1:Event):void{ this.retryButton.gotoAndPlay("up"); } public function fadeOutDone(_arg1:Event):void{ this.fadeOutTween.removeEventListener(TweenEvent.MOTION_FINISH, this.fadeOutDone); this.visible = false; } } }//package gui
Section 27
//Bolt (hero.Bolt) package hero { import flash.display.*; import enemy.*; import flash.geom.*; public class Bolt extends Character { public var hitpoints:int;// = 100 public var hitBox:MovieClip; public function Bolt():void{ hitpoints = 100; super(); addFrameScript(18, frame19, 31, frame32, 32, frame33, 44, frame45, 46, frame47, 49, frame50, 58, frame59, 66, frame67, 71, frame72); this.speed = 8; this.scaleX = 0.9; this.scaleY = 0.9; } function frame72(){ BoltGame.world.boltDied(); } public function getHit():void{ if (this.curAnim != "get_hit"){ this.hitpoints = (this.hitpoints - 10); if (this.hitpoints <= 0){ this.playAnim("die"); } else { trace("PLAYING ANIM GET HIT"); this.playAnim("get_hit"); }; SoundManager.playSound("Sound_GruntHit"); }; } function frame19(){ this.gotoAndPlay("idle"); } public function respawn():void{ this.hitpoints = 100; BoltGame.objMgr.respawnBolt(); this.setAnim("idle"); } public function procAttack():void{ var _local1:Sprite; var _local2:int; var _local3:Point; var _local4:Enemy; var _local5:Point; var _local6:Boolean; _local1 = BoltGame.objMgr.enemies; _local2 = _local1.numChildren; i = 0; while (i < _local2) { _local3 = new Point(this.hitBox.x, this.hitBox.y); _local3 = this.localToGlobal(_local3); _local4 = _local1.getChildAt(i); _local5 = new Point(_local4.x, _local4.y); _local5 = BoltGame.objMgr.enemies.localToGlobal(_local5); _local6 = Util.isWithinRange(_local3.x, _local3.y, _local5.x, _local5.y, (30 + _local4.halfWidth)); if (((((_local6) && (_local4.visible))) && (!((_local4.state == "die"))))){ _local4.getHit(); }; i++; }; } function frame33(){ SoundManager.playSound("Sound_Jump"); } function frame47(){ SoundManager.playSound("Sound_Whoosh"); } function frame32(){ this.gotoAndPlay("walk"); } function frame45(){ this.stop(); } function frame59(){ this.setAnim("idle"); } function frame50(){ this.procAttack(); } function frame67(){ this.setAnim("idle"); } } }//package hero
Section 28
//LevelMap1 (tilemap.LevelMap1) package tilemap { public class LevelMap1 extends TileMap { public function LevelMap1():void{ this.mapHeight = 100; this.mapLength = 100; this.offsetX = 2688; this.offsetY = 1984; this.x = (this.x + this.offsetX); this.y = (this.y + this.offsetY); } } }//package tilemap
Section 29
//LevelMap2 (tilemap.LevelMap2) package tilemap { public class LevelMap2 extends TileMap { public function LevelMap2():void{ this.mapHeight = 100; this.mapLength = 100; this.offsetX = 2688; this.offsetY = 1984; this.x = (this.x + this.offsetX); this.y = (this.y + this.offsetY); } } }//package tilemap
Section 30
//LevelMap3 (tilemap.LevelMap3) package tilemap { public class LevelMap3 extends TileMap { public function LevelMap3():void{ this.mapHeight = 100; this.mapLength = 100; this.offsetX = 2688; this.offsetY = 1984; this.x = (this.x + this.offsetX); this.y = (this.y + this.offsetY); } } }//package tilemap
Section 31
//TileMap (tilemap.TileMap) package tilemap { import flash.display.*; import enemy.*; import tiles.*; import collectibles.*; public class TileMap extends Sprite { public var offsetX:Number; public var offsetY:Number; public var mapLength:Number; public var map:Array; public var tileGraphics:Sprite; public var mapHeight:Number; public function TileMap():void{ } public function generateTileGraphics():void{ var _local1:int; var _local2:int; var _local3:int; var _local4:Tile; _local1 = 0; while (_local1 < this.map.length) { _local2 = 0; while (_local2 < this.map[0].length) { _local3 = this.map[_local1][_local2]; switch (_local3){ case 0: _local4 = new Air(); break; case 1: _local4 = new Impasse(); break; }; this.tileGraphics.addChild(_local4); _local4.x = (_local2 * BoltGame.tileWidth); _local4.y = (_local1 * BoltGame.tileHeight); _local2++; }; _local1++; }; } public function generateMap():void{ var _local1:int; var _local2:*; var _local3:int; var _local4:Array; var _local5:Array; var _local6:Array; var _local7:int; var _local8:int; var _local9:DisplayObject; var _local10:*; var _local11:int; var _local12:Enemy; var _local13:Collectible; _local1 = this.numChildren; _local3 = 0; this.map = new Array(); _local4 = new Array(); _local5 = new Array(); _local6 = new Array(); _local2 = 0; while (_local2 < this.mapHeight) { this.map[_local2] = new Array(); _local3 = 0; while (_local3 < this.mapLength) { this.map[_local2][_local3] = 0; _local3++; }; _local2++; }; _local2 = 0; while (_local2 < _local1) { _local9 = this.getChildAt(_local2); if ((_local9 is Tile)){ _local9.visible = false; _local10 = Math.floor((((_local9.x + this.offsetX) + 32) / BoltGame.tileWidth)); _local11 = Math.floor((((_local9.y + this.offsetY) + 32) / BoltGame.tileHeight)); if ((_local9 is Air)){ this.map[_local11][_local10] = 0; } else { if ((_local9 is Impasse)){ this.map[_local11][_local10] = 1; } else { if ((_local9 is Death)){ this.map[_local11][_local10] = 2; }; }; }; } else { if ((_local9 is Shape)){ _local9.cacheAsBitmap = true; } else { if ((_local9 is Enemy)){ _local4.push(_local9); _local9.x = (_local9.x + this.offsetX); _local9.y = (_local9.y + this.offsetY); } else { if ((_local9 is Collectible)){ _local5.push(_local9); _local9.x = (_local9.x + this.offsetX); _local9.y = (_local9.y + this.offsetY); if ((_local9 is Exit)){ _local9.visible = false; }; } else { if ((_local9 is SavePoint)){ _local9.visible = false; _local6.push(_local9); _local9.x = (_local9.x + this.offsetX); _local9.y = (_local9.y + this.offsetY); } else { if ((_local9 is FloatingMarker)){ _local9.visible = false; }; }; }; }; }; }; _local2++; }; _local7 = _local4.length; _local2 = 0; while (_local2 < _local7) { _local12 = _local4.pop(); this.removeChild(_local12); BoltGame.objMgr.enemies.addChild(_local12); _local2++; }; _local8 = _local5.length; _local2 = 0; while (_local2 < _local8) { _local13 = _local5.pop(); this.removeChild(_local13); BoltGame.objMgr.collectibles.addChild(_local13); _local2++; }; _local6.sortOn("x", (Array.NUMERIC | Array.ASCENDING)); BoltGame.objMgr.savePoints = _local6; } public function mapToString():void{ var _local1:String; trace("map: \n"); i = 0; while (i < this.mapHeight) { _local1 = ""; j = 0; while (j < this.mapLength) { if (this.map[i][j] == null){ _local1 = (_local1 + ("-1" + " ")); } else { _local1 = (_local1 + (this.map[i][j] + " ")); }; j++; }; trace(_local1); i++; }; } } }//package tilemap
Section 32
//Air (tiles.Air) package tiles { public class Air extends Tile { public function Air():void{ } } }//package tiles
Section 33
//Death (tiles.Death) package tiles { public class Death extends Tile { public function Death():void{ } } }//package tiles
Section 34
//Impasse (tiles.Impasse) package tiles { public class Impasse extends Tile { public function Impasse():void{ } } }//package tiles
Section 35
//Tile (tiles.Tile) package tiles { import flash.display.*; public class Tile extends MovieClip { public var walkable:Boolean; public function Tile():void{ } } }//package tiles
Section 36
//Background (Background) package { import flash.display.*; public dynamic class Background extends MovieClip { } }//package
Section 37
//BoltGame (BoltGame) package { import flash.events.*; import flash.display.*; import tilemap.*; import gui.*; import tiles.*; public class BoltGame extends Sprite { public var pauseScreen:Sprite; public var coverScreen:Sprite; public var hud:Sprite; public var GUI:Sprite; public var curLevel:int;// = 1 public var nextLevelScreen:Sprite; public var endScreen:Sprite; public var retryScreen:Sprite; public var overframeButtons:Sprite; public var frame:Sprite; public var maxLevel:int;// = 3 public var screenHeight:Number;// = 410 public var screenWidth:Number;// = 580 public var instructionsFrame:Sprite; public var tileMap:TileMap; public var introScreen:Sprite; public static var objMgr:ObjectManager; public static var gravity:Number = 1.5; public static var keyboard:Keyboard; public static var soundStatus:Boolean = true; public static var isPlaying:Boolean = false; public static var world:Sprite; public static var tileHeight:int = 64; public static var musicStatus:Boolean = true; public static var tileWidth:int = 64; public function BoltGame():void{ screenWidth = 580; screenHeight = 410; curLevel = 1; maxLevel = 3; super(); BoltGame.world = this; this.addEventListener(Event.ENTER_FRAME, mainLoop); this.addEventListener(Event.ADDED_TO_STAGE, initStage); keyboard = new Keyboard(); objMgr = new ObjectManager(); this.addChild(objMgr); this.setupTileMaps(); SoundManager.loadSounds(); SoundManager.startBackgroundMusic(); this.setupGUI(); } public function pause():void{ trace("pause!"); if (((BoltGame.isPlaying) && (!(this.pauseScreen.visible)))){ BoltGame.stopPlay(); this.pauseScreen.fadeIn(); SoundManager.stopBackgroundMusic(); } else { if (this.pauseScreen.visible){ BoltGame.resumePlay(); this.pauseScreen.fadeOut(); SoundManager.resumeBackgroundMusic(); }; }; } public function setupTileMaps():void{ } public function boltDied():void{ SoundManager.playSound("Sound_Mittens"); BoltGame.objMgr.bolt.stop(); BoltGame.stopPlay(); this.retryScreen.fadeIn(); } public function startLevel(_arg1:int):void{ this.curLevel = _arg1; BoltGame.objMgr.setLevel(this.curLevel); BoltGame.isPlaying = true; } public function prepLevel(_arg1:int):void{ } public function showNextLevelScreen():void{ this.nextLevelScreen.fadeIn(); } public function nextLevel():void{ if (this.curLevel == 1){ SoundManager.playSound("Sound_BoltComing"); this.startLevel(2); } else { if (this.curLevel == 2){ this.startLevel(3); } else { this.startLevel(1); }; }; trace(("setting new level: " + this.curLevel)); } public function startGame():void{ SoundManager.playSound("Sound_BoltComing"); PlayerStats.reset(); BoltGame.objMgr.bolt.hitpoints = 100; BoltGame.world.startLevel(1); } public function nextLevelTransition():void{ if (this.curLevel == this.maxLevel){ this.showEndScreen(); } else { this.showNextLevelScreen(); }; } public function setupGUI():void{ this.GUI = new Sprite(); this.addChild(this.GUI); this.hud = new HUD(); this.GUI.addChild(this.hud); this.pauseScreen = new PauseScreen(); this.GUI.addChild(this.pauseScreen); this.pauseScreen.visible = false; this.introScreen = new IntroScreen(); this.GUI.addChild(this.introScreen); this.introScreen.mouseEnabled = false; this.nextLevelScreen = new NextLevelScreen(); this.GUI.addChild(this.nextLevelScreen); this.nextLevelScreen.visible = false; this.endScreen = new EndScreen(); this.GUI.addChild(this.endScreen); this.endScreen.x = this.introScreen.x; this.endScreen.y = this.introScreen.y; this.endScreen.visible = false; this.retryScreen = new RetryScreen(); this.GUI.addChild(this.retryScreen); this.retryScreen.visible = false; } public function retry():void{ BoltGame.objMgr.bolt.respawn(); BoltGame.resumePlay(); } public function showEndScreen():void{ SoundManager.playSound("Sound_Rhino"); this.endScreen.fadeIn(); } public function initStage(_arg1:Event):void{ keyboard.initialize(stage); } public function levelComplete():void{ BoltGame.stopPlay(); this.nextLevelTransition(); } public function mainLoop(_arg1:Event):void{ if (BoltGame.isPlaying){ BoltGame.keyboard.update(); BoltGame.objMgr.update(); this.hud.updateHPBar(); }; } public static function stopPlay():void{ trace("stopped play"); BoltGame.isPlaying = false; } public static function resumePlay():void{ trace("resumed"); BoltGame.isPlaying = true; } } }//package
Section 38
//Character (Character) package { import environment.*; public class Character extends GameObject { public var isJumping:Boolean;// = false public var curAnim:String; public var jumpPower:Number;// = -20 public var state:String; public function Character():void{ isJumping = false; jumpPower = -20; super(); this.speed = 6; } public function walkDown():void{ this.vy = this.speed; } public function moveOnObjs(_arg1:Number, _arg2:Number):Object{ var _local3:Object; var _local4:int; var _local5:Object; var _local6:Object; var _local7:int; var _local8:int; var _local9:int; var _local10:Floater; _local3 = new Object(); _local3.x = false; _local3.y = false; _local4 = BoltGame.objMgr.floaters.numChildren; _local5 = this.getCornerPoints(_arg1, this.y); _local6 = this.getCornerPoints(this.x, _arg2); _local7 = Math.floor((this.x / BoltGame.tileWidth)); _local8 = Math.floor((this.y / BoltGame.tileHeight)); _local9 = 0; while (_local9 < _local4) { _local10 = BoltGame.objMgr.floaters.getChildAt(_local9); _local3.x = true; if (_arg2 < this.y){ _local3.y = true; } else { if (_arg2 > this.y){ if (((_local10.testPoint(_local6.downLeft.x, _local6.downLeft.y)) || (_local10.testPoint(_local6.downRight.x, _local6.downRight.y)))){ this.y = (_local10.y - this.halfHeight); this.vy = 0; this.x = (this.x + _local10.vx); this.isJumping = false; _local3.y = false; return (_local3); }; _local3.y = true; }; }; _local9++; }; return (_local3); } public function jump():void{ if (!this.isJumping){ this.vy = this.jumpPower; this.isJumping = true; this.playAnim("jump"); }; } override public function updatePhysics():void{ var _local1:Number; var _local2:Number; var _local3:Object; var _local4:Object; this.vx = (this.vx + this.ax); this.vy = (this.vy + this.ay); _local1 = (this.x + this.vx); _local2 = (this.y + this.vy); _local3 = this.moveOnTiles(_local1, _local2); _local4 = this.moveOnObjs(_local1, _local2); if (((_local3.x) && (_local4.x))){ this.x = _local1; }; if (((_local3.y) && (_local4.y))){ this.y = _local2; }; } public function walkUp():void{ this.vy = -(this.speed); } public function playAnim(_arg1:String):void{ if (_arg1 == "jump"){ this.setAnim(_arg1); } else { if (_arg1 == "idle"){ if (((((((!(this.isJumping)) && (!((this.curAnim == "bite"))))) && (!((this.curAnim == "get_hit"))))) && (!((this.curAnim == "die"))))){ this.setAnim(_arg1); }; } else { if (_arg1 == "walk"){ if (((!(this.isJumping)) && (!((this.curAnim == "bite"))))){ this.setAnim(_arg1); }; } else { if (_arg1 == "bite"){ this.setAnim(_arg1); } else { if (_arg1 == "get_hit"){ this.setAnim(_arg1); } else { if (_arg1 == "die"){ this.setAnim(_arg1); }; }; }; }; }; }; } public function walkLeft():void{ if (this.curAnim != "bite"){ this.vx = -(this.speed); this.scaleX = -1; this.playAnim("walk"); }; } override public function update():void{ this.updatePhysics(); } public function setAnim(_arg1:String):void{ if (this.curAnim != _arg1){ this.gotoAndPlay(_arg1); this.curAnim = _arg1; }; } public function walkRight():void{ if (this.curAnim != "bite"){ this.vx = this.speed; this.scaleX = 1; this.playAnim("walk"); }; } public function moveOnTiles(_arg1:Number, _arg2:Number):Object{ var _local3:Object; var _local4:int; var _local5:int; var _local6:Object; var _local7:int; var _local8:int; var _local9:int; _local3 = new Object(); _local3.x = false; _local3.y = false; _local4 = Math.floor((this.x / BoltGame.tileWidth)); _local5 = Math.floor((this.y / BoltGame.tileHeight)); _local6 = this.getCorners(_arg1, this.y); _local7 = Math.floor((_arg1 / BoltGame.tileWidth)); _local8 = Math.floor((_arg2 / BoltGame.tileHeight)); _local9 = BoltGame.world.tileMap.map[(_local8 + 1)][_local7]; if (_local9 == 2){ BoltGame.world.boltDied(); return (_local3); }; if (_arg1 > this.x){ if (((!((_local6.upRight == 0))) || (!((_local6.downRight == 0))))){ this.x = (((_local4 + 1) * BoltGame.tileWidth) - this.halfWidth); } else { _local3.x = true; }; } else { if (_arg1 < this.x){ if (((!((_local6.upLeft == 0))) || (!((_local6.downLeft == 0))))){ this.x = ((_local4 * BoltGame.tileWidth) + this.halfWidth); } else { _local3.x = true; }; }; }; _local6 = this.getCorners(this.x, _arg2); if (_arg2 < this.y){ if (((!((_local6.upLeft == 0))) || (!((_local6.upRight == 0))))){ this.y = ((_local5 * BoltGame.tileHeight) + this.halfHeight); this.vy = 0; } else { _local3.y = true; }; } else { if (_arg2 > this.y){ if (((!((_local6.downLeft == 0))) || (!((_local6.downRight == 0))))){ this.y = (((_local5 + 1) * BoltGame.tileHeight) - this.halfHeight); this.vy = 0; this.isJumping = false; } else { this.isJumping = true; _local3.y = true; }; }; }; return (_local3); } public function idle():void{ this.vx = 0; this.playAnim("idle"); } public function bite():void{ if (!this.isJumping){ this.vx = 0; }; this.playAnim("bite"); } } }//package
Section 39
//Dot (Dot) package { import flash.display.*; public dynamic class Dot extends MovieClip { } }//package
Section 40
//Explosion (Explosion) package { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.media.*; import flash.text.*; import flash.geom.*; import flash.accessibility.*; import flash.errors.*; import flash.filters.*; import flash.net.*; import flash.system.*; import flash.ui.*; public dynamic class Explosion extends MovieClip { public function Explosion(){ addFrameScript(0, frame1, 16, frame17); } function frame1(){ SoundManager.playSound("Sound_Explosion"); } function frame17(){ this.stop(); this.parent.removeChild(this); } } }//package
Section 41
//FloatingMarker (FloatingMarker) package { import flash.display.*; public dynamic class FloatingMarker extends MovieClip { } }//package
Section 42
//GameObject (GameObject) package { import flash.display.*; import tiles.*; import flash.geom.*; public class GameObject extends MovieClip { public var ay:Number;// = 0 public var ax:Number;// = 0 public var rv:Number;// = 0 public var minY:Number;// = 0 public var speed:Number;// = 0 public var halfWidth:Number; public var maxX:Number;// = 0 public var maxY:Number;// = 0 public var minX:Number;// = 0 public var radius:Number;// = 0 public var halfHeight:Number; public var vx:Number;// = 0 public var vy:Number;// = 0 public function GameObject():void{ vx = 0; vy = 0; ax = 0; ay = 0; minX = 0; minY = 0; maxX = 0; maxY = 0; radius = 0; speed = 0; rv = 0; super(); this.halfWidth = (this.width / 2); this.halfHeight = (this.height / 2); } public function getCornerPoints(_arg1:Number, _arg2:Number):Object{ var _local3:Object; _local3 = new Object(); _local3.upLeft = new Point((_arg1 - this.halfWidth), (_arg2 - this.halfHeight)); _local3.upRight = new Point((_arg1 + this.halfWidth), (_arg2 - this.halfHeight)); _local3.downLeft = new Point((_arg1 - this.halfWidth), (_arg2 + this.halfHeight)); _local3.downRight = new Point((_arg1 + this.halfWidth), (_arg2 + this.halfHeight)); return (_local3); } public function willCollide(_arg1:Number, _arg2:Number, _arg3:GameObject):Boolean{ return (false); } public function isCollided(_arg1:GameObject):Boolean{ return (false); } public function updatePhysics():void{ var _local1:Number; var _local2:Number; this.vx = (this.vx + ax); this.vy = (this.vy + ay); _local1 = (this.x + this.vx); _local2 = (this.y + this.vy); } public function getCorners(_arg1:Number, _arg2:Number):Object{ var _local3:Object; _local3 = new Object(); _local3.downY = Math.floor((((_arg2 + this.halfHeight) - 1) / BoltGame.tileHeight)); _local3.upY = Math.floor(((_arg2 - this.halfHeight) / BoltGame.tileHeight)); _local3.leftX = Math.floor(((_arg1 - this.halfWidth) / BoltGame.tileWidth)); _local3.rightX = Math.floor((((_arg1 + this.halfWidth) - 1) / BoltGame.tileWidth)); _local3.upLeft = BoltGame.world.tileMap.map[_local3.upY][_local3.leftX]; _local3.upRight = BoltGame.world.tileMap.map[_local3.upY][_local3.rightX]; _local3.downLeft = BoltGame.world.tileMap.map[_local3.downY][_local3.leftX]; _local3.downRight = BoltGame.world.tileMap.map[_local3.downY][_local3.rightX]; return (_local3); } public function update():void{ this.updatePhysics(); } } }//package
Section 43
//Keyboard (Keyboard) package { import flash.events.*; import flash.display.*; public class Keyboard { private static var initialized:Boolean = false; private static var keysDown:Object = new Object(); public function initialize(_arg1:Stage){ if (!initialized){ _arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPressed); _arg1.addEventListener(KeyboardEvent.KEY_UP, keyReleased); _arg1.addEventListener(Event.DEACTIVATE, clearKeys); initialized = true; }; } public function update():void{ var _local1:Boolean; var _local2:Boolean; var _local3:Boolean; var _local4:Boolean; var _local5:Boolean; var _local6:Boolean; var _local7:Boolean; var _local8:Boolean; _local1 = ((Keyboard.isDown(37)) || (Keyboard.isDown(65))); _local2 = ((Keyboard.isDown(39)) || (Keyboard.isDown(68))); _local3 = ((Keyboard.isDown(32)) || (Keyboard.isDown(88))); _local4 = ((Keyboard.isDown(38)) || (Keyboard.isDown(87))); _local5 = ((Keyboard.isDown(40)) || (Keyboard.isDown(83))); _local6 = Keyboard.isDown(17); _local7 = Keyboard.isDown(90); _local8 = Keyboard.isDown(67); if (_local1){ BoltGame.objMgr.bolt.walkLeft(); } else { if (_local2){ BoltGame.objMgr.bolt.walkRight(); } else { if (_local4){ } else { if (_local5){ } else { BoltGame.objMgr.bolt.idle(); }; }; }; }; if (_local3){ BoltGame.objMgr.bolt.jump(); }; if (_local7){ BoltGame.objMgr.bolt.bite(); }; } private static function clearKeys(_arg1:Event):void{ keysDown = new Object(); } private static function keyPressed(_arg1:KeyboardEvent):void{ keysDown[_arg1.keyCode] = true; } private static function keyReleased(_arg1:KeyboardEvent):void{ if ((_arg1.keyCode in keysDown)){ delete keysDown[_arg1.keyCode]; }; if (_arg1.keyCode == 32){ } else { if ((((_arg1.keyCode == 80)) || ((_arg1.keyCode == 27)))){ BoltGame.world.pause(); } else { if ((_arg1.keyCode == 78)){ }; }; }; } public static function isDown(_arg1:uint):Boolean{ if (!initialized){ throw (new Error("Key class has yet been initialized.")); }; return (Boolean((_arg1 in keysDown))); } } }//package
Section 44
//Music_Background (Music_Background) package { import flash.media.*; public dynamic class Music_Background extends Sound { } }//package
Section 45
//ObjectManager (ObjectManager) package { import flash.display.*; import tilemap.*; import hero.*; import enemy.*; import collectibles.*; import environment.*; import flash.geom.*; public class ObjectManager extends Sprite { public var effects:Sprite; public var enemies:Sprite; public var mapOffsetX:Number;// = 2688 public var screenAnchorX:Number;// = 290 public var screenAnchorY:Number;// = 215 public var foreground:Sprite; public var bg:Sprite; public var allFloaters:Array; public var mapOffsetY:Number;// = 1984 public var tileGraphics:Sprite; public var collectibles:Sprite; public var floaters:Sprite; public var bolt:Bolt; public var savePoints:Array; public static var dot0; public static var dot1; public static var dot2; public static var dot3:Dot; public function ObjectManager():void{ mapOffsetX = 2688; mapOffsetY = 1984; screenAnchorX = 290; screenAnchorY = 215; super(); this.setupBg(); this.setupForeground(); this.setupEnemies(); this.setupBolt(); this.setupFloaters(); this.setupCollectibles(); this.setupEffects(); } public function setFloaters(_arg1:int):void{ this.foreground.removeChild(this.floaters); this.floaters = this.allFloaters[_arg1]; this.foreground.addChild(this.floaters); this.foreground.swapChildren(this.bolt, this.floaters); } public function setupFloaters():void{ this.allFloaters = new Array(4); this.floaters = new Sprite(); this.foreground.addChild(this.floaters); this.allFloaters[1] = new Sprite(); this.allFloaters[1].addChild(new FloatingPlatform((-1088 + this.mapOffsetX), (-1088 + this.mapOffsetY), "horizontal", 128, 4)); this.allFloaters[1].addChild(new FloatingPlatform((64 + this.mapOffsetX), (-1280 + this.mapOffsetY), "horizontal", 128, 4)); this.allFloaters[1].addChild(new FloatingPlatform((0x0300 + this.mapOffsetX), (-1536 + this.mapOffsetY), "horizontal", 128, 3)); this.allFloaters[1].addChild(new FloatingPlatform((576 + this.mapOffsetX), (-1600 + this.mapOffsetY), "horizontal", 128, 4)); this.allFloaters[1].addChild(new FloatingPlatform((384 + this.mapOffsetX), (-1664 + this.mapOffsetY), "horizontal", 128, 2)); this.allFloaters[1].addChild(new FloatingPlatform((1728 + this.mapOffsetX), (-1392 + this.mapOffsetY), "horizontal", 384, 2.5)); this.allFloaters[2] = new Sprite(); this.allFloaters[2].addChild(new FloatingPlatform((-2109 + this.mapOffsetX), (-896.2 + this.mapOffsetY), "horizontal", 64, 2)); this.allFloaters[2].addChild(new FloatingPlatform((-1344.8 + this.mapOffsetX), (-896.2 + this.mapOffsetY), "horizontal", 128, 2.3)); this.allFloaters[2].addChild(new FloatingPlatform((-1087.8 + this.mapOffsetX), (-896.2 + this.mapOffsetY), "horizontal", 128, 4)); this.allFloaters[2].addChild(new FloatingPlatform((-128.5 + this.mapOffsetX), (-926.1 + this.mapOffsetY), "horizontal", 128, 2)); this.allFloaters[2].addChild(new FloatingPlatform((128 + this.mapOffsetX), (-994.2 + this.mapOffsetY), "horizontal", 128, 3)); this.allFloaters[2].addChild(new FloatingPlatform((382.6 + this.mapOffsetX), (-945.2 + this.mapOffsetY), "horizontal", 192, 2)); this.allFloaters[2].addChild(new FloatingPlatform((2110.8 + this.mapOffsetX), (-1025.4 + this.mapOffsetY), "horizontal", 192, 2.5)); this.allFloaters[2].addChild(new FloatingPlatform((2368.3 + this.mapOffsetX), (-1089.5 + this.mapOffsetY), "horizontal", 192, 2.4)); this.allFloaters[2].addChild(new FloatingPlatform((2559.9 + this.mapOffsetX), (-1150.5 + this.mapOffsetY), "horizontal", 192, 2.7)); this.allFloaters[3] = new Sprite(); this.allFloaters[3].addChild(new FloatingPlatform((-1791 + this.mapOffsetX), (-3000 + this.mapOffsetY), "horizontal", 128, 4)); } public function setLevel(_arg1:int):void{ this.setFloaters(_arg1); this.setTiles(_arg1); this.bg.gotoAndStop(_arg1); this.bg.x = -300; this.bg.y = 0; if (_arg1 == 1){ this.bolt.x = 268; this.bolt.y = 1125; } else { if (_arg1 == 2){ this.bolt.x = 268; this.bolt.y = 1125; } else { if (_arg1 == 3){ this.bolt.x = 268; this.bolt.y = 1125; }; }; }; } public function addExplosion(_arg1:Number, _arg2:Number):void{ var _local3:MovieClip; _local3 = new Explosion(); this.effects.addChild(_local3); _local3.x = _arg1; _local3.y = _arg2; } public function setTiles(_arg1:int):void{ if (_arg1 == 1){ BoltGame.world.tileMap = new LevelMap1(); } else { if (_arg1 == 2){ BoltGame.world.tileMap = new LevelMap2(); } else { if (_arg1 == 3){ BoltGame.world.tileMap = new LevelMap3(); }; }; }; BoltGame.objMgr.addTileGraphics(BoltGame.world.tileMap); BoltGame.world.tileMap.generateMap(); } public function addTileGraphics(_arg1:Sprite):void{ if (this.tileGraphics != null){ this.foreground.removeChild(this.tileGraphics); }; if (this.enemies != null){ this.foreground.removeChild(this.enemies); this.enemies = new Sprite(); this.foreground.addChild(this.enemies); }; if (this.collectibles != null){ this.foreground.removeChild(this.collectibles); this.collectibles = new Sprite(); this.foreground.addChild(this.collectibles); }; this.tileGraphics = _arg1; this.foreground.addChild(tileGraphics); this.foreground.swapChildren(this.bolt, this.tileGraphics); } public function setupForeground():void{ this.foreground = new Sprite(); this.addChild(this.foreground); } public function setupBg():void{ this.bg = new Background(); this.addChild(bg); this.bg.stop(); this.bg.cacheAsBitmap = true; this.bg.y = 0; this.bg.x = (this.bg.x - 300); } public function setupCollectibles():void{ this.collectibles = new Sprite(); this.foreground.addChild(this.collectibles); } public function setupBolt():void{ this.bolt = new Bolt(); this.foreground.addChild(this.bolt); this.bolt.x = 500; this.bolt.y = 200; this.bolt.ay = BoltGame.gravity; } public function setupEffects():void{ this.effects = new Sprite(); this.addChild(this.effects); } public function update():void{ var _local1:int; var _local2:Enemy; var _local3:Floater; var _local4:Collectible; _local1 = this.enemies.numChildren; i = 0; while (i < _local1) { _local2 = this.enemies.getChildAt(i); if (_local2.visible){ _local2.update(); }; i++; }; _local1 = this.floaters.numChildren; i = 0; while (i < _local1) { _local3 = this.floaters.getChildAt(i); _local3.update(); i++; }; this.bolt.update(); this.updateScroll(); i = 0; while (i < this.collectibles.numChildren) { _local4 = this.collectibles.getChildAt(i); _local4.update(); i++; }; } public function respawnBolt():void{ var _local1:int; var _local2:int; var _local3:SavePoint; _local1 = this.savePoints.length; _local2 = (_local1 - 1); while (_local2 > -1) { _local3 = this.savePoints[_local2]; if (this.bolt.x > _local3.x){ this.bolt.x = _local3.x; this.bolt.y = _local3.y; break; }; _local2--; }; this.bolt.vy = 0; this.bolt.vx = 0; } public function setupEnemies():void{ this.enemies = new Sprite(); this.foreground.addChild(this.enemies); } public function updateScroll():void{ var _local1:Point; var _local2:Number; var _local3:Number; var _local4:Point; _local1 = new Point(this.bolt.x, this.bolt.y); _local1 = this.foreground.localToGlobal(_local1); _local2 = (_local1.x - this.screenAnchorX); _local3 = (_local1.y - this.screenAnchorY); _local4 = new Point(_local2, _local3); this.foreground.x = (this.foreground.x - _local2); this.foreground.y = (this.foreground.y - _local3); this.effects.x = (this.effects.x - _local2); this.effects.y = (this.effects.y - _local3); if (Math.abs(_local2) < 100){ this.bg.x = (this.bg.x - (_local2 / 4)); }; if (Math.abs(_local3) < 300){ this.bg.y = (this.bg.y - (_local3 / 10)); }; } } }//package
Section 46
//PlayerStats (PlayerStats) package { public class PlayerStats { public static var points:int = 0; public function PlayerStats():void{ } public static function init():void{ } public static function addPoints(_arg1:int):void{ var _local2:int; _local2 = (PlayerStats.points + _arg1); PlayerStats.setPoints(_local2); } public static function setPoints(_arg1:int):void{ PlayerStats.points = _arg1; BoltGame.world.hud.pointsText.text = _arg1; } public static function reset():void{ PlayerStats.setPoints(0); } } }//package
Section 47
//SavePoint (SavePoint) package { import flash.display.*; public dynamic class SavePoint extends MovieClip { } }//package
Section 48
//Sound_BoltComing (Sound_BoltComing) package { import flash.media.*; public dynamic class Sound_BoltComing extends Sound { } }//package
Section 49
//Sound_BoltHit (Sound_BoltHit) package { import flash.media.*; public dynamic class Sound_BoltHit extends Sound { } }//package
Section 50
//Sound_Coin (Sound_Coin) package { import flash.media.*; public dynamic class Sound_Coin extends Sound { } }//package
Section 51
//Sound_Explosion (Sound_Explosion) package { import flash.media.*; public dynamic class Sound_Explosion extends Sound { } }//package
Section 52
//Sound_GruntDie (Sound_GruntDie) package { import flash.media.*; public dynamic class Sound_GruntDie extends Sound { } }//package
Section 53
//Sound_GruntHit (Sound_GruntHit) package { import flash.media.*; public dynamic class Sound_GruntHit extends Sound { } }//package
Section 54
//Sound_GruntWhoosh (Sound_GruntWhoosh) package { import flash.media.*; public dynamic class Sound_GruntWhoosh extends Sound { } }//package
Section 55
//Sound_Jump (Sound_Jump) package { import flash.media.*; public dynamic class Sound_Jump extends Sound { } }//package
Section 56
//Sound_Mittens (Sound_Mittens) package { import flash.media.*; public dynamic class Sound_Mittens extends Sound { } }//package
Section 57
//Sound_Rhino (Sound_Rhino) package { import flash.media.*; public dynamic class Sound_Rhino extends Sound { } }//package
Section 58
//Sound_Rocket (Sound_Rocket) package { import flash.media.*; public dynamic class Sound_Rocket extends Sound { } }//package
Section 59
//Sound_StarMissing (Sound_StarMissing) package { import flash.media.*; public dynamic class Sound_StarMissing extends Sound { } }//package
Section 60
//Sound_Whoosh (Sound_Whoosh) package { import flash.media.*; public dynamic class Sound_Whoosh extends Sound { } }//package
Section 61
//SoundManager (SoundManager) package { import flash.events.*; import flash.utils.*; import flash.media.*; public class SoundManager { static var bgMusic:Sound; public static var soundStatus:Boolean = true; static var bgMusicChannel:SoundChannel; static var bgMusicPosition:int = 0; public static var musicStatus:Boolean = true; public function SoundManager():void{ } public static function loadSounds():void{ SoundManager.bgMusic = new Music_Background(); } public static function loopBackgroundMusic(_arg1:Event):void{ if (SoundManager.bgMusicChannel != null){ SoundManager.bgMusicChannel.removeEventListener(Event.SOUND_COMPLETE, loopBackgroundMusic); SoundManager.startBackgroundMusic(); }; } public static function startBackgroundMusic():void{ if (SoundManager.musicStatus){ SoundManager.bgMusicPosition = 0; SoundManager.playBackgroundMusic(0); if (SoundManager.bgMusicChannel != null){ SoundManager.bgMusicChannel.addEventListener(Event.SOUND_COMPLETE, loopBackgroundMusic); }; }; } public static function resumeBackgroundMusic():void{ if (SoundManager.musicStatus){ SoundManager.playBackgroundMusic(SoundManager.bgMusicPosition); if (SoundManager.bgMusicChannel != null){ SoundManager.bgMusicChannel.addEventListener(Event.SOUND_COMPLETE, loopBackgroundMusic); }; }; } public static function playBackgroundMusic(_arg1:uint):void{ var _local2:SoundTransform; SoundManager.bgMusicChannel = SoundManager.bgMusic.play(_arg1); if (SoundManager.bgMusicChannel != null){ _local2 = SoundManager.bgMusicChannel.soundTransform; _local2.volume = 0.3; SoundManager.bgMusicChannel.soundTransform = _local2; }; } public static function stopBackgroundMusic():void{ if (SoundManager.bgMusicChannel != null){ SoundManager.bgMusicPosition = SoundManager.bgMusicChannel.position; SoundManager.bgMusicChannel.stop(); SoundManager.bgMusicChannel.removeEventListener(Event.SOUND_COMPLETE, loopBackgroundMusic); }; } public static function playSound(_arg1:String):void{ var _local2:Class; var _local3:Sound; var _local4:SoundChannel; if (SoundManager.soundStatus){ _local2 = Class(getDefinitionByName(_arg1)); _local3 = new (_local2); _local4 = _local3.play(); }; } } }//package
Section 62
//Util (Util) package { public class Util { public function Util():void{ } public static function getAngleTo(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{ var _local5:*; var _local6:*; var _local7:*; var _local8:*; var _local9:*; var _local10:*; var _local11:Number; _local5 = _arg1; _local6 = _arg2; _local7 = (_arg3 - _local5); _local8 = (_arg4 - _local6); _local10 = Math.atan2(_local8, _local7); return (_local10); } public static function random(_arg1:Number, _arg2:Number):Number{ return ((_arg1 + ((_arg2 - _arg1) * Math.random()))); } public static function normalizeAngle(_arg1:Number):Number{ if (_arg1 < 0){ return ((180 - _arg1)); }; return (_arg1); } public static function isWithinRange(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Boolean{ var _local6:Number; _local6 = (Math.pow((_arg1 - _arg3), 2) + Math.pow((_arg2 - _arg4), 2)); if (_local6 <= Math.pow(_arg5, 2)){ return (true); }; return (false); } } }//package

Library Items

Symbol 1 Sound {Sound_StarMissing}
Symbol 2 Sound {Sound_Rocket}
Symbol 3 Sound {Sound_Rhino}
Symbol 4 Sound {Sound_Whoosh}
Symbol 5 Sound {Sound_Mittens}
Symbol 6 Sound {Sound_Jump}
Symbol 7 Sound {Sound_GruntHit}
Symbol 8 Sound {Sound_Explosion}
Symbol 9 Sound {Sound_GruntDie}
Symbol 10 Sound {Sound_BoltHit}
Symbol 11 Sound {Sound_Coin}
Symbol 12 Sound {Sound_GruntWhoosh}
Symbol 13 Sound {Sound_BoltComing}
Symbol 14 Sound {Music_Background}
Symbol 15 BitmapUsed by:16
Symbol 16 GraphicUses:15Used by:62
Symbol 17 GraphicUsed by:18 104
Symbol 18 MovieClipUses:17Used by:62
Symbol 19 BitmapUsed by:20
Symbol 20 GraphicUses:19Used by:62
Symbol 21 BitmapUsed by:22
Symbol 22 GraphicUses:21Used by:62
Symbol 23 BitmapUsed by:24
Symbol 24 GraphicUses:23Used by:62
Symbol 25 BitmapUsed by:26
Symbol 26 GraphicUses:25Used by:62
Symbol 27 BitmapUsed by:28
Symbol 28 GraphicUses:27Used by:62
Symbol 29 BitmapUsed by:30 42
Symbol 30 GraphicUses:29Used by:62
Symbol 31 BitmapUsed by:32
Symbol 32 GraphicUses:31Used by:62
Symbol 33 BitmapUsed by:34
Symbol 34 GraphicUses:33Used by:62
Symbol 35 BitmapUsed by:36
Symbol 36 GraphicUses:35Used by:62
Symbol 37 BitmapUsed by:38
Symbol 38 GraphicUses:37Used by:62
Symbol 39 BitmapUsed by:40 41
Symbol 40 GraphicUses:39Used by:62
Symbol 41 GraphicUses:39Used by:62
Symbol 42 GraphicUses:29Used by:62
Symbol 43 BitmapUsed by:44
Symbol 44 GraphicUses:43Used by:62
Symbol 45 BitmapUsed by:46
Symbol 46 GraphicUses:45Used by:62
Symbol 47 BitmapUsed by:48 51
Symbol 48 GraphicUses:47Used by:62
Symbol 49 BitmapUsed by:50
Symbol 50 GraphicUses:49Used by:62
Symbol 51 GraphicUses:47Used by:62
Symbol 52 BitmapUsed by:53
Symbol 53 GraphicUses:52Used by:62
Symbol 54 BitmapUsed by:55
Symbol 55 GraphicUses:54Used by:62
Symbol 56 BitmapUsed by:57
Symbol 57 GraphicUses:56Used by:62
Symbol 58 BitmapUsed by:59
Symbol 59 GraphicUses:58Used by:62
Symbol 60 BitmapUsed by:61
Symbol 61 GraphicUses:60Used by:62
Symbol 62 MovieClip {hero.Bolt}Uses:16 18 20 22 24 26 28 30 32 34 36 38 40 41 42 44 46 48 50 51 53 55 57 59 61
Symbol 63 BitmapUsed by:64
Symbol 64 GraphicUses:63Used by:71
Symbol 65 BitmapUsed by:66
Symbol 66 GraphicUses:65Used by:68
Symbol 67 GraphicUsed by:68 94
Symbol 68 MovieClip {BoltGame_fla.RetryButton_42}Uses:66 67Used by:71
Symbol 69 FontUsed by:70 78 95 250
Symbol 70 TextUses:69Used by:71
Symbol 71 MovieClip {gui.RetryScreen}Uses:64 68 70
Symbol 72 BitmapUsed by:73
Symbol 73 GraphicUses:72Used by:79
Symbol 74 BitmapUsed by:75
Symbol 75 GraphicUses:74Used by:77
Symbol 76 GraphicUsed by:77
Symbol 77 MovieClip {BoltGame_fla.ReplayButton_40}Uses:75 76Used by:79
Symbol 78 TextUses:69Used by:79
Symbol 79 MovieClip {gui.EndScreen}Uses:73 77 78
Symbol 80 BitmapUsed by:82
Symbol 81 BitmapUsed by:82
Symbol 82 GraphicUses:80 81Used by:89
Symbol 83 BitmapUsed by:84
Symbol 84 GraphicUses:83Used by:86
Symbol 85 GraphicUsed by:86
Symbol 86 MovieClip {BoltGame_fla.GoButton_35}Uses:84 85Used by:89 99
Symbol 87 FontUsed by:88
Symbol 88 TextUses:87Used by:89
Symbol 89 MovieClip {gui.NextLevelScreen}Uses:82 86 88
Symbol 90 BitmapUsed by:91
Symbol 91 GraphicUses:90Used by:96
Symbol 92 BitmapUsed by:93
Symbol 93 GraphicUses:92Used by:94
Symbol 94 MovieClip {BoltGame_fla.PlayButton_37}Uses:93 67Used by:96
Symbol 95 TextUses:69Used by:96 99
Symbol 96 MovieClip {gui.IntroScreen}Uses:91 94 95
Symbol 97 BitmapUsed by:98
Symbol 98 GraphicUses:97Used by:99
Symbol 99 MovieClip {gui.PauseScreen}Uses:98 86 95
Symbol 100 GraphicUsed by:101
Symbol 101 MovieClip {tiles.Air}Uses:100
Symbol 102 BitmapUsed by:103
Symbol 103 GraphicUses:102Used by:113
Symbol 104 MovieClipUses:17Used by:113 175 199
Symbol 105 BitmapUsed by:106
Symbol 106 GraphicUses:105Used by:113
Symbol 107 BitmapUsed by:108
Symbol 108 GraphicUses:107Used by:113
Symbol 109 BitmapUsed by:110
Symbol 110 GraphicUses:109Used by:113
Symbol 111 BitmapUsed by:112
Symbol 112 GraphicUses:111Used by:113
Symbol 113 MovieClip {enemy.Thrower}Uses:103 104 106 108 110 112
Symbol 114 BitmapUsed by:115
Symbol 115 GraphicUses:114Used by:116
Symbol 116 MovieClip {environment.FloatingPlatform}Uses:115
Symbol 117 GraphicUsed by:118
Symbol 118 MovieClip {Dot}Uses:117
Symbol 119 GraphicUsed by:120
Symbol 120 MovieClip {tiles.Impasse}Uses:119Used by:209 227 237
Symbol 121 GraphicUsed by:122
Symbol 122 MovieClipUses:121Used by:209 227 237
Symbol 123 BitmapUsed by:134
Symbol 124 BitmapUsed by:134
Symbol 125 BitmapUsed by:134
Symbol 126 BitmapUsed by:134
Symbol 127 BitmapUsed by:134
Symbol 128 BitmapUsed by:134
Symbol 129 BitmapUsed by:134
Symbol 130 BitmapUsed by:134
Symbol 131 BitmapUsed by:134
Symbol 132 BitmapUsed by:134 236
Symbol 133 BitmapUsed by:134
Symbol 134 GraphicUses:123 124 125 126 127 128 129 130 131 132 133Used by:209
Symbol 135 BitmapUsed by:136
Symbol 136 GraphicUses:135Used by:175
Symbol 137 BitmapUsed by:138
Symbol 138 GraphicUses:137Used by:175
Symbol 139 BitmapUsed by:140
Symbol 140 GraphicUses:139Used by:175
Symbol 141 BitmapUsed by:142
Symbol 142 GraphicUses:141Used by:175
Symbol 143 BitmapUsed by:144
Symbol 144 GraphicUses:143Used by:175
Symbol 145 BitmapUsed by:146
Symbol 146 GraphicUses:145Used by:175
Symbol 147 BitmapUsed by:148
Symbol 148 GraphicUses:147Used by:175
Symbol 149 BitmapUsed by:150
Symbol 150 GraphicUses:149Used by:175
Symbol 151 BitmapUsed by:152
Symbol 152 GraphicUses:151Used by:175
Symbol 153 BitmapUsed by:154
Symbol 154 GraphicUses:153Used by:175
Symbol 155 BitmapUsed by:156
Symbol 156 GraphicUses:155Used by:175
Symbol 157 BitmapUsed by:158
Symbol 158 GraphicUses:157Used by:175
Symbol 159 BitmapUsed by:160
Symbol 160 GraphicUses:159Used by:175
Symbol 161 BitmapUsed by:162
Symbol 162 GraphicUses:161Used by:175
Symbol 163 BitmapUsed by:164
Symbol 164 GraphicUses:163Used by:175
Symbol 165 BitmapUsed by:166
Symbol 166 GraphicUses:165Used by:175
Symbol 167 BitmapUsed by:168
Symbol 168 GraphicUses:167Used by:175
Symbol 169 BitmapUsed by:170
Symbol 170 GraphicUses:169Used by:175
Symbol 171 BitmapUsed by:172
Symbol 172 GraphicUses:171Used by:175
Symbol 173 BitmapUsed by:174
Symbol 174 GraphicUses:173Used by:175
Symbol 175 MovieClip {enemy.Grunt}Uses:136 104 138 140 142 144 146 148 150 152 154 156 158 160 162 164 166 168 170 172 174Used by:209 227 237
Symbol 176 BitmapUsed by:177 183 185
Symbol 177 GraphicUses:176Used by:188 199
Symbol 178 BitmapUsed by:179
Symbol 179 GraphicUses:178Used by:188 199
Symbol 180 BitmapUsed by:181
Symbol 181 GraphicUses:180Used by:188 199
Symbol 182 BitmapUsed by:183 243
Symbol 183 GraphicUses:182 176Used by:199
Symbol 184 BitmapUsed by:185 244
Symbol 185 GraphicUses:184 176Used by:199
Symbol 186 BitmapUsed by:187
Symbol 187 GraphicUses:186Used by:199 247
Symbol 188 MovieClipUses:177 179 181Used by:199
Symbol 189 BitmapUsed by:190
Symbol 190 GraphicUses:189Used by:191
Symbol 191 MovieClipUses:190Used by:199
Symbol 192 BitmapUsed by:193
Symbol 193 GraphicUses:192Used by:198
Symbol 194 BitmapUsed by:195
Symbol 195 GraphicUses:194Used by:198
Symbol 196 BitmapUsed by:197
Symbol 197 GraphicUses:196Used by:198
Symbol 198 MovieClipUses:193 195 197Used by:199
Symbol 199 MovieClip {enemy.Helicopter}Uses:177 104 179 181 183 185 187 188 191 198Used by:209 227
Symbol 200 GraphicUsed by:201
Symbol 201 MovieClip {collectibles.Exit}Uses:200Used by:209 227 237
Symbol 202 BitmapUsed by:203
Symbol 203 GraphicUses:202Used by:204
Symbol 204 MovieClip {collectibles.Coin}Uses:203Used by:209 227 237
Symbol 205 BitmapUsed by:206
Symbol 206 GraphicUses:205Used by:209
Symbol 207 GraphicUsed by:208
Symbol 208 MovieClip {SavePoint}Uses:207Used by:209 227 237
Symbol 209 MovieClip {tilemap.LevelMap3}Uses:120 122 134 175 199 201 204 206 208
Symbol 210 GraphicUsed by:211
Symbol 211 MovieClip {tiles.Death}Uses:210Used by:227 237
Symbol 212 BitmapUsed by:219 236
Symbol 213 BitmapUsed by:219 236
Symbol 214 BitmapUsed by:219 236
Symbol 215 BitmapUsed by:219 236
Symbol 216 BitmapUsed by:219 236
Symbol 217 BitmapUsed by:219 236
Symbol 218 BitmapUsed by:219 236
Symbol 219 GraphicUses:212 213 214 215 216 217 218Used by:227
Symbol 220 GraphicUsed by:221
Symbol 221 MovieClip {FloatingMarker}Uses:220Used by:227 237
Symbol 222 BitmapUsed by:226 236
Symbol 223 BitmapUsed by:226 236
Symbol 224 BitmapUsed by:226 236
Symbol 225 BitmapUsed by:226 236
Symbol 226 GraphicUses:222 223 224 225Used by:227
Symbol 227 MovieClip {tilemap.LevelMap2}Uses:120 211 122 219 221 199 175 208 226 201 204
Symbol 228 BitmapUsed by:236
Symbol 229 BitmapUsed by:236
Symbol 230 BitmapUsed by:236
Symbol 231 BitmapUsed by:236
Symbol 232 BitmapUsed by:236
Symbol 233 BitmapUsed by:236
Symbol 234 BitmapUsed by:236
Symbol 235 BitmapUsed by:236
Symbol 236 GraphicUses:222 224 223 225 228 229 230 213 132 214 216 215 231 217 232 233 218 212 234 235Used by:237
Symbol 237 MovieClip {tilemap.LevelMap1}Uses:122 120 211 236 221 175 208 204 201
Symbol 238 BitmapUsed by:239
Symbol 239 GraphicUses:238Used by:242
Symbol 240 BitmapUsed by:241
Symbol 241 GraphicUses:240Used by:242
Symbol 242 MovieClip {Background}Uses:239 241
Symbol 243 GraphicUses:182Used by:247
Symbol 244 GraphicUses:184Used by:247
Symbol 245 BitmapUsed by:246
Symbol 246 GraphicUses:245Used by:247
Symbol 247 MovieClip {Explosion}Uses:243 244 187 246
Symbol 248 BitmapUsed by:249
Symbol 249 GraphicUses:248Used by:271
Symbol 250 EditableTextUses:69Used by:271
Symbol 251 GraphicUsed by:252
Symbol 252 MovieClipUses:251Used by:255
Symbol 253 BitmapUsed by:254
Symbol 254 GraphicUses:253Used by:255
Symbol 255 MovieClip {BoltGame_fla.HealthBar_2}Uses:252 254Used by:271
Symbol 256 BitmapUsed by:257
Symbol 257 GraphicUses:256Used by:258 260
Symbol 258 MovieClipUses:257Used by:259
Symbol 259 MovieClipUses:258Used by:262
Symbol 260 MovieClipUses:257Used by:262
Symbol 261 GraphicUsed by:262 267 270
Symbol 262 MovieClip {BoltGame_fla.SoundButton_4}Uses:259 260 261Used by:271
Symbol 263 BitmapUsed by:264
Symbol 264 GraphicUses:263Used by:265 266
Symbol 265 MovieClipUses:264Used by:267
Symbol 266 MovieClipUses:264Used by:267
Symbol 267 MovieClip {BoltGame_fla.MusicButton_8}Uses:265 266 261Used by:271
Symbol 268 BitmapUsed by:269
Symbol 269 GraphicUses:268Used by:270
Symbol 270 MovieClip {BoltGame_fla.PauseButton_11}Uses:269 261Used by:271
Symbol 271 MovieClip {gui.HUD}Uses:249 250 255 262 267 270

Instance Names

"hitBox"Symbol 62 MovieClip {hero.Bolt} Frame 1Symbol 18 MovieClip
"retryButton"Symbol 71 MovieClip {gui.RetryScreen} Frame 1Symbol 68 MovieClip {BoltGame_fla.RetryButton_42}
"replayButton"Symbol 79 MovieClip {gui.EndScreen} Frame 1Symbol 77 MovieClip {BoltGame_fla.ReplayButton_40}
"nextButton"Symbol 89 MovieClip {gui.NextLevelScreen} Frame 1Symbol 86 MovieClip {BoltGame_fla.GoButton_35}
"startButton"Symbol 96 MovieClip {gui.IntroScreen} Frame 1Symbol 94 MovieClip {BoltGame_fla.PlayButton_37}
"resumeButton"Symbol 99 MovieClip {gui.PauseScreen} Frame 1Symbol 86 MovieClip {BoltGame_fla.GoButton_35}
"hitBox"Symbol 113 MovieClip {enemy.Thrower} Frame 1Symbol 104 MovieClip
"hitBox"Symbol 175 MovieClip {enemy.Grunt} Frame 1Symbol 104 MovieClip
"hitBox"Symbol 199 MovieClip {enemy.Helicopter} Frame 1Symbol 104 MovieClip
"barMask"Symbol 255 MovieClip {BoltGame_fla.HealthBar_2} Frame 1Symbol 252 MovieClip
"statusOff"Symbol 262 MovieClip {BoltGame_fla.SoundButton_4} Frame 1Symbol 259 MovieClip
"statusOn"Symbol 262 MovieClip {BoltGame_fla.SoundButton_4} Frame 1Symbol 260 MovieClip
"statusOn"Symbol 267 MovieClip {BoltGame_fla.MusicButton_8} Frame 1Symbol 265 MovieClip
"statusOff"Symbol 267 MovieClip {BoltGame_fla.MusicButton_8} Frame 1Symbol 266 MovieClip
"pointsText"Symbol 271 MovieClip {gui.HUD} Frame 1Symbol 250 EditableText
"healthBar"Symbol 271 MovieClip {gui.HUD} Frame 1Symbol 255 MovieClip {BoltGame_fla.HealthBar_2}
"soundButton"Symbol 271 MovieClip {gui.HUD} Frame 1Symbol 262 MovieClip {BoltGame_fla.SoundButton_4}
"musicButton"Symbol 271 MovieClip {gui.HUD} Frame 1Symbol 267 MovieClip {BoltGame_fla.MusicButton_8}
"pauseButton"Symbol 271 MovieClip {gui.HUD} Frame 1Symbol 270 MovieClip {BoltGame_fla.PauseButton_11}

Special Tags

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

Labels

"idle"Symbol 62 MovieClip {hero.Bolt} Frame 1
"walk"Symbol 62 MovieClip {hero.Bolt} Frame 20
"jump"Symbol 62 MovieClip {hero.Bolt} Frame 33
"bite"Symbol 62 MovieClip {hero.Bolt} Frame 47
"get_hit"Symbol 62 MovieClip {hero.Bolt} Frame 60
"die"Symbol 62 MovieClip {hero.Bolt} Frame 68
"up"Symbol 68 MovieClip {BoltGame_fla.RetryButton_42} Frame 1
"over"Symbol 68 MovieClip {BoltGame_fla.RetryButton_42} Frame 6
"up"Symbol 77 MovieClip {BoltGame_fla.ReplayButton_40} Frame 1
"over"Symbol 77 MovieClip {BoltGame_fla.ReplayButton_40} Frame 6
"up"Symbol 86 MovieClip {BoltGame_fla.GoButton_35} Frame 1
"over"Symbol 86 MovieClip {BoltGame_fla.GoButton_35} Frame 6
"up"Symbol 94 MovieClip {BoltGame_fla.PlayButton_37} Frame 1
"over"Symbol 94 MovieClip {BoltGame_fla.PlayButton_37} Frame 6
"idle"Symbol 113 MovieClip {enemy.Thrower} Frame 1
"walk"Symbol 113 MovieClip {enemy.Thrower} Frame 6
"get_hit"Symbol 113 MovieClip {enemy.Thrower} Frame 22
"die"Symbol 113 MovieClip {enemy.Thrower} Frame 27
"attack"Symbol 113 MovieClip {enemy.Thrower} Frame 32
"idle"Symbol 175 MovieClip {enemy.Grunt} Frame 1
"walk"Symbol 175 MovieClip {enemy.Grunt} Frame 14
"get_hit"Symbol 175 MovieClip {enemy.Grunt} Frame 27
"die"Symbol 175 MovieClip {enemy.Grunt} Frame 36
"attack"Symbol 175 MovieClip {enemy.Grunt} Frame 66
"idle"Symbol 188 MovieClip Frame 1
"idle"Symbol 199 MovieClip {enemy.Helicopter} Frame 1
"die"Symbol 199 MovieClip {enemy.Helicopter} Frame 8
"attack"Symbol 199 MovieClip {enemy.Helicopter} Frame 13
"idle"Symbol 204 MovieClip {collectibles.Coin} Frame 1
"collected"Symbol 204 MovieClip {collectibles.Coin} Frame 5
"up"Symbol 262 MovieClip {BoltGame_fla.SoundButton_4} Frame 1
"over"Symbol 262 MovieClip {BoltGame_fla.SoundButton_4} Frame 6
"up"Symbol 267 MovieClip {BoltGame_fla.MusicButton_8} Frame 1
"over"Symbol 267 MovieClip {BoltGame_fla.MusicButton_8} Frame 6
"up"Symbol 270 MovieClip {BoltGame_fla.PauseButton_11} Frame 1
"over"Symbol 270 MovieClip {BoltGame_fla.PauseButton_11} Frame 6




http://swfchan.com/23/114142/info.shtml
Created: 11/3 -2019 00:55:18 Last modified: 11/3 -2019 00:55:18 Server time: 02/05 -2024 06:51:52