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

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

CounterTerror.swf

This is the info page for
Flash #135223

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


Text
SCORE

AREA

ARMOR

0

0

0

- DEMO -

You have x plays left

Register

Play Now

PAUSED

Submit

Name

Score

1

2

3

4

5

10

9

8

7

6

High Scores

Enter Your Name

Your Score

Well done!
You achieved a new High Score!!

ActionScript [AS3]

Section 1
//MainTimeline (CounterTerror_fla.MainTimeline) package CounterTerror_fla { import flash.display.*; import deflogic.engine.*; public dynamic class MainTimeline extends MovieClip { public function MainTimeline(){ addFrameScript(0, frame1, 2, frame3); } function frame3(){ AbstractGame.Root.startGame(); } function frame1(){ this.addChild(new CounterTerror()); AbstractGame.Root.preload(); } } }//package CounterTerror_fla
Section 2
//soundDummy_12 (CounterTerror_fla.soundDummy_12) package CounterTerror_fla { import flash.display.*; public dynamic class soundDummy_12 extends MovieClip { public function soundDummy_12(){ addFrameScript(0, frame1); } function frame1(){ stop(); } } }//package CounterTerror_fla
Section 3
//BasicScoreboard (deflogic.engine.score.BasicScoreboard) package deflogic.engine.score { import flash.events.*; import deflogic.engine.utility.*; public class BasicScoreboard extends EventDispatcher { private var activeScreen:int; private var scoreboardScreen:ScoreboardScreen; protected var scores:Array; protected var max:int; private var enterScoreScreen:EnterScoreScreen; private var isVisible:Boolean; protected var url:String; protected var game_name:String; public static const ENTER_SCORE_SCREEN:int = 1; public static const SCORE_SUBMITTED:String = "score_sent"; public static const SCOREBOARD_SCREEN:int = 0; public function BasicScoreboard(){ this.game_name = "highscores"; this.scores = [["", 0], ["", 0], ["", 0], ["", 0], ["", 0], ["", 0], ["", 0], ["", 0], ["", 0], ["", 0]]; this.activeScreen = SCOREBOARD_SCREEN; this.isVisible = false; } public function applyDefaultScores(_arg1:Array):void{ this.scores = _arg1; } public function showScores():void{ scoreboardScreen.writeScores(this.scores); } public function showError(_arg1:String):void{ scoreboardScreen.writeError(_arg1); } public function updateVisibility():void{ if (this.isVisible){ switch (this.activeScreen){ case SCOREBOARD_SCREEN: scoreboardScreen.visible = true; enterScoreScreen.visible = false; break; case ENTER_SCORE_SCREEN: scoreboardScreen.visible = false; enterScoreScreen.visible = true; break; }; } else { scoreboardScreen.visible = false; enterScoreScreen.visible = false; }; } public function changeToScoreboardScreen():void{ this.activeScreen = SCOREBOARD_SCREEN; updateVisibility(); } public function get gameName():String{ return (this.game_name); } public function dispose():void{ scoreboardScreen = null; enterScoreScreen = null; } public function changeToEnterScoreScreen(_arg1:int):void{ this.activeScreen = ENTER_SCORE_SCREEN; enterScoreScreen.initEnter(_arg1); updateVisibility(); enterScoreScreen.stage.focus = enterScoreScreen.txtName; } public function registerScreens(_arg1:ScoreboardScreen, _arg2:EnterScoreScreen):void{ this.scoreboardScreen = _arg1; this.enterScoreScreen = _arg2; this.enterScoreScreen.applyScoreboard(this); this.max = _arg1.totalScores; } public function set submitURL(_arg1:String):void{ this.url = _arg1; } public function get visible():Boolean{ return (this.isVisible); } public function insertScoreButtonClick(_arg1:String, _arg2:int):void{ var _local3:String; _local3 = Utility.trim(_arg1); this.insert(_local3, _arg2); dispatchEvent(new Event(BasicScoreboard.SCORE_SUBMITTED)); } public function redisplay():void{ showScores(); } public function get submitURL():String{ return (this.url); } public function insert(_arg1:String, _arg2:int):Boolean{ var _local3:int; if (isHighScore(_arg2)){ _local3 = (this.max - 1); while (_local3 >= 0) { if (this.scores[_local3][1] >= _arg2){ _local3++; break; }; _local3--; }; if (_local3 == -1){ _local3 = 0; }; this.scores.splice(_local3, 0, new Array(_arg1, _arg2)); this.scores.length--; return (true); }; return (false); } public function set gameName(_arg1:String):void{ this.game_name = _arg1; } public function set visible(_arg1:Boolean):void{ this.isVisible = _arg1; updateVisibility(); } public function initialise():void{ } public function isHighScore(_arg1:int):Boolean{ return ((_arg1 > this.scores[(this.max - 1)][1])); } } }//package deflogic.engine.score
Section 4
//EnterScoreScreen (deflogic.engine.score.EnterScoreScreen) package deflogic.engine.score { import flash.events.*; import flash.display.*; import flash.text.*; import flash.ui.*; public class EnterScoreScreen extends MovieClip { public var txtScore:TextField; public var txtName:TextField; public var bnSubmit:SimpleButton; private var score:int; private var scoreboard:BasicScoreboard; public function EnterScoreScreen(){ this.score = 0; this.bnSubmit.addEventListener(MouseEvent.CLICK, onMouseSubmitPressed, false, 0, true); this.addEventListener(KeyboardEvent.KEY_UP, onKeySubmitPressed, false, 0, true); } public function submit():void{ this.scoreboard.insertScoreButtonClick(this.txtName.text, this.score); } public function onMouseSubmitPressed(_arg1:MouseEvent):void{ submit(); } public function initEnter(_arg1:int):void{ this.txtScore.text = _arg1.toString(); this.score = _arg1; } public function applyScoreboard(_arg1:BasicScoreboard){ this.scoreboard = _arg1; } public function onKeySubmitPressed(_arg1:KeyboardEvent):void{ if (_arg1.keyCode == Keyboard.ENTER){ submit(); }; } } }//package deflogic.engine.score
Section 5
//MochiAdsScoreboard (deflogic.engine.score.MochiAdsScoreboard) package deflogic.engine.score { import deflogic.engine.*; import deflogic.engine.utility.*; public class MochiAdsScoreboard extends BasicScoreboard { public function gotScores(_arg1:Array, _arg2:int=-1):void{ var _local3:int; var _local4:int; var _local5:Array; var _local6:String; var _local7:String; _local3 = Math.min(this.max, _arg1.length); _local4 = 0; while (_local4 < _local3) { _local5 = _arg1[_local4]; _local6 = _local5[0]; _local7 = Utility.commafy(_local5[1].toString()); this.scores[_local4][0] = _local6; this.scores[_local4][1] = _local5[1]; _local4++; }; while (_local4 < this.max) { this.scores[_local4][0] = "Your name here"; this.scores[_local4][1] = 0; _local4++; }; showScores(); } override public function redisplay():void{ var _local1:Boolean; _local1 = MochiAd.fetchHighScores({clip:AbstractGame.Root.mochiAdsClip, id:AbstractGame.Root.mochiAdsId}, this, "gotScores"); if (!_local1){ showError("Sorry, you need to be online for HighScores."); }; } override public function insert(_arg1:String, _arg2:int):Boolean{ var _local3:Boolean; _local3 = super.insert(_arg1, _arg2); if (_local3){ MochiAd.sendHighScore({clip:AbstractGame.Root.mochiAdsClip, id:AbstractGame.Root.mochiAdsId, name:_arg1, score:_arg2}, this, "gotScores"); showScores(); }; return (_local3); } } }//package deflogic.engine.score
Section 6
//ScoreboardScreen (deflogic.engine.score.ScoreboardScreen) package deflogic.engine.score { import flash.display.*; import flash.text.*; import deflogic.engine.utility.*; public class ScoreboardScreen extends MovieClip { private var allScores:Array; public var txtWarning:TextField; private var allNames:Array; private var max:int; public var txtScore2:TextField; public var txtScore3:TextField; public var txtName0:TextField; public var txtName1:TextField; public var txtName2:TextField; public var txtName6:TextField; public var txtName7:TextField; public var txtName3:TextField; public var txtScore6:TextField; public var txtName8:TextField; public var txtScore1:TextField; public var txtScore4:TextField; public var txtScore0:TextField; public var txtName4:TextField; public var txtScore5:TextField; public var txtScore7:TextField; public var txtScore8:TextField; public var txtScore9:TextField; public var txtName5:TextField; public var txtName9:TextField; public function ScoreboardScreen(){ this.allNames = [txtName0, txtName1, txtName2, txtName3, txtName4, txtName5, txtName6, txtName7, txtName8, txtName9]; this.allScores = [txtScore0, txtScore1, txtScore2, txtScore3, txtScore4, txtScore5, txtScore6, txtScore7, txtScore8, txtScore9]; this.max = 10; } public function writeError(_arg1:String):void{ this.txtWarning.text = _arg1; } public function get totalScores():int{ return (max); } public function writeScores(_arg1:Array):void{ var _local2:int; _local2 = 0; while (_local2 < this.max) { this.allNames[_local2].text = _arg1[_local2][0]; this.allScores[_local2].text = Utility.commafy(_arg1[_local2][1].toString()); _local2++; }; } } }//package deflogic.engine.score
Section 7
//AnimatedBitmapSprite (deflogic.engine.sprite.AnimatedBitmapSprite) package deflogic.engine.sprite { import flash.display.*; import deflogic.engine.*; import deflogic.engine.utility.*; import flash.geom.*; public class AnimatedBitmapSprite extends StaticBitmapSprite { public var animsStart:int; public var animRepeat:int; public var fbd:Array; public var frameWidth:int; public var frame:int; public var animPos:int; public var countRepeat:int; public var isFBD:Boolean; public var animTimer:int; public var animDir:int; public var animSpeed:int; private var maskRect:Rectangle; public var animsEnd:int; public var frameHeight:int; public static const BACKWARD:int = -1; public static const FORWARD:int = 1; public function AnimatedBitmapSprite(){ this.animDir = FORWARD; this.countRepeat = 0; this.animSpeed = 0; this.animTimer = 0; this.animPos = 0; this.animRepeat = -1; this.animsEnd = 0; this.animsStart = 0; this.frame = 0; this.frameWidth = 0; this.frameHeight = 0; this.fbd = null; this.isFBD = false; } public function setAnimationSpeed(_arg1:int):void{ this.countRepeat = 0; this.animSpeed = _arg1; this.animTimer = _arg1; super.notifyUpdating(); } public function setFrame(_arg1:int):void{ this.animPos = this.animsStart; this.animRepeat = -1; this.animTimer = this.animSpeed; this.frame = _arg1; this.setSourcePosition(this.frame, this.animPos); super.notifyUpdating(); } override public function setSpeedDir(_arg1:Number, _arg2:Number, _arg3:Number):void{ super.setSpeedDir(_arg1, _arg2, _arg3); if (this.isFBD){ this.xyDegrees = Math.round((360 * ((Math.atan2(-(_arg2), _arg3) + Math.PI) * SpecialMath.TwoPiOverOne))); if (this.frame != this.fbd[this.xyDegrees]){ this.setFrame(this.fbd[this.xyDegrees]); }; }; } public function setAnimation(_arg1:int):void{ if (_arg1 > this.animsEnd){ this.animPos = this.animsEnd; } else { if (_arg1 < this.animsStart){ this.animPos = this.animsStart; } else { this.animPos = _arg1; }; }; this.setSourcePosition(this.frame, this.animPos); } public function setSourcePosition(_arg1:int, _arg2:int):void{ this.maskRect.x = (_arg1 * this.frameWidth); this.maskRect.y = (_arg2 * this.frameHeight); this.movieClip.scrollRect = this.maskRect; } public function setAnimationRepeat(_arg1:int):void{ if (_arg1 < -1){ this.animRepeat = -1; } else { this.animRepeat = _arg1; }; this.countRepeat = 0; super.notifyUpdating(); } public function setImageStrip(_arg1:String, _arg2:int, _arg3:Number, _arg4:Number, _arg5:int, _arg6:int, _arg7:Boolean=false):void{ var _local8:BitmapData; var _local9:Sprite; this.targetWidth = (this.frameWidth = _arg3); this.targetHeight = (this.frameHeight = _arg4); this.animsEnd = _arg6; this.animsStart = 0; this.z = _arg2; _local8 = AbstractGame.Root.Images.getImage(_arg1); if (_arg7){ _local9 = new Sprite(); _local9.graphics.beginBitmapFill(_local8); _local9.graphics.drawRect(0, 0, _local8.width, _local8.height); _local9.graphics.endFill(); this.movieClip = _local9; } else { this.movieClip = new Bitmap(_local8); }; this.maskRect = new Rectangle(0, 0, this.frameWidth, this.frameHeight); this.movieClip.scrollRect = this.maskRect; this.movieClip.visible = false; AbstractGame.Root.insertMovieClip(this.movieClip, _arg2); if (this.frameWidth != (this.movieClip.width / _arg5)){ trace(("bad width:" + _arg1)); }; if (this.frameHeight != (this.movieClip.height / _arg6)){ trace(((((("bad height:" + _arg1) + " ") + this.movieClip.height) + "=") + (this.frameHeight * _arg6))); }; } override public function swapImage(_arg1:String):void{ var _local2:BitmapData; var _local3:Bitmap; var _local4:Sprite; if (this.movieClip == null){ trace("animatedBitmapSprite bad"); return; }; this.targetWidth = this.frameWidth; this.targetHeight = this.frameHeight; _local2 = AbstractGame.Root.Images.getImage(_arg1); _local3 = (this.movieClip as Bitmap); if (_local3 != null){ _local3.bitmapData = _local2; } else { _local4 = (this.movieClip as Sprite); _local4.graphics.clear(); _local4.graphics.beginBitmapFill(_local2); _local4.graphics.drawRect(0, 0, this.targetWidth, this.targetHeight); _local4.graphics.endFill(); }; this.movieClip.scrollRect = new Rectangle(0, 0, this.frameWidth, this.frameHeight); this.movieClip.visible = false; } override public function isUpdating():Boolean{ return (((this.isOn) && (((super.isUpdating()) || ((((this.animSpeed > 0)) && (!((this.countRepeat == this.animRepeat))))))))); } public function setFrameByDirection(... _args):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; var _local6:Number; _local6 = _args.length; if (Math.floor((_local6 * SpecialMath.OneOverThree)) != (_local6 * SpecialMath.OneOverThree)){ throw (new Error("setFrameByDirection: Called with wrong number of arguments")); }; if (!this.isFBD){ this.fbd = new Array(); _local4 = 0; while (_local4 < 360) { this.fbd[_local4] = -1; _local4++; }; this.isFBD = true; }; _local4 = 0; while (_local4 < _local6) { _local2 = Math.round(_args[_local4]); _local3 = Math.round((_args[(_local4 + 1)] + 1)); if (_local2 > 359){ _local2 = 359; } else { if (_local2 < 0){ _local2 = 0; }; }; if (_local3 > 360){ _local3 = 360; } else { if (_local3 < 0){ _local3 = 0; }; }; _local5 = _local2; while (_local5 < _local3) { this.fbd[_local5] = _args[(_local4 + 2)]; _local5++; }; _local4 = (_local4 + 3); }; } override public function update():void{ super.update(); if ((((((this.animSpeed > 0)) && (!((this.countRepeat == this.animRepeat))))) && ((--this.animTimer < 1)))){ this.animTimer = this.animSpeed; this.animPos = (this.animPos + this.animDir); if (this.animPos < 0){ this.animPos = (this.animsEnd - 1); if (this.animRepeat != -1){ this.countRepeat++; }; } else { if (this.animPos == this.animsEnd){ this.animPos = this.animsStart; if (this.animRepeat != -1){ this.countRepeat++; }; }; }; if (this.countRepeat != this.animRepeat){ this.setAnimation(this.animPos); }; }; } override public function setDir(_arg1:Number, _arg2:Number):void{ super.setDir(_arg1, _arg2); if (this.isFBD){ this.xyDegrees = Math.round((360 * ((Math.atan2(-(_arg1), _arg2) + Math.PI) * SpecialMath.TwoPiOverOne))); if (this.frame != this.fbd[this.xyDegrees]){ this.setFrame(this.fbd[this.xyDegrees]); }; }; } override public function setXYdegs(_arg1:Number):void{ _arg1 = (Math.floor(_arg1) % 360); while (_arg1 < 0) { _arg1 = (360 + _arg1); }; this.xyDegrees = _arg1; super.setDir(SpecialMath.sin[_arg1], SpecialMath.cos[_arg1]); if (((((this.isFBD) && ((this.fbd[_arg1] > -1)))) && (!((this.frame == this.fbd[_arg1]))))){ this.setFrame(this.fbd[_arg1]); }; } } }//package deflogic.engine.sprite
Section 8
//SimpleBitmapSprite (deflogic.engine.sprite.SimpleBitmapSprite) package deflogic.engine.sprite { import flash.display.*; import deflogic.engine.*; public class SimpleBitmapSprite { public var movieClip:DisplayObject; public var isOn:Boolean; public var targetWidth:Number; public var targetHeight:Number; public var y:Number; public var z:int; public var x:Number; public function SimpleBitmapSprite(){ this.movieClip = null; this.targetWidth = 0; this.targetHeight = 0; this.isOn = false; this.x = 0; this.y = 0; this.z = 0; } public function switchOn():void{ if (!this.isOn){ this.isOn = true; this.movieClip.visible = true; }; } public function setImage(_arg1:String, _arg2:int, _arg3:Boolean=false):void{ var _local4:BitmapData; var _local5:Sprite; _local4 = AbstractGame.Root.Images.getImage(_arg1); this.targetWidth = _local4.width; this.targetHeight = _local4.height; this.z = _arg2; if (_arg3){ _local5 = new Sprite(); _local5.graphics.beginBitmapFill(_local4); _local5.graphics.drawRect(0, 0, this.targetWidth, this.targetHeight); _local5.graphics.endFill(); this.movieClip = _local5; } else { this.movieClip = new Bitmap(_local4); }; this.movieClip.visible = false; AbstractGame.Root.insertMovieClip(this.movieClip, _arg2); } public function moveTo(_arg1:Number, _arg2:Number):void{ this.movieClip.x = Math.round(_arg1); this.movieClip.y = Math.round(_arg2); this.x = _arg1; this.y = _arg2; } public function swapImage(_arg1:String):void{ var _local2:BitmapData; var _local3:Bitmap; var _local4:Sprite; if (this.movieClip == null){ trace("Simple Bitmap: this should not happen"); this.setImage(_arg1, z); return; }; _local2 = AbstractGame.Root.Images.getImage(_arg1); this.targetWidth = _local2.width; this.targetHeight = _local2.height; _local3 = (this.movieClip as Bitmap); if (_local3 != null){ _local3.bitmapData = _local2; } else { _local4 = (this.movieClip as Sprite); _local4.graphics.clear(); _local4.graphics.beginBitmapFill(_local2); _local4.graphics.drawRect(0, 0, this.targetWidth, this.targetHeight); _local4.graphics.endFill(); }; } public function switchOff():void{ if (this.isOn){ this.isOn = false; this.movieClip.visible = false; }; } public static function createSimpleSprite(_arg1:String, _arg2:Number, _arg3:Number, _arg4:int, _arg5:Boolean=false):SimpleBitmapSprite{ var _local6:SimpleBitmapSprite; _local6 = new (SimpleBitmapSprite); _local6.setImage(_arg1, _arg4, _arg5); _local6.moveTo(_arg2, _arg3); return (_local6); } } }//package deflogic.engine.sprite
Section 9
//SpriteRouting (deflogic.engine.sprite.SpriteRouting) package deflogic.engine.sprite { import deflogic.engine.*; public class SpriteRouting implements IUpdating { protected var sprite:StaticBitmapSprite; private var route:Array; private var routePos:int; private var isRoutingByDirection:Boolean; private var routeCnt:Number; private var routeP2:Number; private var isLooping:Boolean; private var routeToY:Number; private var routeCI:Number; private var routeToX:Number; private var isRouting:Boolean; public function SpriteRouting(){ this.sprite = null; this.isRouting = false; } public function clearRoute():void{ this.isRouting = false; this.isRoutingByDirection = false; } public function setRoute(... _args):void{ var _local2:Number; this.routeToX = this.sprite.x; this.routeToY = this.sprite.y; this.isRouting = true; this.isRoutingByDirection = false; this.routePos = -2; this.route = new Array(); if (_args.length == 2){ this.isLooping = _args[0]; _local2 = 0; while (_local2 < _args[1].length) { this.route[_local2] = _args[1][_local2]; _local2++; }; } else { if (_args.length > 1){ this.isLooping = _args[0]; _local2 = 1; while (_local2 < _args.length) { this.route[(_local2 - 1)] = _args[_local2]; _local2++; }; } else { this.isLooping = _args[0][0]; _local2 = 1; while (_local2 < _args[0].length) { this.route[(_local2 - 1)] = _args[0][_local2]; _local2++; }; }; }; this.sprite.onIsUpdatingChanged(this, true); } public function setIndex(_arg1:int):void{ } public function setTarget(_arg1:StaticBitmapSprite){ this.sprite = _arg1; } public function getIndex():int{ return (-1); } public function isUpdating():Boolean{ return (((this.isRouting) || (this.isRoutingByDirection))); } public function update():void{ if (this.isRouting){ if ((((Math.abs((this.sprite.x - this.routeToX)) < 0.1)) && ((Math.abs((this.sprite.y - this.routeToY)) < 0.1)))){ this.nextRoutePosition(); if (this.isRouting){ this.setDirection(this.routeToX, this.routeToY); }; } else { this.setDirection(this.routeToX, this.routeToY); }; } else { if (this.isRoutingByDirection){ if (--this.routeCnt == 0){ this.setNextRBD(); }; if (this.routeCI == 1){ this.sprite.setXYdegs((this.sprite.xyDegrees - this.routeP2)); } else { if (this.routeCI == 2){ this.sprite.setXYdegs((this.sprite.xyDegrees + this.routeP2)); }; }; }; }; } public function nextRoutePosition():void{ this.sprite.setLocation(this.routeToX, this.routeToY); this.routePos = (this.routePos + 2); if (this.routePos >= this.route.length){ if (this.isLooping){ this.routePos = 0; } else { this.isRouting = false; this.sprite.onIsUpdatingChanged(this, false); }; }; this.routeToX = this.route[this.routePos]; this.routeToY = this.route[(this.routePos + 1)]; } public function setRouteByCommand(_arg1:String, _arg2:Boolean):void{ var _local3:Number; var _local4:String; var _local5:String; var _local6:String; var _local7:String; var _local8:Number; var _local9:Array; var _local10:Array; var _local11:String; var _local12:Number; this.isRouting = false; this.isRoutingByDirection = true; this.route = new Array(); this.isLooping = _arg2; this.routeCnt = 1; this.routeCI = 0; this.routePos = -3; _local4 = ""; _local5 = ""; _local6 = "0123456789macsdfAC;,"; _local3 = 0; while (_local3 < _arg1.length) { _local5 = _arg1.charAt(_local3); if (_local6.indexOf(_local5) != -1){ _local4 = (_local4 + _local5); }; _local3++; }; if (_local4.charAt((_local4.length - 1)) == ";"){ _local4 = _local4.substring(0, (_local4.length - 1)); }; _local10 = _local4.split(";"); _local11 = "macdsfAC"; _local3 = 0; while (_local3 < _local10.length) { _local8 = (this.route[(_local3 * 3)] = _local11.indexOf(_local10[_local3].charAt(0))); if (_local8 == -1){ trace(((("setRouteByDirection(): Unknown command \"" + _local10[_local3]) + "\" at index ") + _local3)); return; }; if (_local8 > 2){ _local7 = _local10[_local3].substring(1, _local10[_local3].length); _local12 = parseInt(_local7); if (isNaN(_local12)){ trace(((("setRouteByDirection(): Illegal value \"" + _local7) + "\" found at index ") + _local3)); return; }; this.route[((_local3 * 3) + 1)] = _local12; } else { if (_local10[_local3].indexOf(",") == -1){ trace(((("setRouteByDirection(): Illegal argument to command \"" + _local8) + "\" (should have 2 arguments) found at index ") + _local3)); return; }; _local7 = _local10[_local3].substring(1, _local10[_local3].length); _local9 = _local7.split(","); if (((isNaN(_local9[0])) || (isNaN(_local9[1])))){ trace(((("setRouteByDirection(): Illegal argument to command \"" + _local8) + "\" (should be integers) found at index ") + _local3)); return; }; this.route[((_local3 * 3) + 1)] = parseInt(_local9[0]); this.route[((_local3 * 3) + 2)] = parseInt(_local9[1]); }; _local3++; }; this.sprite.onIsUpdatingChanged(this, true); } public function setDirection(_arg1:Number, _arg2:Number):void{ var _local3:Number; var _local4:Number; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; _local5 = this.sprite.x; _local6 = this.sprite.y; _local7 = Math.abs((_local5 - _arg1)); _local8 = Math.abs((_local6 - _arg2)); if (_local7 > _local8){ _local3 = ((_local7)<this.sprite.speed) ? _local7 : this.sprite.speed; _local4 = (((_local5 - _arg1))!=0) ? (_local5 - _arg1) : 1; this.sprite.setSpeedDir(_local3, ((_local4)>0) ? -1 : 1, (-((_local6 - _arg2)) / Math.abs(_local4))); } else { _local3 = ((_local8)<this.sprite.speed) ? _local8 : this.sprite.speed; _local4 = (((_local6 - _arg2))!=0) ? (_local6 - _arg2) : 1; this.sprite.setSpeedDir(_local3, (-((_local5 - _arg1)) / Math.abs(_local4)), ((_local4)>0) ? -1 : 1); }; } public function setNextRBD():void{ var _local1:Number; this.routeCnt = 1; this.routePos = (this.routePos + 3); if (this.routePos > this.route.length){ if (this.isLooping){ this.sprite.x = Math.round(this.sprite.x); this.sprite.y = Math.round(this.sprite.y); this.routePos = 0; } else { this.isRoutingByDirection = false; this.sprite.onIsUpdatingChanged(this, false); }; }; this.routeCI = this.route[this.routePos]; _local1 = this.route[(this.routePos + 1)]; this.routeP2 = this.route[(this.routePos + 2)]; switch (this.routeCI){ case 0: this.sprite.moveTo(_local1, this.routeP2); break; case 1: case 2: this.routeCnt = _local1; break; case 3: this.sprite.setXYdegs(_local1); break; case 4: this.sprite.setSpeed(_local1); break; case 5: this.routeCnt = _local1; break; case 6: this.sprite.setXYdegs((this.sprite.xyDegrees - _local1)); break; case 7: this.sprite.setXYdegs((this.sprite.xyDegrees + _local1)); break; }; } } }//package deflogic.engine.sprite
Section 10
//StaticBitmapSprite (deflogic.engine.sprite.StaticBitmapSprite) package deflogic.engine.sprite { import deflogic.engine.*; import deflogic.engine.utility.*; public class StaticBitmapSprite extends SimpleBitmapSprite implements IUpdating { public var xSpeed:Number; public var isListening:Boolean; public var isNowUpdating:Boolean; public var finishPos:int; public var routing:SpriteRouting; public var speed:Number; public var ySpeed:Number; public var yDir:Number; public var index:int; public var xyDegrees:Number; public var xDir:Number; public var value:int; public function StaticBitmapSprite(){ this.speed = 0; this.xSpeed = 0; this.ySpeed = 0; this.value = 0; this.xDir = 0; this.yDir = 0; this.xyDegrees = 0; this.finishPos = 0; this.routing = null; this.isNowUpdating = false; this.index = -1; this.isListening = false; } public function setRouting(_arg1:SpriteRouting):void{ _arg1.setTarget(this); this.routing = _arg1; } public function setSpeed(_arg1:Number):void{ this.speed = _arg1; this.xSpeed = (this.xDir * _arg1); this.ySpeed = (this.yDir * _arg1); this.notifyUpdating(); } public function setFinishPos(_arg1:int):void{ this.finishPos = _arg1; } public function setIndex(_arg1:int):void{ this.index = _arg1; } override public function switchOff():void{ if (this.isOn){ this.isOn = false; this.movieClip.visible = false; this.notifyUpdating(); this.isListening = false; }; } public function isUpdating():Boolean{ return (((this.isOn) && (((((!((this.speed == 0))) && (!((((this.xDir == 0)) && ((this.yDir == 0))))))) || (((!((this.routing == null))) && (this.routing.isUpdating()))))))); } public function getIndex():int{ return (this.index); } override public function moveTo(_arg1:Number, _arg2:Number):void{ this.setLocation(_arg1, _arg2); this.setTargetPosition(this.x, this.y); } public function resize(_arg1:Number, _arg2:Number):void{ this.targetWidth = _arg1; this.targetHeight = _arg2; this.movieClip.width = this.targetWidth; this.movieClip.height = this.targetHeight; } protected function notifyUpdating(){ if (((isListening) && (!((this.isNowUpdating == this.isUpdating()))))){ this.isNowUpdating = !(this.isNowUpdating); AbstractGame.Root.onIsUpdatingChanged(this, this.isNowUpdating); }; } public function setLocation(_arg1:Number, _arg2:Number):void{ this.x = _arg1; this.y = _arg2; } override public function switchOn():void{ if (!this.isOn){ this.isOn = true; this.movieClip.visible = true; this.isListening = true; this.notifyUpdating(); }; } public function setValue(_arg1:int):void{ this.value = _arg1; } public function setSpeedDir(_arg1:Number, _arg2:Number, _arg3:Number):void{ this.xDir = _arg2; this.yDir = _arg3; this.xSpeed = (_arg2 * _arg1); this.ySpeed = (_arg3 * _arg1); this.notifyUpdating(); } public function update():void{ if (this.routing != null){ this.routing.update(); }; if (this.speed != 0){ this.setLocation((this.x + this.xSpeed), (this.y + this.ySpeed)); this.setTargetPosition(this.x, this.y); }; } public function setDir(_arg1:Number, _arg2:Number):void{ this.xDir = _arg1; this.yDir = _arg2; this.xSpeed = (this.xDir * this.speed); this.ySpeed = (this.yDir * this.speed); this.notifyUpdating(); } public function setXYdegs(_arg1:Number):void{ _arg1 = (Math.floor(_arg1) % 360); while (_arg1 < 0) { _arg1 = (360 + _arg1); }; this.xyDegrees = _arg1; setDir(SpecialMath.sin[_arg1], SpecialMath.cos[_arg1]); } public function setTargetPosition(_arg1:Number, _arg2:Number):void{ this.movieClip.x = Math.round(_arg1); this.movieClip.y = Math.round(_arg2); } public function onIsUpdatingChanged(_arg1:IUpdating, _arg2:Boolean):void{ notifyUpdating(); } } }//package deflogic.engine.sprite
Section 11
//SpecialMath (deflogic.engine.utility.SpecialMath) package deflogic.engine.utility { public class SpecialMath { public static const Radian:Number = 0.0174532925199433; public static const OneOverThree:Number = 0.333333333333333; public static const Degree:Number = 57.2957795130823; public static const TwoPiOverOne:Number = 0.159154943091895; public static var cos:Array = null; public static var sin:Array = null; public static function initialise():void{ var _local1:Number; var _local2:Number; sin = new Array(); cos = new Array(); _local2 = 0; while (_local2 < 360) { _local1 = (_local2 * Radian); sin[_local2] = Math.sin(_local1); cos[_local2] = -(Math.cos(_local1)); _local2++; }; } } }//package deflogic.engine.utility
Section 12
//Utility (deflogic.engine.utility.Utility) package deflogic.engine.utility { public final class Utility { public static function commafy(_arg1:String):String{ var _local2:String; var _local3:Array; _local2 = (parseInt(_arg1, 10) + ""); _local3 = []; while (_local2.length > 3) { _local3.unshift(_local2.slice((_local2.length - 3), _local2.length)); _local2 = _local2.slice(0, (_local2.length - 3)); }; _local3.unshift(_local2); return (_local3.join(",")); } public static function trim(_arg1:String):String{ var _local2:int; var _local3:int; _local2 = 0; _local3 = (_arg1.length - 1); while (_arg1.charAt(_local2) == " ") { _local2++; }; if (_local2 == (_local3 + 1)){ return (""); }; while (_arg1.charAt(_local3) == " ") { _local3--; }; return (_arg1.substring(_local2, (_local3 + 1))); } public static function msecToDateString(_arg1:Number):String{ var _local2:Date; _local2 = new Date(_arg1); return ([_local2.getFullYear(), (1 + _local2.getMonth()), _local2.getDate()].join("-")); } } }//package deflogic.engine.utility
Section 13
//AbstractGame (deflogic.engine.AbstractGame) package deflogic.engine { import flash.events.*; import flash.display.*; import deflogic.engine.score.*; import flash.text.*; import deflogic.engine.utility.*; import flash.utils.*; import flash.ui.*; public class AbstractGame extends Sprite { public var Keys:KeyboardManager;// = null private var isSoundToggleActive:Boolean;// = true private var startTime:int; private var activeSprites:Array; private var mochiAdClip:MovieClip; private var ticks:int;// = 0 protected var useMochi:Boolean;// = true protected var mochiId:String;// = "" public var Images:ImageManager;// = null protected var score:int;// = 0 protected var sprTitleMini:DisplayObject;// = null private var thisTime:int; protected var mochiBotId:String;// = "" protected var usePreloader:Boolean;// = true private var txtDevMode:TextField; public var GameWidth:int; private var waitCallback:String; private var adTimer:int; protected var scrollArea:MovieClip;// = null private var hooked:Array; private var waitUntil:int;// = 0 private var isPauseActive:Boolean;// = false private var isRunning:Boolean; protected var adLevel:Number;// = 1 private var sprPaused:Sprite;// = null public var Sounds:SoundManager;// = null private var isScroller:Boolean;// = false protected var devModeString:String;// = "" private var frameRateLevel:int;// = 0 protected var scoreboard:BasicScoreboard;// = null protected var stageNum:int;// = 0 public var checkFrameRate:Boolean;// = false public var allScroll:Array; public var GameHeight:int; public var allStage:Array; protected var gameTime:int;// = 0 protected var isSiteLocked:Boolean;// = false public static var Root:AbstractGame; public function AbstractGame(){ Images = null; Keys = null; Sounds = null; allStage = new Array(); allScroll = new Array(); score = 0; stageNum = 0; scoreboard = null; sprPaused = null; gameTime = 0; isScroller = false; sprTitleMini = null; mochiId = ""; mochiBotId = ""; adLevel = 1; scrollArea = null; useMochi = true; usePreloader = true; isSiteLocked = false; devModeString = ""; checkFrameRate = false; isPauseActive = false; isSoundToggleActive = true; ticks = 0; startTime = (getTimer() + 2000); thisTime = getTimer(); frameRateLevel = 0; waitUntil = 0; super(); AbstractGame.Root = this; this.hooked = new Array(); this.isRunning = false; this.activeSprites = new Array(); } public function sortScrollClip(_arg1:DisplayObject, _arg2:int):void{ var _local3:int; _local3 = 0; while (_local3 < this.allScroll.length) { if (this.allScroll[_local3].object == _arg1){ this.allScroll.splice(_local3, 1); break; }; _local3++; }; addSortedScrollClip(_arg1, _arg2); } public function preload():void{ var pattern:RegExp; var loadLocation:String; var format:TextFormat; var errorField:TextField; if (this.root == null){ AbstractGame.Root = null; return; }; root.loaderInfo.addEventListener(Event.UNLOAD, onDispose, false, 0, true); MovieClip(root).stop(); if (this.stage == null){ AbstractGame.Root = null; return; }; SpecialMath.initialise(); stage.showDefaultContextMenu = false; stage.stageFocusRect = false; pattern = new RegExp("(www.){0,1}def-logic.com", "i"); loadLocation = this.root.loaderInfo.loaderURL; if (((!(isSiteLocked)) || (!((loadLocation.search(pattern) == -1))))){ this.mochiAdClip = new MovieClip(); insertMovieClip(this.mochiAdClip, 1100); if (this.mochiBotId != ""){ MochiBot.track(this.mochiAdClip, this.mochiBotId); }; if (((this.usePreloader) && (!((this.mochiId == ""))))){ MochiAd.showPreGameAd({clip:this.mochiAdClip, id:this.mochiId, res:((GameWidth + "x") + GameHeight), isMochiActive:useMochi, ad_finished:function ():void{ this.clip.root.gotoAndPlay("startGame"); }}); } else { MovieClip(root).gotoAndPlay("startGame"); }; } else { format = new TextFormat(); format.font = "Verdana"; format.color = 0xFF0000; format.align = "center"; format.size = 20; errorField = new TextField(); errorField.multiline = true; errorField.defaultTextFormat = format; errorField.htmlText = "Sorry this version can only be played at<br/><a href=\"http://www.def-logic.com\">www.def-logic.com</a>."; errorField.autoSize = TextFieldAutoSize.CENTER; errorField.x = Math.round(((GameWidth - errorField.width) * 0.5)); errorField.y = (Math.round(((GameHeight - errorField.height) * 0.5)) + 100); errorField.background = true; errorField.border = true; errorField.backgroundColor = 0; this.addChild(errorField); }; } public function startNextLevel():void{ } public function get highScore():int{ return (this.score); } public function removeActiveSprite(_arg1:IUpdating):void{ var _local2:int; _local2 = _arg1.getIndex(); if (_local2 < (this.activeSprites.length - 1)){ this.activeSprites[_local2] = this.activeSprites[(this.activeSprites.length - 1)]; this.activeSprites[_local2].setIndex(_local2); }; this.activeSprites[(this.activeSprites.length - 1)] = null; this.activeSprites.length--; } public function toggleSound():void{ Keys.deactivateKey("sound"); Sounds.toggleSound(); } public function startLoop():void{ if (!this.isRunning){ this.isRunning = true; this.addEventListener(Event.ENTER_FRAME, onGameLoop, false, 0, true); }; } public function dispose():void{ var _local1:int; if (this.scoreboard != null){ this.scoreboard.removeEventListener(BasicScoreboard.SCORE_SUBMITTED, onHighScoreSubmitted); this.scoreboard.dispose(); this.scoreboard = null; }; if (mochiAdClip != null){ disposeMC(this.mochiAdClip); MochiAd.unload(this.mochiAdClip); this.removeChild(this.mochiAdClip); mochiAdClip = null; }; SpecialMath.sin = null; SpecialMath.cos = null; if (Images != null){ Images.dispose(); Images = null; }; if (Keys != null){ Keys.dispose(); Keys = null; }; if (Sounds != null){ Sounds.dispose(); Sounds = null; }; if (root != null){ root.loaderInfo.removeEventListener(Event.UNLOAD, onDispose); }; this.removeEventListener(Event.ENTER_FRAME, onGameLoop); _local1 = (this.numChildren - 1); while (_local1 >= 0) { this.removeChildAt(_local1); _local1--; }; if (this.parent != null){ this.parent.removeChild(this); }; AbstractGame.Root = null; } public function set isPauseAllowed(_arg1:Boolean):void{ this.isPauseActive = _arg1; } public function launchGame():void{ preRunTitle(); } public function addSortedStageClip(_arg1:DisplayObject, _arg2:int):void{ var _local3:Object; var _local4:int; _local3 = new Object(); _local3.object = _arg1; _local3.z = _arg2; _local4 = 0; while (_local4 < this.allStage.length) { if (this.allStage[_local4].z >= _arg2){ this.addChildAt(_arg1, this.getChildIndex(this.allStage[_local4].object)); this.allStage.splice(_local4, 0, _local3); break; }; _local4++; }; if (_local4 == this.allStage.length){ this.allStage.push(_local3); this.addChild(_arg1); }; } public function preRunTitle():void{ if (this.scoreboard != null){ this.scoreboard.redisplay(); }; hideScoreboard(); isPauseAllowed = false; runTitle(); } public function runScoreBoard():void{ root.dispatchEvent(new Event("GameOver")); if (this.scoreboard != null){ Keys.deactivateAllKeys(); if (this.scoreboard.isHighScore(score)){ Sounds.isMuteToggleAllowed = false; this.scoreboard.changeToEnterScoreScreen(score); } else { this.scoreboard.redisplay(); this.scoreboard.changeToScoreboardScreen(); waitFor(150, "preRunTitle"); }; showScoreboard(); } else { runTitle(); }; } public function waiting():void{ if (this.gameTime++ >= waitUntil){ unhook("waiting"); var _local1 = this; _local1[waitCallback](); }; } public function showScoreboard():void{ if (this.scoreboard != null){ this.scoreboard.visible = true; if (this.sprTitleMini != null){ this.sprTitleMini.visible = true; }; }; isPauseAllowed = false; } public function showDemo():void{ } public function waitForToHook(_arg1:int, _arg2:String):void{ this.waitUntil = _arg1; this.waitCallback = _arg2; this.gameTime = 0; hook("waitingToHook"); } public function runTitle():void{ } public function get isOn():Boolean{ return (this.isRunning); } public function addActiveSprite(_arg1:IUpdating):void{ var _local2:int; _local2 = this.activeSprites.length; _arg1.setIndex(_local2); this.activeSprites[_local2] = _arg1; } public function onGameLoop(_arg1:Event):void{ var _local2:int; if (((this.isSoundToggleActive) && (Keys.isKeyPressed("sound")))){ toggleSound(); }; if (this.isRunning){ if (this.checkFrameRate){ if ((thisTime - startTime) >= 1000){ startTime = thisTime; if ((((frameRateLevel < 5)) && ((ticks < 20)))){ AbstractGame.Root.onFrameRateAlert(++frameRateLevel); } else { if ((((frameRateLevel > 0)) && ((ticks > 21)))){ AbstractGame.Root.onFrameRateAlert(--frameRateLevel); }; }; ticks = 0; }; thisTime = getTimer(); ticks++; }; _local2 = this.activeSprites.length; while (_local2--) { this.activeSprites[_local2].update(); }; _local2 = this.hooked.length; while (_local2--) { var _local3 = AbstractGame.Root; _local3[this.hooked[_local2]](); }; }; if (((this.isPauseActive) && (Keys.isKeyPressed("pause")))){ this.isRunning = !(this.isRunning); AbstractGame.Root.togglePaused(!(this.isRunning)); }; Keys.update(); } public function initialise():void{ var _local1:Class; var _local2:String; Keys.registerKeyEvent("pause", KeyboardManager.asciiToCode("P")); Keys.registerKeyEvent("pause", Keyboard.ESCAPE); Keys.registerKeyEvent("pause", 19); Keys.registerKeyEvent("sound", KeyboardManager.asciiToCode("M")); if (devModeString != ""){ txtDevMode = createTextField(0, 150, 640, 475); txtDevMode.y = (GameHeight - 150); txtDevMode.htmlText = (("<p align=\"center\"><font face=\"Arial\" size=\"32\" color=\"#FFFF00\">" + devModeString) + "<br/>Development Version</font></p>"); insertMovieClip(txtDevMode, 1010); txtDevMode.visible = true; }; this.sprPaused = new Paused(); this.sprPaused.x = Math.round(((GameWidth - this.sprPaused.width) / 2)); this.sprPaused.y = Math.round(((GameHeight - this.sprPaused.height) / 2)); this.sprPaused.visible = false; insertMovieClip(this.sprPaused, 1002); _local1 = (getDefinitionByName("titleMini") as Class); if (_local1 != null){ _local2 = getQualifiedSuperclassName(_local1); if (_local2.indexOf("MovieClip") != -1){ this.sprTitleMini = new (_local1); } else { this.sprTitleMini = new Bitmap(Images.getImage("titleMini")); }; this.sprTitleMini.visible = false; insertMovieClip(this.sprTitleMini, 1000); }; } public function onActivated():void{ launchGame(); } public function hideScoreboard():void{ if (this.scoreboard != null){ this.scoreboard.visible = false; if (this.sprTitleMini != null){ this.sprTitleMini.visible = false; }; }; } public function waitingToHook():void{ if (this.gameTime++ >= waitUntil){ unhook("waitingToHook"); hook(waitCallback); }; } public function unload():void{ this.stopLoop(); this.hooked = null; } public function onSoundToggled(_arg1:Boolean):void{ } public function onHighScoreSubmitted(_arg1:Event):void{ Sounds.isMuteToggleAllowed = true; this.scoreboard.changeToScoreboardScreen(); waitFor(150, "preRunTitle"); } public function waitFor(_arg1:int, _arg2:String):void{ this.waitUntil = _arg1; this.waitCallback = _arg2; this.gameTime = 0; hook("waiting"); } public function addSortedScrollClip(_arg1:DisplayObject, _arg2:int):void{ var _local3:Object; var _local4:int; _local3 = new Object(); _local3.object = _arg1; _local3.z = _arg2; _local4 = 0; while (_local4 < this.allScroll.length) { if (this.allScroll[_local4].z >= _arg2){ this.scrollArea.addChildAt(_arg1, this.scrollArea.getChildIndex(this.allScroll[_local4].object)); this.allScroll.splice(_local4, 0, _local3); break; }; _local4++; }; if (_local4 == this.allScroll.length){ this.allScroll.push(_local3); this.scrollArea.addChild(_arg1); }; } public function get isPauseAllowed():Boolean{ return (this.isPauseActive); } public function hook(_arg1:String):void{ var _local2:int; _local2 = this.hooked.length; while (_local2--) { if (this.hooked[_local2] == _arg1){ return; }; }; this.hooked[this.hooked.length] = _arg1; } public function transitionLevel():void{ var time:int; if (((((this.useMochi) && (!((this.mochiId == ""))))) && ((stageNum > adLevel)))){ time = getTimer(); if (stageNum > (adLevel + 1)){ if ((time - adTimer) < 100000){ startNextLevel(); return; }; }; adTimer = time; MochiAd.showInterLevelAd({clip:this.mochiAdClip, id:this.mochiId, res:((GameWidth + "x") + GameHeight), ad_started:function ():void{ AbstractGame.Root.stopLoop(); }, ad_finished:function ():void{ AbstractGame.Root.startNextLevel(); AbstractGame.Root.startLoop(); }}); } else { startNextLevel(); }; } public function unhook(_arg1:String):void{ var _local2:int; _local2 = this.hooked.length; while (_local2--) { if (this.hooked[_local2] == _arg1){ this.hooked.splice(_local2, 1); break; }; }; } public function onFrameRateAlert(_arg1:int):void{ } public function disallowContinue():void{ Keys.deactivateKey("continue"); } public function get mochiAdsId():String{ return (this.mochiId); } public function onDispose(_arg1:Event):void{ dispose(); } private function captureScreen():void{ Keys.deactivateKey("capture"); } public function removeSortedClip(_arg1:DisplayObject):void{ var _local2:int; if (this.scrollArea == null){ _local2 = 0; while (_local2 < this.allScroll.length) { if (this.allScroll[_local2].object >= _arg1){ this.allScroll.splice(_local2, 1); return; }; _local2++; }; }; _local2 = 0; while (_local2 < this.allStage.length) { if (this.allStage[_local2].object >= _arg1){ this.allStage.splice(_local2, 1); return; }; _local2++; }; } public function getHighScore():int{ return (this.score); } public function set isSoundToggleAllowed(_arg1:Boolean):void{ this.isSoundToggleActive = _arg1; } public function sortStageClip(_arg1:DisplayObject, _arg2:int):void{ var _local3:int; _local3 = 0; while (_local3 < this.allStage.length) { if (this.allStage[_local3].object == _arg1){ this.allStage.splice(_local3, 1); break; }; _local3++; }; addSortedStageClip(_arg1, _arg2); } public function startGame():void{ MovieClip(root).stop(); if (Images == null){ Images = new ImageManager(); Keys = new KeyboardManager(); Sounds = new SoundManager(); initialise(); }; startLoop(); launchGame(); } public function toggleSnd():void{ Keys.deactivateKey("sound"); Sounds.toggleSound(); } public function setScoreboard(_arg1:Class, _arg2:String, _arg3:Number, _arg4:Number):void{ setScoreboardWithDefaults(_arg1, _arg2, _arg3, _arg4, [["Brent", "50000"], ["Steven", "40000"], ["Brent", "30000"], ["Steven", "20000"], ["Brent", "10000"], ["Steven", "8000"], ["Brent", "6000"], ["Steven", "4000"], ["Brent", "2000"], ["Steven", "500"]]); } public function togglePaused(_arg1:Boolean):void{ Keys.deactivateKey("pause"); if (_arg1){ this.sprPaused.visible = true; } else { this.sprPaused.visible = false; }; } public function get isSoundToggleAllowed():Boolean{ return (this.isSoundToggleActive); } public function newGame():void{ hideScoreboard(); isPauseAllowed = true; } public function stopLoop():void{ this.isRunning = false; this.removeEventListener(Event.ENTER_FRAME, onGameLoop); } public function hasScoreboard():Boolean{ return (!((this.scoreboard == null))); } public function onSponsorLinkPressed(_arg1:MouseEvent):void{ } public function onIsUpdatingChanged(_arg1:IUpdating, _arg2:Boolean):void{ if (_arg2){ this.addActiveSprite(_arg1); } else { this.removeActiveSprite(_arg1); }; } public function insertMovieClip(_arg1:DisplayObject, _arg2:int):void{ if (this.scrollArea == null){ addSortedStageClip(_arg1, _arg2); } else { addSortedScrollClip(_arg1, _arg2); }; } public function setScoreboardWithDefaults(_arg1:Class, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Array):void{ var _local6:ScoreboardScreen; var _local7:EnterScoreScreen; _local6 = new ScoreboardScreenMC(); _local6.x = _arg3; _local6.y = _arg4; insertMovieClip(_local6, 1001); _local7 = new EnterScoreScreenMC(); _local7.x = _arg3; _local7.y = _arg4; insertMovieClip(_local7, 1001); this.scoreboard = new (_arg1); this.scoreboard.gameName = _arg2; this.scoreboard.applyDefaultScores(_arg5); this.scoreboard.registerScreens(_local6, _local7); this.scoreboard.addEventListener(BasicScoreboard.SCORE_SUBMITTED, onHighScoreSubmitted, false, 0, true); hideScoreboard(); } public function get mochiAdsClip():MovieClip{ return (this.mochiAdClip); } public static function createTextField(_arg1:int, _arg2:int, _arg3:int, _arg4:int):TextField{ var _local5:TextField; _local5 = new TextField(); _local5.x = _arg1; _local5.y = _arg2; _local5.width = _arg3; _local5.height = _arg4; _local5.visible = false; _local5.multiline = true; _local5.selectable = false; return (_local5); } public static function disposeMC(_arg1:Object):void{ var c:DisplayObjectContainer; var i:int; var l:Loader; var clip = _arg1; if ((clip is DisplayObjectContainer)){ c = DisplayObjectContainer(clip); i = (c.numChildren - 1); while (i >= 0) { disposeMC(c.getChildAt(i)); i = (i - 1); }; }; if ((clip is Loader)){ l = Loader(clip); try { l.close(); } catch(e) { } finally { l.unload(); l.parent.removeChild(l); }; } else { if (clip.lc != null){ clip.lc.close(); delete clip.lc; }; }; } } }//package deflogic.engine
Section 14
//ImageManager (deflogic.engine.ImageManager) package deflogic.engine { import flash.display.*; import deflogic.engine.*; import flash.utils.*; class ImageManager { private var allBitmaps:Object; function ImageManager(){ allBitmaps = new Object(); super(); } public function getImage(_arg1:String):BitmapData{ var _local2:BitmapData; var _local3:Class; _local2 = this.allBitmaps[_arg1]; if (!_local2){ _local3 = (getDefinitionByName(_arg1) as Class); _local2 = BitmapData(new _local3(0, 0)); this.allBitmaps[_arg1] = _local2; }; return (_local2); } public function dispose():void{ var _local1:String; for (_local1 in this.allBitmaps) { this.allBitmaps[_local1].dispose(); delete this.allBitmaps[_local1]; }; this.allBitmaps = null; } } }//package deflogic.engine
Section 15
//IUpdating (deflogic.engine.IUpdating) package deflogic.engine { public interface IUpdating { function setIndex(_arg1:int):void; function isUpdating():Boolean; function update():void; function getIndex():int; } }//package deflogic.engine
Section 16
//KeyboardManager (deflogic.engine.KeyboardManager) package deflogic.engine { import flash.events.*; public class KeyboardManager { private var currentKeyDownEvents:Object; private var lastKeyDownEvents:Object; private var keys:Array; private var keyEvents:Object; public function KeyboardManager(){ this.currentKeyDownEvents = new Object(); this.lastKeyDownEvents = new Object(); this.keyEvents = new Object(); this.keys = new Array(); if (AbstractGame.Root.stage != null){ AbstractGame.Root.stage.addEventListener(KeyboardEvent.KEY_DOWN, this.onKeyboardDown, false, 0, true); AbstractGame.Root.stage.addEventListener(KeyboardEvent.KEY_UP, this.onKeyboardUp, false, 0, true); }; } public function onKeyboardDown(_arg1:KeyboardEvent):void{ currentKeyDownEvents[_arg1.keyCode] = true; } public function deactivateAllKeys():void{ var _local1:int; _local1 = (keys.length - 1); while (_local1 >= 0) { if (this.keys[_local1] != null){ this.keys[_local1] = false; }; _local1--; }; } public function update(){ this.lastKeyDownEvents = this.currentKeyDownEvents; } public function deactivateKey(_arg1:String):void{ var _local2:Array; var _local3:int; _local2 = this.keyEvents[_arg1]; _local3 = (_local2.length - 1); while (_local3 >= 0) { this.keys[_local2[_local3]] = false; this.currentKeyDownEvents[_local2[_local3]] = false; _local3--; }; } public function isKeyPressed(_arg1:String):Boolean{ var _local2:Array; var _local3:int; var _local4:int; _local2 = this.keyEvents[_arg1]; _local4 = _local2.length; while (_local4--) { _local3 = _local2[_local4]; if (this.currentKeyDownEvents[_local3]){ return (true); }; }; return (false); } public function onKeyboardUp(_arg1:KeyboardEvent):void{ currentKeyDownEvents[_arg1.keyCode] = false; } public function registerKeyEvent(_arg1:String, _arg2:int):void{ if (this.keyEvents[_arg1] == null){ this.keyEvents[_arg1] = new Array(); this.keyEvents[_arg1][0] = _arg2; } else { this.keyEvents[_arg1][this.keyEvents[_arg1].length] = _arg2; }; this.keys[_arg2] = false; } public function dispose():void{ var _local1:String; if (AbstractGame.Root.stage != null){ AbstractGame.Root.stage.removeEventListener(KeyboardEvent.KEY_DOWN, this.onKeyboardDown); AbstractGame.Root.stage.removeEventListener(KeyboardEvent.KEY_UP, this.onKeyboardUp); }; for (_local1 in this.currentKeyDownEvents) { delete this.currentKeyDownEvents[_local1]; }; for (_local1 in this.lastKeyDownEvents) { delete this.lastKeyDownEvents[_local1]; }; for (_local1 in this.keyEvents) { delete this.keyEvents[_local1]; }; this.currentKeyDownEvents = null; this.lastKeyDownEvents = null; this.keyEvents = null; this.keys = null; } public static function asciiToCode(_arg1:String):int{ return (_arg1.charCodeAt(0)); } } }//package deflogic.engine
Section 17
//SoundManager (deflogic.engine.SoundManager) package deflogic.engine { import flash.media.*; import flash.utils.*; public class SoundManager { private var allLoopingSounds:Object; private var isSoundOn:Boolean;// = true private var allSounds:Object; private var isMuteable:Boolean;// = true private var allChannels:Object; private var allSoundNames:Array; private var allSoundTransforms:Object; public static const LOOP_INFINITE:int = -1; public function SoundManager(){ allSounds = new Object(); allSoundTransforms = new Object(); allSoundNames = new Array(); allChannels = new Object(); allLoopingSounds = new Object(); isSoundOn = true; isMuteable = true; super(); } public function loadSound(_arg1:String, _arg2:Number=1):Sound{ return (loadSoundAs(_arg1, _arg1, _arg2)); } public function getVolume(_arg1:String):Number{ return (SoundTransform(allSoundTransforms[_arg1]).volume); } public function switchOff():void{ if (isSoundOn){ toggleSound(); }; } public function get isMuteToggleAllowed():Boolean{ return (this.isMuteable); } public function toggleSound():void{ var _local1:int; var _local2:String; if (this.isMuteable){ isSoundOn = !(isSoundOn); if (!isSoundOn){ _local1 = (allSoundNames.length - 1); while (_local1 >= 0) { stopSound(allSoundNames[_local1]); _local1--; }; } else { for (_local2 in this.allLoopingSounds) { playSoundLooped(_local2, LOOP_INFINITE); }; }; AbstractGame.Root.onSoundToggled(isSoundOn); }; } public function setVolume(_arg1:String, _arg2:Number):void{ var _local3:SoundTransform; var _local4:SoundChannel; _local3 = SoundTransform(allSoundTransforms[_arg1]); _local3.volume = _arg2; _local4 = SoundChannel(allChannels[_arg1]); if (_local4 != null){ _local4.soundTransform = _local3; }; } public function playSoundLooped(_arg1:String, _arg2:int):void{ if (isSoundOn){ if (_arg2 == LOOP_INFINITE){ allChannels[_arg1] = Sound(allSounds[_arg1]).play(0, int.MAX_VALUE, allSoundTransforms[_arg1]); allLoopingSounds[_arg1] = allSounds[_arg1]; } else { allChannels[_arg1] = Sound(allSounds[_arg1]).play(0, _arg2, allSoundTransforms[_arg1]); }; }; } public function dispose():void{ var _local1:int; var _local2:String; for (_local2 in this.allChannels) { this.allChannels[_local2].stop(); delete this.allChannels[_local2]; }; for (_local2 in this.allSounds) { delete this.allSounds[_local2]; }; for (_local2 in this.allSoundTransforms) { delete this.allSoundTransforms[_local2]; }; for (_local2 in this.allLoopingSounds) { delete this.allLoopingSounds[_local2]; }; _local1 = this.allSoundNames.length; while (_local1 >= 0) { this.allSoundNames[_local1] = null; _local1--; }; this.allSounds = null; this.allSoundTransforms = null; this.allSoundNames = null; this.allChannels = null; this.allLoopingSounds = null; } public function set isMuteToggleAllowed(_arg1:Boolean):void{ this.isMuteable = _arg1; } public function isSoundActive():Boolean{ return (isSoundOn); } public function stopSound(_arg1:String):void{ var _local2:SoundChannel; _local2 = SoundChannel(allChannels[_arg1]); if (_local2 != null){ _local2.stop(); allChannels[_arg1] = null; if (allLoopingSounds[_arg1] != null){ allLoopingSounds[_arg1] = null; }; }; } public function switchOn():void{ if (!isSoundOn){ toggleSound(); }; } public function playSound(_arg1:String):void{ if (isSoundOn){ allChannels[_arg1] = Sound(allSounds[_arg1]).play(0, 0, allSoundTransforms[_arg1]); }; } public function loadSoundAs(_arg1:String, _arg2:String, _arg3:Number=1):Sound{ var _local4:Class; var _local5:Sound; _local4 = (getDefinitionByName(_arg1) as Class); _local5 = Sound(new (_local4)); Sound(new (_local4)).play(_local5.length); allSounds[_arg2] = _local5; allSoundTransforms[_arg2] = new SoundTransform(_arg3, 0); allSoundNames.push(_arg2); return (_local5); } } }//package deflogic.engine
Section 18
//am1 (am1) package { import flash.display.*; public dynamic class am1 extends BitmapData { public function am1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 19
//b (b) package { import flash.display.*; public dynamic class b extends BitmapData { public function b(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 20
//bk1 (bk1) package { import flash.display.*; public dynamic class bk1 extends BitmapData { public function bk1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 21
//bk10 (bk10) package { import flash.display.*; public dynamic class bk10 extends BitmapData { public function bk10(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 22
//bk2 (bk2) package { import flash.display.*; public dynamic class bk2 extends BitmapData { public function bk2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 23
//bk3 (bk3) package { import flash.display.*; public dynamic class bk3 extends BitmapData { public function bk3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 24
//bk4 (bk4) package { import flash.display.*; public dynamic class bk4 extends BitmapData { public function bk4(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 25
//bk5 (bk5) package { import flash.display.*; public dynamic class bk5 extends BitmapData { public function bk5(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 26
//bk6 (bk6) package { import flash.display.*; public dynamic class bk6 extends BitmapData { public function bk6(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 27
//bk7 (bk7) package { import flash.display.*; public dynamic class bk7 extends BitmapData { public function bk7(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 28
//bk8 (bk8) package { import flash.display.*; public dynamic class bk8 extends BitmapData { public function bk8(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 29
//bk9 (bk9) package { import flash.display.*; public dynamic class bk9 extends BitmapData { public function bk9(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 30
//bm1 (bm1) package { import flash.display.*; public dynamic class bm1 extends BitmapData { public function bm1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 31
//bnSubmit (bnSubmit) package { import flash.display.*; public dynamic class bnSubmit extends SimpleButton { } }//package
Section 32
//collectBomb (collectBomb) package { import flash.media.*; public dynamic class collectBomb extends Sound { } }//package
Section 33
//CounterTerror (CounterTerror) package { import flash.display.*; import deflogic.engine.sprite.*; import deflogic.engine.*; import deflogic.engine.score.*; import flash.text.*; import flash.ui.*; public class CounterTerror extends AbstractGame { private var shootProb:int; private var hitFlash:AnimatedBitmapSprite; private var enemy2Pos:int;// = 0 private var bombPos:int;// = 0 private var playerBottom:AnimatedBitmapSprite; private var shieldLaunch:Array; private var en11:Boolean; private var en12:Boolean; private var en1:Boolean; private var en4:Boolean; private var en8:Boolean; private var en2:Boolean; private var en3:Boolean; private var en5:Boolean; private var en9:Boolean; private var enemy3Pos:int;// = 0 private var sprGameOver:SimpleBitmapSprite; private var enemy12Launch:Array; private var sprBackground:Array; private var enemy9Launch:Array; private var isDown:Boolean; private var bombLaunch:Array; private var lives:int;// = 6 private var titlePage:AnimatedBitmapSprite; private var text:Array; private var loading:int; private var enemy3Launch:Array; private var enemy5Pos:int;// = 0 private var enemy11Launch:Array; private var enemy8Launch:Array; private var enemy11Pos:int;// = 0 private var demoBut:Array; private var trux:Number; private var enemy1:Array; private var enemy2:Array; private var enemy4:Array; private var enemy5:Array; private var enemy6:Array; private var enemy8:Array; private var enemy9:Array; private var enemy7:Array; private var enemy3; private var cityLoc:Array; private var enemy12Pos:int;// = 0 private var enemy2Launch:Array; private var interface1:Interface1; private var shieldPos:int; private var enemy8Pos:int;// = 0 private var bomb:Array; private var playerTop:ShooterSprite; private var passedLayer:TextField; private var enemy1Launch:Array; private var playerdead:int;// = 0 private var winLayer:TextField; private var enemy9Pos:int;// = 0 private var shot:Array; private var explosion:Array; private var astin:AnimatedBitmapSprite; private var layout:Array; private var shootFreq:int; private var enShot:Array; private var shield:Array; private var sprGround:Array; private var enemy10:Array; private var enemy12:Array; private var enemy11:Array; private var enemy5Launch:Array; private var gamestate:int;// = 1 private var enemy1Pos:int;// = 0 public function CounterTerror(){ lives = 6; demoBut = new Array(); layout = new Array(); shield = new Array(); shieldLaunch = new Array(); shot = new Array(); playerdead = 0; text = new Array(); bomb = new Array(); bombLaunch = new Array(); bombPos = 0; enemy1 = new Array(); enemy1Launch = new Array(); enemy1Pos = 0; enemy2 = new Array(); enemy2Launch = new Array(); enemy2Pos = 0; enemy3 = new Array(); enemy3Launch = new Array(); enemy3Pos = 0; enemy4 = new Array(); enemy5 = new Array(); enemy5Launch = new Array(); enemy5Pos = 0; enemy6 = new Array(); enemy7 = new Array(); enemy8 = new Array(); enemy8Launch = new Array(); enemy8Pos = 0; enemy9 = new Array(); enemy9Launch = new Array(); enemy9Pos = 0; enemy10 = new Array(); enemy11 = new Array(); enemy11Launch = new Array(); enemy11Pos = 0; enemy12 = new Array(); enemy12Launch = new Array(); enemy12Pos = 0; explosion = new Array(); enShot = new Array(); gamestate = 1; cityLoc = ["NULL", "Los Angeles", "Las Vegas", "London", "Rome Ruins", "Midnight Desert", "Egypt", "Middle East Caves", "Bagdad"]; sprBackground = new Array(); sprGround = new Array(); super(); GameWidth = 640; GameHeight = 475; mochiId = "34752aa0e8ad5c0b"; mochiBotId = "bcb99d41"; } public function printscore():void{ this.interface1.screenscore.text = score.toString(); if (lives > 0){ this.interface1.screenlives.text = lives.toString(); } else { this.interface1.screenlives.text = "0"; }; this.interface1.screenstage.text = stageNum.toString(); } public function initEn2Shot(_arg1:ShooterSprite):void{ var _local2:AnimatedBitmapSprite; var _local3:int; _local3 = (enShot.length - 1); do { _local2 = enShot[_local3]; } while (_local2.isOn); } public function drawStage(_arg1:int):void{ var _local2:int; var _local3:int; var _local4:int; var _local5:int; _local5 = 1; _local2 = 1; while (_local2 <= 25) { _local3 = 0; while (_local3 <= layout[_local2].length) { _local4 = layout[_local2][_local3]; if (_local4 != 0){ if (_local4 == 1){ sprGround[_local5].moveTo((_local3 * 528), 420); sprGround[_local5].switchOn(); _local5++; } else { if (_local4 == 5){ sprBackground[_arg1].moveTo((_local3 * 687), 0); sprBackground[_arg1].switchOn(); _arg1++; }; }; }; _local3++; }; _local2++; }; } public function deadEn(_arg1:AnimatedBitmapSprite, _arg2:AnimatedBitmapSprite, _arg3:int):void{ _arg2.switchOff(); _arg1.setFrame(_arg3); _arg1.setDir(0, 0); _arg1.setAnimationSpeed(1); } public function deadplayer():void{ if (gamestate > 1000){ return; }; gamestate = 1001; sprGameOver.switchOn(); initExplosion((playerTop.x - 20), (playerTop.y - 30), 90, 140); printscore(); playerTop.switchOff(); playerBottom.switchOff(); playerdead = 1; } public function checkDemoBomb():void{ var _local1:StaticBitmapSprite; var _local2:int; _local2 = (bomb.length - 1); do { _local1 = bomb[_local2]; if (_local1.isOn){ if (((((playerTop.isOn) && (((_local1.x + _local1.targetWidth) > (playerTop.x + 16))))) && ((_local1.x < ((playerTop.x + playerTop.targetWidth) - 16))))){ initText(_local1.x, _local1.y, 4); _local1.switchOff(); }; }; --_local2; } while (_local2); } public function checkDemoShots():void{ var _local1:AnimatedBitmapSprite; var _local2:AnimatedBitmapSprite; var _local3:int; var _local4:int; _local4 = (shot.length - 1); do { _local1 = shot[_local4]; if (_local1.isOn){ if ((((((_local1.y < -10)) || ((_local1.x > ((playerTop.x - trux) + 640))))) || ((_local1.x < ((playerTop.x - trux) - 28))))){ _local1.switchOff(); }; _local3 = (enemy1.length - 1); do { _local2 = enemy1[_local3]; if (_local2.isOn){ if ((((((((((_local2.frame < 4)) && (((_local1.y + _local1.targetHeight) > _local2.y)))) && ((_local1.y < (_local2.y + _local2.targetHeight))))) && (((_local1.x + _local1.targetWidth) > _local2.x)))) && ((_local1.x < (_local2.x + _local2.targetWidth))))){ deadEn(_local2, _local1, 4); }; }; --_local3; } while (_local3); }; --_local4; } while (_local4); } public function initEnemy11():void{ var _local1:AnimatedBitmapSprite; var _local2:int; var _local3:int; _local2 = (Math.floor((Math.random() * 500)) + 100); _local3 = (enemy11.length - 1); do { _local1 = enemy11[_local3]; } while (_local1.isOn); } public function initEnemy12():void{ var _local1:AnimatedBitmapSprite; var _local2:int; var _local3:int; _local2 = (Math.floor((Math.random() * 300)) + 490); _local3 = (enemy12.length - 1); do { _local1 = enemy12[_local3]; } while (_local1.isOn); } public function checkShots():void{ var _local1:AnimatedBitmapSprite; var _local2:AnimatedBitmapSprite; var _local3:StaticBitmapSprite; var _local4:int; var _local5:int; _local5 = (shot.length - 1); do { _local1 = shot[_local5]; if (_local1.isOn){ if ((((((_local1.y < -10)) || ((_local1.x > ((playerTop.x - trux) + 640))))) || ((_local1.x < ((playerTop.x - trux) - 28))))){ _local1.switchOff(); }; _local4 = (enemy4.length - 1); do { _local2 = enemy4[_local4]; if (_local2.isOn){ if (((((((((_local1.y + _local1.targetHeight) > _local2.y)) && ((_local1.y < (_local2.y + _local2.targetHeight))))) && (((_local1.x + _local1.targetWidth) > _local2.x)))) && ((_local1.x < (_local2.x + _local2.targetWidth))))){ score = (score + 500); updateScore(); initText(_local2.x, _local2.y, 0); initExplosion((_local2.x - 20), (_local2.y - 50), 100, 100); _local2.switchOff(); _local1.switchOff(); }; }; --_local4; } while (_local4); _local4 = (enemy7.length - 1); do { _local2 = enemy7[_local4]; if (_local2.isOn){ if (((((((((_local1.y + _local1.targetHeight) > _local2.y)) && ((_local1.y < (_local2.y + _local2.targetHeight))))) && (((_local1.x + _local1.targetWidth) > _local2.x)))) && ((_local1.x < (_local2.x + _local2.targetWidth))))){ score = (score + 1000); updateScore(); initText(_local2.x, _local2.y, 1); initExplosion((_local2.x - 20), (_local2.y - 50), 80, 80); _local2.switchOff(); _local1.switchOff(); }; }; --_local4; } while (_local4); _local4 = (enemy10.length - 1); do { _local3 = enemy10[_local4]; if (_local3.isOn){ if (((((((((_local1.y + _local1.targetHeight) > _local3.y)) && ((_local1.y < (_local3.y + _local3.targetHeight))))) && (((_local1.x + _local1.targetWidth) > _local3.x)))) && ((_local1.x < (_local3.x + _local3.targetWidth))))){ score = (score + 2000); updateScore(); initText(_local3.x, _local3.y, 2); initExplosion((_local3.x - 20), (_local3.y - 20), 55, 55); _local3.switchOff(); _local1.switchOff(); }; }; --_local4; } while (_local4); if (en1){ _local4 = (enemy1.length - 1); do { _local2 = enemy1[_local4]; if (_local2.isOn){ if ((((((((((_local2.frame < 4)) && (((_local1.y + _local1.targetHeight) > _local2.y)))) && ((_local1.y < (_local2.y + _local2.targetHeight))))) && (((_local1.x + _local1.targetWidth) > _local2.x)))) && ((_local1.x < (_local2.x + _local2.targetWidth))))){ score = (score + 100); updateScore(); deadEn(_local2, _local1, 4); Sounds.playSound("enemyHit1"); }; }; --_local4; } while (_local4); }; if (_local3){ _local4 = (enemy2.length - 1); do { _local2 = enemy2[_local4]; if (_local2.isOn){ if ((((((((((_local2.frame < 2)) && (((_local1.y + _local1.targetHeight) > _local2.y)))) && ((_local1.y < (_local2.y + _local2.targetHeight))))) && (((_local1.x + _local1.targetWidth) > _local2.x)))) && ((_local1.x < (_local2.x + _local2.targetWidth))))){ score = (score + 250); updateScore(); deadEn(_local2, _local1, 2); Sounds.playSound("enemyHit1"); }; }; --_local4; } while (_local4); }; if (en3){ _local4 = (enemy3.length - 1); do { _local2 = enemy3[_local4]; if (_local2.isOn){ if ((((((((((_local2.frame < 4)) && (((_local1.y + _local1.targetHeight) > _local2.y)))) && ((_local1.y < (_local2.y + _local2.targetHeight))))) && (((_local1.x + _local1.targetWidth) > _local2.x)))) && ((_local1.x < (_local2.x + _local2.targetWidth))))){ score = (score + 150); updateScore(); if (_local2.frame < 2){ initBrief(_local2); }; deadEn(_local2, _local1, 4); Sounds.playSound("enemyHit1"); }; }; --_local4; } while (_local4); }; if (en5){ _local4 = (enemy5.length - 1); do { _local2 = enemy5[_local4]; if (_local2.isOn){ if (((((((((_local1.y + _local1.targetHeight) > _local2.y)) && ((_local1.y < (_local2.y + _local2.targetHeight))))) && (((_local1.x + _local1.targetWidth) > _local2.x)))) && ((_local1.x < (_local2.x + _local2.targetWidth))))){ _local1.switchOff(); score = (score + 50); updateScore(); if (_local2.frame < 9){ _local2.setFrame((_local2.frame + 1)); }; if (_local2.frame == 9){ initExplosion((_local2.x - 20), (_local2.y - 100), 100, 230); if (_local2.value){ killEnemy6(_local2, _local1); }; _local2.switchOff(); Sounds.playSound("explosion2"); }; }; }; --_local4; } while (_local4); }; if (en8){ _local4 = (enemy8.length - 1); do { _local2 = enemy8[_local4]; if (_local2.isOn){ if ((((((((((_local2.frame < 2)) && (((_local1.y + _local1.targetHeight) > _local2.y)))) && ((_local1.y < (_local2.y + _local2.targetHeight))))) && (((_local1.x + _local1.targetWidth) > _local2.x)))) && ((_local1.x < (_local2.x + _local2.targetWidth))))){ score = (score + 100); updateScore(); deadEn(_local2, _local1, 2); Sounds.playSound("enemyHit1"); }; }; --_local4; } while (_local4); }; if (en9){ _local4 = (enemy9.length - 1); do { _local2 = enemy9[_local4]; if (_local2.isOn){ if (((((((((_local1.y + _local1.targetHeight) > _local2.y)) && ((_local1.y < (_local2.y + _local2.targetHeight))))) && (((_local1.x + _local1.targetWidth) > _local2.x)))) && ((_local1.x < (_local2.x + _local2.targetWidth))))){ score = (score + 175); updateScore(); initExplosion((_local2.x - 20), (_local2.y - 50), 120, 200); _local2.switchOff(); _local1.switchOff(); Sounds.playSound("explosion2"); }; }; --_local4; } while (_local4); }; if (en11){ _local4 = (enemy11.length - 1); do { _local2 = enemy11[_local4]; if (_local2.isOn){ if (((((((((_local1.y + _local1.targetHeight) > _local2.y)) && ((_local1.y < (_local2.y + _local2.targetHeight))))) && (((_local1.x + _local1.targetWidth) > _local2.x)))) && ((_local1.x < (_local2.x + _local2.targetWidth))))){ score = (score + 1000); updateScore(); initText(_local2.x, _local2.y, 1); initExplosion((_local2.x - 30), (_local2.y - 65), 110, 130); _local2.switchOff(); _local1.switchOff(); Sounds.playSound("explosion2"); }; }; --_local4; } while (_local4); }; if (en12){ _local4 = (enemy12.length - 1); do { _local2 = enemy12[_local4]; if (_local2.isOn){ if (((((((((_local1.y + _local1.targetHeight) > _local2.y)) && ((_local1.y < (_local2.y + _local2.targetHeight))))) && (((_local1.x + _local1.targetWidth) > _local2.x)))) && ((_local1.x < (_local2.x + _local2.targetWidth))))){ score = (score + 2000); updateScore(); initText(_local2.x, _local2.y, 2); initExplosion((_local2.x - 30), (_local2.y - 65), 110, 130); _local2.switchOff(); _local1.switchOff(); Sounds.playSound("explosionSmall"); }; }; --_local4; } while (_local4); }; }; --_local5; } while (_local5); } public function initEn1Shot(_arg1:AnimatedBitmapSprite):void{ var _local2:AnimatedBitmapSprite; var _local3:int; _local3 = (enShot.length - 1); do { _local2 = enShot[_local3]; } while (_local2.isOn); } public function initShield():void{ var _local1:StaticBitmapSprite; var _local2:int; _local2 = (shield.length - 1); do { _local1 = shield[_local2]; } while (_local1.isOn); } public function checkDemoEnemy1():void{ var _local1:AnimatedBitmapSprite; var _local2:int; _local2 = (enemy1.length - 1); do { _local1 = enemy1[_local2]; if (_local1.isOn){ if ((((_local1.frame == 4)) && ((_local1.animPos >= 5)))){ _local1.switchOff(); }; if ((((((_local1.x < ((playerTop.x - trux) - 64))) && ((((_local1.xDir < 0)) || ((_local1.speed == 0)))))) || ((((_local1.x > ((playerTop.x + 650) - trux))) && ((_local1.xDir > 0)))))){ _local1.switchOff(); }; }; --_local2; } while (_local2); } public function initEn9Shot(_arg1:AnimatedBitmapSprite):void{ var _local2:StaticBitmapSprite; var _local3:int; _local3 = (enemy10.length - 1); do { _local2 = enemy10[_local3]; } while (_local2.isOn); } public function preloadSounds():void{ Sounds.loadSound("gun_pistol"); Sounds.loadSound("explosionSmall"); Sounds.loadSound("explosion2"); Sounds.loadSound("collectBomb"); Sounds.loadSound("enemyHit1"); } public function clearOffLevel():void{ var _local1:int; _local1 = 1; while (_local1 < sprBackground.length) { sprBackground[_local1].switchOff(); _local1++; }; _local1 = 1; while (_local1 < sprGround.length) { sprGround[_local1].switchOff(); _local1++; }; } public function resetTime():void{ gameTime = (enemy1Pos = 0); } public function checkEnemy1():void{ var _local1:AnimatedBitmapSprite; var _local2:AnimatedBitmapSprite; var _local3:int; var _local4:int; _local3 = (enemy1.length - 1); do { _local1 = enemy1[_local3]; if (_local1.isOn){ if ((((_local1.frame == 4)) && ((_local1.animPos >= 5)))){ _local1.switchOff(); }; if (_local1.frame < 4){ _local4 = (enemy5.length - 1); do { _local2 = enemy5[_local4]; if (_local2.isOn){ if ((((((_local1.xDir < 0)) && ((((_local1.x <= (_local2.x + _local2.targetWidth))) && (((_local1.x + _local1.targetWidth) > _local2.x)))))) || ((((_local1.xDir > 0)) && (((((_local1.x + _local1.targetWidth) > _local2.x)) && ((_local1.x <= (_local2.x + _local2.targetWidth))))))))){ if (!_local2.value){ initEnemy6(_local1, _local2); } else { if (_local2.value){ if (_local1.frame == 0){ _local1.setFrame(1); _local1.setDir(1, 0); } else { if (_local1.frame == 1){ _local1.setFrame(0); _local1.setDir(-1, 0); }; }; }; }; }; }; --_local4; } while (_local4); if ((((((_local1.x < ((playerTop.x - trux) - 64))) && ((((_local1.xDir < 0)) || ((_local1.speed == 0)))))) || ((((_local1.x > ((playerTop.x + 650) - trux))) && ((_local1.xDir > 0)))))){ _local1.switchOff(); }; if ((((((_local1.x < (playerTop.x + 70))) && ((_local1.xDir < 0)))) || ((((_local1.x > (playerTop.x - 70))) && ((_local1.xDir > 0)))))){ if (_local1.frame < 2){ initEn1Shot(_local1); }; }; if ((Math.random() * 1000) > shootProb){ if ((((((((_local1.x > playerTop.x)) && ((_local1.xDir < 0)))) && ((_local1.x < ((playerTop.x + 600) - trux))))) || ((((((_local1.x < playerTop.x)) && ((_local1.xDir > 0)))) && ((_local1.x > ((playerTop.x - trux) + 30))))))){ initEn1Shot(_local1); }; }; }; }; --_local3; } while (_local3); } public function checkEnemy2():void{ var _local1:ShooterSprite; var _local2:int; _local2 = (enemy2.length - 1); do { _local1 = enemy2[_local2]; if (_local1.isOn){ _local1.shootDelay--; if ((((_local1.frame == 2)) && ((_local1.animPos >= 3)))){ _local1.switchOff(); }; if (_local1.frame < 2){ if (_local1.x < ((playerTop.x - trux) - 64)){ _local1.switchOff(); }; if ((((playerTop.x > _local1.x)) && (!((_local1.frame == 1))))){ _local1.setFrame(1); }; if (_local1.shootDelay < 0){ initEn2Shot(_local1); }; }; }; --_local2; } while (_local2); } public function checkEnemy3():void{ var _local1:AnimatedBitmapSprite; var _local2:AnimatedBitmapSprite; var _local3:int; var _local4:int; _local3 = (enemy3.length - 1); do { _local1 = enemy3[_local3]; if (_local1.isOn){ if ((((_local1.frame == 4)) && ((_local1.animPos >= 5)))){ _local1.switchOff(); }; if (_local1.frame < 4){ if ((((((_local1.x < ((playerTop.x - trux) - 64))) && ((((_local1.xDir < 0)) || ((_local1.speed == 0)))))) || ((((_local1.x > ((playerTop.x + 650) - trux))) && ((_local1.xDir > 0)))))){ _local1.switchOff(); }; if (_local1.frame < 2){ _local4 = (enemy5.length - 1); do { _local2 = enemy5[_local4]; if (_local2.isOn){ if ((((((_local1.xDir < 0)) && ((_local1.x <= (_local2.x + _local2.targetWidth))))) || ((((_local1.xDir > 0)) && (((_local1.x + _local1.targetWidth) > _local2.x)))))){ initBrief(_local1); }; }; --_local4; } while (_local4); if ((((((_local1.x < (playerTop.x + 140))) && ((_local1.xDir < 0)))) || ((((_local1.x > (playerTop.x - 120))) && ((_local1.xDir > 0)))))){ initBrief(_local1); }; if ((Math.random() * 1000) > shootProb){ if ((((((((_local1.x > playerTop.x)) && ((_local1.xDir < 0)))) && ((_local1.x < ((playerTop.x + 600) - trux))))) || ((((((_local1.x < playerTop.x)) && ((_local1.xDir > 0)))) && ((_local1.x > ((playerTop.x - trux) + 30))))))){ initBrief(_local1); }; }; }; }; }; --_local3; } while (_local3); } public function checkEnemy5():void{ var _local1:AnimatedBitmapSprite; var _local2:int; _local2 = (enemy5.length - 1); do { _local1 = enemy5[_local2]; if (_local1.isOn){ if ((playerTop.x + playerTop.targetWidth) > _local1.x){ playerTop.moveTo((_local1.x - playerTop.targetWidth), playerTop.y); playerBottom.moveTo((_local1.x - playerTop.targetWidth), playerBottom.y); }; }; --_local2; } while (_local2); } public function checkEnemy6():void{ var _local1:ShooterSprite; var _local2:int; _local2 = (enemy6.length - 1); do { _local1 = enemy6[_local2]; if (_local1.isOn){ _local1.shootDelay--; if ((((_local1.frame == 1)) && ((_local1.animPos >= 5)))){ _local1.switchOff(); }; if (_local1.shootDelay < 0){ _local1.setAnimationSpeed(1); _local1.shootDelay = shootFreq; }; if (_local1.animPos >= 5){ initEn6Shot(_local1); }; }; --_local2; } while (_local2); } public function checkEnemy7():void{ var _local1:AnimatedBitmapSprite; var _local2:int; _local2 = (enemy7.length - 1); do { _local1 = enemy7[_local2]; if (_local1.isOn){ _local1.setDir(_local1.xDir, (_local1.yDir + 1)); if ((((_local1.x < ((playerTop.x - trux) - 64))) && ((_local1.xDir < 0)))){ _local1.switchOff(); }; if (((((((playerTop.isOn) && (((_local1.y + _local1.targetHeight) > playerTop.y)))) && (((_local1.x + _local1.targetWidth) > (playerTop.x + 16))))) && ((_local1.x < ((playerTop.x + playerTop.targetWidth) - 16))))){ initExplosion((_local1.x - 20), (_local1.y - 50), 100, 100); playerHit(_local1); }; if (_local1.y > 410){ initExplosion((_local1.x - 20), (_local1.y - 50), 100, 100); _local1.switchOff(); }; }; --_local2; } while (_local2); } public function checkEnemy9():void{ var _local1:ShooterSprite; var _local2:int; _local2 = (enemy9.length - 1); do { _local1 = enemy9[_local2]; if (_local1.isOn){ _local1.shootDelay--; if ((((_local1.xDir < 0)) && ((_local1.x < ((playerTop.x - trux) - 100))))){ _local1.switchOff(); }; if ((((_local1.xDir > 0)) && ((_local1.x > ((playerTop.x - trux) + 650))))){ _local1.switchOff(); }; if (_local1.shootDelay < 0){ initEn9Shot(_local1); _local1.shootDelay = 18; }; }; --_local2; } while (_local2); } public function checkEnemy4():void{ var _local1:AnimatedBitmapSprite; var _local2:int; _local2 = (enemy4.length - 1); do { _local1 = enemy4[_local2]; if (_local1.isOn){ _local1.setDir(_local1.xDir, (_local1.yDir + 1)); if ((((_local1.x < ((playerTop.x - trux) - 64))) && ((_local1.xDir < 0)))){ _local1.switchOff(); }; if (((((((playerTop.isOn) && (((_local1.y + _local1.targetHeight) > playerTop.y)))) && (((_local1.x + _local1.targetWidth) > (playerTop.x + 16))))) && ((_local1.x < ((playerTop.x + playerTop.targetWidth) - 16))))){ initExplosion((_local1.x - 20), (_local1.y - 50), 100, 100); playerHit(_local1); Sounds.playSound("explosion2"); }; if (_local1.y > 410){ Sounds.playSound("explosion2"); initExplosion((_local1.x - 20), (_local1.y - 50), 100, 100); _local1.switchOff(); }; }; --_local2; } while (_local2); } public function checkEnemy8():void{ var _local1:ShooterSprite; var _local2:int; _local2 = (enemy8.length - 1); do { _local1 = enemy8[_local2]; if (_local1.isOn){ _local1.shootDelay--; if ((((_local1.frame == 2)) && ((_local1.animPos >= 3)))){ initExplosion((_local1.x - 20), (_local1.y - 20), 138, 96); _local1.switchOff(); }; if ((((_local1.frame == 1)) && ((_local1.animPos >= 3)))){ initEn8Shot(_local1); }; if (_local1.x < ((playerTop.x - trux) - 100)){ _local1.switchOff(); }; if (_local1.y > 300){ _local1.setDir(_local1.xDir, -1); }; if (_local1.shootDelay < 0){ _local1.setFrame(1); _local1.shootDelay = shootFreq; }; }; --_local2; } while (_local2); } public function playerHit(_arg1:AnimatedBitmapSprite):void{ _arg1.switchOff(); lives--; if (lives < 0){ lives = 0; deadplayer(); }; updateLives(); playerTop.setValue(25); hitFlash.switchOn(); hitFlash.setFrame(playerTop.frame); hitFlash.moveTo(playerTop.x, playerTop.y); hitFlash.setValue(6); } public function initEn8Shot(_arg1:AnimatedBitmapSprite):void{ var _local2:AnimatedBitmapSprite; var _local3:int; var _local4:int; _local3 = (enemy7.length - 1); do { _local2 = enemy7[_local3]; } while (_local2.isOn); } public function titleLoop():void{ var _local1:StaticBitmapSprite; var _local2:int; trux = playerTop.x; checkDemoShots(); checkDemoBomb(); checkText(); checkDemoEnemy1(); playerTop.shootDelay--; gamestate--; if ((((((gamestate < 99960)) && ((gamestate > 80000)))) && ((playerTop.shootDelay < 0)))){ launchBullet(); }; switch (gamestate){ case 99998: demoBut[2].setAnimation(3); demoBut[2].switchOn(); demoBut[2].moveTo(341, 285); playerTop.setFrame(0); playerBottom.setFrame(0); playerTop.setDir(1, 0); playerBottom.setDir(1, 0); playerBottom.setAnimationSpeed(2); break; case 99960: demoBut[1].setAnimation(4); demoBut[1].switchOn(); demoBut[1].moveTo(311, 354); initDemoEnemy1(7); break; case 99950: demoBut[3].setAnimation(0); demoBut[3].switchOn(); demoBut[3].moveTo(310, 0xFF); playerTop.setFrame(2); break; case 99920: demoBut[2].switchOff(); playerTop.setDir(0, 0); playerBottom.setDir(0, 0); playerBottom.setAnimationSpeed(0); playerTop.setFrame(4); playerBottom.setFrame(4); break; case 99880: demoBut[2].switchOn(); demoBut[2].setAnimation(1); demoBut[2].moveTo(280, 285); playerTop.setDir(-1, 0); playerBottom.setDir(-1, 0); playerBottom.setAnimationSpeed(2); playerTop.setFrame(3); playerBottom.setFrame(1); break; case 99860: initDemoEnemy1(3); break; case 99850: demoBut[3].switchOff(); playerTop.setFrame(1); break; case 99840: demoBut[3].switchOn(); demoBut[3].setAnimation(2); demoBut[3].moveTo(310, 285); playerTop.setDir(0, 0); playerBottom.setDir(0, 0); playerBottom.setAnimationSpeed(0); playerBottom.setFrame(3); playerTop.moveTo(playerTop.x, (playerBottom.y - 15)); break; case 99820: demoBut[3].switchOff(); playerTop.setDir(-1, 0); playerBottom.setDir(-1, 0); playerBottom.setAnimationSpeed(2); playerBottom.setFrame(1); playerTop.moveTo(playerTop.x, (playerBottom.y - 32)); break; case 79998: titlePage.setFrame(1); break; case 79940: if (this.hasScoreboard()){ titlePage.switchOff(); showScoreboard(); break; }; case 79840: hideScoreboard(); titlePage.switchOn(); titlePage.setFrame(0); resetSprites(); playerTop.moveTo(40, 352); playerTop.switchOn(); playerBottom.moveTo(40, 384); playerBottom.switchOn(); _local2 = 4; do { _local1 = bomb[_local2]; if (!_local1.isOn){ _local1.switchOn(); _local1.moveTo(((_local2 * 50) + 140), 400); }; --_local2; } while (_local2); gamestate = 99999; break; }; if (((((playerTop.isOn) && ((playerTop.x < 110)))) && ((playerTop.frame == 1)))){ playerTop.switchOff(); playerBottom.switchOff(); demoBut[1].switchOff(); demoBut[2].switchOff(); gamestate = 79999; }; if (Keys.isKeyPressed("fire")){ super.unhook("titleLoop"); newGame(); }; } public function preloadInterface():void{ this.interface1 = new Interface1(); this.interface1.x = (Math.round(((GameWidth - this.interface1.width) * 0.5)) + 40); this.interface1.visible = false; insertMovieClip(this.interface1, 1001); this.passedLayer = createTextField(0, 100, 640, 475); this.passedLayer.x = Math.round(((GameWidth - this.passedLayer.width) * 0.5)); this.passedLayer.htmlText = ((("<p align=\"center\"><b><font face=\"Arial, Helvetica, sans-serif\" color=\"#FFFF00\" size=\"16\">Mission 1 complete.</font></b></p>" + "<p align=\"center\"><b><font face=\"Arial, Helvetica, sans-serif\" color=\"#FFFFFF\" size=\"16\">The LA area is now secure and free of<br/>Terrorist Threat.</font></b></p>") + "<p align=\"center\"><b><font face=\"Arial, Helvetica, sans-serif\" color=\"#FF0000\" size=\"16\">Mission 2 ACTIVE:</font></b></p>") + "<p align=\"center\"><b><font face=\"Arial, Helvetica, sans-serif\" color=\"#FFFFFF\" size=\"16\">A Terrorist Threat has been identified.<br/>Target city: Vegas<br/>Move in and secure the area!</font></b></p>"); insertMovieClip(this.passedLayer, 1002); this.winLayer = createTextField(0, 20, 640, 475); this.winLayer.x = Math.round(((GameWidth - this.winLayer.width) * 0.5)); this.winLayer.htmlText = ((("<p align=\"center\"><b><i><font face=\"Arial, Helvetica, sans-serif\" color=\"#FF0000\" size=\"24\">Congratulations</font></i></b></p>" + "<p align=\"center\"><b><i><font face=\"Arial, Helvetica, sans-serif\" color=\"#0033FF\" size=\"16\">You have defeated the terrorists!<br/>You have restored Freedom across the planet</font></i></b></p>") + "<p align=\"center\"><b><i><font face=\"Arial, Helvetica, sans-serif\" color=\"#FFFF00\" size=\"16\">GREAT SCORE!!!</font></b></i></p>") + "<p align=\"center\"><b><i><font face=\"Arial, Helvetica, sans-serif\" color=\"#FFFF00\" size=\"16\">Press Fire to Continue.</font></b></i></p>"); insertMovieClip(this.winLayer, 1003); } public function checkHitFlash():void{ if (hitFlash.isOn){ hitFlash.setValue((hitFlash.value - 1)); if (hitFlash.frame != playerTop.frame){ hitFlash.setFrame(playerTop.frame); }; hitFlash.moveTo(playerTop.x, playerTop.y); if (!hitFlash.value){ hitFlash.switchOff(); }; }; } public function initBrief(_arg1:AnimatedBitmapSprite):void{ var _local2:AnimatedBitmapSprite; var _local3:int; var _local4:int; _local3 = (enemy4.length - 1); do { _local2 = enemy4[_local3]; } while (_local2.isOn); } public function bonusScreen():void{ this.passedLayer.htmlText = ((((((((((("<p align=\"center\"><font face=\"Arial, Helvetica, sans-serif\" color=\"#FFFF00\" size=\"16\"><b>Mission " + (stageNum - 1)) + " complete.</b></font></p>") + "<p align=\"center\"><font face=\"Arial, Helvetica, sans-serif\" color=\"#FFFFFF\" size=\"16\"><b>The ") + cityLoc[(stageNum - 1)]) + " area is now secure and free of<br/>Terrorist Threat.</b></font></p>") + "<p align=\"center\"><font face=\"Arial, Helvetica, sans-serif\" color=\"#FF0000\" size=\"16\"><b>Mission ") + stageNum) + " ACTIVE:</b></font></p>") + "<p align=\"center\"><font face=\"Arial, Helvetica, sans-serif\" color=\"#FFFFFF\" size=\"16\"><b>A Terrorist Threat has been identified.<br/>Target city: ") + cityLoc[stageNum]) + "<br/>Move in and secure the area!</b></font></p>"); this.passedLayer.visible = true; clearOffLevel(); resetSprites(); astin.moveTo(((playerTop.x - trux) - 250), 350); astin.setDir(12, 0); astin.setSpeed(1); astin.setAnimationSpeed(1); playerTop.switchOff(); playerBottom.switchOff(); loading = 0; printscore(); gamestate = 0; super.hook("bonusLoop"); } public function checkEnemy10():void{ var _local1:AnimatedBitmapSprite; var _local2:int; _local2 = (enemy10.length - 1); do { _local1 = enemy10[_local2]; if (_local1.isOn){ _local1.setDir(_local1.xDir, (_local1.yDir + 1)); if (_local1.x < ((playerTop.x - trux) - 15)){ _local1.switchOff(); }; if (((((((playerTop.isOn) && (((_local1.y + _local1.targetHeight) > playerTop.y)))) && (((_local1.x + _local1.targetWidth) > (playerTop.x + 16))))) && ((_local1.x < ((playerTop.x + playerTop.targetWidth) - 16))))){ initExplosion((_local1.x - 20), (_local1.y - 50), 55, 55); playerHit(_local1); }; if (_local1.y > 420){ initExplosion((_local1.x - 20), (_local1.y - 50), 55, 55); _local1.switchOff(); }; }; --_local2; } while (_local2); } public function checkEnemy12():void{ var _local1:AnimatedBitmapSprite; var _local2:int; _local2 = (enemy12.length - 1); do { _local1 = enemy12[_local2]; if (_local1.isOn){ if (_local1.x < ((playerTop.x - trux) - 45)){ _local1.switchOff(); }; if (((((((playerTop.isOn) && (((_local1.y + _local1.targetHeight) > playerTop.y)))) && (((_local1.x + _local1.targetWidth) > (playerTop.x + 16))))) && ((_local1.x < ((playerTop.x + playerTop.targetWidth) - 16))))){ initExplosion((_local1.x - 30), (_local1.y - 65), 110, 130); playerHit(_local1); }; if (_local1.y > 410){ initExplosion((_local1.x - 30), (_local1.y - 65), 110, 130); _local1.switchOff(); }; }; --_local2; } while (_local2); } public function preloadStaticBitmapSprites():void{ var _local1:int; _local1 = 1; while (_local1 < 12) { bomb[_local1] = new StaticBitmapSprite(); bomb[_local1].setImage("bm1", 14); _local1++; }; _local1 = 1; while (_local1 < 7) { shield[_local1] = new StaticBitmapSprite(); shield[_local1].setImage("sh3", 40); _local1++; }; sprBackground[1] = SimpleBitmapSprite.createSimpleSprite("bk1", 0, 0, 0); sprBackground[2] = SimpleBitmapSprite.createSimpleSprite("bk2", 0, 0, 0); sprBackground[3] = SimpleBitmapSprite.createSimpleSprite("bk1", 0, 0, 0); sprBackground[4] = SimpleBitmapSprite.createSimpleSprite("bk2", 0, 0, 0); sprBackground[5] = SimpleBitmapSprite.createSimpleSprite("bk1", 0, 0, 0); sprBackground[6] = SimpleBitmapSprite.createSimpleSprite("bk3", 0, 0, 0); sprBackground[7] = SimpleBitmapSprite.createSimpleSprite("bk4", 0, 0, 0); sprBackground[8] = SimpleBitmapSprite.createSimpleSprite("bk3", 0, 0, 0); sprBackground[9] = SimpleBitmapSprite.createSimpleSprite("bk4", 0, 0, 0); sprBackground[10] = SimpleBitmapSprite.createSimpleSprite("bk3", 0, 0, 0); sprBackground[11] = SimpleBitmapSprite.createSimpleSprite("bk5", 0, 0, 0); sprBackground[12] = SimpleBitmapSprite.createSimpleSprite("bk5", 0, 0, 0); sprBackground[13] = SimpleBitmapSprite.createSimpleSprite("bk5", 0, 0, 0); sprBackground[14] = SimpleBitmapSprite.createSimpleSprite("bk5", 0, 0, 0); sprBackground[15] = SimpleBitmapSprite.createSimpleSprite("bk5", 0, 0, 0); sprBackground[16] = SimpleBitmapSprite.createSimpleSprite("bk6", 0, 0, 0); sprBackground[17] = SimpleBitmapSprite.createSimpleSprite("bk6", 0, 0, 0); sprBackground[18] = SimpleBitmapSprite.createSimpleSprite("bk6", 0, 0, 0); sprBackground[19] = SimpleBitmapSprite.createSimpleSprite("bk6", 0, 0, 0); sprBackground[20] = SimpleBitmapSprite.createSimpleSprite("bk6", 0, 0, 0); sprBackground[21] = SimpleBitmapSprite.createSimpleSprite("bk7", 0, 0, 0); sprBackground[22] = SimpleBitmapSprite.createSimpleSprite("bk7", 0, 0, 0); sprBackground[23] = SimpleBitmapSprite.createSimpleSprite("bk7", 0, 0, 0); sprBackground[24] = SimpleBitmapSprite.createSimpleSprite("bk7", 0, 0, 0); sprBackground[25] = SimpleBitmapSprite.createSimpleSprite("bk7", 0, 0, 0); sprBackground[26] = SimpleBitmapSprite.createSimpleSprite("bk8", 0, 0, 0); sprBackground[27] = SimpleBitmapSprite.createSimpleSprite("bk8", 0, 0, 0); sprBackground[28] = SimpleBitmapSprite.createSimpleSprite("bk8", 0, 0, 0); sprBackground[29] = SimpleBitmapSprite.createSimpleSprite("bk8", 0, 0, 0); sprBackground[30] = SimpleBitmapSprite.createSimpleSprite("bk8", 0, 0, 0); sprBackground[31] = SimpleBitmapSprite.createSimpleSprite("bk9", 0, 0, 0); sprBackground[32] = SimpleBitmapSprite.createSimpleSprite("bk9", 0, 0, 0); sprBackground[33] = SimpleBitmapSprite.createSimpleSprite("bk9", 0, 0, 0); sprBackground[34] = SimpleBitmapSprite.createSimpleSprite("bk9", 0, 0, 0); sprBackground[35] = SimpleBitmapSprite.createSimpleSprite("bk9", 0, 0, 0); sprBackground[36] = SimpleBitmapSprite.createSimpleSprite("bk10", 0, 0, 0); sprBackground[37] = SimpleBitmapSprite.createSimpleSprite("bk10", 0, 0, 0); sprBackground[38] = SimpleBitmapSprite.createSimpleSprite("bk10", 0, 0, 0); sprBackground[39] = SimpleBitmapSprite.createSimpleSprite("bk10", 0, 0, 0); sprBackground[40] = SimpleBitmapSprite.createSimpleSprite("bk10", 0, 0, 0); _local1 = 1; while (_local1 < 8) { sprGround[_local1] = SimpleBitmapSprite.createSimpleSprite("tl1", 0, 0, 1); _local1++; }; } public function checkEnemy11():void{ var _local1:AnimatedBitmapSprite; var _local2:int; _local2 = (enemy11.length - 1); do { _local1 = enemy11[_local2]; if (_local1.isOn){ if (_local1.x < ((playerTop.x - trux) - 45)){ _local1.switchOff(); }; if (((((((playerTop.isOn) && (((_local1.y + _local1.targetHeight) > playerTop.y)))) && (((_local1.x + _local1.targetWidth) > (playerTop.x + 16))))) && ((_local1.x < ((playerTop.x + playerTop.targetWidth) - 16))))){ initExplosion((_local1.x - 30), (_local1.y - 65), 110, 130); playerHit(_local1); }; if (_local1.y > 420){ initExplosion((_local1.x - 30), (_local1.y - 65), 110, 130); _local1.switchOff(); }; }; --_local2; } while (_local2); } override public function newGame():void{ var _local1:int; super.newGame(); _local1 = 1; while (_local1 < demoBut.length) { demoBut[_local1].switchOff(); _local1++; }; titlePage.switchOff(); resetSprites(); playerTop.setDir(0, 0); playerBottom.setDir(0, 0); playerTop.switchOff(); playerBottom.switchOff(); score = 0; stageNum = 1; lives = 6; playerTop.setValue(0); printscore(); this.passedLayer.htmlText = ((("<p align=\"center\"><font face=\"Arial, Helvetica, sans-serif\" color=\"#FFFF00\" size=\"16\"><b>Mission Start!</b></font></p>" + "<p></p>") + "<p align=\"center\"><font face=\"Arial, Helvetica, sans-serif\" color=\"#FF0000\" size=\"16\"><b>Mission 1 ACTIVE:</b></font></p>") + "<p align=\"center\"><font face=\"Arial, Helvetica, sans-serif\" color=\"#FFFFFF\" size=\"16\"><b>A Terrorist Threat has been identified.<br/>Target city: Los Angeles<br/>Move in and secure the area!</b></font></p>"); this.passedLayer.visible = true; updateStage(); astin.moveTo(-250, 350); astin.switchOn(); astin.setDir(12, 0); astin.setSpeed(1); astin.setAnimationSpeed(1); gamestate = 1; super.hook("introToStart"); } public function sign():void{ if (Keys.isKeyPressed("fire")){ super.unhook("sign"); this.winLayer.visible = false; runScoreBoard(); }; } public function updateLives():void{ if (lives > 0){ this.interface1.screenlives.text = lives.toString(); } else { this.interface1.screenlives.text = "0"; }; } public function gameLoop():void{ playerTop.setValue((playerTop.value - 1)); gameTime++; playerTop.shootDelay--; if (gamestate < 1000){ if (gameTime > 1400){ resetTime(); }; checkKeys(); }; checkShots(); checkEnShots(); checkExplosions(); checkHitFlash(); checkText(); if (en1){ checkEnemy1(); checkEnemy6(); if (gameTime > enemy1Launch[enemy1Pos]){ initEnemy1(); }; }; if (en2){ checkEnemy2(); if (playerTop.x > enemy2Launch[enemy2Pos]){ initEnemy2(); }; }; if (en3){ checkEnemy3(); if (playerTop.x > enemy3Launch[enemy3Pos]){ initEnemy3(); }; }; if (playerTop.x > bombLaunch[bombPos]){ initBomb(); }; if (playerTop.x > shieldLaunch[shieldPos]){ initShield(); }; checkEnemy4(); if (en5){ checkEnemy5(); if (playerTop.x > enemy5Launch[enemy5Pos]){ initEnemy5(); }; }; checkEnemy7(); if (en8){ checkEnemy8(); if (playerTop.x > enemy8Launch[enemy8Pos]){ initEnemy8(); }; }; if (en9){ checkEnemy9(); checkEnemy10(); if (playerTop.x > enemy9Launch[enemy9Pos]){ initEnemy9(); }; }; if (en11){ checkEnemy11(); if (playerTop.x > enemy11Launch[enemy11Pos]){ initEnemy11(); }; }; if (en12){ checkEnemy12(); if (playerTop.x > enemy12Launch[enemy12Pos]){ initEnemy12(); }; }; checkBomb(); checkShield(); if (playerTop.x >= playerTop.finishPos){ passLevel(); }; if (playerdead > 0){ deadPause(); }; } public function passLevel():void{ var _local1:int; if (gamestate < 1000){ gamestate = 1001; printscore(); playerTop.setAnimationSpeed(0); playerBottom.setAnimationSpeed(0); if (en1){ _local1 = 1; while (_local1 < enemy1.length) { enemy1[_local1].setSpeed(0); enemy1[_local1].setAnimationSpeed(0); _local1++; }; }; if (en2){ _local1 = 1; while (_local1 < enemy2.length) { enemy2[_local1].setSpeed(0); enemy2[_local1].setAnimationSpeed(0); _local1++; }; }; if (en3){ _local1 = 1; while (_local1 < enemy3.length) { enemy3[_local1].setSpeed(0); enemy3[_local1].setAnimationSpeed(0); _local1++; }; }; if (en4){ _local1 = 1; while (_local1 < enemy4.length) { enemy4[_local1].setSpeed(0); enemy4[_local1].setAnimationSpeed(0); _local1++; }; }; _local1 = 1; while (_local1 < enemy5.length) { enemy5[_local1].setSpeed(0); enemy5[_local1].setAnimationSpeed(0); _local1++; }; _local1 = 1; while (_local1 < enemy6.length) { enemy6[_local1].setSpeed(0); enemy6[_local1].setAnimationSpeed(0); _local1++; }; _local1 = 1; while (_local1 < enemy7.length) { enemy7[_local1].setSpeed(0); enemy7[_local1].setAnimationSpeed(0); _local1++; }; _local1 = 1; while (_local1 < enemy8.length) { enemy8[_local1].setSpeed(0); enemy8[_local1].setAnimationSpeed(0); _local1++; }; _local1 = 1; while (_local1 < enemy9.length) { enemy9[_local1].setSpeed(0); enemy9[_local1].setAnimationSpeed(0); _local1++; }; _local1 = 1; while (_local1 < enemy10.length) { enemy10[_local1].setSpeed(0); _local1++; }; _local1 = 1; while (_local1 < enemy11.length) { enemy11[_local1].setSpeed(0); enemy11[_local1].setAnimationSpeed(0); _local1++; }; _local1 = 1; while (_local1 < enemy12.length) { enemy12[_local1].setSpeed(0); enemy12[_local1].setAnimationSpeed(0); _local1++; }; }; gamestate++; if ((((gamestate > 1010)) && ((gamestate < 1100)))){ stageNum++; gamestate = 1201; super.unhook("gameLoop"); if (stageNum < 9){ bonusScreen(); } else { if (stageNum == 9){ completedScreen(); }; }; }; } public function resetSprites():void{ var _local1:int; playerTop.setFrame(0); playerTop.shootDelay = 0; playerTop.setAnimationSpeed(0); playerTop.setSpeed(5); playerTop.switchOn(); playerBottom.setFrame(0); playerBottom.setAnimationSpeed(0); playerBottom.setSpeed(5); playerBottom.switchOn(); isDown = false; _local1 = 1; while (_local1 < shot.length) { shot[_local1].setAnimationSpeed(1); shot[_local1].setFrame(0); shot[_local1].setSpeed(12); shot[_local1].switchOff(); _local1++; }; playerTop.shootDelay = 0; hitFlash.setAnimationSpeed(1); hitFlash.setFrame(0); hitFlash.setSpeed(0); hitFlash.switchOff(); _local1 = 1; while (_local1 < enShot.length) { enShot[_local1].setAnimationSpeed(1); enShot[_local1].setFrame(0); enShot[_local1].setSpeed(9); enShot[_local1].switchOff(); _local1++; }; _local1 = 1; while (_local1 < text.length) { text[_local1].setAnimationSpeed(1); text[_local1].setFrame(0); text[_local1].setSpeed(0); text[_local1].switchOff(); _local1++; }; _local1 = 1; while (_local1 < bomb.length) { bomb[_local1].switchOff(); _local1++; }; bombPos = 0; _local1 = 1; while (_local1 < shield.length) { shield[_local1].switchOff(); _local1++; }; shieldPos = 0; if (en1){ _local1 = 1; while (_local1 < enemy1.length) { enemy1[_local1].setAnimationSpeed(2); enemy1[_local1].setFrame(0); enemy1[_local1].setSpeed(1); enemy1[_local1].switchOff(); _local1++; }; }; enemy1Pos = 0; if (en2){ _local1 = 1; while (_local1 < enemy2.length) { enemy2[_local1].setAnimationSpeed(0); enemy2[_local1].setFrame(0); enemy2[_local1].setSpeed(1); enemy2[_local1].switchOff(); enemy2[_local1].shootDelay = 0; _local1++; }; }; enemy2Pos = 0; if (en3){ _local1 = 1; while (_local1 < enemy3.length) { enemy3[_local1].setAnimationSpeed(2); enemy3[_local1].setFrame(0); enemy3[_local1].setSpeed(1); enemy3[_local1].shootDelay = 0; enemy3[_local1].switchOff(); _local1++; }; }; enemy3Pos = 0; _local1 = 1; while (_local1 < enemy4.length) { enemy4[_local1].setAnimationSpeed(2); enemy4[_local1].setFrame(0); enemy4[_local1].setSpeed(1); enemy4[_local1].shootDelay = 0; enemy4[_local1].switchOff(); _local1++; }; if (en5){ _local1 = 1; while (_local1 < enemy5.length) { enemy5[_local1].setAnimationSpeed(0); enemy5[_local1].setFrame(0); enemy5[_local1].setSpeed(1); enemy5[_local1].shootDelay = 0; enemy5[_local1].switchOff(); enemy5[_local1].setValue(0); _local1++; }; }; enemy5Pos = 0; _local1 = 1; while (_local1 < enemy6.length) { enemy6[_local1].setAnimationSpeed(0); enemy6[_local1].setFrame(0); enemy6[_local1].setSpeed(1); enemy6[_local1].shootDelay = 0; enemy6[_local1].switchOff(); _local1++; }; _local1 = 1; while (_local1 < enemy7.length) { enemy7[_local1].setAnimationSpeed(2); enemy7[_local1].setFrame(0); enemy7[_local1].setSpeed(1); enemy7[_local1].shootDelay = 0; enemy7[_local1].switchOff(); _local1++; }; _local1 = 1; while (_local1 < enemy8.length) { enemy8[_local1].setAnimationSpeed(2); enemy8[_local1].setFrame(0); enemy8[_local1].setSpeed(1); enemy8[_local1].shootDelay = 0; enemy8[_local1].switchOff(); _local1++; }; enemy8Pos = 0; _local1 = 1; while (_local1 < enemy9.length) { enemy9[_local1].setAnimationSpeed(2); enemy9[_local1].setFrame(0); enemy9[_local1].setSpeed(1); enemy9[_local1].shootDelay = 0; enemy9[_local1].switchOff(); _local1++; }; enemy9Pos = 0; _local1 = 1; while (_local1 < enemy10.length) { enemy10[_local1].setAnimationSpeed(0); enemy10[_local1].setFrame(0); enemy10[_local1].setSpeed(1); enemy10[_local1].switchOff(); _local1++; }; _local1 = 1; while (_local1 < enemy11.length) { enemy11[_local1].setAnimationSpeed(2); enemy11[_local1].setFrame(0); enemy11[_local1].setSpeed(1); enemy11[_local1].switchOff(); _local1++; }; _local1 = 1; while (_local1 < enemy12.length) { enemy12[_local1].setAnimationSpeed(1); enemy12[_local1].setFrame(0); enemy12[_local1].setSpeed(1); enemy12[_local1].switchOff(); _local1++; }; _local1 = 1; while (_local1 < explosion.length) { explosion[_local1].setAnimationSpeed(1); explosion[_local1].setFrame(0); explosion[_local1].setSpeed(1); explosion[_local1].switchOff(); _local1++; }; playerdead = 0; gameTime = 0; } override public function startNextLevel():void{ playerTop.switchOn(); playerBottom.switchOn(); setUpStage(); super.hook("gameLoop"); } public function initEn6Shot(_arg1:AnimatedBitmapSprite):void{ var _local2:AnimatedBitmapSprite; var _local3:int; var _local4:int; _local3 = (enemy7.length - 1); do { _local2 = enemy7[_local3]; } while (_local2.isOn); } public function initText(_arg1:Number, _arg2:Number, _arg3:int):void{ var _local4:AnimatedBitmapSprite; var _local5:int; _local5 = (text.length - 1); do { _local4 = text[_local5]; } while (_local4.isOn); } public function setUpStage():void{ trux = 40; playerTop.moveTo(40, 352); playerBottom.moveTo(40, 384); scrollArea.x = 0; var _local1 = this; _local1[("resetStage" + stageNum)](); resetSprites(); playerdead = 0; } public function checkText():void{ var _local1:AnimatedBitmapSprite; var _local2:int; _local2 = (text.length - 1); do { _local1 = text[_local2]; if (_local1.isOn){ _local1.setValue((_local1.value - 1)); if (!_local1.value){ _local1.switchOff(); }; }; --_local2; } while (_local2); } override public function runTitle():void{ var _local1:StaticBitmapSprite; var _local2:int; this.interface1.visible = true; en1 = (en2 = (en3 = (en4 = (en5 = false)))); scrollArea.x = 0; titlePage.switchOn(); titlePage.setFrame(0); gamestate = 0; resetSprites(); playerTop.moveTo(40, 352); playerBottom.moveTo(40, 384); _local2 = 4; do { _local1 = bomb[_local2]; if (!_local1.isOn){ _local1.switchOn(); _local1.moveTo(((_local2 * 50) + 140), 400); }; --_local2; } while (_local2); gamestate = 99999; Keys.deactivateKey("fire"); super.hook("titleLoop"); } public function checkShield():void{ var _local1:StaticBitmapSprite; var _local2:int; _local2 = (shield.length - 1); do { _local1 = shield[_local2]; if (_local1.isOn){ if (((((_local1.x + _local1.targetWidth) > (playerTop.x + 16))) && ((_local1.x < ((playerTop.x + playerTop.targetWidth) - 16))))){ lives++; updateLives(); initText(playerTop.x, (playerTop.y + 10), 3); _local1.switchOff(); }; }; --_local2; } while (_local2); } public function launchBullet():void{ var _local1:AnimatedBitmapSprite; var _local2:int; _local2 = (shot.length - 1); do { playerTop.shootDelay = 5; _local1 = shot[_local2]; } while (_local1.isOn); } public function completedScreen():void{ resetSprites(); clearOffLevel(); scrollArea.x = 0; this.winLayer.visible = true; Keys.deactivateKey("fire"); super.hook("sign"); } public function introToStart():void{ if (astin.x > 640){ super.unhook("introToStart"); astin.switchOff(); this.passedLayer.visible = false; setUpStage(); Keys.deactivateKey("fire"); super.hook("gameLoop"); }; } public function initDemoEnemy1(_arg1:int):void{ var _local2:AnimatedBitmapSprite; var _local3:int; _local3 = (enemy1.length - 1); do { _local2 = enemy1[_local3]; } while (_local2.isOn); } public function killEnemy6(_arg1:AnimatedBitmapSprite, _arg2:AnimatedBitmapSprite):void{ var _local3:AnimatedBitmapSprite; var _local4:int; _local4 = (enemy6.length - 1); do { _local3 = enemy6[_local4]; if (_local3.isOn){ if (_local3.x < ((_arg1.x + _arg1.targetWidth) + 8)){ score = (score + 100); updateScore(); deadEn(_local3, _arg2, 1); }; }; --_local4; } while (_local4); } public function preloadAnimatedBitmapSprites():void{ var _local1:int; playerTop = new ShooterSprite(); playerTop.setImageStrip("h1", 15, 51, 33, 5, 1); playerBottom = new AnimatedBitmapSprite(); playerBottom.setImageStrip("h2", 15, 51, 41, 5, 8); hitFlash = new AnimatedBitmapSprite(); hitFlash.setImageStrip("ht1", 40, 51, 33, 5, 2); _local1 = 1; while (_local1 < 11) { text[_local1] = new AnimatedBitmapSprite(); text[_local1].setImageStrip("txt1", 45, 45, 19, 5, 3); _local1++; }; _local1 = 1; while (_local1 < 12) { shot[_local1] = new AnimatedBitmapSprite(); shot[_local1].setImageStrip("sh1", 25, 28, 8, 5, 2); _local1++; }; _local1 = 1; while (_local1 < 12) { enShot[_local1] = new AnimatedBitmapSprite(); enShot[_local1].setImageStrip("sh2", 25, 9, 8, 4, 2); _local1++; }; _local1 = 1; while (_local1 < 7) { enemy1[_local1] = new AnimatedBitmapSprite(); enemy1[_local1].setImageStrip("e1", 16, 64, 71, 5, 6); _local1++; }; _local1 = 1; while (_local1 < 5) { enemy2[_local1] = new ShooterSprite(); enemy2[_local1].setImageStrip("e2", 18, 30, 34, 3, 4); _local1++; }; _local1 = 1; while (_local1 < 7) { enemy3[_local1] = new ShooterSprite(); enemy3[_local1].setImageStrip("e3", 17, 64, 71, 5, 6); _local1++; }; _local1 = 1; while (_local1 < 6) { enemy4[_local1] = new ShooterSprite(); enemy4[_local1].setImageStrip("e4", 24, 24, 24, 1, 8); _local1++; }; _local1 = 1; while (_local1 < 4) { enemy5[_local1] = new ShooterSprite(); enemy5[_local1].setImageStrip("e5", 25, 48, 70, 10, 1); _local1++; }; _local1 = 1; while (_local1 < 3) { enemy6[_local1] = new ShooterSprite(); enemy6[_local1].setImageStrip("e6", 16, 64, 71, 2, 6); _local1++; }; _local1 = 1; while (_local1 < 4) { enemy7[_local1] = new ShooterSprite(); enemy7[_local1].setImageStrip("e7", 25, 14, 14, 1, 4); _local1++; }; _local1 = 1; while (_local1 < 5) { enemy8[_local1] = new ShooterSprite(); enemy8[_local1].setImageStrip("e8", 30, 98, 56, 3, 4); _local1++; }; _local1 = 1; while (_local1 < 5) { enemy9[_local1] = new ShooterSprite(); enemy9[_local1].setImageStrip("e9", 30, 77, 89, 2, 2); _local1++; }; _local1 = 1; while (_local1 < 10) { enemy10[_local1] = new AnimatedBitmapSprite(); enemy10[_local1].setImageStrip("e10", 26, 12, 13, 1, 1); _local1++; }; _local1 = 1; while (_local1 < 5) { enemy11[_local1] = new AnimatedBitmapSprite(); enemy11[_local1].setImageStrip("e11", 26, 43, 28, 1, 5); _local1++; }; _local1 = 1; while (_local1 < 5) { enemy12[_local1] = new AnimatedBitmapSprite(); enemy12[_local1].setImageStrip("e12", 27, 36, 38, 1, 3); _local1++; }; _local1 = 1; while (_local1 < 7) { explosion[_local1] = new AnimatedBitmapSprite(); explosion[_local1].setImageStrip("ex1", 30, 71, 100, 1, 13); _local1++; }; astin = new AnimatedBitmapSprite(); astin.setImageStrip("am1", 14, 193, 51, 1, 3); _local1 = 1; while (_local1 < 4) { demoBut[_local1] = new AnimatedBitmapSprite(); demoBut[_local1].setImageStrip("b", 2, 28, 28, 1, 5); demoBut[_local1].setFrame(0); _local1++; }; titlePage = new AnimatedBitmapSprite(); titlePage.setImageStrip("t", 0, 640, 475, 2, 1); titlePage.setFrame(0); } override public function initialise():void{ super.initialise(); setScoreboard(MochiAdsScoreboard, "CounterTerror", 117, 120); sprGameOver = SimpleBitmapSprite.createSimpleSprite("go", 218, 220, 40); preloadInterface(); scrollArea = new MovieClip(); addSortedStageClip(this.scrollArea, 10); preloadAnimatedBitmapSprites(); preloadStaticBitmapSprites(); preloadSounds(); Keys.registerKeyEvent("left", KeyboardManager.asciiToCode("J")); Keys.registerKeyEvent("left", Keyboard.LEFT); Keys.registerKeyEvent("right", KeyboardManager.asciiToCode("L")); Keys.registerKeyEvent("right", Keyboard.RIGHT); Keys.registerKeyEvent("up", KeyboardManager.asciiToCode("I")); Keys.registerKeyEvent("up", Keyboard.UP); Keys.registerKeyEvent("down", KeyboardManager.asciiToCode("K")); Keys.registerKeyEvent("down", Keyboard.DOWN); Keys.registerKeyEvent("fire", KeyboardManager.asciiToCode("Z")); Keys.registerKeyEvent("fire", Keyboard.SPACE); gamestate = 1; } public function initEnemy1():void{ var _local1:AnimatedBitmapSprite; var _local2:int; var _local3:int; _local2 = Math.floor((Math.random() * 10)); _local3 = (enemy1.length - 1); do { _local1 = enemy1[_local3]; } while (_local1.isOn); } public function initEnemy2():void{ var _local1:AnimatedBitmapSprite; var _local2:int; _local2 = (enemy2.length - 1); do { _local1 = enemy2[_local2]; } while (_local1.isOn); } public function initEnemy3():void{ var _local1:AnimatedBitmapSprite; var _local2:int; var _local3:int; _local2 = Math.floor((Math.random() * 10)); _local3 = (enemy3.length - 1); do { _local1 = enemy3[_local3]; } while (_local1.isOn); } public function initEnemy5():void{ var _local1:AnimatedBitmapSprite; var _local2:int; _local2 = (enemy5.length - 1); do { _local1 = enemy5[_local2]; } while (_local1.isOn); } public function initEnemy6(_arg1:AnimatedBitmapSprite, _arg2:AnimatedBitmapSprite):void{ var _local3:int; var _local4:AnimatedBitmapSprite; _local3 = (enemy6.length - 1); do { _local4 = enemy6[_local3]; } while (_local4.isOn); } public function initEnemy8():void{ var _local1:int; var _local2:AnimatedBitmapSprite; _local1 = (enemy8.length - 1); do { _local2 = enemy8[_local1]; } while (_local2.isOn); } public function initEnemy9():void{ var _local1:AnimatedBitmapSprite; var _local2:int; var _local3:int; _local2 = Math.floor((Math.random() * 10)); _local3 = (enemy9.length - 1); do { _local1 = enemy9[_local3]; } while (_local1.isOn); } public function checkKeys():void{ if (playerBottom.frame < 7){ if (((!(Keys.isKeyPressed("left"))) && (!(Keys.isKeyPressed("right"))))){ playerBottom.setAnimationSpeed(0); }; if (Keys.isKeyPressed("down")){ isDown = true; if ((((playerBottom.frame == 0)) || ((playerBottom.frame == 4)))){ playerTop.setFrame(0); playerBottom.setFrame(2); }; if (playerBottom.frame == 1){ playerTop.setFrame(1); playerBottom.setFrame(3); }; playerTop.moveTo(playerTop.x, (playerBottom.y - 15)); }; if (((isDown) && (!(Keys.isKeyPressed("down"))))){ isDown = false; if (playerBottom.frame == 2){ playerBottom.setFrame(0); }; if (playerBottom.frame == 3){ playerBottom.setFrame(1); }; playerTop.moveTo(playerTop.x, (playerBottom.y - 32)); }; if (((Keys.isKeyPressed("up")) && (!(isDown)))){ if (((!(Keys.isKeyPressed("left"))) && (!(Keys.isKeyPressed("right"))))){ playerTop.setFrame(4); playerBottom.setFrame(4); }; if (Keys.isKeyPressed("left")){ playerTop.setFrame(3); }; if (((Keys.isKeyPressed("right")) && (!(Keys.isKeyPressed("left"))))){ playerTop.setFrame(2); }; }; if (((Keys.isKeyPressed("left")) && ((playerBottom.x > 0)))){ if (!Keys.isKeyPressed("up")){ playerTop.setFrame(1); }; if ((((((((playerBottom.animSpeed == 0)) || ((playerBottom.frame == 0)))) || ((playerBottom.frame == 2)))) || ((playerBottom.frame == 3)))){ if (!isDown){ playerBottom.setFrame(1); playerBottom.setAnimationSpeed(2); } else { if (isDown){ playerTop.setFrame(1); playerBottom.setFrame(3); playerBottom.setAnimationSpeed(0); }; }; }; if (!isDown){ if (trux > 0){ trux = (trux - playerBottom.speed); playerBottom.moveTo((playerBottom.x - playerBottom.speed), playerBottom.y); playerTop.moveTo(playerBottom.x, playerTop.y); }; }; } else { if (Keys.isKeyPressed("right")){ if (!Keys.isKeyPressed("up")){ playerTop.setFrame(0); }; if ((((((((playerBottom.animSpeed == 0)) || ((playerBottom.frame == 1)))) || ((playerBottom.frame == 2)))) || ((playerBottom.frame == 3)))){ if (!isDown){ playerBottom.setFrame(0); playerBottom.setAnimationSpeed(2); } else { if (isDown){ playerTop.setFrame(0); playerBottom.setFrame(2); playerBottom.setAnimationSpeed(0); }; }; }; if (!isDown){ if (trux < 300){ trux = (trux + playerBottom.speed); }; playerBottom.moveTo((playerBottom.x + playerBottom.speed), playerBottom.y); playerTop.moveTo(playerBottom.x, playerTop.y); if (trux >= 300){ scrollArea.x = (-(playerBottom.x) + trux); }; }; }; }; if (((Keys.isKeyPressed("fire")) && ((playerTop.shootDelay < 0)))){ launchBullet(); }; }; } public function resetStage1():void{ var _local1:int; _local1 = 0; while (_local1 <= 28) { layout[_local1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); _local1++; }; enemy1Launch = [100, 200, 300, 400, 500, 550, 600, 650, 700, 750, 800, 850, 900, 925, 950, 1000, 1025, 1050, 1100, 1125, 1150, 1175, 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 999999]; enemy2Launch = [420, 1012, 1625, 1800, 2287, 99999]; enemy3Launch = [1700, 1900, 2000, 2300, 2350, 2375, 2400, 2500, 2525, 2550, 2575, 2600, 99999]; bombLaunch = [500, 1000, 1500, 2000, 2520, 2555, 2600, 2630, 2670, 999999]; shieldLaunch = [600, 99999]; en1 = (en2 = (en3 = (en5 = (en8 = (en9 = (en11 = (en12 = false))))))); en1 = (en2 = (en3 = true)); layout[1] = new Array(5, 5, 5, 5, 5); layout[21] = new Array(1, 1, 1, 1, 1, 1, 1); playerTop.setFinishPos(3020); astin.switchOn(); astin.setFrame(0); astin.moveTo(3020, 373); astin.setSpeed(0); astin.setAnimationSpeed(0); drawStage(1); gameTime = 0; gamestate = 1; printscore(); shootProb = 980; shootFreq = 70; } public function resetStage2():void{ var _local1:int; _local1 = 0; while (_local1 <= 28) { layout[_local1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); _local1++; }; enemy1Launch = [100, 150, 175, 200, 250, 300, 350, 400, 500, 550, 600, 650, 700, 750, 800, 850, 900, 925, 950, 1000, 1025, 1050, 1100, 1125, 1150, 1175, 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 999999]; enemy2Launch = [370, 470, 580, 1012, 1625, 2287, 99999]; enemy3Launch = [500, 700, 900, 1700, 1900, 2000, 2300, 2350, 2375, 2400, 2500, 2525, 2550, 2575, 2600, 99999]; enemy5Launch = [370, 900, 1600, 99999]; bombLaunch = [200, 400, 500, 800, 1000, 1500, 2000, 2520, 2555, 2575, 2600, 2615, 2630, 2670, 999999]; shieldLaunch = [600, 1200, 999999]; en1 = (en2 = (en3 = (en5 = (en8 = (en9 = (en11 = (en12 = false))))))); en1 = (en2 = (en3 = (en5 = true))); layout[1] = new Array(5, 5, 5, 5, 5); layout[21] = new Array(1, 1, 1, 1, 1, 1, 1); playerTop.setFinishPos(3020); astin.switchOn(); astin.setFrame(0); astin.setAnimationSpeed(0); astin.moveTo(3020, 373); astin.setSpeed(0); drawStage(6); gameTime = 0; gamestate = 1; printscore(); shootProb = 980; shootFreq = 60; } public function resetStage3():void{ var _local1:int; _local1 = 0; while (_local1 <= 28) { layout[_local1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); _local1++; }; enemy1Launch = [100, 150, 175, 200, 250, 300, 350, 400, 500, 550, 600, 650, 700, 750, 800, 850, 900, 925, 950, 1000, 1025, 1050, 1100, 1125, 1150, 1175, 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 999999]; enemy3Launch = [500, 700, 850, 975, 1300, 1350, 1375, 1500, 1700, 1900, 2000, 2300, 2350, 2375, 2400, 2500, 2525, 2550, 2575, 2600, 99999]; enemy5Launch = [370, 700, 1200, 1800, 2200, 99999]; enemy8Launch = [370, 470, 580, 800, 900, 950, 1000, 1050, 1100, 1300, 1625, 1800, 1850, 1900, 2287, 99999]; bombLaunch = [200, 300, 400, 500, 800, 1000, 1200, 1500, 2000, 2200, 2520, 2555, 2575, 2600, 2615, 2630, 2670, 999999]; shieldLaunch = [600, 900, 1600, 999999]; en1 = (en2 = (en3 = (en5 = (en8 = (en9 = (en11 = (en12 = false))))))); en1 = (en8 = (en3 = (en5 = true))); layout[1] = new Array(5, 5, 5, 5, 5); layout[21] = new Array(1, 1, 1, 1, 1, 1, 1); playerTop.setFinishPos(3020); astin.switchOn(); astin.setFrame(0); astin.setAnimationSpeed(0); astin.moveTo(3020, 373); astin.setSpeed(0); drawStage(11); gameTime = 0; gamestate = 1; printscore(); shootProb = 980; shootFreq = 55; } public function resetStage4():void{ var _local1:int; _local1 = 0; while (_local1 <= 28) { layout[_local1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); _local1++; }; enemy1Launch = [50, 75, 100, 150, 175, 200, 250, 275, 300, 350, 375, 400, 450, 500, 550, 575, 600, 650, 675, 700, 750, 775, 800, 850, 875, 900, 925, 950, 1000, 1025, 1050, 1100, 1125, 1150, 1175, 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 999999]; enemy9Launch = [500, 700, 800, 850, 975, 1100, 1200, 1300, 1350, 1375, 1500, 1600, 1700, 1900, 2000, 2300, 2350, 2375, 2400, 2500, 2525, 2550, 2575, 2600, 99999]; enemy5Launch = [370, 700, 1200, 1800, 2200, 99999]; enemy8Launch = [370, 470, 580, 800, 900, 950, 1000, 1050, 1100, 1300, 1625, 1800, 1850, 1900, 2287, 99999]; bombLaunch = [200, 275, 400, 450, 500, 800, 1000, 1100, 1300, 1500, 2000, 2300, 2400, 2520, 2555, 2575, 2600, 2615, 2630, 2670, 999999]; shieldLaunch = [600, 900, 1100, 2000, 999999]; en1 = (en2 = (en3 = (en5 = (en8 = (en9 = (en11 = (en12 = false))))))); en1 = (en8 = (en9 = (en5 = true))); layout[1] = new Array(5, 5, 5, 5, 5); layout[21] = new Array(1, 1, 1, 1, 1, 1, 1); playerTop.setFinishPos(3020); astin.switchOn(); astin.setFrame(0); astin.setAnimationSpeed(0); astin.moveTo(3020, 373); astin.setSpeed(0); drawStage(16); gameTime = 0; gamestate = 1; printscore(); shootProb = 970; shootFreq = 55; } public function checkExplosions():void{ var _local1:AnimatedBitmapSprite; var _local2:int; _local2 = (explosion.length - 1); do { _local1 = explosion[_local2]; if (_local1.animPos >= 12){ _local1.switchOff(); }; --_local2; } while (_local2); } public function resetStage8():void{ var _local1:int; _local1 = 0; while (_local1 <= 28) { layout[_local1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); _local1++; }; enemy1Launch = [50, 75, 100, 150, 175, 200, 250, 275, 300, 350, 375, 400, 450, 500, 550, 575, 600, 650, 675, 700, 750, 775, 800, 850, 875, 900, 925, 950, 1000, 1025, 1050, 1100, 1125, 1150, 1175, 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 999999]; enemy3Launch = [500, 700, 850, 975, 1300, 1350, 1375, 1500, 1700, 1900, 2000, 2300, 2350, 2375, 2400, 2500, 2525, 2550, 2575, 2600, 99999]; enemy9Launch = [100, 150, 200, 370, 470, 580, 650, 700, 800, 900, 950, 1000, 1050, 1100, 1300, 1350, 1400, 1625, 1800, 1850, 1900, 2287, 99999]; enemy11Launch = [400, 600, 750, 875, 1200, 1250, 1275, 1400, 2100, 2300, 2375, 2400, 2425, 2450, 2475, 2590, 99999]; enemy12Launch = [300, 400, 500, 750, 850, 975, 1100, 1200, 1300, 1350, 1375, 1500, 1600, 1700, 1900, 2000, 2300, 2350, 2375, 2400, 2500, 2525, 2550, 2575, 2600, 99999]; bombLaunch = [200, 275, 350, 400, 500, 550, 600, 800, 1000, 1100, 1300, 1500, 2000, 2300, 2400, 2485, 2520, 2555, 2575, 2600, 2615, 2630, 2670, 999999]; shieldLaunch = [200, 600, 800, 1000, 1600, 999999]; en1 = (en2 = (en3 = (en5 = (en8 = (en9 = (en11 = (en12 = false))))))); en1 = (en3 = (en9 = (en11 = (en12 = true)))); layout[1] = new Array(5, 5, 5, 5, 5); layout[21] = new Array(1, 1, 1, 1, 1, 1, 1); playerTop.setFinishPos(3020); astin.switchOn(); astin.setFrame(0); astin.setAnimationSpeed(0); astin.moveTo(3020, 373); astin.setSpeed(0); drawStage(36); gameTime = 0; gamestate = 1; printscore(); shootProb = 965; shootFreq = 40; } public function resetStage5():void{ var _local1:int; _local1 = 0; while (_local1 <= 28) { layout[_local1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); _local1++; }; enemy1Launch = [50, 75, 100, 150, 175, 200, 250, 275, 300, 350, 375, 400, 450, 500, 550, 575, 600, 650, 675, 700, 750, 775, 800, 850, 875, 900, 925, 950, 1000, 1025, 1050, 1100, 1125, 1150, 1175, 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 999999]; enemy3Launch = [500, 700, 850, 975, 1300, 1350, 1375, 1500, 1700, 1900, 2000, 2300, 2350, 2375, 2400, 2500, 2525, 2550, 2575, 2600, 99999]; enemy9Launch = [500, 700, 800, 850, 975, 1100, 1200, 1300, 1350, 1375, 1500, 1600, 1700, 1900, 2000, 2300, 2350, 2375, 2400, 2500, 2525, 2550, 2575, 2600, 99999]; enemy8Launch = [370, 470, 580, 800, 900, 950, 1000, 1050, 1100, 1300, 1625, 1800, 1850, 1900, 2287, 99999]; bombLaunch = [200, 275, 400, 450, 500, 800, 1000, 1100, 1300, 1500, 2000, 2300, 2400, 2485, 2520, 2555, 2575, 2600, 2615, 2630, 2670, 999999]; shieldLaunch = [600, 900, 1100, 2000, 999999]; en1 = (en2 = (en3 = (en5 = (en8 = (en9 = (en11 = (en12 = false))))))); en1 = (en3 = (en8 = (en9 = true))); layout[1] = new Array(5, 5, 5, 5, 5); layout[21] = new Array(1, 1, 1, 1, 1, 1, 1); playerTop.setFinishPos(3020); astin.switchOn(); astin.setFrame(0); astin.setAnimationSpeed(0); astin.moveTo(3020, 373); astin.setSpeed(0); drawStage(21); gameTime = 0; gamestate = 1; printscore(); shootProb = 970; shootFreq = 50; } public function resetStage6():void{ var _local1:int; _local1 = 0; while (_local1 <= 28) { layout[_local1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); _local1++; }; enemy1Launch = [50, 75, 100, 150, 175, 200, 250, 275, 300, 350, 375, 400, 450, 500, 550, 575, 600, 650, 675, 700, 750, 775, 800, 850, 875, 900, 925, 950, 1000, 1025, 1050, 1100, 1125, 1150, 1175, 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 999999]; enemy3Launch = [500, 700, 850, 975, 1300, 1350, 1375, 1500, 1700, 1900, 2000, 2300, 2350, 2375, 2400, 2500, 2525, 2550, 2575, 2600, 99999]; enemy9Launch = [500, 700, 800, 850, 975, 1100, 1200, 1300, 1350, 1375, 1500, 1600, 1700, 1900, 2000, 2300, 2350, 2375, 2400, 2500, 2525, 2550, 2575, 2600, 99999]; enemy11Launch = [370, 470, 580, 800, 900, 950, 1000, 1050, 1100, 1300, 1625, 1800, 1850, 1900, 2287, 99999]; bombLaunch = [200, 275, 400, 450, 500, 800, 1000, 1100, 1300, 1500, 2000, 2300, 2400, 2485, 2520, 2555, 2575, 2600, 2615, 2630, 2670, 999999]; shieldLaunch = [600, 800, 1000, 1600, 2000, 999999]; en1 = (en2 = (en3 = (en5 = (en8 = (en9 = (en11 = (en12 = false))))))); en1 = (en3 = (en9 = (en11 = true))); layout[1] = new Array(5, 5, 5, 5, 5); layout[21] = new Array(1, 1, 1, 1, 1, 1, 1); playerTop.setFinishPos(3020); astin.switchOn(); astin.setFrame(0); astin.setAnimationSpeed(0); astin.moveTo(3020, 373); astin.setSpeed(0); drawStage(26); gameTime = 0; gamestate = 1; printscore(); shootProb = 965; shootFreq = 45; } public function resetStage7():void{ var _local1:int; _local1 = 0; while (_local1 <= 28) { layout[_local1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); _local1++; }; enemy1Launch = [50, 75, 100, 150, 175, 200, 250, 275, 300, 350, 375, 400, 450, 500, 550, 575, 600, 650, 675, 700, 750, 775, 800, 850, 875, 900, 925, 950, 1000, 1025, 1050, 1100, 1125, 1150, 1175, 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 999999]; enemy3Launch = [500, 700, 850, 975, 1300, 1350, 1375, 1500, 1700, 1900, 2000, 2300, 2350, 2375, 2400, 2500, 2525, 2550, 2575, 2600, 99999]; enemy9Launch = [500, 700, 800, 850, 975, 1100, 1200, 1300, 1350, 1375, 1500, 1600, 1700, 1900, 2000, 2300, 2350, 2375, 2400, 2500, 2525, 2550, 2575, 2600, 99999]; enemy12Launch = [370, 470, 580, 800, 900, 950, 1000, 1050, 1100, 1300, 1625, 1800, 1850, 1900, 2287, 99999]; bombLaunch = [200, 275, 350, 400, 500, 550, 600, 800, 1000, 1100, 1300, 1500, 2000, 2300, 2400, 2485, 2520, 2555, 2575, 2600, 2615, 2630, 2670, 999999]; shieldLaunch = [300, 800, 1000, 1200, 1700, 999999]; en1 = (en2 = (en3 = (en5 = (en8 = (en9 = (en11 = (en12 = false))))))); en1 = (en3 = (en9 = (en12 = true))); layout[1] = new Array(5, 5, 5, 5, 5); layout[21] = new Array(1, 1, 1, 1, 1, 1, 1); playerTop.setFinishPos(3020); astin.switchOn(); astin.setFrame(0); astin.setAnimationSpeed(0); astin.moveTo(3020, 373); astin.setSpeed(0); drawStage(31); gameTime = 0; gamestate = 1; printscore(); shootProb = 965; shootFreq = 45; } public function bonusLoop():void{ if ((((loading >= 0)) && ((loading < 120)))){ loading++; }; if ((((loading >= 120)) && ((loading < 200)))){ loading = 201; this.passedLayer.visible = false; super.unhook("bonusLoop"); updateStage(); resetSprites(); clearOffLevel(); playerTop.switchOff(); playerBottom.switchOff(); startNextLevel(); }; } public function checkEnShots():void{ var _local1:AnimatedBitmapSprite; var _local2:AnimatedBitmapSprite; var _local3:int; var _local4:int; _local3 = (enShot.length - 1); do { _local1 = enShot[_local3]; if (_local1.isOn){ if ((((((((_local1.y < -10)) || ((_local1.y > 430)))) || ((_local1.x > ((playerTop.x - trux) + 640))))) || ((_local1.x < ((playerTop.x - trux) - 28))))){ _local1.switchOff(); }; if (((((((playerTop.isOn) && (((_local1.y + _local1.targetHeight) > (playerTop.y + 8))))) && (((_local1.x + _local1.targetWidth) > (playerTop.x + 16))))) && ((_local1.x < ((playerTop.x + playerTop.targetWidth) - 16))))){ playerHit(_local1); }; _local4 = (enemy5.length - 1); do { _local2 = enemy5[_local4]; if (_local2.isOn){ if ((((_local1.x < (_local2.x + _local2.targetWidth))) && (((_local1.x + _local1.targetWidth) > _local2.x)))){ _local1.switchOff(); }; }; --_local4; } while (_local4); }; --_local3; } while (_local3); } public function updateScore():void{ this.interface1.screenscore.text = score.toString(); } public function updateStage():void{ this.interface1.screenstage.text = stageNum.toString(); } public function gameover():void{ super.unhook("gameLoop"); resetSprites(); clearOffLevel(); playerTop.switchOff(); playerBottom.switchOff(); sprGameOver.switchOff(); runScoreBoard(); } public function checkBomb():void{ var _local1:StaticBitmapSprite; var _local2:int; _local2 = (bomb.length - 1); do { _local1 = bomb[_local2]; if (_local1.isOn){ if (((((playerTop.isOn) && (((_local1.x + _local1.targetWidth) > (playerTop.x + 16))))) && ((_local1.x < ((playerTop.x + playerTop.targetWidth) - 16))))){ score = (score + 350); updateScore(); initText(_local1.x, _local1.y, 4); _local1.switchOff(); Sounds.playSound("collectBomb"); }; }; --_local2; } while (_local2); } public function initBomb():void{ var _local1:StaticBitmapSprite; var _local2:int; _local2 = (bomb.length - 1); do { _local1 = bomb[_local2]; } while (_local1.isOn); } public function initExplosion(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{ var _local5:AnimatedBitmapSprite; var _local6:int; _local6 = (explosion.length - 1); do { _local5 = explosion[_local6]; } while (_local5.isOn); } public function deadPause():void{ playerdead++; if ((((playerdead > 70)) && ((playerdead < 100)))){ playerdead = 200; printscore(); if (lives <= 0){ gameover(); return; }; resetSprites(); }; } } }//package
Section 34
//demoMenu (demoMenu) package { import flash.display.*; import flash.text.*; public dynamic class demoMenu extends MovieClip { public var bnRegister:SimpleButton; public var bnLaunch:SimpleButton; public var demoTries:TextField; } }//package
Section 35
//e1 (e1) package { import flash.display.*; public dynamic class e1 extends BitmapData { public function e1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 36
//e10 (e10) package { import flash.display.*; public dynamic class e10 extends BitmapData { public function e10(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 37
//e11 (e11) package { import flash.display.*; public dynamic class e11 extends BitmapData { public function e11(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 38
//e12 (e12) package { import flash.display.*; public dynamic class e12 extends BitmapData { public function e12(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 39
//e2 (e2) package { import flash.display.*; public dynamic class e2 extends BitmapData { public function e2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 40
//e3 (e3) package { import flash.display.*; public dynamic class e3 extends BitmapData { public function e3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 41
//e4 (e4) package { import flash.display.*; public dynamic class e4 extends BitmapData { public function e4(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 42
//e5 (e5) package { import flash.display.*; public dynamic class e5 extends BitmapData { public function e5(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 43
//e6 (e6) package { import flash.display.*; public dynamic class e6 extends BitmapData { public function e6(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 44
//e7 (e7) package { import flash.display.*; public dynamic class e7 extends BitmapData { public function e7(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 45
//e8 (e8) package { import flash.display.*; public dynamic class e8 extends BitmapData { public function e8(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 46
//e9 (e9) package { import flash.display.*; public dynamic class e9 extends BitmapData { public function e9(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 47
//enemyHit1 (enemyHit1) package { import flash.media.*; public dynamic class enemyHit1 extends Sound { } }//package
Section 48
//EnterScoreScreenMC (EnterScoreScreenMC) package { import deflogic.engine.score.*; public dynamic class EnterScoreScreenMC extends EnterScoreScreen { } }//package
Section 49
//ex1 (ex1) package { import flash.display.*; public dynamic class ex1 extends BitmapData { public function ex1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 50
//explosion2 (explosion2) package { import flash.media.*; public dynamic class explosion2 extends Sound { } }//package
Section 51
//explosionSmall (explosionSmall) package { import flash.media.*; public dynamic class explosionSmall extends Sound { } }//package
Section 52
//go (go) package { import flash.display.*; public dynamic class go extends BitmapData { public function go(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 53
//gun_pistol (gun_pistol) package { import flash.media.*; public dynamic class gun_pistol extends Sound { } }//package
Section 54
//h1 (h1) package { import flash.display.*; public dynamic class h1 extends BitmapData { public function h1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 55
//h2 (h2) package { import flash.display.*; public dynamic class h2 extends BitmapData { public function h2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 56
//ht1 (ht1) package { import flash.display.*; public dynamic class ht1 extends BitmapData { public function ht1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 57
//Interface1 (Interface1) package { import flash.display.*; import flash.text.*; public dynamic class Interface1 extends MovieClip { public var screenstage:TextField; public var screenlives:TextField; public var screenscore:TextField; } }//package
Section 58
//MochiAd (MochiAd) package { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; import flash.net.*; public class MochiAd { public static function getVersion():String{ return ("2.1"); } public static function showTimedAd(_arg1:Object):void{ MochiAd.showInterLevelAd(_arg1); } public static function _allowDomains(_arg1:String):String{ var _local2:String; _local2 = _arg1.split("/")[2].split(":")[0]; Security.allowDomain("*"); Security.allowDomain(_local2); Security.allowInsecureDomain("*"); Security.allowInsecureDomain(_local2); return (_local2); } public static function load(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var depth:Number; var mc:MovieClip; var wh:Array; var lv:URLVariables; var k:String; var server:String; var hostname:String; var lc:LocalConnection; var name:String; var loader:Loader; var f:Function; var g:Function; var req:URLRequest; var v:Object; var options = _arg1; DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; if (!MochiAd._isNetworkAvailable()){ return (null); }; if (clip._mochiad_loaded){ return (null); }; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, "_mochiad", depth); wh = MochiAd._getRes(options, clip); options.res = ((wh[0] + "x") + wh[1]); options.server = (options.server + options.id); delete options.id; clip._mochiad_loaded = true; if (clip.loaderInfo.loaderURL.indexOf("http") == 0){ options.as3_swf = clip.loaderInfo.loaderURL; }; lv = new URLVariables(); for (k in options) { v = options[k]; if (!(v is Function)){ lv[k] = v; }; }; server = lv.server; delete lv.server; hostname = _allowDomains(server); lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.lc = lc; lv.lc = name; lv.st = getTimer(); loader = new Loader(); f = function (_arg1:Object):void{ mc._mochiad_ctr_failed = true; }; loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, f, false, 0, true); g = function (_arg1:Object):void{ MochiAd.unload(clip); }; loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g, false, 0, true); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader.load(req); mc.addChild(loader); mc._mochiad_ctr = loader; return (mc); } public static function sendHighScore(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip; _local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["sendHighScore", _arg1], _arg2, _arg3); return (true); } public static function _parseOptions(_arg1:Object, _arg2:Object):Object{ var _local3:Object; var _local4:String; var _local5:Array; var _local6:Number; var _local7:Array; _local3 = {}; for (_local4 in _arg2) { _local3[_local4] = _arg2[_local4]; }; if (_arg1){ for (_local4 in _arg1) { _local3[_local4] = _arg1[_local4]; }; }; _arg1 = _local3.clip.loaderInfo.parameters.mochiad_options; if (_arg1){ _local5 = _arg1.split("&"); _local6 = 0; while (_local6 < _local5.length) { _local7 = _local5[_local6].split("="); _local3[unescape(_local7[0])] = unescape(_local7[1]); _local6++; }; }; return (_local3); } public static function _isNetworkAvailable():Boolean{ return (!((Security.sandboxType == "localWithFile"))); } public static function unload(_arg1:Object):Boolean{ if (((_arg1.clip) && (_arg1.clip._mochiad))){ _arg1 = _arg1.clip; }; if (!_arg1._mochiad){ return (false); }; if (_arg1._mochiad.onUnload){ _arg1._mochiad.onUnload(); }; _arg1.removeChild(_arg1._mochiad); delete _arg1._mochiad_loaded; delete _arg1._mochiad; return (true); } public static function showInterLevelAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{ this.clip.stop(); }, ad_finished:function ():void{ this.clip.play(); }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; if (!MochiAd.load(options)){ options.ad_finished(); return; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ options.ad_finished(); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.fadeout_time = fadeout_time; chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; mc.unloadAd = function ():void{ MochiAd.unload(clip); }; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.started = getTimer(); _local2.ad_msec = (_arg1 - 250); }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Number; var _local3:Boolean; var _local4:Number; _local1 = this.parent._mochiad_ctr; _local2 = (getTimer() - this.started); _local3 = false; if (!chk.showing){ _local4 = _local1.loaderInfo.bytesTotal; if ((((_local4 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local2 > chk.ad_timeout){ _local3 = true; }; }; }; if ((((_local2 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){ _local3 = true; }; if (_local3){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = this.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function _getRes(_arg1:Object, _arg2:Object):Array{ var _local3:Object; var _local4:Number; var _local5:Number; var _local6:Array; _local3 = _arg2.getBounds(_arg2.root); _local4 = 0; _local5 = 0; if (typeof(_arg1.res) != "undefined"){ _local6 = _arg1.res.split("x"); _local4 = parseFloat(_local6[0]); _local5 = parseFloat(_local6[1]); } else { _local4 = (_local3.xMax - _local3.xMin); _local5 = (_local3.yMax - _local3.yMin); }; if ((((_local4 == 0)) || ((_local5 == 0)))){ _local4 = _arg2.stage.stageWidth; _local5 = _arg2.stage.stageHeight; }; return ([_local4, _local5]); } public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{ var _local4:MovieClip; _local4 = new MovieClip(); if (((false) && (_arg3))){ _arg1.addChildAt(_local4, _arg3); } else { _arg1.addChild(_local4); }; _arg1[_arg2] = _local4; _local4["_name"] = _arg2; return (_local4); } public static function _loadCommunicator(_arg1:Object):MovieClip{ var DEFAULTS:Object; var clip:Object; var clipname:String; var server:String; var depth:Number; var mc:MovieClip; var lv:URLVariables; var k:String; var lc:LocalConnection; var name:String; var req:URLRequest; var loader:Loader; var options = _arg1; DEFAULTS = {com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"}; options = MochiAd._parseOptions(options, DEFAULTS); options.swfv = 9; options.mav = MochiAd.getVersion(); clip = options.clip; clipname = ("_mochiad_com_" + options.id); if (!MochiAd._isNetworkAvailable()){ return (null); }; if (clip[clipname]){ return (clip[clipname]); }; server = (options.com_server + options.id); MochiAd._allowDomains(server); delete options.id; delete options.com_server; depth = options.depth; delete options.depth; mc = createEmptyMovieClip(clip, clipname, depth); lv = new URLVariables(); for (k in options) { lv[k] = options[k]; }; lc = new LocalConnection(); lc.client = mc; name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_"); lc.allowDomain("*", "localhost"); lc.allowInsecureDomain("*", "localhost"); lc.connect(name); mc.name = name; mc.lc = lc; lv.lc = name; mc._id = 0; mc._queue = []; mc.rpcResult = function (_arg1:Object):void{ var _local3:Array; var _local4:Array; var _local5:Number; var _local6:Object; var _local7:Object; _arg1 = parseInt(_arg1.toString()); _local3 = mc._callbacks[_arg1]; if (typeof(_local3) == "undefined"){ return; }; delete mc._callbacks[_arg1]; _local4 = []; _local5 = 2; while (_local5 < _local3.length) { _local4.push(_local3[_local5]); _local5++; }; _local5 = 1; while (_local5 < arguments.length) { _local4.push(arguments[_local5]); _local5++; }; _local6 = _local3[1]; _local7 = _local3[0]; if (((_local7) && ((typeof(_local6) == "string")))){ _local6 = _local7[_local6]; }; if (typeof(_local6) == "function"){ _local6.apply(_local7, _local4); }; }; mc._didConnect = function (_arg1:String):void{ var _local2:Array; var _local3:Function; var _local4:Number; var _local5:Array; mc._endpoint = _arg1; _local2 = mc._queue; delete mc._queue; _local3 = mc.doSend; _local4 = 0; while (_local4 < _local2.length) { _local5 = _local2[_local4]; _local3.apply(this, _local5); _local4++; }; }; mc.doSend = function (_arg1:Array, _arg2:Object, _arg3:Object):void{ var _local5:Number; var _local6:LocalConnection; var _local7:Array; var _local8:Number; if (mc._endpoint == null){ _local7 = []; _local8 = 0; while (_local8 < arguments.length) { _local7.push(arguments[_local8]); _local8++; }; mc._queue.push(_local7); return; }; mc._id = (mc._id + 1); _local5 = mc._id; mc._callbacks[_local5] = [_arg2, ((_arg3) || (_arg2))]; _local6 = new LocalConnection(); _local6.send(mc._endpoint, "rpc", _local5, _arg1); }; mc._callbacks = {}; mc._callbacks[0] = [mc, "_didConnect"]; lv.st = getTimer(); req = new URLRequest((server + ".swf")); req.contentType = "application/x-www-form-urlencoded"; req.method = URLRequestMethod.POST; req.data = lv; loader = new Loader(); loader.load(req); mc.addChild(loader); mc._mochiad_com = loader; return (mc); } public static function showPreGameAd(_arg1:Object):void{ var DEFAULTS:Object; var clip:Object; var ad_msec:Number; var ad_timeout:Number; var fadeout_time:Number; var isMochiActive:Boolean; var mc:MovieClip; var wh:Array; var w:Number; var h:Number; var chk:MovieClip; var bar:MovieClip; var bar_color:Number; var bar_background:Number; var bar_outline:Number; var backing_mc:MovieClip; var backing:Object; var inside_mc:MovieClip; var inside:Object; var outline_mc:MovieClip; var outline:Object; var complete:Boolean; var unloaded:Boolean; var depth:Number; var f:Function; var r:MovieClip; var options = _arg1; DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF00, background:16777161, outline:0x9900, isMochiActive:true, ad_started:function ():void{ this.clip.stop(); }, ad_finished:function ():void{ this.clip.play(); }}; options = MochiAd._parseOptions(options, DEFAULTS); clip = options.clip; ad_msec = 11000; ad_timeout = options.ad_timeout; delete options.ad_timeout; fadeout_time = options.fadeout_time; delete options.fadeout_time; isMochiActive = options.isMochiActive; if (isMochiActive){ if (!MochiAd.load(options)){ options.ad_finished(); return; }; } else { depth = options.depth; delete options.depth; createEmptyMovieClip(clip, "_mochiad", depth); ad_msec = 2000; }; options.ad_started(); mc = clip._mochiad; mc["onUnload"] = function ():void{ var fn:Function; fn = function ():void{ options.ad_finished(); }; setTimeout(fn, 100); }; wh = MochiAd._getRes(options, clip); w = wh[0]; h = wh[1]; mc.x = (w * 0.5); mc.y = (h * 0.5); chk = createEmptyMovieClip(mc, "_mochiad_wait", 3); chk.x = (w * -0.5); chk.y = (h * -0.5); bar = createEmptyMovieClip(chk, "_mochiad_bar", 4); bar.x = 10; bar.y = (h - 20); bar_color = options.color; delete options.color; bar_background = options.background; delete options.background; bar_outline = options.outline; delete options.outline; backing_mc = createEmptyMovieClip(bar, "_outline", 1); backing = backing_mc.graphics; backing.beginFill(bar_background); backing.moveTo(0, 0); backing.lineTo((w - 20), 0); backing.lineTo((w - 20), 10); backing.lineTo(0, 10); backing.lineTo(0, 0); backing.endFill(); inside_mc = createEmptyMovieClip(bar, "_inside", 2); inside = inside_mc.graphics; inside.beginFill(bar_color); inside.moveTo(0, 0); inside.lineTo((w - 20), 0); inside.lineTo((w - 20), 10); inside.lineTo(0, 10); inside.lineTo(0, 0); inside.endFill(); inside_mc.scaleX = 0; outline_mc = createEmptyMovieClip(bar, "_outline", 3); outline = outline_mc.graphics; outline.lineStyle(0, bar_outline, 100); outline.moveTo(0, 0); outline.lineTo((w - 20), 0); outline.lineTo((w - 20), 10); outline.lineTo(0, 10); outline.lineTo(0, 0); chk.ad_msec = ad_msec; chk.ad_timeout = ad_timeout; chk.started = getTimer(); chk.showing = false; chk.last_pcnt = 0; chk.fadeout_time = fadeout_time; chk.isMochiActive = isMochiActive; if (isMochiActive){ chk.fadeFunction = function ():void{ var _local1:Number; _local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time))); if (_local1 > 0){ this.parent.alpha = (_local1 * 0.01); } else { MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; } else { chk.fadeFunction = function ():void{ MochiAd.unload(clip); delete this["onEnterFrame"]; }; }; complete = false; unloaded = false; if (isMochiActive){ f = function (_arg1:Event):void{ complete = true; if (unloaded){ MochiAd.unload(clip); }; }; clip.loaderInfo.addEventListener(Event.COMPLETE, f, false, 0, true); }; if ((clip.root is MovieClip)){ r = (clip.root as MovieClip); if (r.framesLoaded >= r.totalFrames){ complete = true; }; }; mc.unloadAd = function ():void{ unloaded = true; if (complete){ MochiAd.unload(clip); }; }; mc.adjustProgress = function (_arg1:Number):void{ var _local2:Object; _local2 = mc._mochiad_wait; _local2.server_control = true; _local2.started = getTimer(); _local2.ad_msec = _arg1; }; chk["onEnterFrame"] = function ():void{ var _local1:Object; var _local2:Object; var _local3:Number; var _local4:Boolean; var _local5:Number; var _local6:Number; var _local7:Number; var _local8:Number; var _local9:Object; var _local10:Number; var _local11:Number; if (!this.parent.parent){ delete this["onEnterFrame"]; return; }; _local1 = this.parent.parent.root; _local2 = this.parent._mochiad_ctr; _local3 = (getTimer() - this.started); _local4 = false; _local5 = _local1.loaderInfo.bytesTotal; _local6 = _local1.loaderInfo.bytesLoaded; _local7 = ((100 * _local6) / _local5); _local8 = ((100 * _local3) / chk.ad_msec); _local9 = this._mochiad_bar._inside; _local10 = Math.min(100, Math.min(((_local7) || (0)), _local8)); _local10 = Math.max(this.last_pcnt, _local10); this.last_pcnt = _local10; _local9.scaleX = (_local10 * 0.01); if (!this.isMochiActive){ if (r.framesLoaded >= r.totalFrames){ complete = true; }; } else { if (!chk.showing){ _local11 = _local2.loaderInfo.bytesTotal; if ((((_local11 > 0)) || (("number" == "undefined")))){ chk.showing = true; chk.started = getTimer(); } else { if (_local3 > chk.ad_timeout){ _local4 = true; }; }; }; }; if ((((_local3 > chk.ad_msec)) || (this.parent._mochiad_ctr_failed))){ _local4 = true; }; if (((complete) && (_local4))){ if (this.server_control){ delete this.onEnterFrame; } else { this.fadeout_start = getTimer(); this.onEnterFrame = chk.fadeFunction; }; }; }; doOnEnterFrame(chk); } public static function showPreloaderAd(_arg1:Object):void{ MochiAd.showPreGameAd(_arg1); } public static function fetchHighScores(_arg1:Object, _arg2:Object, _arg3:Object=null):Boolean{ var _local4:MovieClip; _local4 = MochiAd._loadCommunicator({clip:_arg1.clip, id:_arg1.id}); if (!_local4){ return (false); }; _local4.doSend(["fetchHighScores", _arg1], _arg2, _arg3); return (true); } public static function doOnEnterFrame(_arg1:MovieClip):void{ var f:Function; var mc = _arg1; f = function (_arg1:Object):void{ if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){ mc.onEnterFrame(); } else { mc.removeEventListener(Event.ENTER_FRAME, f); }; }; mc.addEventListener(Event.ENTER_FRAME, f, false, 0, true); } } }//package
Section 59
//MochiBot (MochiBot) package { import flash.display.*; import flash.system.*; import flash.net.*; public dynamic class MochiBot extends Sprite { public static function track(_arg1:DisplayObjectContainer, _arg2:String):MochiBot{ var _local3:MochiBot; var _local4:String; var _local5:URLVariables; var _local6:String; var _local7:URLRequest; var _local8:Loader; if (Security.sandboxType == "localWithFile"){ return (null); }; _local3 = new (MochiBot); _arg1.addChild(_local3); Security.allowDomain("*"); Security.allowInsecureDomain("*"); _local4 = "http://core.mochibot.com/my/core.swf"; _local5 = new URLVariables(); _local5["sb"] = Security.sandboxType; _local5["v"] = Capabilities.version; _local5["swfid"] = _arg2; _local5["mv"] = "8"; _local5["fv"] = "9"; _local6 = _local3.root.loaderInfo.loaderURL; if (_local6.indexOf("http") == 0){ _local5["url"] = _local6; } else { _local5["url"] = "local"; }; _local7 = new URLRequest(_local4); _local7.contentType = "application/x-www-form-urlencoded"; _local7.method = URLRequestMethod.POST; _local7.data = _local5; _local8 = new Loader(); _local3.addChild(_local8); _local8.load(_local7); return (_local3); } } }//package
Section 60
//Paused (Paused) package { import flash.display.*; public dynamic class Paused extends Sprite { } }//package
Section 61
//ScoreboardScreenMC (ScoreboardScreenMC) package { import deflogic.engine.score.*; public dynamic class ScoreboardScreenMC extends ScoreboardScreen { } }//package
Section 62
//sh1 (sh1) package { import flash.display.*; public dynamic class sh1 extends BitmapData { public function sh1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 63
//sh2 (sh2) package { import flash.display.*; public dynamic class sh2 extends BitmapData { public function sh2(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 64
//sh3 (sh3) package { import flash.display.*; public dynamic class sh3 extends BitmapData { public function sh3(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 65
//ShooterSprite (ShooterSprite) package { import deflogic.engine.sprite.*; public class ShooterSprite extends AnimatedBitmapSprite { private var mShootDelay:Number; public function ShooterSprite(){ this.mShootDelay = 0; } public function set shootDelay(_arg1:Number):void{ this.mShootDelay = _arg1; } public function get shootDelay():Number{ return (this.mShootDelay); } } }//package
Section 66
//t (t) package { import flash.display.*; public dynamic class t extends BitmapData { public function t(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 67
//titleMini (titleMini) package { import flash.display.*; public dynamic class titleMini extends BitmapData { public function titleMini(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 68
//tl1 (tl1) package { import flash.display.*; public dynamic class tl1 extends BitmapData { public function tl1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package
Section 69
//txt1 (txt1) package { import flash.display.*; public dynamic class txt1 extends BitmapData { public function txt1(_arg1:Number, _arg2:Number){ super(_arg1, _arg2); } } }//package

Library Items

Symbol 1 GraphicUsed by:Timeline
Symbol 2 BitmapUsed by:3 102
Symbol 3 GraphicUses:2Used by:4
Symbol 4 MovieClipUses:3Used by:Timeline
Symbol 5 FontUsed by:6 7 8 14 15 20 22 26 28 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 66 67 68 69 70
Symbol 6 TextUses:5Used by:13
Symbol 7 TextUses:5Used by:13
Symbol 8 TextUses:5Used by:13
Symbol 9 FontUsed by:10 11 12
Symbol 10 EditableTextUses:9Used by:13
Symbol 11 EditableTextUses:9Used by:13
Symbol 12 EditableTextUses:9Used by:13
Symbol 13 MovieClip {Interface1}Uses:6 7 8 10 11 12Used by:Timeline
Symbol 14 TextUses:5Used by:24
Symbol 15 EditableTextUses:5Used by:24
Symbol 16 GraphicUsed by:19 21 23 29
Symbol 17 GraphicUsed by:18 21 23 29
Symbol 18 MovieClipUses:17Used by:19
Symbol 19 MovieClipUses:16 18Used by:21 23 29
Symbol 20 TextUses:5Used by:21
Symbol 21 ButtonUses:19 20 16 17Used by:24
Symbol 22 TextUses:5Used by:23
Symbol 23 ButtonUses:19 22 16 17Used by:24
Symbol 24 MovieClip {demoMenu}Uses:14 15 21 23Used by:Timeline
Symbol 25 GraphicUsed by:27
Symbol 26 TextUses:5Used by:27
Symbol 27 MovieClip {Paused}Uses:25 26Used by:Timeline
Symbol 28 TextUses:5Used by:29
Symbol 29 Button {bnSubmit}Uses:19 28 16 17Used by:71  Timeline
Symbol 30 TextUses:5Used by:64
Symbol 31 TextUses:5Used by:64
Symbol 32 TextUses:5Used by:64
Symbol 33 TextUses:5Used by:64
Symbol 34 TextUses:5Used by:64
Symbol 35 TextUses:5Used by:64
Symbol 36 TextUses:5Used by:64
Symbol 37 TextUses:5Used by:64
Symbol 38 TextUses:5Used by:64
Symbol 39 TextUses:5Used by:64
Symbol 40 TextUses:5Used by:64
Symbol 41 TextUses:5Used by:64
Symbol 42 TextUses:5Used by:64
Symbol 43 EditableTextUses:5Used by:64
Symbol 44 EditableTextUses:5Used by:64
Symbol 45 EditableTextUses:5Used by:64
Symbol 46 EditableTextUses:5Used by:64
Symbol 47 EditableTextUses:5Used by:64
Symbol 48 EditableTextUses:5Used by:64
Symbol 49 EditableTextUses:5Used by:64
Symbol 50 EditableTextUses:5Used by:64
Symbol 51 EditableTextUses:5Used by:64
Symbol 52 EditableTextUses:5Used by:64
Symbol 53 EditableTextUses:5Used by:64
Symbol 54 EditableTextUses:5Used by:64
Symbol 55 EditableTextUses:5Used by:64
Symbol 56 EditableTextUses:5Used by:64
Symbol 57 EditableTextUses:5Used by:64
Symbol 58 EditableTextUses:5Used by:64
Symbol 59 EditableTextUses:5Used by:64
Symbol 60 EditableTextUses:5Used by:64
Symbol 61 EditableTextUses:5Used by:64
Symbol 62 EditableTextUses:5Used by:64
Symbol 63 EditableTextUses:5Used by:64
Symbol 64 MovieClip {ScoreboardScreenMC}Uses:30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63Used by:Timeline
Symbol 65 GraphicUsed by:71
Symbol 66 TextUses:5Used by:71
Symbol 67 TextUses:5Used by:71
Symbol 68 TextUses:5Used by:71
Symbol 69 EditableTextUses:5Used by:71
Symbol 70 EditableTextUses:5Used by:71
Symbol 71 MovieClip {EnterScoreScreenMC}Uses:65 66 67 68 69 70 29Used by:Timeline
Symbol 72 Bitmap {am1}Used by:Timeline
Symbol 73 Bitmap {b}Used by:Timeline
Symbol 74 Bitmap {bk1}Used by:Timeline
Symbol 75 Bitmap {bk10}Used by:Timeline
Symbol 76 Bitmap {bk2}Used by:Timeline
Symbol 77 Bitmap {bk3}Used by:Timeline
Symbol 78 Bitmap {bk4}Used by:Timeline
Symbol 79 Bitmap {bk5}Used by:Timeline
Symbol 80 Bitmap {bk6}Used by:Timeline
Symbol 81 Bitmap {bk7}Used by:Timeline
Symbol 82 Bitmap {bk8}Used by:Timeline
Symbol 83 Bitmap {bk9}Used by:Timeline
Symbol 84 Bitmap {bm1}Used by:Timeline
Symbol 85 Bitmap {e1}Used by:Timeline
Symbol 86 Bitmap {e10}Used by:Timeline
Symbol 87 Bitmap {e11}Used by:Timeline
Symbol 88 Bitmap {e12}Used by:Timeline
Symbol 89 Bitmap {e2}Used by:Timeline
Symbol 90 Bitmap {e3}Used by:Timeline
Symbol 91 Bitmap {e4}Used by:Timeline
Symbol 92 Bitmap {e5}Used by:Timeline
Symbol 93 Bitmap {e6}Used by:Timeline
Symbol 94 Bitmap {e7}Used by:Timeline
Symbol 95 Bitmap {e8}Used by:Timeline
Symbol 96 Bitmap {e9}Used by:Timeline
Symbol 97 Bitmap {ex1}Used by:Timeline
Symbol 98 Bitmap {go}Used by:Timeline
Symbol 99 Bitmap {h1}Used by:Timeline
Symbol 100 Bitmap {h2}Used by:Timeline
Symbol 101 Bitmap {ht1}Used by:Timeline
Symbol 102 GraphicUses:2Used by:Timeline
Symbol 103 Bitmap {sh1}Used by:Timeline
Symbol 104 Bitmap {sh2}Used by:Timeline
Symbol 105 Bitmap {sh3}Used by:Timeline
Symbol 106 Bitmap {t}Used by:Timeline
Symbol 107 Bitmap {titleMini}Used by:Timeline
Symbol 108 Bitmap {tl1}Used by:Timeline
Symbol 109 Bitmap {txt1}Used by:Timeline
Symbol 110 Sound {collectBomb}Used by:115
Symbol 111 Sound {enemyHit1}Used by:115
Symbol 112 Sound {explosion2}Used by:115
Symbol 113 Sound {explosionSmall}Used by:115
Symbol 114 Sound {gun_pistol}Used by:115
Symbol 115 MovieClip {CounterTerror_fla.soundDummy_12}Uses:110 111 112 113 114Used by:Timeline

Instance Names

"screenstage"Symbol 13 MovieClip {Interface1} Frame 1Symbol 10 EditableText
"screenscore"Symbol 13 MovieClip {Interface1} Frame 1Symbol 11 EditableText
"screenlives"Symbol 13 MovieClip {Interface1} Frame 1Symbol 12 EditableText
"demoTries"Symbol 24 MovieClip {demoMenu} Frame 1Symbol 15 EditableText
"bnRegister"Symbol 24 MovieClip {demoMenu} Frame 1Symbol 21 Button
"bnLaunch"Symbol 24 MovieClip {demoMenu} Frame 1Symbol 23 Button
"txtName0"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 43 EditableText
"txtScore0"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 44 EditableText
"txtName1"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 45 EditableText
"txtScore1"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 46 EditableText
"txtName2"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 47 EditableText
"txtScore2"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 48 EditableText
"txtName3"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 49 EditableText
"txtScore3"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 50 EditableText
"txtName4"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 51 EditableText
"txtScore4"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 52 EditableText
"txtName5"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 53 EditableText
"txtScore5"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 54 EditableText
"txtName6"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 55 EditableText
"txtScore6"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 56 EditableText
"txtName7"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 57 EditableText
"txtScore7"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 58 EditableText
"txtName8"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 59 EditableText
"txtScore8"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 60 EditableText
"txtName9"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 61 EditableText
"txtScore9"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 62 EditableText
"txtWarning"Symbol 64 MovieClip {ScoreboardScreenMC} Frame 1Symbol 63 EditableText
"txtScore"Symbol 71 MovieClip {EnterScoreScreenMC} Frame 1Symbol 69 EditableText
"txtName"Symbol 71 MovieClip {EnterScoreScreenMC} Frame 1Symbol 70 EditableText
"bnSubmit"Symbol 71 MovieClip {EnterScoreScreenMC} Frame 1Symbol 29 Button {bnSubmit}

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1368 bytes "<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns ..."
Protect (24)Timeline Frame 131 bytes "..$1$gY$VfL37JTSGuW.Lp/iZQm0i.."

Labels

"startGame"Frame 3




http://swfchan.com/28/135223/info.shtml
Created: 9/2 -2019 15:25:21 Last modified: 9/2 -2019 15:25:21 Server time: 22/12 -2024 09:19:14