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

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

MoneySeize.swf

This is the info page for
Flash #205676

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


ActionScript [AS3]
Section 1
//Bird (com.mattmakesgames.Actors.Birds.Bird) package com.mattmakesgames.Actors.Birds { import com.mattmakesgames.*; import flash.display.*; import com.mattmakesgames.Actors.*; import com.mattmakesgames.Actors.NonGameplay.*; public class Bird extends GameObject { public var flyingAnim:AnimatedBitmap; public var coins:Array; public var soundHit:Class; public var flying:Boolean;// = false public var partColor:uint; public var vSpeed:Number;// = 0 public var soundFly:Class; public var sittingAnim:Bitmap; public var hSpeed:Number;// = 0 public function Bird(level:Level, ax:int, ay:int, coins:Array):void{ super(); solid = false; actor = true; thru = false; this.level = level; level.actorArray.push(this); main = level.main; this.coins = coins; x = ax; y = ay; above = true; hitWidth = 16; hitHeight = 16; } public function flyAway():void{ if (flying){ return; }; Sounds.playSound(soundFly); flying = true; removeChild(sittingAnim); addChild(flyingAnim); hSpeed = -0.5; } public function createParticles():void{ var i:Number; i = 0; while (i < (Math.PI * 2)) { main.partSys.createParticles(1, (x + 8), (y + 8), 3, partColor, 1, 0.5, i, 0, 3, 1, 30, 10, 0.05); i = (i + (Math.PI / 10)); }; } override public function tick():void{ if (flying){ flyingAnim.tick(); vSpeed = Utils.approach(vSpeed, -5, 0.25); y = (y + vSpeed); x = (x + hSpeed); if (y < -20){ destroy(); }; }; } public function die():void{ var temp:EnemyCorpse; var c:Coin; Sounds.playSound(soundHit); var i:int; while (i < coins.length) { c = new Coin(level, x, (y - (i * 16)), coins[i], (15 + (i * 4))); level.addObjectBelow(c); i++; }; if ((this is GoldBird)){ temp = new EnemyCorpse(level, (x + 8), (y + 8), GoldBird.GfxBird3); } else { if ((this is GreenBird)){ temp = new EnemyCorpse(level, (x + 8), (y + 8), GreenBird.GfxBird3); } else { if ((this is PinkBird)){ temp = new EnemyCorpse(level, (x + 8), (y + 8), PinkBird.GfxBird3); }; }; }; temp.scaleY = -1; level.addObjectAbove(temp); createParticles(); destroy(); } } }//package com.mattmakesgames.Actors.Birds
Section 2
//GoldBird (com.mattmakesgames.Actors.Birds.GoldBird) package com.mattmakesgames.Actors.Birds { import com.mattmakesgames.*; public class GoldBird extends Bird { public var start:Boolean;// = false public var time:int; private static const GfxBird2:Class = GoldBird_GfxBird2; public static const GfxBird3:Class = GoldBird_GfxBird3; private static const GfxBird1:Class = GoldBird_GfxBird1; public function GoldBird(level:Level, ax:int, ay:int, coins:Array, time:int):void{ super(level, ax, ay, coins); sittingAnim = new GfxBird1(); sittingAnim.scaleX = 2; sittingAnim.scaleY = 2; sittingAnim.y = -2; addChild(sittingAnim); flyingAnim = new AnimatedBitmap(new Array(new GfxBird2(), new GfxBird3()), 8); flyingAnim.scaleX = 2; flyingAnim.scaleY = 2; flyingAnim.y = -2; this.time = time; level.goldBird = true; soundHit = Sounds.SndBirdGoldHit; soundFly = Sounds.SndBirdGoldFly; partColor = 15728406; } override public function tick():void{ super.tick(); if (((start) && ((time > 0)))){ time--; if (time == 0){ flyAway(); }; }; } } }//package com.mattmakesgames.Actors.Birds
Section 3
//GoldBird_GfxBird1 (com.mattmakesgames.Actors.Birds.GoldBird_GfxBird1) package com.mattmakesgames.Actors.Birds { import mx.core.*; public class GoldBird_GfxBird1 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Birds
Section 4
//GoldBird_GfxBird2 (com.mattmakesgames.Actors.Birds.GoldBird_GfxBird2) package com.mattmakesgames.Actors.Birds { import mx.core.*; public class GoldBird_GfxBird2 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Birds
Section 5
//GoldBird_GfxBird3 (com.mattmakesgames.Actors.Birds.GoldBird_GfxBird3) package com.mattmakesgames.Actors.Birds { import mx.core.*; public class GoldBird_GfxBird3 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Birds
Section 6
//GreenBird (com.mattmakesgames.Actors.Birds.GreenBird) package com.mattmakesgames.Actors.Birds { import com.mattmakesgames.*; public class GreenBird extends Bird { private static const GfxBird2:Class = GreenBird_GfxBird2; public static const GfxBird3:Class = GreenBird_GfxBird3; private static const GfxBird1:Class = GreenBird_GfxBird1; public function GreenBird(level:Level, ax:int, ay:int, coins:Array):void{ super(level, ax, ay, coins); sittingAnim = new GfxBird1(); sittingAnim.scaleX = 2; sittingAnim.scaleY = 2; sittingAnim.y = -2; addChild(sittingAnim); flyingAnim = new AnimatedBitmap(new Array(new GfxBird2(), new GfxBird3()), 8); flyingAnim.scaleX = 2; flyingAnim.scaleY = 2; flyingAnim.y = -2; level.greenBird = true; soundHit = Sounds.SndBirdGreenHit; soundFly = Sounds.SndBirdGreenFly; partColor = 8126230; } } }//package com.mattmakesgames.Actors.Birds
Section 7
//GreenBird_GfxBird1 (com.mattmakesgames.Actors.Birds.GreenBird_GfxBird1) package com.mattmakesgames.Actors.Birds { import mx.core.*; public class GreenBird_GfxBird1 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Birds
Section 8
//GreenBird_GfxBird2 (com.mattmakesgames.Actors.Birds.GreenBird_GfxBird2) package com.mattmakesgames.Actors.Birds { import mx.core.*; public class GreenBird_GfxBird2 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Birds
Section 9
//GreenBird_GfxBird3 (com.mattmakesgames.Actors.Birds.GreenBird_GfxBird3) package com.mattmakesgames.Actors.Birds { import mx.core.*; public class GreenBird_GfxBird3 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Birds
Section 10
//PinkBird (com.mattmakesgames.Actors.Birds.PinkBird) package com.mattmakesgames.Actors.Birds { import com.mattmakesgames.*; public class PinkBird extends Bird { private static const GfxBird2:Class = PinkBird_GfxBird2; public static const GfxBird3:Class = PinkBird_GfxBird3; private static const GfxBird1:Class = PinkBird_GfxBird1; public function PinkBird(level:Level, ax:int, ay:int, coins:Array):void{ super(level, ax, ay, coins); sittingAnim = new GfxBird1(); sittingAnim.scaleX = 2; sittingAnim.scaleY = 2; sittingAnim.y = -2; addChild(sittingAnim); flyingAnim = new AnimatedBitmap(new Array(new GfxBird2(), new GfxBird3()), 8); flyingAnim.scaleX = 2; flyingAnim.scaleY = 2; flyingAnim.y = -2; level.pinkBird = true; soundHit = Sounds.SndBirdPinkHit; soundFly = Sounds.SndBirdPinkFly; partColor = 16717493; } } }//package com.mattmakesgames.Actors.Birds
Section 11
//PinkBird_GfxBird1 (com.mattmakesgames.Actors.Birds.PinkBird_GfxBird1) package com.mattmakesgames.Actors.Birds { import mx.core.*; public class PinkBird_GfxBird1 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Birds
Section 12
//PinkBird_GfxBird2 (com.mattmakesgames.Actors.Birds.PinkBird_GfxBird2) package com.mattmakesgames.Actors.Birds { import mx.core.*; public class PinkBird_GfxBird2 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Birds
Section 13
//PinkBird_GfxBird3 (com.mattmakesgames.Actors.Birds.PinkBird_GfxBird3) package com.mattmakesgames.Actors.Birds { import mx.core.*; public class PinkBird_GfxBird3 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Birds
Section 14
//Blue (com.mattmakesgames.Actors.Enemies.Blue) package com.mattmakesgames.Actors.Enemies { import com.mattmakesgames.*; public class Blue extends Enemy { public var xMin:int; public var xMax:int; public var dir:int; public var change:int;// = 0 public var gfx:AnimatedBitmap; private static const GfxBlue1:Class = Blue_GfxBlue1; private static const GfxBlue2:Class = Blue_GfxBlue2; public function Blue(lvl:Level, ax:int, ay:int, d:int, xmn:int, xmx:int, coin:int):void{ super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; hitHeight = 16; hitWidth = 16; coinX = 0; coinY = 0; this.coin = coin; x = ax; y = ay; xMin = xmn; xMax = xmx; var imgArr:Array = new Array(new GfxBlue1(), new GfxBlue2()); gfx = new AnimatedBitmap(imgArr, 8); gfx.scaleY = 2; setDir(d); addChild(gfx); partColor = 4998868; } public function setDir(d:int):void{ dir = d; gfx.scaleX = (-2 * dir); gfx.x = (10 + (12 * dir)); } override public function tick():void{ gfx.tick(); if (change > 0){ change--; if (change == 0){ setDir(-(dir)); }; return; }; x = (x + (dir * 1)); if ((((dir == -1)) && ((x <= xMin)))){ x = xMin; change = 50; } else { if ((((dir == 1)) && ((x >= xMax)))){ x = xMax; change = 50; }; }; } } }//package com.mattmakesgames.Actors.Enemies
Section 15
//Blue_GfxBlue1 (com.mattmakesgames.Actors.Enemies.Blue_GfxBlue1) package com.mattmakesgames.Actors.Enemies { import mx.core.*; public class Blue_GfxBlue1 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Enemies
Section 16
//Blue_GfxBlue2 (com.mattmakesgames.Actors.Enemies.Blue_GfxBlue2) package com.mattmakesgames.Actors.Enemies { import mx.core.*; public class Blue_GfxBlue2 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Enemies
Section 17
//Enemy (com.mattmakesgames.Actors.Enemies.Enemy) package com.mattmakesgames.Actors.Enemies { import com.mattmakesgames.*; import com.mattmakesgames.Actors.*; import com.mattmakesgames.Actors.Birds.*; import com.mattmakesgames.Actors.NonGameplay.*; public class Enemy extends GameObject { public var coin:int; public var coinX:int; public var coinY:int; public var partColor:uint; public function Enemy(){ super(); } public function die():void{ var o:GameObject; Sounds.playSound(Sounds.SndEnemyHit); if (level.pinkBird){ for each (o in level.actorArray) { if ((o is PinkBird)){ (o as PinkBird).flyAway(); }; }; }; if ((this is Blue)){ level.addObjectAbove(new EnemyCorpse(level, (x + 8), (y + 8), EnemyCorpse.GfxBlueX)); } else { if ((this is Pinko)){ level.addObjectAbove(new EnemyCorpse(level, (x + 8), (y + 8), EnemyCorpse.GfxPinkoX)); } else { if ((this is Green)){ level.addObjectAbove(new EnemyCorpse(level, (x + 8), (y + 8), EnemyCorpse.GfxGreenX)); }; }; }; main.partSys.createParticles(10, (x + 8), (y + 8), 6, partColor, 2, 1, 0, (Math.PI * 2), 2, 2, 10, 10, 0.1); if (coin != -1){ level.addObjectBelow(new Coin(level, (x + coinX), (y + coinY), coin, 15)); }; destroy(); } } }//package com.mattmakesgames.Actors.Enemies
Section 18
//Green (com.mattmakesgames.Actors.Enemies.Green) package com.mattmakesgames.Actors.Enemies { import com.mattmakesgames.*; import flash.display.*; public class Green extends Enemy { public var gfx:AnimatedBitmap; public var vSpeed:Number; public var startY:int; public var gfx2:Bitmap; public var gfx3:Bitmap; public var jumping:Boolean;// = false public var counter:int;// = 30 public var gfx1:Bitmap; private static const GfxGreen1:Class = Green_GfxGreen1; private static const GfxGreen2:Class = Green_GfxGreen2; private static const GfxGreen3:Class = Green_GfxGreen3; public function Green(lvl:Level, ax:int, ay:int, coin:int):void{ gfx1 = new GfxGreen1(); gfx2 = new GfxGreen2(); gfx3 = new GfxGreen3(); super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; hitHeight = 12; hitWidth = 16; coinX = 0; coinY = -4; x = ax; y = ay; startY = y; this.coin = coin; gfx1.scaleX = 2; gfx1.scaleY = 2; gfx1.y = -4; gfx2.scaleX = 2; gfx2.scaleY = 2; gfx2.y = -4; gfx3.scaleX = 2; gfx3.scaleY = 2; gfx3.y = -4; addChild(gfx1); partColor = 429072; } public function jump():void{ vSpeed = -7; jumping = true; removeChild(gfx1); addChild(gfx2); } override public function tick():void{ if (jumping){ y = (y + vSpeed); vSpeed = Math.min((vSpeed + 0.4), 5); if ((((vSpeed >= 0)) && ((counter == 0)))){ counter = 30; removeChild(gfx2); addChild(gfx3); }; if (y >= startY){ y = startY; removeChild(gfx3); addChild(gfx1); jumping = false; }; } else { counter--; if (counter == 0){ jump(); }; }; } } }//package com.mattmakesgames.Actors.Enemies
Section 19
//Green_GfxGreen1 (com.mattmakesgames.Actors.Enemies.Green_GfxGreen1) package com.mattmakesgames.Actors.Enemies { import mx.core.*; public class Green_GfxGreen1 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Enemies
Section 20
//Green_GfxGreen2 (com.mattmakesgames.Actors.Enemies.Green_GfxGreen2) package com.mattmakesgames.Actors.Enemies { import mx.core.*; public class Green_GfxGreen2 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Enemies
Section 21
//Green_GfxGreen3 (com.mattmakesgames.Actors.Enemies.Green_GfxGreen3) package com.mattmakesgames.Actors.Enemies { import mx.core.*; public class Green_GfxGreen3 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Enemies
Section 22
//Pinko (com.mattmakesgames.Actors.Enemies.Pinko) package com.mattmakesgames.Actors.Enemies { import com.mattmakesgames.*; public class Pinko extends Enemy { public var xMin:int; public var xMax:int; public var dir:int; public var change:int;// = 0 public var gfx:AnimatedBitmap; private static const GfxPinko1:Class = Pinko_GfxPinko1; private static const GfxPinko2:Class = Pinko_GfxPinko2; public function Pinko(lvl:Level, ax:int, ay:int, d:int, xmn:int, xmx:int, coin:int):void{ super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; carry = true; hitHeight = 16; hitWidth = 16; coinX = 0; coinY = 0; this.coin = coin; x = ax; y = ay; xMin = xmn; xMax = xmx; var imgArr:Array = new Array(new GfxPinko1(), new GfxPinko2()); gfx = new AnimatedBitmap(imgArr, 8); gfx.scaleY = 2; setDir(d); addChild(gfx); partColor = 9720460; } public function setDir(d:int):void{ dir = d; gfx.scaleX = (-2 * dir); gfx.x = (8 + (8 * dir)); } override public function move(ax:Number, ay:Number=0):void{ x = (x + ax); xMin = (xMin + ax); xMax = (xMax + ax); y = (y + ay); } override public function tick():void{ gfx.tick(); if (change > 0){ change--; if (change == 0){ gfx.stop = false; setDir(-(dir)); }; return; }; x = (x + (dir * 1)); if ((((dir == -1)) && ((x <= xMin)))){ x = xMin; change = 50; gfx.stop = true; gfx.current = 0; } else { if ((((dir == 1)) && ((x >= xMax)))){ x = xMax; change = 50; gfx.stop = true; gfx.current = 0; }; }; } } }//package com.mattmakesgames.Actors.Enemies
Section 23
//Pinko_GfxPinko1 (com.mattmakesgames.Actors.Enemies.Pinko_GfxPinko1) package com.mattmakesgames.Actors.Enemies { import mx.core.*; public class Pinko_GfxPinko1 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Enemies
Section 24
//Pinko_GfxPinko2 (com.mattmakesgames.Actors.Enemies.Pinko_GfxPinko2) package com.mattmakesgames.Actors.Enemies { import mx.core.*; public class Pinko_GfxPinko2 extends BitmapAsset { } }//package com.mattmakesgames.Actors.Enemies
Section 25
//CoinDead (com.mattmakesgames.Actors.NonGameplay.CoinDead) package com.mattmakesgames.Actors.NonGameplay { import com.mattmakesgames.*; import com.mattmakesgames.Actors.*; public class CoinDead extends GameObject { public var vSpeed:Number;// = 0 public var gfx:AnimatedBitmap; public var counter:int;// = 40 public var hSpeed:Number;// = 0 public function CoinDead(lvl:Level, ax:int, ay:int):void{ super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; above = true; x = ax; y = ay; hSpeed = (-2 + (Math.random() * 4)); vSpeed = (-3 - (Math.random() * 2)); var imgArr:Array = new Array(); imgArr.push(new Coin.GfxCoin1()); imgArr.push(new Coin.GfxCoin2()); imgArr.push(new Coin.GfxCoin3()); imgArr.push(new Coin.GfxCoin4()); imgArr.push(new Coin.GfxCoin3()); imgArr.push(new Coin.GfxCoin2()); gfx = new AnimatedBitmap(imgArr, 3); gfx.scaleX = 2; gfx.scaleY = 2; addChild(gfx); Sounds.playSound(Sounds.SndLoseCoin); level.screenShake(2); } public function createParticles():void{ main.partSys.createParticles(10, (x + 8), (y + 8), 10, 16643968, 2, 1, Math.PI, Math.PI, 3, 2, 10, 8, 0.2); } override public function tick():void{ if (!visible){ return; }; gfx.tick(); hSpeed = Utils.approach(hSpeed, 0, 0.02); vSpeed = Math.min((vSpeed + 0.1), 4); x = (x + hSpeed); y = (y + vSpeed); if (y < -2){ y = -2; vSpeed = (vSpeed * -1); }; if (x < -2){ x = -2; hSpeed = (hSpeed * -1); } else { if (x > 626){ x = 626; hSpeed = (hSpeed * -1); }; }; counter--; if (counter == 0){ createParticles(); visible = false; }; } } }//package com.mattmakesgames.Actors.NonGameplay
Section 26
//Corpse (com.mattmakesgames.Actors.NonGameplay.Corpse) package com.mattmakesgames.Actors.NonGameplay { import com.mattmakesgames.*; import flash.display.*; public class Corpse extends GameObject { public var coinSpacing:int; public var coins:int; public var speed:Number;// = 5 public var coinCounter:int;// = 0 public var dir:int; public var count:int;// = 15 public var gfx:Bitmap; public var moveDir:Number; private static const GfxDead:Class = Corpse_GfxDead; public function Corpse(lvl:Level, ax:int, ay:int, dir:int):void{ super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; above = true; x = ax; y = ay; this.dir = dir; moveDir = (-((Math.PI / 2)) + ((Math.PI / 4) * dir)); gfx = new GfxDead(); gfx.scaleX = (2 * -(dir)); gfx.scaleY = 2; gfx.x = (8 + (13 * dir)); gfx.y = -4; addChild(gfx); coins = level.coins.length; if (coins > 0){ coinSpacing = Math.floor((25 / coins)); coinCounter = 10; }; } override public function destroy():void{ var i:Number = 0; while (i < (Math.PI * 2)) { main.partSys.createParticles(1, (x + 8), (y + 8), 2, 0, 1, 0, i, 0, 3, 2, 30, 12, 0.02); i = (i + (Math.PI / 8)); }; var j:Number = 0; while (j < (Math.PI * 2)) { main.partSys.createParticles(5, (x + 8), (y + 8), 10, 0, 3, 0.5, j, 0, 3, 2, 15, 6); j = (j + (Math.PI / 2)); }; main.partSys.createParticles(10, (x + 8), (y + 8), 10, 0, 1.5, 0.5, 0, (Math.PI * 2), 3, 2, 15, 6); Sounds.playSound(Sounds.SndDieExplode); Utils.removeFromArray(level.actorArray, this); level.gameHolderAbove.removeChild(this); } override public function tick():void{ if (coinCounter > 0){ coinCounter--; if (coinCounter == 0){ level.addObjectAboveBottom(new CoinDead(level, x, y)); coins--; if (coins > 0){ coinCounter = coinSpacing; }; }; }; if (speed > 0){ x = (x + (Math.cos(moveDir) * speed)); y = (y + (Math.sin(moveDir) * speed)); speed = Math.max(0, (speed - 0.2)); x = Math.max(0, x); x = Math.min(624, x); y = Math.max(0, y); } else { count--; if (count <= 0){ level.screenShake(10); destroy(); }; }; } } }//package com.mattmakesgames.Actors.NonGameplay
Section 27
//Corpse_GfxDead (com.mattmakesgames.Actors.NonGameplay.Corpse_GfxDead) package com.mattmakesgames.Actors.NonGameplay { import mx.core.*; public class Corpse_GfxDead extends BitmapAsset { } }//package com.mattmakesgames.Actors.NonGameplay
Section 28
//DeadControl (com.mattmakesgames.Actors.NonGameplay.DeadControl) package com.mattmakesgames.Actors.NonGameplay { import com.mattmakesgames.*; import com.mattmakesgames.Menus.*; public class DeadControl extends GameObject { public var controls:ShowControls; public var count:int;// = 10 public function DeadControl(lvl:Level):void{ super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; above = true; controls = new ShowControls(main); controls.alpha = 0; addChild(controls); } public function backToMap():void{ level.backToMap(); } public function incDeaths():void{ var _local1 = Data.lvlDeaths; var _local2 = (level.levelNum - 1); var _local3 = (_local1[_local2] + 1); _local1[_local2] = _local3; Data.totalDeaths++; } public function restartLevel():void{ level.resetLevel(); } override public function destroy():void{ Utils.removeFromArray(level.actorArray, this); level.gameHolderAbove.removeChild(this); } override public function tick():void{ controls.alpha = (controls.alpha + 0.05); if (count > 0){ count--; } else { if (((main.kp_jump) || (main.kp_restart))){ incDeaths(); restartLevel(); } else { if (main.kp_pause){ incDeaths(); backToMap(); }; }; }; } } }//package com.mattmakesgames.Actors.NonGameplay
Section 29
//Dust (com.mattmakesgames.Actors.NonGameplay.Dust) package com.mattmakesgames.Actors.NonGameplay { import com.mattmakesgames.*; import flash.display.*; public class Dust extends GameObject { public var vSpeed:Number; public var startX:Number; public var startY:Number; public var gfx:Bitmap; public var counter:Number;// = 1.5 public var hSpeed:Number; private static const GfxDust:Class = Dust_GfxDust; public function Dust(level:Level, ax:int, ay:int, hSpeed:Number=0, vSpeed:Number=0):void{ super(); solid = false; actor = true; thru = false; this.level = level; level.actorArray.push(this); main = level.main; x = ax; y = ay; this.hSpeed = hSpeed; this.vSpeed = vSpeed; startX = (2 + (Math.random() * 1.5)); startY = (2 + (Math.random() * 1.5)); scaleX = startX; scaleY = startY; gfx = new GfxDust(); gfx.x = -2; gfx.y = -2; addChild(gfx); } override public function tick():void{ y = (y + vSpeed); x = (x + hSpeed); counter = (counter - 0.05); if (counter < 0){ destroy(); return; }; scaleX = (startX * Math.min(counter, 1)); scaleY = (startY * Math.min(counter, 1)); } } }//package com.mattmakesgames.Actors.NonGameplay
Section 30
//Dust_GfxDust (com.mattmakesgames.Actors.NonGameplay.Dust_GfxDust) package com.mattmakesgames.Actors.NonGameplay { import mx.core.*; public class Dust_GfxDust extends BitmapAsset { } }//package com.mattmakesgames.Actors.NonGameplay
Section 31
//EnemyCorpse (com.mattmakesgames.Actors.NonGameplay.EnemyCorpse) package com.mattmakesgames.Actors.NonGameplay { import com.mattmakesgames.*; import flash.display.*; public class EnemyCorpse extends GameObject { public var vSpeed:Number; public var gfx:Bitmap; public var hSpeed:Number; public static const GfxBlueX:Class = EnemyCorpse_GfxBlueX; public static const GfxPinkoX:Class = EnemyCorpse_GfxPinkoX; public static const GfxGreenX:Class = EnemyCorpse_GfxGreenX; public function EnemyCorpse(level:Level, ax:int, ay:int, spr:Class){ super(); solid = false; actor = true; thru = false; this.level = level; level.actorArray.push(this); main = level.main; above = true; x = ax; y = ay; gfx = new (spr); gfx.x = -(gfx.width); gfx.y = -(gfx.height); gfx.scaleX = 2; gfx.scaleY = 2; addChild(gfx); hSpeed = (-1 + (Math.random() * 2)); vSpeed = (-2 - (Math.random() * 1)); } override public function tick():void{ x = (x + hSpeed); y = (y + vSpeed); if ((((((x > 650)) || ((x < -10)))) || ((y > 490)))){ destroy(); return; }; vSpeed = Math.min((vSpeed + 0.3), 6); rotation = (rotation - vSpeed); } } }//package com.mattmakesgames.Actors.NonGameplay
Section 32
//EnemyCorpse_GfxBlueX (com.mattmakesgames.Actors.NonGameplay.EnemyCorpse_GfxBlueX) package com.mattmakesgames.Actors.NonGameplay { import mx.core.*; public class EnemyCorpse_GfxBlueX extends BitmapAsset { } }//package com.mattmakesgames.Actors.NonGameplay
Section 33
//EnemyCorpse_GfxGreenX (com.mattmakesgames.Actors.NonGameplay.EnemyCorpse_GfxGreenX) package com.mattmakesgames.Actors.NonGameplay { import mx.core.*; public class EnemyCorpse_GfxGreenX extends BitmapAsset { } }//package com.mattmakesgames.Actors.NonGameplay
Section 34
//EnemyCorpse_GfxPinkoX (com.mattmakesgames.Actors.NonGameplay.EnemyCorpse_GfxPinkoX) package com.mattmakesgames.Actors.NonGameplay { import mx.core.*; public class EnemyCorpse_GfxPinkoX extends BitmapAsset { } }//package com.mattmakesgames.Actors.NonGameplay
Section 35
//TheEnd (com.mattmakesgames.Actors.NonGameplay.TheEnd) package com.mattmakesgames.Actors.NonGameplay { import com.mattmakesgames.*; import com.mattmakesgames.Menus.*; public class TheEnd extends GameObject { public var startX:Number; public var startY:Number; public var posCount:Number;// = 0 public function TheEnd(lvl:Level, ax:int, ay:int):void{ var temp:MenuItem; super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; above = true; x = ax; y = ay; startX = x; startY = y; temp = new MenuItem(main, "The End", true, 48); temp.y = -35; addChild(temp); temp = new MenuItem(main, ("Deaths: " + Data.totalDeaths), true, 24); addChild(temp); alpha = 0; } override public function tick():void{ posCount = ((posCount + (Math.PI / 40)) % (Math.PI * 8)); x = (startX + (10 * Math.sin(posCount))); y = (startY + (10 * Math.sin((posCount / 2)))); rotation = (5 * Math.sin((posCount / 4))); if (level.player != null){ if ((((((level.player.y <= 170)) && (!(level.player.duck)))) || ((((level.player.y <= 176)) && (level.player.duck))))){ if (alpha < 1){ alpha = (alpha + 0.01); }; } else { if (alpha > 0){ alpha = (alpha - 0.05); }; }; }; } } }//package com.mattmakesgames.Actors.NonGameplay
Section 36
//Tophat (com.mattmakesgames.Actors.NonGameplay.Tophat) package com.mattmakesgames.Actors.NonGameplay { import com.mattmakesgames.*; import flash.display.*; public class Tophat extends GameObject { public var vSpeed:Number; public var gfx:Bitmap; public var dir:int; public var hSpeed:Number; private static const GfxTophat:Class = Tophat_GfxTophat; public function Tophat(lvl:Level, ax:int, ay:int, dir:int):void{ super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; above = true; x = ax; y = ay; this.dir = dir; vSpeed = (-3 - Math.random()); hSpeed = ((1 + Math.random()) * dir); gfx = new GfxTophat(); gfx.x = -6; gfx.y = -4; gfx.scaleX = 2; gfx.scaleY = 2; addChild(gfx); } override public function tick():void{ vSpeed = Math.min((vSpeed + 0.2), 4); x = (x + hSpeed); y = (y + vSpeed); rotation = (rotation - (vSpeed * dir)); if (y >= 490){ destroy(); }; } override public function destroy():void{ Utils.removeFromArray(level.actorArray, this); level.gameHolderAbove.removeChild(this); } } }//package com.mattmakesgames.Actors.NonGameplay
Section 37
//Tophat_GfxTophat (com.mattmakesgames.Actors.NonGameplay.Tophat_GfxTophat) package com.mattmakesgames.Actors.NonGameplay { import mx.core.*; public class Tophat_GfxTophat extends BitmapAsset { } }//package com.mattmakesgames.Actors.NonGameplay
Section 38
//ColorSwitch (com.mattmakesgames.Actors.switches.ColorSwitch) package com.mattmakesgames.Actors.switches { import com.mattmakesgames.*; import flash.display.*; public class ColorSwitch extends GameObject { public var down:Boolean; public var topX:int; public var topY:int; public var color:uint; public var blockClass:Class; public var downClass:Class; public var upClass:Class; public function ColorSwitch(level:Level, down:Boolean, upClass:Class, downClass:Class, ax:int, ay:int):void{ super(); solid = true; actor = true; thru = false; this.level = level; level.solidArray.push(this); level.actorArray.push(this); main = level.main; this.blockClass = blockClass; this.upClass = upClass; this.downClass = downClass; this.down = down; topX = ax; topY = ay; setGfxAndBox(); } public function hit():void{ Sounds.playSound(Sounds.SndSwitch); setSaveData(); level.screenShake(40); down = true; setGfxAndBox(); makeAppear(); var i:int; while (i < 20) { main.partSys.createParticles(1, ((x + 1) + (Math.random() * 18)), (y + 4), 0, color, 0.5, 0.5, ((-(Math.PI) / 2) - (Math.PI / 16)), (Math.PI / 8), 2, 2, 50, 30, 0.02); main.partSys.createParticles(1, ((x + 1) + (Math.random() * 18)), (y + 4), 0, color, 1.5, 0.5, ((-(Math.PI) / 2) - (Math.PI / 16)), (Math.PI / 8), 2, 2, 50, 30, 0.02); i++; }; } public function setSaveData():void{ } public function setGfxAndBox():void{ var temp:Bitmap; if (numChildren > 0){ removeChildAt(0); }; if (down){ x = (topX + 4); y = (topY + 8); hitWidth = 24; hitHeight = 8; temp = new downClass(); } else { x = (topX + 6); y = (topY + 2); hitWidth = 20; hitHeight = 14; temp = new upClass(); }; temp.x = (topX - x); temp.y = (topY - y); temp.scaleX = 2; temp.scaleY = 2; addChild(temp); } public function makeAppear():void{ } override public function tick():void{ if (((!(down)) && (placePlayer(0, -1)))){ hit(); }; } } }//package com.mattmakesgames.Actors.switches
Section 39
//GreenSwitch (com.mattmakesgames.Actors.switches.GreenSwitch) package com.mattmakesgames.Actors.switches { import com.mattmakesgames.*; import flash.display.*; import com.mattmakesgames.Blocks.*; public class GreenSwitch extends ColorSwitch { public static const GfxSwitchUp:Class = GreenSwitch_GfxSwitchUp; public static const GfxSwitchDown:Class = GreenSwitch_GfxSwitchDown; public function GreenSwitch(level:Level, down:Boolean, ax:int, ay:int){ super(level, down, GfxSwitchUp, GfxSwitchDown, ax, ay); color = 8126230; } override public function setSaveData():void{ Data.switchGreen = true; } override public function makeAppear():void{ var o:DisplayObject; var i:int; while (i < level.blockHolder.numChildren) { o = level.blockHolder.getChildAt(i); if ((o is GreenBlock)){ (o as GreenBlock).createParticles(); (o as GreenBlock).appear(); }; i++; }; } } }//package com.mattmakesgames.Actors.switches
Section 40
//GreenSwitch_GfxSwitchDown (com.mattmakesgames.Actors.switches.GreenSwitch_GfxSwitchDown) package com.mattmakesgames.Actors.switches { import mx.core.*; public class GreenSwitch_GfxSwitchDown extends BitmapAsset { } }//package com.mattmakesgames.Actors.switches
Section 41
//GreenSwitch_GfxSwitchUp (com.mattmakesgames.Actors.switches.GreenSwitch_GfxSwitchUp) package com.mattmakesgames.Actors.switches { import mx.core.*; public class GreenSwitch_GfxSwitchUp extends BitmapAsset { } }//package com.mattmakesgames.Actors.switches
Section 42
//OrangeSwitch (com.mattmakesgames.Actors.switches.OrangeSwitch) package com.mattmakesgames.Actors.switches { import com.mattmakesgames.*; import flash.display.*; import com.mattmakesgames.Blocks.*; public class OrangeSwitch extends ColorSwitch { public static const GfxSwitchUp:Class = OrangeSwitch_GfxSwitchUp; public static const GfxSwitchDown:Class = OrangeSwitch_GfxSwitchDown; public function OrangeSwitch(level:Level, down:Boolean, ax:int, ay:int){ super(level, down, GfxSwitchUp, GfxSwitchDown, ax, ay); color = 16755990; } override public function setSaveData():void{ Data.switchOrange = true; } override public function makeAppear():void{ var o:DisplayObject; var i:int; while (i < level.blockHolder.numChildren) { o = level.blockHolder.getChildAt(i); if ((o is OrangeBlock)){ (o as OrangeBlock).createParticles(); (o as OrangeBlock).appear(); }; i++; }; } } }//package com.mattmakesgames.Actors.switches
Section 43
//OrangeSwitch_GfxSwitchDown (com.mattmakesgames.Actors.switches.OrangeSwitch_GfxSwitchDown) package com.mattmakesgames.Actors.switches { import mx.core.*; public class OrangeSwitch_GfxSwitchDown extends BitmapAsset { } }//package com.mattmakesgames.Actors.switches
Section 44
//OrangeSwitch_GfxSwitchUp (com.mattmakesgames.Actors.switches.OrangeSwitch_GfxSwitchUp) package com.mattmakesgames.Actors.switches { import mx.core.*; public class OrangeSwitch_GfxSwitchUp extends BitmapAsset { } }//package com.mattmakesgames.Actors.switches
Section 45
//PinkSwitch (com.mattmakesgames.Actors.switches.PinkSwitch) package com.mattmakesgames.Actors.switches { import com.mattmakesgames.*; import flash.display.*; import com.mattmakesgames.Blocks.*; public class PinkSwitch extends ColorSwitch { public static const GfxSwitchUp:Class = PinkSwitch_GfxSwitchUp; public static const GfxSwitchDown:Class = PinkSwitch_GfxSwitchDown; public function PinkSwitch(level:Level, down:Boolean, ax:int, ay:int){ super(level, down, GfxSwitchUp, GfxSwitchDown, ax, ay); color = 16717493; } override public function setSaveData():void{ Data.switchPink = true; } override public function makeAppear():void{ var o:DisplayObject; var i:int; while (i < level.blockHolder.numChildren) { o = level.blockHolder.getChildAt(i); if ((o is PinkBlock)){ (o as PinkBlock).createParticles(); (o as PinkBlock).appear(); }; i++; }; } } }//package com.mattmakesgames.Actors.switches
Section 46
//PinkSwitch_GfxSwitchDown (com.mattmakesgames.Actors.switches.PinkSwitch_GfxSwitchDown) package com.mattmakesgames.Actors.switches { import mx.core.*; public class PinkSwitch_GfxSwitchDown extends BitmapAsset { } }//package com.mattmakesgames.Actors.switches
Section 47
//PinkSwitch_GfxSwitchUp (com.mattmakesgames.Actors.switches.PinkSwitch_GfxSwitchUp) package com.mattmakesgames.Actors.switches { import mx.core.*; public class PinkSwitch_GfxSwitchUp extends BitmapAsset { } }//package com.mattmakesgames.Actors.switches
Section 48
//YellowSwitch (com.mattmakesgames.Actors.switches.YellowSwitch) package com.mattmakesgames.Actors.switches { import com.mattmakesgames.*; import flash.display.*; import com.mattmakesgames.Blocks.*; public class YellowSwitch extends ColorSwitch { public static const GfxSwitchUp:Class = YellowSwitch_GfxSwitchUp; public static const GfxSwitchDown:Class = YellowSwitch_GfxSwitchDown; public function YellowSwitch(level:Level, down:Boolean, ax:int, ay:int){ super(level, down, GfxSwitchUp, GfxSwitchDown, ax, ay); color = 15728406; } override public function setSaveData():void{ Data.switchYellow = true; } override public function makeAppear():void{ var o:DisplayObject; var i:int; while (i < level.blockHolder.numChildren) { o = level.blockHolder.getChildAt(i); if ((o is YellowBlock)){ (o as YellowBlock).createParticles(); (o as YellowBlock).appear(); }; i++; }; } } }//package com.mattmakesgames.Actors.switches
Section 49
//YellowSwitch_GfxSwitchDown (com.mattmakesgames.Actors.switches.YellowSwitch_GfxSwitchDown) package com.mattmakesgames.Actors.switches { import mx.core.*; public class YellowSwitch_GfxSwitchDown extends BitmapAsset { } }//package com.mattmakesgames.Actors.switches
Section 50
//YellowSwitch_GfxSwitchUp (com.mattmakesgames.Actors.switches.YellowSwitch_GfxSwitchUp) package com.mattmakesgames.Actors.switches { import mx.core.*; public class YellowSwitch_GfxSwitchUp extends BitmapAsset { } }//package com.mattmakesgames.Actors.switches
Section 51
//Balloon (com.mattmakesgames.Actors.Balloon) package com.mattmakesgames.Actors { import com.mattmakesgames.*; import flash.display.*; public class Balloon extends GameObject { public var coin:int; public var respawn:int; public var gfx:Bitmap; public var yAdd:Number; public static const RESPAWN_TIME:int = 150; private static const GfxBalloon:Class = Balloon_GfxBalloon; public function Balloon(lvl:Level, ax:int, ay:int, coin:int):void{ super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; hitWidth = 16; hitHeight = 2; x = ax; y = ay; this.coin = coin; gfx = new Balloon.GfxBalloon(); gfx.x = -2; gfx.y = -2; gfx.scaleX = 2; gfx.scaleY = 2; addChild(gfx); yAdd = ((Math.random() * Math.PI) * 2); } override public function tick():void{ if (respawn > 0){ respawn--; if (respawn == 0){ yAdd = 0; visible = true; }; } else { yAdd = ((yAdd + (Math.PI / 32)) % (Math.PI * 2)); gfx.y = (-2 + (2 * Math.sin(yAdd))); }; } public function pop():void{ Sounds.playSound(Sounds.SndBalloon); main.partSys.createParticles(10, (x + 8), (y + 8), 10, 0xFF0000, 2, 1, Math.PI, Math.PI, 3, 2, 10, 8); if (coin != -1){ level.addObjectBelow(new Coin(level, x, y, coin, 15)); coin = -1; }; visible = false; respawn = RESPAWN_TIME; } } }//package com.mattmakesgames.Actors
Section 52
//Balloon_GfxBalloon (com.mattmakesgames.Actors.Balloon_GfxBalloon) package com.mattmakesgames.Actors { import mx.core.*; public class Balloon_GfxBalloon extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 53
//Blade (com.mattmakesgames.Actors.Blade) package com.mattmakesgames.Actors { import com.mattmakesgames.*; import flash.display.*; public class Blade extends GameObject { public var gfx:Sprite; private static const GfxBlade:Class = Blade_GfxBlade; public function Blade(level:Level, ax:int, ay:int):void{ var temp:Bitmap; super(); solid = false; actor = true; thru = false; this.level = level; level.actorArray.push(this); main = level.main; hitWidth = 12; hitHeight = 12; x = ax; y = ay; gfx = new Sprite(); gfx.x = 6; gfx.y = 6; gfx.rotation = (Math.random() * 360); addChild(gfx); temp = new GfxBlade(); temp.scaleX = 2; temp.scaleY = 2; temp.x = -8; temp.y = -8; gfx.addChild(temp); } override public function tick():void{ gfx.rotation = ((gfx.rotation + 10) % 360); } } }//package com.mattmakesgames.Actors
Section 54
//Blade_GfxBlade (com.mattmakesgames.Actors.Blade_GfxBlade) package com.mattmakesgames.Actors { import mx.core.*; public class Blade_GfxBlade extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 55
//Cannon (com.mattmakesgames.Actors.Cannon) package com.mattmakesgames.Actors { import com.mattmakesgames.*; import flash.display.*; public class Cannon extends GameObject { public var rider:Boolean;// = false public var holding:Boolean;// = false public var turnCountV:int; public var gotoH:Number; public var xMax:int; public var dir:Number; public var sizeCount:Number;// = 0 public var gfx:Sprite; public var gotoV:Number; public var yMin:int; public var autoCount:int; public var yMax:int; public var auto:Boolean; public var vSpeed:Number; public var rSpeed:Number; public var turnCountH:int; public var turnTime:int; public var xMin:int; public var counter:int; public var hSpeed:Number; private static const COUNTER_MAX:int = 8; private static const GfxCannon:Class = Cannon_GfxCannon; private static const SHOOT_SPEED:int = 10; private static const SHOOT_TIME:int = 5; public function Cannon(lvl:Level, ax:int, ay:int, hSpeed:Number, xMin:int, xMax:int, vSpeed:Number, yMin:int, yMax:int, turnTime:int, rSpeed:int, startDir:Number, auto:int, rider:int):void{ var temp:Bitmap; super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; x = ax; y = ay; hitHeight = 16; hitWidth = 16; dir = startDir; this.rSpeed = ((Math.PI / 8) * rSpeed); this.xMin = xMin; this.xMax = xMax; this.yMin = yMin; this.yMax = yMax; this.turnTime = turnTime; this.auto = (auto == 1); if (rider == 1){ this.rider = true; this.gotoH = hSpeed; this.hSpeed = 0; this.gotoV = vSpeed; this.vSpeed = 0; } else { this.hSpeed = hSpeed; this.vSpeed = vSpeed; }; gfx = new Sprite(); temp = new GfxCannon(); temp.x = -5; temp.y = -5; gfx.addChild(temp); gfx.scaleX = 2; gfx.scaleY = 2; gfx.x = 8; gfx.y = 8; addChild(gfx); counter = COUNTER_MAX; } public function updateSize():void{ sizeCount = ((sizeCount + (Math.PI / 20)) % (Math.PI * 2)); var s:Number = (2.4 + (0.2 * Math.sin(sizeCount))); gfx.scaleX = s; gfx.scaleY = s; } public function fill():void{ Sounds.playSound(Sounds.SndCannonFill); sizeCount = (Math.PI / 2); holding = true; if (auto){ autoCount = 20; }; if (rider){ rider = false; hSpeed = gotoH; vSpeed = gotoV; }; } public function turnV():void{ gotoV = -(vSpeed); vSpeed = 0; turnCountV = turnTime; } override public function tick():void{ var n:Boolean; if (gfx.x != 8){ n = true; gfx.x = Utils.approach(gfx.x, 8, 0.5); }; if (gfx.y != 8){ n = true; gfx.y = Utils.approach(gfx.y, 8, 0.5); }; if (n){ return; }; if (hSpeed != 0){ x = (x + hSpeed); if (x < xMin){ x = xMin; turnH(); } else { if (x > xMax){ x = xMax; turnH(); }; }; } else { if (turnCountH > 0){ turnCountH--; if (turnCountH == 0){ hSpeed = gotoH; }; }; }; if (vSpeed != 0){ y = (y + vSpeed); if (y < yMin){ y = yMin; turnV(); } else { if (y > yMax){ y = yMax; turnV(); }; }; } else { if (turnCountV > 0){ turnCountV--; if (turnCountV == 0){ vSpeed = gotoV; }; }; }; counter--; if (counter == 0){ dir = ((dir + rSpeed) % (Math.PI * 2)); gfx.rotation = ((dir / Math.PI) * 180); counter = COUNTER_MAX; }; if (autoCount > 0){ updateSize(); autoCount--; if (autoCount == 0){ shoot(); }; } else { if (holding){ updateSize(); if (main.kp_jump){ shoot(); }; }; }; } public function turnH():void{ gotoH = -(hSpeed); hSpeed = 0; turnCountH = turnTime; } public function shoot():void{ Sounds.playSound(Sounds.SndCannonShoot); gfx.scaleX = 2; gfx.scaleY = 2; holding = false; var p:Player = new Player(level, x, (y - 3)); level.addObjectBelow(p); p.hSpeed = (Math.cos(dir) * SHOOT_SPEED); p.vSpeed = (Math.sin(dir) * SHOOT_SPEED); p.shot = SHOOT_TIME; p.wasShot = true; p.cantCannon = 10; p.lastCannon = this; var cos:Number = (12 * Math.cos(dir)); var sin:Number = (12 * Math.sin(dir)); gfx.x = (gfx.x - cos); gfx.y = (gfx.y - sin); level.screenShake(6); main.partSys.createParticles(6, ((x + 8) + cos), ((y + 8) + sin), 3, 0, 5, 1, (dir - (Math.PI / 8)), (Math.PI / 8), 3, 1, 10, 5); main.partSys.createParticles(6, ((x + 8) + cos), ((y + 8) + sin), 3, 0, 3, 1, (dir - (Math.PI / 8)), (Math.PI / 8), 3, 1, 10, 5); main.partSys.createParticles(6, ((x + 8) + cos), ((y + 8) + sin), 3, 0, 1, 1, (dir - (Math.PI / 8)), (Math.PI / 8), 3, 1, 10, 5); } } }//package com.mattmakesgames.Actors
Section 56
//Cannon_GfxCannon (com.mattmakesgames.Actors.Cannon_GfxCannon) package com.mattmakesgames.Actors { import mx.core.*; public class Cannon_GfxCannon extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 57
//Chest (com.mattmakesgames.Actors.Chest) package com.mattmakesgames.Actors { import com.mattmakesgames.*; import flash.display.*; public class Chest extends GameObject { public var coins:Array; public var gfx:Bitmap; public var open:Boolean; private static const GfxChest1:Class = Chest_GfxChest1; private static const GfxChest2:Class = Chest_GfxChest2; public function Chest(lvl:Level, ax:int, ay:int, c:Array):void{ super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; hitHeight = 2; hitWidth = 16; x = ax; y = ay; if ((((c == null)) || ((c.length == 0)))){ open = true; coins = null; gfx = new GfxChest2(); gfx.scaleX = 2; gfx.scaleY = 2; gfx.y = -2; addChild(gfx); } else { open = false; coins = c; gfx = new GfxChest1(); gfx.scaleX = 2; gfx.scaleY = 2; gfx.y = -2; addChild(gfx); }; } public function openChest():void{ var c:Coin; Sounds.playSound(Sounds.SndChest); open = true; var i:int; while (i < coins.length) { c = new Coin(level, ((x - ((coins.length - 1) * 8)) + (i * 16)), (y - 4), coins[i], (15 + (i * 4))); level.addObjectBelow(c); i++; }; removeChild(gfx); gfx = new GfxChest2(); gfx.scaleX = 2; gfx.scaleY = 2; gfx.y = -2; addChild(gfx); main.partSys.createParticles(12, (x + 8), (y + 2), 10, 7825686, 1, 1, Math.PI, Math.PI, 2, 1, 16, 8, 0.1); } } }//package com.mattmakesgames.Actors
Section 58
//Chest_GfxChest1 (com.mattmakesgames.Actors.Chest_GfxChest1) package com.mattmakesgames.Actors { import mx.core.*; public class Chest_GfxChest1 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 59
//Chest_GfxChest2 (com.mattmakesgames.Actors.Chest_GfxChest2) package com.mattmakesgames.Actors { import mx.core.*; public class Chest_GfxChest2 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 60
//Coin (com.mattmakesgames.Actors.Coin) package com.mattmakesgames.Actors { import com.mattmakesgames.*; public class Coin extends GameObject { public var countdown:int; public var gfx:AnimatedBitmap; public var id:int; public static const GfxCoin1:Class = Coin_GfxCoin1; public static const GfxCoin2:Class = Coin_GfxCoin2; public static const GfxCoin3:Class = Coin_GfxCoin3; public static const GfxCoin4:Class = Coin_GfxCoin4; public function Coin(lvl:Level, ax:int, ay:int, num:int, cd:int=0):void{ super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; hitHeight = 16; hitWidth = 16; var imgArr:Array = new Array(); imgArr.push(new Coin.GfxCoin1()); imgArr.push(new Coin.GfxCoin2()); imgArr.push(new Coin.GfxCoin3()); imgArr.push(new Coin.GfxCoin4()); imgArr.push(new Coin.GfxCoin3()); imgArr.push(new Coin.GfxCoin2()); gfx = new AnimatedBitmap(imgArr, 3); gfx.scaleX = 2; gfx.scaleY = 2; addChild(gfx); id = num; x = ax; y = ay; countdown = cd; if (countdown > 0){ visible = false; }; } public function createParticles():void{ main.partSys.createParticles(10, (x + 8), (y + 8), 10, 16643968, 2, 1, Math.PI, Math.PI, 3, 2, 10, 8, 0.2); } override public function tick():void{ if (!visible){ countdown--; if (countdown == 0){ createParticles(); Sounds.playSound(Sounds.SndCoinAppear); visible = true; }; } else { gfx.tick(); }; } } }//package com.mattmakesgames.Actors
Section 61
//Coin_GfxCoin1 (com.mattmakesgames.Actors.Coin_GfxCoin1) package com.mattmakesgames.Actors { import mx.core.*; public class Coin_GfxCoin1 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 62
//Coin_GfxCoin2 (com.mattmakesgames.Actors.Coin_GfxCoin2) package com.mattmakesgames.Actors { import mx.core.*; public class Coin_GfxCoin2 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 63
//Coin_GfxCoin3 (com.mattmakesgames.Actors.Coin_GfxCoin3) package com.mattmakesgames.Actors { import mx.core.*; public class Coin_GfxCoin3 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 64
//Coin_GfxCoin4 (com.mattmakesgames.Actors.Coin_GfxCoin4) package com.mattmakesgames.Actors { import mx.core.*; public class Coin_GfxCoin4 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 65
//Door (com.mattmakesgames.Actors.Door) package com.mattmakesgames.Actors { import com.mattmakesgames.*; public class Door extends GameObject { public var gfx; private static const GfxDoor1:Class = Door_GfxDoor1; private static const GfxDoor2:Class = Door_GfxDoor2; private static const GfxDoor3:Class = Door_GfxDoor3; private static const GfxDoor4:Class = Door_GfxDoor4; public function Door(lvl:Level, ax:int, ay:int):void{ super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; hitHeight = 16; hitWidth = 16; x = ax; y = ay; gfx = new GfxDoor1(); gfx.scaleX = 2; gfx.scaleY = 2; gfx.x = -2; gfx.y = -16; addChild(gfx); } public function open():void{ removeChild(gfx); var arr:Array = new Array(new GfxDoor1(), new GfxDoor2(), new GfxDoor3(), new GfxDoor4(), new GfxDoor4(), new GfxDoor3(), new GfxDoor2(), new GfxDoor1()); gfx = new AnimatedBitmap(arr, 5, false); gfx.scaleX = 2; gfx.scaleY = 2; gfx.x = -2; gfx.y = -16; gfx.animEnd = function ():void{ Sounds.playSound(Sounds.SndDoorClose); }; addChildAt(gfx, 0); alpha = 1; } override public function tick():void{ if ((gfx is AnimatedBitmap)){ gfx.tick(); }; } } }//package com.mattmakesgames.Actors
Section 66
//Door_GfxDoor1 (com.mattmakesgames.Actors.Door_GfxDoor1) package com.mattmakesgames.Actors { import mx.core.*; public class Door_GfxDoor1 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 67
//Door_GfxDoor2 (com.mattmakesgames.Actors.Door_GfxDoor2) package com.mattmakesgames.Actors { import mx.core.*; public class Door_GfxDoor2 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 68
//Door_GfxDoor3 (com.mattmakesgames.Actors.Door_GfxDoor3) package com.mattmakesgames.Actors { import mx.core.*; public class Door_GfxDoor3 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 69
//Door_GfxDoor4 (com.mattmakesgames.Actors.Door_GfxDoor4) package com.mattmakesgames.Actors { import mx.core.*; public class Door_GfxDoor4 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 70
//LevelDoor (com.mattmakesgames.Actors.LevelDoor) package com.mattmakesgames.Actors { import com.mattmakesgames.*; import flash.display.*; public class LevelDoor extends Door { public var coins:int; public var num:int; public var bar:Sprite; public var invis:Boolean; public static const Gfx100p:Class = LevelDoor_Gfx100p; public function LevelDoor(lvl:Level, num:int, ax:int, ay:int, invis:Boolean=false):void{ super(lvl, ax, ay); this.num = num; coins = Data.lvlTotalCoins[(num - 1)]; getTitle(); getProgress(); if ((((coins == 25)) || ((((num > 40)) && ((coins == 1)))))){ }; this.invis = invis; if (invis){ alpha = 0; }; } public function getProgress():void{ var total:int; var g:Bitmap; if (!Data.lvlCompletions[(num - 1)]){ return; }; bar = new Sprite(); addChild(bar); if (num > 40){ total = 1; } else { total = 25; }; if (coins == total){ g = new Gfx100p(); g.scaleX = 2; g.scaleY = 2; g.x = -11; g.y = -10; addChild(g); return; }; bar.graphics.beginFill(0); bar.graphics.drawRect(0, -36, 16, 4); bar.graphics.endFill(); bar.graphics.beginFill(1690636); bar.graphics.drawRect(1, -35, (14 * (coins / total)), 2); bar.graphics.endFill(); } public function getTitle():void{ var bmp:Bitmap; var bpd:BitmapData = new BitmapData(7, 5, true, 0); var numString:String = Level.getName(num); if (numString.length == 1){ getChar(bpd, numString, 3); } else { getChar(bpd, numString.charAt(0), 1); getChar(bpd, numString.charAt(1), 5); }; bmp = new Bitmap(bpd); bmp.x = 1; bmp.y = -28; bmp.scaleX = 2; bmp.scaleY = 2; addChild(bmp); } public function getChar(bpd:BitmapData, char:String, center:int):void{ switch (char){ case "0": bpd.setPixel32((center - 1), 0, 4278190080); bpd.setPixel32(center, 0, 4278190080); bpd.setPixel32((center + 1), 0, 4278190080); bpd.setPixel32((center - 1), 1, 4278190080); bpd.setPixel32((center + 1), 1, 4278190080); bpd.setPixel32((center - 1), 2, 4278190080); bpd.setPixel32((center + 1), 2, 4278190080); bpd.setPixel32((center - 1), 3, 4278190080); bpd.setPixel32((center + 1), 3, 4278190080); bpd.setPixel32((center - 1), 4, 4278190080); bpd.setPixel32(center, 4, 4278190080); bpd.setPixel32((center + 1), 4, 4278190080); break; case "1": bpd.setPixel32((center - 1), 0, 4278190080); bpd.setPixel32(center, 0, 4278190080); bpd.setPixel32(center, 1, 4278190080); bpd.setPixel32(center, 2, 4278190080); bpd.setPixel32(center, 3, 4278190080); bpd.setPixel32(center, 4, 4278190080); break; case "2": bpd.setPixel32((center - 1), 0, 4278190080); bpd.setPixel32(center, 0, 4278190080); bpd.setPixel32((center + 1), 0, 4278190080); bpd.setPixel32((center + 1), 1, 4278190080); bpd.setPixel32((center - 1), 2, 4278190080); bpd.setPixel32(center, 2, 4278190080); bpd.setPixel32((center + 1), 2, 4278190080); bpd.setPixel32((center - 1), 3, 4278190080); bpd.setPixel32((center - 1), 4, 4278190080); bpd.setPixel32(center, 4, 4278190080); bpd.setPixel32((center + 1), 4, 4278190080); break; case "3": bpd.setPixel32((center - 1), 0, 4278190080); bpd.setPixel32(center, 0, 4278190080); bpd.setPixel32((center + 1), 0, 4278190080); bpd.setPixel32((center + 1), 1, 4278190080); bpd.setPixel32((center - 1), 2, 4278190080); bpd.setPixel32(center, 2, 4278190080); bpd.setPixel32((center + 1), 2, 4278190080); bpd.setPixel32((center + 1), 3, 4278190080); bpd.setPixel32((center - 1), 4, 4278190080); bpd.setPixel32(center, 4, 4278190080); bpd.setPixel32((center + 1), 4, 4278190080); break; case "4": bpd.setPixel32((center - 1), 0, 4278190080); bpd.setPixel32((center + 1), 0, 4278190080); bpd.setPixel32((center - 1), 1, 4278190080); bpd.setPixel32((center + 1), 1, 4278190080); bpd.setPixel32((center - 1), 2, 4278190080); bpd.setPixel32(center, 2, 4278190080); bpd.setPixel32((center + 1), 2, 4278190080); bpd.setPixel32((center + 1), 3, 4278190080); bpd.setPixel32((center + 1), 4, 4278190080); break; case "5": bpd.setPixel32((center - 1), 0, 4278190080); bpd.setPixel32(center, 0, 4278190080); bpd.setPixel32((center + 1), 0, 4278190080); bpd.setPixel32((center - 1), 1, 4278190080); bpd.setPixel32((center - 1), 2, 4278190080); bpd.setPixel32(center, 2, 4278190080); bpd.setPixel32((center + 1), 2, 4278190080); bpd.setPixel32((center + 1), 3, 4278190080); bpd.setPixel32((center - 1), 4, 4278190080); bpd.setPixel32(center, 4, 4278190080); bpd.setPixel32((center + 1), 4, 4278190080); break; case "6": bpd.setPixel32((center - 1), 0, 4278190080); bpd.setPixel32(center, 0, 4278190080); bpd.setPixel32((center + 1), 0, 4278190080); bpd.setPixel32((center - 1), 1, 4278190080); bpd.setPixel32((center - 1), 2, 4278190080); bpd.setPixel32(center, 2, 4278190080); bpd.setPixel32((center + 1), 2, 4278190080); bpd.setPixel32((center - 1), 3, 4278190080); bpd.setPixel32((center + 1), 3, 4278190080); bpd.setPixel32((center - 1), 4, 4278190080); bpd.setPixel32(center, 4, 4278190080); bpd.setPixel32((center + 1), 4, 4278190080); break; case "7": bpd.setPixel32((center - 1), 0, 4278190080); bpd.setPixel32(center, 0, 4278190080); bpd.setPixel32((center + 1), 0, 4278190080); bpd.setPixel32((center + 1), 1, 4278190080); bpd.setPixel32((center + 1), 2, 4278190080); bpd.setPixel32(center, 3, 4278190080); bpd.setPixel32(center, 4, 4278190080); break; case "8": bpd.setPixel32((center - 1), 0, 4278190080); bpd.setPixel32(center, 0, 4278190080); bpd.setPixel32((center + 1), 0, 4278190080); bpd.setPixel32((center - 1), 1, 4278190080); bpd.setPixel32((center + 1), 1, 4278190080); bpd.setPixel32((center - 1), 2, 4278190080); bpd.setPixel32(center, 2, 4278190080); bpd.setPixel32((center + 1), 2, 4278190080); bpd.setPixel32((center - 1), 3, 4278190080); bpd.setPixel32((center + 1), 3, 4278190080); bpd.setPixel32((center - 1), 4, 4278190080); bpd.setPixel32(center, 4, 4278190080); bpd.setPixel32((center + 1), 4, 4278190080); break; case "9": bpd.setPixel32((center - 1), 0, 4278190080); bpd.setPixel32(center, 0, 4278190080); bpd.setPixel32((center + 1), 0, 4278190080); bpd.setPixel32((center - 1), 1, 4278190080); bpd.setPixel32((center + 1), 1, 4278190080); bpd.setPixel32((center - 1), 2, 4278190080); bpd.setPixel32(center, 2, 4278190080); bpd.setPixel32((center + 1), 2, 4278190080); bpd.setPixel32((center + 1), 3, 4278190080); bpd.setPixel32((center - 1), 4, 4278190080); bpd.setPixel32(center, 4, 4278190080); bpd.setPixel32((center + 1), 4, 4278190080); break; case "S": bpd.setPixel32(center, 0, 4278190080); bpd.setPixel32((center + 1), 0, 4278190080); bpd.setPixel32((center - 1), 1, 4278190080); bpd.setPixel32(center, 2, 4278190080); bpd.setPixel32((center + 1), 3, 4278190080); bpd.setPixel32((center - 1), 4, 4278190080); bpd.setPixel32(center, 4, 4278190080); break; case "X": bpd.setPixel32((center - 1), 0, 4278190080); bpd.setPixel32((center + 1), 0, 4278190080); bpd.setPixel32((center - 1), 1, 4278190080); bpd.setPixel32((center + 1), 1, 4278190080); bpd.setPixel32(center, 2, 4278190080); bpd.setPixel32((center - 1), 3, 4278190080); bpd.setPixel32((center + 1), 3, 4278190080); bpd.setPixel32((center - 1), 4, 4278190080); bpd.setPixel32((center + 1), 4, 4278190080); break; }; } override public function tick():void{ var dist:Number; if ((gfx is AnimatedBitmap)){ gfx.tick(); }; if (((invis) && (!((level.player == null))))){ dist = Utils.pointDistance((x + 8), (y + 8), (level.player.x + 8), (level.player.y + 11)); alpha = ((32 - dist) / 32); }; } } }//package com.mattmakesgames.Actors
Section 71
//LevelDoor_Gfx100p (com.mattmakesgames.Actors.LevelDoor_Gfx100p) package com.mattmakesgames.Actors { import mx.core.*; public class LevelDoor_Gfx100p extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 72
//Spawn (com.mattmakesgames.Actors.Spawn) package com.mattmakesgames.Actors { import com.mattmakesgames.*; import flash.display.*; import com.mattmakesgames.Menus.*; import com.mattmakesgames.Actors.Birds.*; public class Spawn extends GameObject { public var yAdd:Number;// = 0 public var gfx:Bitmap; private static const GfxSpawn:Class = Spawn_GfxSpawn; public function Spawn(lvl:Level, ax:int, ay:int):void{ super(); level = lvl; level.actorArray.push(this); main = level.main; x = ax; y = ay; gfx = new Spawn.GfxSpawn(); addChild(gfx); } public function spawnPlayer():void{ var o:GameObject; Sounds.playSound(Sounds.SndSpawn); if (level.goldBird){ for each (o in level.actorArray) { if ((o is GoldBird)){ (o as GoldBird).start = true; break; }; }; }; for each (o in level.actorArray) { if ((o is InitStage)){ (o as InitStage).destroy(); break; }; }; level.screenShake(10); level.player = new Player(level, x, (y - 6)); level.addObjectBelow(level.player); level.mode = 1; main.partSys.createParticles(10, (x + 8), (y + 8), 10, 0, 3, 1, 0, (Math.PI * 2), 3, 2, 10, 5); destroy(); } override public function tick():void{ if (level.mode == 0){ yAdd = ((yAdd + (Math.PI / 16)) % (Math.PI * 2)); gfx.y = (-16 + (6 * Math.sin(yAdd))); if (main.kp_jump){ spawnPlayer(); }; }; } } }//package com.mattmakesgames.Actors
Section 73
//Spawn_GfxSpawn (com.mattmakesgames.Actors.Spawn_GfxSpawn) package com.mattmakesgames.Actors { import mx.core.*; public class Spawn_GfxSpawn extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 74
//SpikeCeil (com.mattmakesgames.Actors.SpikeCeil) package com.mattmakesgames.Actors { import com.mattmakesgames.*; import flash.display.*; public class SpikeCeil extends GameObject { public var gfx:Bitmap; private static const GfxSpikeCeil:Class = SpikeCeil_GfxSpikeCeil; public function SpikeCeil(lvl:Level, ax:int, ay:int, width:int){ var temp:Bitmap; var i:int; super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; x = ax; y = ay; hitWidth = width; hitHeight = 8; i = 0; while (i < hitWidth) { temp = new GfxSpikeCeil(); temp.x = i; temp.scaleX = 2; temp.scaleY = 2; addChild(temp); i = (i + 16); }; } } }//package com.mattmakesgames.Actors
Section 75
//SpikeCeil_GfxSpikeCeil (com.mattmakesgames.Actors.SpikeCeil_GfxSpikeCeil) package com.mattmakesgames.Actors { import mx.core.*; public class SpikeCeil_GfxSpikeCeil extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 76
//SpikeFloor (com.mattmakesgames.Actors.SpikeFloor) package com.mattmakesgames.Actors { import com.mattmakesgames.*; import flash.display.*; public class SpikeFloor extends GameObject { public var gfx:Bitmap; private static const GfxSpikeFloor:Class = SpikeFloor_GfxSpikeFloor; public function SpikeFloor(lvl:Level, ax:int, ay:int, width:int){ var temp:Bitmap; var i:int; super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; x = ax; y = ay; carry = true; hitWidth = width; hitHeight = 8; i = 0; while (i < hitWidth) { temp = new GfxSpikeFloor(); temp.x = i; temp.y = -2; temp.scaleX = 2; temp.scaleY = 2; addChild(temp); i = (i + 16); }; } } }//package com.mattmakesgames.Actors
Section 77
//SpikeFloor_GfxSpikeFloor (com.mattmakesgames.Actors.SpikeFloor_GfxSpikeFloor) package com.mattmakesgames.Actors { import mx.core.*; public class SpikeFloor_GfxSpikeFloor extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 78
//SpikeLeft (com.mattmakesgames.Actors.SpikeLeft) package com.mattmakesgames.Actors { import com.mattmakesgames.*; import flash.display.*; public class SpikeLeft extends GameObject { public var gfx:Bitmap; private static const GfxSpikeLeft:Class = SpikeLeft_GfxSpikeLeft; public function SpikeLeft(lvl:Level, ax:int, ay:int, height:int){ var temp:Bitmap; var i:int; super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; x = ax; y = ay; hitWidth = 8; hitHeight = height; i = 0; while (i < hitHeight) { temp = new GfxSpikeLeft(); temp.y = i; temp.scaleX = 2; temp.scaleY = 2; addChild(temp); i = (i + 16); }; } } }//package com.mattmakesgames.Actors
Section 79
//SpikeLeft_GfxSpikeLeft (com.mattmakesgames.Actors.SpikeLeft_GfxSpikeLeft) package com.mattmakesgames.Actors { import mx.core.*; public class SpikeLeft_GfxSpikeLeft extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 80
//SpikeRight (com.mattmakesgames.Actors.SpikeRight) package com.mattmakesgames.Actors { import com.mattmakesgames.*; import flash.display.*; public class SpikeRight extends GameObject { public var gfx:Bitmap; private static const GfxSpikeRight:Class = SpikeRight_GfxSpikeRight; public function SpikeRight(lvl:Level, ax:int, ay:int, height:int){ var temp:Bitmap; var i:int; super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; x = ax; y = ay; hitWidth = 8; hitHeight = height; i = 0; while (i < hitHeight) { temp = new GfxSpikeRight(); temp.x = -2; temp.y = i; temp.scaleX = 2; temp.scaleY = 2; addChild(temp); i = (i + 16); }; } } }//package com.mattmakesgames.Actors
Section 81
//SpikeRight_GfxSpikeRight (com.mattmakesgames.Actors.SpikeRight_GfxSpikeRight) package com.mattmakesgames.Actors { import mx.core.*; public class SpikeRight_GfxSpikeRight extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 82
//Spring (com.mattmakesgames.Actors.Spring) package com.mattmakesgames.Actors { import com.mattmakesgames.*; import flash.display.*; import com.mattmakesgames.Blocks.*; public class Spring extends GameObject { public var falling:Boolean;// = false public var speed:int;// = 0 public var gfx:AnimatedBitmap; public var plat:GameObject;// = null private static const GfxSpring1:Class = Spring_GfxSpring1; private static const GfxSpring2:Class = Spring_GfxSpring2; private static const GfxSpring3:Class = Spring_GfxSpring3; private static const GfxSpring4:Class = Spring_GfxSpring4; public function Spring(lvl:Level, ax:int, ay:int):void{ var a:GameObject; super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; carry = true; hitWidth = 16; hitHeight = 16; x = ax; y = ay; var g1:Bitmap = new GfxSpring1(); var g2:Bitmap = new GfxSpring2(); var g3:Bitmap = new GfxSpring3(); var g4:Bitmap = new GfxSpring4(); var arr:Array = new Array(g1, g2, g3, new GfxSpring4(), g3, g2, g1); gfx = new AnimatedBitmap(arr, 1, false); gfx.current = 6; gfx.scaleX = 2; gfx.scaleY = 2; addChild(gfx); var aarr:Array = placeActorAll(0, 1); for each (a in aarr) { if ((a is Breakable)){ plat = a; break; }; }; } override public function tick():void{ if (falling){ y = (y + speed); if ((y % 16) == 0){ if (y >= 480){ destroy(); return; }; if (((!(placeFree(0, 16))) || (placeJumpThru(0, 16)))){ speed = 0; falling = false; }; }; }; gfx.tick(); } public function bounce():void{ gfx.reset(); if (plat != null){ if ((plat is Breakable)){ (plat as Breakable).spring = this; (plat as Breakable).startCrack(); } else { if ((plat is MovingPlat)){ (plat as MovingPlat).startRider(); }; }; }; } public function fall():void{ falling = true; speed = 2; } } }//package com.mattmakesgames.Actors
Section 83
//Spring_GfxSpring1 (com.mattmakesgames.Actors.Spring_GfxSpring1) package com.mattmakesgames.Actors { import mx.core.*; public class Spring_GfxSpring1 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 84
//Spring_GfxSpring2 (com.mattmakesgames.Actors.Spring_GfxSpring2) package com.mattmakesgames.Actors { import mx.core.*; public class Spring_GfxSpring2 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 85
//Spring_GfxSpring3 (com.mattmakesgames.Actors.Spring_GfxSpring3) package com.mattmakesgames.Actors { import mx.core.*; public class Spring_GfxSpring3 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 86
//Spring_GfxSpring4 (com.mattmakesgames.Actors.Spring_GfxSpring4) package com.mattmakesgames.Actors { import mx.core.*; public class Spring_GfxSpring4 extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 87
//Tutorial (com.mattmakesgames.Actors.Tutorial) package com.mattmakesgames.Actors { import com.mattmakesgames.*; import flash.display.*; public class Tutorial extends GameObject { public var yAdd:Number; public var gfx:Bitmap; public var text:String; private static const GfxBalloon:Class = Tutorial_GfxBalloon; public function Tutorial(lvl:Level, ax:int, ay:int, txt:String):void{ super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; gfx = new GfxBalloon(); gfx.scaleX = 2; gfx.scaleY = 2; gfx.y = -8; addChild(gfx); hitWidth = 16; hitHeight = 16; x = ax; y = ay; text = txt; yAdd = ((Math.random() * Math.PI) * 2); } override public function tick():void{ yAdd = ((yAdd + (Math.PI / 32)) % (Math.PI * 2)); gfx.y = (-8 + (2 * Math.sin(yAdd))); } } }//package com.mattmakesgames.Actors
Section 88
//Tutorial_GfxBalloon (com.mattmakesgames.Actors.Tutorial_GfxBalloon) package com.mattmakesgames.Actors { import mx.core.*; public class Tutorial_GfxBalloon extends BitmapAsset { } }//package com.mattmakesgames.Actors
Section 89
//Block (com.mattmakesgames.Blocks.Block) package com.mattmakesgames.Blocks { import com.mattmakesgames.*; import flash.display.*; public class Block extends BlockParent { public function Block(lvl:Level, ax:int, ay:int, w:int=16, h:int=16):void{ super(); solid = true; actor = false; thru = false; level = lvl; level.solidArray.push(this); main = level.main; x = ax; y = ay; hitWidth = w; hitHeight = h; } override public function destroy():void{ Utils.removeFromArray(level.solidArray, this); level.blockHolder.removeChild(this); } override public function initTiles():void{ var block:Array; var blockTop:Array; var temp:Bitmap; var num:int; var j:int; block = Tilesets.tileBlock; blockTop = Tilesets.tileBlockTop; var i:int; while (i < hitWidth) { j = 0; while (j < hitHeight) { if ((((((j == 0)) && ((y > 0)))) && (level.positionFree(((x + i) + 8), (y - 8))))){ if ((((y + x) + i) % 32) == 0){ num = 1; } else { num = 0; }; temp = new (blockTop[num]); } else { if (((((x + i) + j) + y) % 32) == 0){ num = 1; } else { num = 0; }; temp = new (block[num]); }; temp.x = (i - 2); temp.y = (j - 2); temp.scaleX = 2; temp.scaleY = 2; addChild(temp); j = (j + 16); }; i = (i + 16); }; } } }//package com.mattmakesgames.Blocks
Section 90
//BlockParent (com.mattmakesgames.Blocks.BlockParent) package com.mattmakesgames.Blocks { import com.mattmakesgames.*; public class BlockParent extends GameObject { public function BlockParent(){ super(); } public function initTiles():void{ } } }//package com.mattmakesgames.Blocks
Section 91
//Breakable (com.mattmakesgames.Blocks.Breakable) package com.mattmakesgames.Blocks { import com.mattmakesgames.*; import flash.display.*; import com.mattmakesgames.Actors.*; public class Breakable extends GameObject { public var spring:Spring;// = null public var count:int;// = 30 public var coin:int; public var broken:Boolean;// = false public var gfx:Bitmap; private static const GfxBreakable:Class = Breakable_GfxBreakable; public static const BREAK_TIME:int = 30; public function Breakable(lvl:Level, ax:int, ay:int, coin:int):void{ super(); solid = true; actor = true; thru = false; level = lvl; level.solidArray.push(this); level.actorArray.push(this); main = level.main; this.coin = coin; x = ax; y = ay; hitWidth = 16; hitHeight = 16; gfx = new GfxBreakable(); gfx.scaleX = 2; gfx.scaleY = 2; addChild(gfx); } public function createParticles():void{ main.partSys.createParticles(12, (x + 8), (y + 8), 10, 7825686, 0.2, 0.4, 0, (Math.PI * 2), 2, 1, 10, 8, 0.2); } public function crack():void{ var a:GameObject; var c:Coin; Sounds.playSound(Sounds.SndBreakableBreak); if (spring != null){ spring.fall(); } else { a = placeActor(0, -1); if ((a is Spring)){ (a as Spring).fall(); }; }; if (coin != -1){ c = new Coin(level, x, y, coin, 15); level.addObjectBelow(c); }; createParticles(); destroy(); } public function startCrack():void{ if (broken){ return; }; broken = true; count--; Sounds.playSound(Sounds.SndBreakableStart); } override public function tick():void{ if (count < BREAK_TIME){ count--; if (count == 0){ crack(); } else { gfx.x = (-2 + (Math.random() * 4)); gfx.y = (-2 + (Math.random() * 4)); }; } else { if (placePlayer(0, -1)){ startCrack(); }; }; } } }//package com.mattmakesgames.Blocks
Section 92
//Breakable_GfxBreakable (com.mattmakesgames.Blocks.Breakable_GfxBreakable) package com.mattmakesgames.Blocks { import mx.core.*; public class Breakable_GfxBreakable extends BitmapAsset { } }//package com.mattmakesgames.Blocks
Section 93
//ColorBlock (com.mattmakesgames.Blocks.ColorBlock) package com.mattmakesgames.Blocks { import com.mattmakesgames.*; import flash.display.*; public class ColorBlock extends BlockParent { public function ColorBlock(lvl:Level, solid:Boolean, gfx:Class, ax:int, ay:int, w:int=16, h:int=16):void{ var temp:Bitmap; var j:int; super(); this.solid = solid; actor = false; thru = false; level = lvl; if (solid){ level.solidArray.push(this); } else { alpha = 0.3; }; main = level.main; x = ax; y = ay; hitWidth = w; hitHeight = h; var i:int; while (i < hitWidth) { j = 0; while (j < hitHeight) { temp = new (gfx); temp.x = i; temp.y = j; temp.scaleX = 2; temp.scaleY = 2; addChild(temp); j = (j + 16); }; i = (i + 16); }; } override public function destroy():void{ if (solid){ Utils.removeFromArray(level.solidArray, this); }; level.blockHolder.removeChild(this); } public function appear():void{ solid = true; level.solidArray.push(this); alpha = 1; } public function createPart(color:uint):void{ var j:int; var i:int; while (i < hitWidth) { j = 0; while (j < hitHeight) { main.partSys.createParticles(5, ((x + i) + 8), ((y + j) + 8), 16, color, 0.5, 0.5, 0, (Math.PI * 2), 3, 2, 30, 15); j = (j + 16); }; i = (i + 16); }; } } }//package com.mattmakesgames.Blocks
Section 94
//GreenBlock (com.mattmakesgames.Blocks.GreenBlock) package com.mattmakesgames.Blocks { import com.mattmakesgames.*; public class GreenBlock extends ColorBlock { private static const GfxBlock:Class = GreenBlock_GfxBlock; public function GreenBlock(lvl:Level, solid:Boolean, ax:int, ay:int, w:int=16, h:int=16):void{ super(lvl, solid, GfxBlock, ax, ay, w, h); } public function createParticles():void{ createPart(8126230); } } }//package com.mattmakesgames.Blocks
Section 95
//GreenBlock_GfxBlock (com.mattmakesgames.Blocks.GreenBlock_GfxBlock) package com.mattmakesgames.Blocks { import mx.core.*; public class GreenBlock_GfxBlock extends BitmapAsset { } }//package com.mattmakesgames.Blocks
Section 96
//HMoving (com.mattmakesgames.Blocks.HMoving) package com.mattmakesgames.Blocks { import com.mattmakesgames.*; public class HMoving extends MovingPlat { public var xMin:int; public var xMax:int; public function HMoving(lvl:Level, ax:int, ay:int, width:int, xMin:int, xMax:int, speed:Number, turnTime:int, rider:int):void{ super(lvl, ax, ay, width); this.xMin = xMin; this.xMax = xMax; this.turnTime = turnTime; if (rider == 1){ goto = speed; this.speed = 0; start = true; } else { this.speed = speed; start = false; }; getCarryArray(); } override public function tick():void{ if (speed != 0){ move(speed); if ((((((x >= xMax)) && ((speed > 0)))) || ((((x <= xMin)) && ((speed < 0)))))){ wait = turnTime; goto = (speed = (speed * -1)); speed = 0; }; } else { if (start){ if (((((!((level.player == null))) && (placePlayer(0, -1)))) && (!(placePlayer(0, 0))))){ startRider(); }; } else { if (wait > 0){ wait--; if (wait == 0){ speed = goto; }; }; }; }; } } }//package com.mattmakesgames.Blocks
Section 97
//JumpThru (com.mattmakesgames.Blocks.JumpThru) package com.mattmakesgames.Blocks { import com.mattmakesgames.*; import flash.display.*; public class JumpThru extends BlockParent { public function JumpThru(lvl:Level, ax:int, ay:int, width:int=16):void{ super(); solid = false; actor = false; thru = true; level = lvl; level.thruArray.push(this); main = level.main; hitWidth = width; hitHeight = 2; x = ax; y = ay; } override public function destroy():void{ if (solid){ Utils.removeFromArray(level.solidArray, this); }; if (thru){ Utils.removeFromArray(level.thruArray, this); }; if (actor){ Utils.removeFromArray(level.actorArray, this); }; level.blockHolder.removeChild(this); } override public function initTiles():void{ var temp:Bitmap; var num:int; var i:int; i = 0; while (i < hitWidth) { if ((((x + i) + y) % 32) == 0){ num = 1; } else { num = 0; }; temp = new (Tilesets.tileJumpThru[num]); temp.x = (i - 2); temp.y = -2; temp.scaleX = 2; temp.scaleY = 2; addChild(temp); i = (i + 16); }; } } }//package com.mattmakesgames.Blocks
Section 98
//MovingPlat (com.mattmakesgames.Blocks.MovingPlat) package com.mattmakesgames.Blocks { import com.mattmakesgames.*; import com.mattmakesgames.Actors.*; public class MovingPlat extends JumpThru { public var start:Boolean; public var goto:Number; public var vCounter:Number;// = 0 public var speed:Number; public var turnTime:int; public var hCounter:Number;// = 0 public var wait:int;// = 0 public var rider:int; public var carryArray:Array; public function MovingPlat(lvl:Level, ax:int, ay:int, width:int):void{ super(lvl, ax, ay, width); actor = true; level.actorArray.push(this); } public function getCarryArray():void{ var o:GameObject; carryArray = new Array(); var arr:Array = placeActorAll(0, -2); for each (o in arr) { if (o.carry){ carryArray.push(o); }; if ((o is Spring)){ (o as Spring).plat = this; }; }; } override public function move(h:Number, v:Number=0):void{ var m:int; var o:GameObject; if (h != 0){ hCounter = (hCounter + h); m = Math.round(hCounter); hCounter = (hCounter - m); x = (x + m); if (((((!((level.player == null))) && (placePlayer(-(m), -1)))) && (!(placePlayer(-(m), 0))))){ level.player.move(m); }; for each (o in carryArray) { o.move(m); }; }; if (v != 0){ vCounter = (vCounter + v); m = Math.round(vCounter); vCounter = (vCounter - m); y = (y + m); if (m < 0){ y = (y - m); if (((((!((level.player == null))) && (placePlayer(0, -1)))) && (!(placePlayer(0, 0))))){ level.player.vCounter = 0; level.player.move(0, m); }; y = (y + m); } else { if (((((!((level.player == null))) && (placePlayer(0, (-(m) - 1))))) && (!(placePlayer(0, -(m)))))){ level.player.vCounter = 0; level.player.move(0, m); }; }; for each (o in carryArray) { o.move(0, m); }; }; } public function startRider():void{ if (start){ start = false; speed = goto; }; } } }//package com.mattmakesgames.Blocks
Section 99
//OrangeBlock (com.mattmakesgames.Blocks.OrangeBlock) package com.mattmakesgames.Blocks { import com.mattmakesgames.*; public class OrangeBlock extends ColorBlock { private static const GfxBlock:Class = OrangeBlock_GfxBlock; public function OrangeBlock(lvl:Level, solid:Boolean, ax:int, ay:int, w:int=16, h:int=16):void{ super(lvl, solid, GfxBlock, ax, ay, w, h); } public function createParticles():void{ createPart(16755990); } } }//package com.mattmakesgames.Blocks
Section 100
//OrangeBlock_GfxBlock (com.mattmakesgames.Blocks.OrangeBlock_GfxBlock) package com.mattmakesgames.Blocks { import mx.core.*; public class OrangeBlock_GfxBlock extends BitmapAsset { } }//package com.mattmakesgames.Blocks
Section 101
//PinkBlock (com.mattmakesgames.Blocks.PinkBlock) package com.mattmakesgames.Blocks { import com.mattmakesgames.*; public class PinkBlock extends ColorBlock { private static const GfxBlock:Class = PinkBlock_GfxBlock; public function PinkBlock(lvl:Level, solid:Boolean, ax:int, ay:int, w:int=16, h:int=16):void{ super(lvl, solid, GfxBlock, ax, ay, w, h); } public function createParticles():void{ createPart(16717493); } } }//package com.mattmakesgames.Blocks
Section 102
//PinkBlock_GfxBlock (com.mattmakesgames.Blocks.PinkBlock_GfxBlock) package com.mattmakesgames.Blocks { import mx.core.*; public class PinkBlock_GfxBlock extends BitmapAsset { } }//package com.mattmakesgames.Blocks
Section 103
//VMoving (com.mattmakesgames.Blocks.VMoving) package com.mattmakesgames.Blocks { import com.mattmakesgames.*; public class VMoving extends MovingPlat { public var yMin:int; public var yMax:int; public var counter:Number;// = 0 public function VMoving(lvl:Level, ax:int, ay:int, width:int, yMin:int, yMax:int, speed:Number, turnTime:int, rider:int):void{ super(lvl, ax, ay, width); this.yMin = yMin; this.yMax = yMax; this.turnTime = turnTime; this.rider = rider; if (rider == 1){ goto = speed; this.speed = 0; start = true; } else { this.speed = speed; start = false; }; getCarryArray(); } override public function tick():void{ if (speed != 0){ move(0, speed); if ((((((y >= yMax)) && ((speed > 0)))) || ((((y <= yMin)) && ((speed < 0)))))){ wait = turnTime; goto = (speed = (speed * -1)); speed = 0; }; } else { if (start){ if (((((!((level.player == null))) && (placePlayer(0, -1)))) && (!(placePlayer(0, 0))))){ startRider(); }; } else { if (wait > 0){ wait--; if (wait == 0){ speed = goto; }; }; }; }; } } }//package com.mattmakesgames.Blocks
Section 104
//YellowBlock (com.mattmakesgames.Blocks.YellowBlock) package com.mattmakesgames.Blocks { import com.mattmakesgames.*; public class YellowBlock extends ColorBlock { private static const GfxBlock:Class = YellowBlock_GfxBlock; public function YellowBlock(lvl:Level, solid:Boolean, ax:int, ay:int, w:int=16, h:int=16):void{ super(lvl, solid, GfxBlock, ax, ay, w, h); } public function createParticles():void{ createPart(15728406); } } }//package com.mattmakesgames.Blocks
Section 105
//YellowBlock_GfxBlock (com.mattmakesgames.Blocks.YellowBlock_GfxBlock) package com.mattmakesgames.Blocks { import mx.core.*; public class YellowBlock_GfxBlock extends BitmapAsset { } }//package com.mattmakesgames.Blocks
Section 106
//CompleteMenu (com.mattmakesgames.Menus.CompleteMenu) package com.mattmakesgames.Menus { import com.mattmakesgames.*; import flash.display.*; import com.mattmakesgames.Actors.*; public class CompleteMenu extends GameObject { public var coins:Array; public var drawnCoins:int;// = 0 public var coinTotalDisplay:Sprite; public var dispCoin:Bitmap; public var coinStageDisplay:Sprite; public var onehun:Sprite;// = null public var dispCoinText:MenuItem; public var stageDraw:int; public var stageAnim:AnimatedBitmap; public var totalAnim:AnimatedBitmap; public var cango:int;// = 60 public var counter:int;// = 0 public function CompleteMenu(lvl:Level, c:Array):void{ var add:String; super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; above = true; coins = c; alpha = 0; addChild(new Spotlight((level.player.x + 8), (level.player.y + 11))); addText(this, "Level Complete!", 72, 280, 60); if (coins.length == 0){ addText(this, "...but you didn't get any coins.", 36, 280, 140); } else { add = ""; if (coins.length > 1){ add = "s"; }; addText(this, (((("You got " + coins.length) + " coin") + add) + "!"), 36, 280, 140); }; addChild(new ShowControls(main)); stageDraw = Data.lvlTotalCoins[(level.levelNum - 1)]; addText(this, (("Level " + Level.getName(level.levelNum)) + ":"), 24, 280, 220); addText(this, "Total:", 24, 280, 310); initCoinTotalDisplay(); initCoinStageDisplay(); } override public function destroy():void{ Utils.removeFromArray(level.actorArray, this); level.gameHolderAbove.removeChild(this); } public function initCoinStageDisplay():void{ var temp:MenuItem; var coinAnim:AnimatedBitmap; coinStageDisplay = new Sprite(); var ax = 297; var ay = 250; var size = 36; if (level.levelNum > 40){ ax = (ax + 10); }; addText(coinStageDisplay, "x", size, (ax - 80), ay); addText(coinStageDisplay, ("" + stageDraw), size, (ax - 40), ay); if (level.levelNum > 40){ addText(coinStageDisplay, "/ 1", size, (ax + 45), ay); } else { addText(coinStageDisplay, "/ 25", size, (ax + 45), ay); }; coinAnim = new AnimatedBitmap(new Array(new Coin.GfxCoin1(), new Coin.GfxCoin2(), new Coin.GfxCoin3(), new Coin.GfxCoin4()), 6); coinAnim.scaleX = 4; coinAnim.scaleY = 4; coinAnim.x = (ax - 85); coinAnim.y = (ay - 20); coinStageDisplay.addChild(coinAnim); stageAnim = coinAnim; addChild(coinStageDisplay); } public function initCoinTotalDisplay():void{ var temp:MenuItem; var ax:int; var ay:int; var size:int; var coinAnim:AnimatedBitmap; coinTotalDisplay = new Sprite(); ax = 302; ay = 340; size = 36; var text:String = ("x " + (Data.totalCoins + coins.length)); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = (ay - 2); coinTotalDisplay.addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = (ay - 2); coinTotalDisplay.addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = (ay + 2); coinTotalDisplay.addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = (ay + 2); coinTotalDisplay.addChild(temp); temp = new MenuItem(main, text, true, size, 0xFFFFFF); temp.x = ax; temp.y = ay; coinTotalDisplay.addChild(temp); coinAnim = new AnimatedBitmap(new Array(new Coin.GfxCoin1(), new Coin.GfxCoin2(), new Coin.GfxCoin3(), new Coin.GfxCoin4()), 6); coinAnim.scaleX = 4; coinAnim.scaleY = 4; coinAnim.x = (ax - 50); coinAnim.y = (ay - 20); coinTotalDisplay.addChild(coinAnim); totalAnim = coinAnim; addChild(coinTotalDisplay); } public function returnToMap():void{ win(); destroy(); level.backToMap(); } public function win():void{ if (!Data.lvlCompletions[(level.levelNum - 1)]){ Data.totalCompletions++; Data.lvlCompletions[(level.levelNum - 1)] = true; }; var i:int; while (i < coins.length) { Data.totalCoins++; var _local2 = Data.lvlTotalCoins; var _local3 = (level.levelNum - 1); var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; Data.lvlCoins[(level.levelNum - 1)][coins[i]] = true; i++; }; } override public function tick():void{ totalAnim.tick(); stageAnim.tick(); alpha = Math.min((alpha + 0.025), 1); if (cango > 0){ cango--; if (cango == 0){ setCounter(); }; } else { if (counter > 0){ counter--; if (counter == 0){ if (handleCounter()){ setCounter(); }; }; }; if (((main.kp_jump) || (main.kp_restart))){ replayLevel(); } else { if (main.kp_pause){ returnToMap(); }; }; }; if (((!((onehun == null))) && ((onehun.scaleX > 3)))){ onehun.scaleX = (onehun.scaleX - 0.5); onehun.scaleY = (onehun.scaleY - 0.5); if (onehun.scaleX == 3){ level.screenShake(10); Sounds.playSound(Sounds.Snd100p); main.partSys.createParticles(50, 360, 250, 40, 16767761, 1, 0.5, 0, (Math.PI * 2), 2, 3, 30, 20); }; }; } public function replayLevel():void{ win(); destroy(); level.resetLevel(); } public function initOneHun():void{ var temp:Bitmap; onehun = new Sprite(); temp = new LevelDoor.Gfx100p(); temp.scaleX = 2; temp.scaleY = 2; temp.x = -19; temp.y = -9; onehun.addChild(temp); onehun.rotation = -20; onehun.scaleX = 5; onehun.scaleY = 5; onehun.x = 360; onehun.y = 250; addChild(onehun); } public function addText(spr:Sprite, text:String, size:int, ax:int, ay:int):void{ var temp:MenuItem; temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = (ay - 2); spr.addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = (ay - 2); spr.addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = (ay + 2); spr.addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = (ay + 2); spr.addChild(temp); temp = new MenuItem(main, text, true, size, 0xFFFFFF); temp.x = ax; temp.y = ay; spr.addChild(temp); } public function handleCounter():Boolean{ if (drawnCoins < coins.length){ drawnCoins++; stageDraw++; Sounds.playSound(Sounds.SndCoin); removeChild(coinStageDisplay); initCoinStageDisplay(); return (true); }; initOneHun(); return (false); } public function setCounter():void{ if ((coins.length - drawnCoins) == 0){ if (((((((coins.length + Data.lvlTotalCoins[(level.levelNum - 1)]) == 25)) && ((level.levelNum <= 40)))) || (((((coins.length + Data.lvlTotalCoins[(level.levelNum - 1)]) == 1)) && ((level.levelNum > 40)))))){ counter = 10; }; } else { if (drawnCoins == 0){ counter = 10; } else { counter = 2; }; }; } } }//package com.mattmakesgames.Menus
Section 107
//ConfirmMenu (com.mattmakesgames.Menus.ConfirmMenu) package com.mattmakesgames.Menus { import com.mattmakesgames.*; public class ConfirmMenu extends Menu { public var logo:Logo; public function ConfirmMenu(m:Main, lg:Logo):void{ var temp:MenuItem; var m = m; var lg = lg; super(m); logo = lg; addChild(logo); temp = new MenuItem(main, "Are you sure?", true, 72); temp.x = 280; temp.y = 130; addChild(temp); temp = new MenuItem(main, "Starting a new game will delete", true, 32); temp.x = 280; temp.y = 185; addChild(temp); temp = new MenuItem(main, "all your previous progress!", true, 32); temp.x = 280; temp.y = 215; addChild(temp); temp = new MenuItem(main, "New Game", false, 32, 0, 6); temp.x = 280; temp.y = 300; temp.onClick = function ():void{ Sounds.playSound(Sounds.SndMenuClick); Data.initVars(); Data.initSave(); this.main.removeChild(this.parent); main.addChild(new Map(main)); }; addChild(temp); temp = new MenuItem(main, "Cancel", false, 32, 0, 6); temp.x = 280; temp.y = 350; temp.onClick = function ():void{ Sounds.playSound(Sounds.SndBack); this.main.removeChild(this.parent); main.addChild(new MainMenu(main, logo, false)); }; addChild(temp); } override public function tick():void{ logo.tick(); } } }//package com.mattmakesgames.Menus
Section 108
//CreditsMenu (com.mattmakesgames.Menus.CreditsMenu) package com.mattmakesgames.Menus { import com.mattmakesgames.*; import flash.net.*; public class CreditsMenu extends Menu { public var logo:Logo; public function CreditsMenu(m:Main, lg:Logo):void{ var temp:MenuItem; var m = m; var lg = lg; super(m); logo = lg; addChild(logo); temp = new MenuItem(main, "Credits", true, 72); temp.x = 280; temp.y = 60; addChild(temp); temp = new MenuItem(main, "Programming, Design, Graphics and Audio by", true, 16); temp.x = 280; temp.y = 125; addChild(temp); temp = new MenuItem(main, "Matt Thorson", true, 32); temp.x = 280; temp.y = 150; addChild(temp); temp = new MenuItem(main, "www.mattmakesgames.com", false, 16, 0, 2); temp.x = 280; temp.y = 175; temp.onClick = function ():void{ Sounds.playSound(Sounds.SndMenuClick); navigateToURL(new URLRequest("http://mattmakesgames.com/")); }; addChild(temp); temp = new MenuItem(main, "With Graphics by", true, 16); temp.x = 280; temp.y = 225; addChild(temp); temp = new MenuItem(main, "Chevy Johnston", true, 32); temp.x = 280; temp.y = 250; addChild(temp); temp = new MenuItem(main, "www.properundead.com", false, 16, 0, 2); temp.x = 280; temp.y = 275; temp.onClick = function ():void{ Sounds.playSound(Sounds.SndMenuClick); navigateToURL(new URLRequest("http://properundead.com/")); }; addChild(temp); temp = new MenuItem(main, "Presented by", true, 16); temp.x = 280; temp.y = 325; addChild(temp); temp = new MenuItem(main, "Kongregate", true, 32); temp.x = 280; temp.y = 350; addChild(temp); temp = new MenuItem(main, "www.kongregate.com", false, 16, 0, 2); temp.x = 280; temp.y = 375; temp.onClick = function ():void{ Main.gotoSponsorSite(); }; addChild(temp); temp = new MenuItem(main, "Back", false, 32); temp.x = 280; temp.y = 440; temp.onClick = function ():void{ Sounds.playSound(Sounds.SndBack); this.main.removeChild(this.parent); main.addChild(new MainMenu(main, logo, false)); }; addChild(temp); } override public function tick():void{ logo.tick(); } } }//package com.mattmakesgames.Menus
Section 109
//EnterStage (com.mattmakesgames.Menus.EnterStage) package com.mattmakesgames.Menus { import com.mattmakesgames.*; import flash.display.*; public class EnterStage extends GameObject { public var num:int; public var goCount:int;// = 0 public function EnterStage(lvl:Level, num:int):void{ var spot:Bitmap; super(); solid = false; actor = true; thru = false; level = lvl; level.actorArray.push(this); main = level.main; above = true; alpha = 0; this.num = num; spot = new Spotlight((level.player.x + 8), ((level.player.y + 11) + level.y)); spot.y = -(level.y); addChild(spot); } override public function tick():void{ alpha = Math.min((alpha + 0.025), 1); goCount++; if (goCount > 60){ main.removeChild(level); LevelLoader.loadLevel(main, num); destroy(); }; } } }//package com.mattmakesgames.Menus
Section 110
//InitStage (com.mattmakesgames.Menus.InitStage) package com.mattmakesgames.Menus { import com.mattmakesgames.*; import flash.display.*; import com.mattmakesgames.Actors.*; public class InitStage extends GameObject { public var coinAnim:AnimatedBitmap; public var spot:Bitmap; public function InitStage(level:Level, coins:int):void{ var a:Spawn; var o:GameObject; var ax:int; var tc:int; super(); solid = false; actor = true; thru = false; this.level = level; level.actorArray.push(this); main = level.main; above = true; for each (o in level.actorArray) { if ((o is Spawn)){ a = (o as Spawn); break; }; }; spot = new Spotlight((a.x + 8), (a.y + 8)); addChild(spot); if (level.levelNum <= 40){ addText(("Level " + level.levelNum), 72, 280, 60); } else { if (level.levelNum == 50){ addText("Secret X", 72, 280, 60); } else { addText(("Secret " + (level.levelNum - 40)), 72, 280, 60); }; }; if (level.levelNum > 40){ tc = 1; ax = 10; } else { tc = 25; ax = 0; }; addText(((("x " + coins) + " / ") + tc), 36, (296 + ax), 120); coinAnim = new AnimatedBitmap(new Array(new Coin.GfxCoin1(), new Coin.GfxCoin2(), new Coin.GfxCoin3(), new Coin.GfxCoin4()), 6); coinAnim.scaleX = 4; coinAnim.scaleY = 4; coinAnim.x = (214 + ax); coinAnim.y = 100; addChild(coinAnim); addText2("Deaths:", 24, 540, 436); addText2(("" + Data.lvlDeaths[(level.levelNum - 1)]), 24, 540, 460); addChild(new ShowControls(main)); } public function addText2(text:String, size:int, ax:int, ay:int):void{ var temp:MenuItem; temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = (ay - 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = (ay - 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = (ay + 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = (ay + 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = ay; addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = ay; addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = ax; temp.y = (ay - 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = ax; temp.y = (ay + 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0xFFFFFF); temp.x = ax; temp.y = ay; addChild(temp); } override public function tick():void{ spot.alpha = Math.max(0.4, (spot.alpha - 0.05)); coinAnim.tick(); } public function addText(text:String, size:int, ax:int, ay:int):void{ var temp:MenuItem; temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = (ay - 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = (ay - 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = (ay + 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = (ay + 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0xFFFFFF); temp.x = ax; temp.y = ay; addChild(temp); } } }//package com.mattmakesgames.Menus
Section 111
//Logo (com.mattmakesgames.Menus.Logo) package com.mattmakesgames.Menus { import flash.events.*; import com.mattmakesgames.*; import flash.display.*; public class Logo extends Sprite { public var bg:Boolean;// = false public var logo2:Bitmap; public var logo:Bitmap; public var text:MenuItem; public var count:Number;// = 0 public var logoBG:Bitmap; public var doIt:Boolean;// = true public var main:Main; private static const GfxLogo:Class = Logo_GfxLogo; private static const GfxLogoBG:Class = Logo_GfxLogoBG; private static const GfxLogo2:Class = Logo_GfxLogo2; public function Logo(main:Main):void{ super(); this.main = main; x = 320; y = 150; scaleX = 2; scaleY = 2; logoBG = new GfxLogoBG(); logoBG.x = (-(x) / scaleX); logoBG.y = (-(y) / scaleY); logoBG.scaleX = (5 / scaleX); logoBG.scaleY = (5 / scaleY); addChild(logoBG); logo2 = new GfxLogo2(); logo2.x = (-(logo2.width) / 2); logo2.y = 30; logo2.scaleX = 1; logo2.scaleY = 1; addChild(logo2); logo = new GfxLogo(); logo.x = -(logo.width); logo.y = -(logo.height); logo.scaleX = 2; logo.scaleY = 2; addChild(logo); } public function quickToggle():void{ bg = true; x = 320; y = 150; scaleX = 1; scaleY = 1; logo.alpha = 0.2; logo2.alpha = 0.2; } public function tick():void{ if (((doIt) && (!(bg)))){ doIt = false; main.addEventListener(MouseEvent.CLICK, click, false, 0, true); }; if (bg){ scaleX = Utils.approach(scaleX, 1, 0.05); scaleY = Utils.approach(scaleY, 1, 0.05); logo.alpha = Utils.approach(logo.alpha, 0.1, 0.02); logo2.alpha = Utils.approach(logo2.alpha, 0.1, 0.02); } else { scaleX = Utils.approach(scaleX, 2, 0.02); scaleY = Utils.approach(scaleY, 2, 0.02); logo.alpha = Utils.approach(logo.alpha, 1, 0.05); logo2.alpha = Utils.approach(logo2.alpha, 1, 0.05); }; logoBG.scaleX = (5 / scaleX); logoBG.scaleY = (5 / scaleY); logoBG.x = (-(x) / scaleX); logoBG.y = (-(y) / scaleY); count = ((count + (Math.PI / 30)) % (Math.PI * 8)); logo.x = ((-(logo.width) / 2) + (8 * Math.sin(count))); logo.y = ((-(logo.height) / 2) + (10 * Math.sin((count / 4)))); } public function toggleBG():void{ bg = !(bg); if (!bg){ Music.playMusic(Music.SndMenu1); main.addEventListener(MouseEvent.CLICK, click, false, 0, true); } else { Music.playMusic(Music.SndMenu2); Sounds.playSound(Sounds.SndMenuStart); if ((parent is MainMenu)){ (parent as MainMenu).enableMenu(); }; }; } public function click(e:MouseEvent):void{ var a:Array; var s:Sprite; if ((main.menu is MainMenu)){ a = (main.menu as MainMenu).doNotGo; for each (s in a) { if (s.hitTestPoint(e.stageX, e.stageY)){ return; }; }; }; main.removeEventListener(MouseEvent.CLICK, click); toggleBG(); } } }//package com.mattmakesgames.Menus
Section 112
//Logo_GfxLogo (com.mattmakesgames.Menus.Logo_GfxLogo) package com.mattmakesgames.Menus { import mx.core.*; public class Logo_GfxLogo extends BitmapAsset { } }//package com.mattmakesgames.Menus
Section 113
//Logo_GfxLogo2 (com.mattmakesgames.Menus.Logo_GfxLogo2) package com.mattmakesgames.Menus { import mx.core.*; public class Logo_GfxLogo2 extends BitmapAsset { } }//package com.mattmakesgames.Menus
Section 114
//Logo_GfxLogoBG (com.mattmakesgames.Menus.Logo_GfxLogoBG) package com.mattmakesgames.Menus { import mx.core.*; public class Logo_GfxLogoBG extends BitmapAsset { } }//package com.mattmakesgames.Menus
Section 115
//MainMenu (com.mattmakesgames.Menus.MainMenu) package com.mattmakesgames.Menus { import flash.events.*; import com.mattmakesgames.*; import flash.display.*; import flash.net.*; public class MainMenu extends Menu { public var doNotGo:Array; public var begin:MenuItem; public var logo:Logo; public static const GfxKong:Class = MainMenu_GfxKong; public static const GfxMMG:Class = MainMenu_GfxMMG; public function MainMenu(m:Main, lg:Logo=null, clouds:Boolean=true){ var temp:MenuItem; var st:Sprite; var stb:Sprite; var m = m; var lg = lg; var clouds = clouds; super(m); doNotGo = new Array(); Music.setMusicVolume(1); Music.stopBG(); if (lg == null){ Music.playMusic(Music.SndMenu1); } else { Music.playMusic(Music.SndMenu2); }; if (clouds){ main.clouds.scramble(); }; main.setBGColor(11061196); main.lastLevel = 0; if (lg == null){ logo = new Logo(main); } else { logo = lg; }; addChild(logo); temp = new MenuItem(main, "New Game", false, 48, 0, 6); temp.x = 280; temp.y = 100; temp.onClick = function ():void{ Sounds.playSound(Sounds.SndMenuClick); if (Data.saveExists()){ this.main.removeChild(this.parent); main.addChild(new ConfirmMenu(main, logo)); } else { Data.initVars(); Data.initSave(); this.main.removeChild(this.parent); main.addChild(new Map(main)); }; }; temp.disable(); addChild(temp); if (Data.saveExists()){ temp = new MenuItem(main, "Continue", false, 48, 0, 6); temp.x = 280; temp.y = 170; temp.onClick = function ():void{ Sounds.playSound(Sounds.SndMenuClick); Data.initVars(); Data.load(); this.main.removeChild(this.parent); main.addChild(new Map(main)); }; temp.disable(); addChild(temp); }; temp = new MenuItem(main, "Options", false, 48, 0, 6); temp.x = 280; temp.y = 240; temp.onClick = function ():void{ Sounds.playSound(Sounds.SndMenuClick); Music.setBGVolume(1); this.main.removeChild(this.parent); main.addChild(new OptionsMenu(main, logo)); }; temp.disable(); addChild(temp); temp = new MenuItem(main, "Credits", false, 48, 0, 6); temp.x = 280; temp.y = 310; temp.onClick = function ():void{ Sounds.playSound(Sounds.SndMenuClick); Music.setBGVolume(1); this.main.removeChild(this.parent); main.addChild(new CreditsMenu(main, logo)); }; temp.disable(); addChild(temp); temp = new MenuItem(main, "More Games", false, 48, 0, 6); temp.x = 280; temp.y = 380; temp.onClick = function ():void{ Main.gotoSponsorSite(); }; temp.disable(); addChild(temp); begin = new MenuItem(main, "click to begin", true, 24, 0); begin.x = 280; begin.y = 460; if (lg != null){ begin.disable(); }; addChild(begin); st = new Sprite(); var bt:Bitmap = new GfxMMG(); bt.x = (-(bt.bitmapData.width) / 2); bt.y = (-(bt.bitmapData.height) / 2); st.addChild(bt); st.x = 570; st.y = 430; st.scaleX = 3; st.scaleY = 3; var funcA:Function = function (e:Event):void{ st.scaleX = 3.4; st.scaleY = 3.4; }; st.addEventListener(MouseEvent.MOUSE_OVER, funcA, false, 0, true); var funcB:Function = function (e:Event):void{ st.scaleX = 3; st.scaleY = 3; }; st.addEventListener(MouseEvent.MOUSE_OUT, funcB, false, 0, true); var funcC:Function = function (e:Event):void{ if (visible){ Sounds.playSound(Sounds.SndMenuClick); navigateToURL(new URLRequest("http://mattmakesgames.com/")); }; }; st.addEventListener(MouseEvent.CLICK, funcC, false, 0, true); addChild(st); doNotGo.push(st); stb = new Sprite(); bt = new GfxKong(); bt.x = (-(bt.bitmapData.width) / 2); bt.y = (-(bt.bitmapData.height) / 2); stb.addChild(bt); stb.x = 100; stb.y = 430; stb.scaleX = 1; stb.scaleY = 1; var funcD:Function = function (e:Event):void{ stb.scaleX = 1.1; stb.scaleY = 1.1; }; stb.addEventListener(MouseEvent.MOUSE_OVER, funcD, false, 0, true); var funcE:Function = function (e:Event):void{ stb.scaleX = 1; stb.scaleY = 1; }; stb.addEventListener(MouseEvent.MOUSE_OUT, funcE, false, 0, true); var funcF:Function = function (e:Event):void{ if (visible){ Main.gotoSponsorSite(); }; }; stb.addEventListener(MouseEvent.CLICK, funcF, false, 0, true); addChild(stb); doNotGo.push(stb); if (lg != null){ enableMenu(); }; } public function enableMenu():void{ var i:int; while (i < numChildren) { if ((getChildAt(i) is MenuItem)){ (getChildAt(i) as MenuItem).enable(); } else { if ((((getChildAt(i) is Sprite)) && (!((getChildAt(i) == logo))))){ (getChildAt(i) as Sprite).visible = false; }; }; i++; }; begin.disable(); } override public function tick():void{ logo.tick(); if (((logo.bg) && (main.kp_pause))){ disableMenu(); logo.toggleBG(); Sounds.playSound(Sounds.SndBack); }; } public function disableMenu():void{ var i:int; while (i < numChildren) { if ((getChildAt(i) is MenuItem)){ (getChildAt(i) as MenuItem).disable(); } else { if ((((getChildAt(i) is Sprite)) && (!((getChildAt(i) == logo))))){ (getChildAt(i) as Sprite).visible = true; }; }; i++; }; begin.enable(); } } }//package com.mattmakesgames.Menus
Section 116
//MainMenu_GfxKong (com.mattmakesgames.Menus.MainMenu_GfxKong) package com.mattmakesgames.Menus { import mx.core.*; public class MainMenu_GfxKong extends BitmapAsset { } }//package com.mattmakesgames.Menus
Section 117
//MainMenu_GfxMMG (com.mattmakesgames.Menus.MainMenu_GfxMMG) package com.mattmakesgames.Menus { import mx.core.*; public class MainMenu_GfxMMG extends BitmapAsset { } }//package com.mattmakesgames.Menus
Section 118
//Menu (com.mattmakesgames.Menus.Menu) package com.mattmakesgames.Menus { import com.mattmakesgames.*; import flash.display.*; public class Menu extends Sprite { public var main:Main; public function Menu(main:Main):void{ super(); this.main = main; main.menu = this; } public function tick():void{ } } }//package com.mattmakesgames.Menus
Section 119
//MenuItem (com.mattmakesgames.Menus.MenuItem) package com.mattmakesgames.Menus { import flash.events.*; import com.mattmakesgames.*; import flash.display.*; import flash.text.*; public class MenuItem extends Sprite { public var field:TextField; public var increase:int; public var color:uint; public var size:int; public var onClick:Function;// = null public var text:String; public var format:TextFormat; public var main:Main; public function MenuItem(m:Main, txt:String, title:Boolean, s:int, col:uint=0, increase:int=12):void{ super(); main = m; text = txt; size = s; color = col; this.increase = increase; format = new TextFormat(); format.font = "Pixel"; format.color = color; format.size = size; format.align = "center"; field = new TextField(); field.selectable = false; field.embedFonts = true; field.autoSize = TextFieldAutoSize.CENTER; field.htmlText = text; field.setTextFormat(format); field.y = -((field.height / 2)); addChild(field); if (!title){ alpha = 0.5; addEventListener(MouseEvent.MOUSE_OVER, mouseOver, false, 0, true); addEventListener(MouseEvent.MOUSE_OUT, mouseOut, false, 0, true); addEventListener(MouseEvent.CLICK, mouseClick, false, 0, true); }; } public function mouseOver(e:MouseEvent):void{ alpha = 1; size = (size + increase); format.size = size; field.setTextFormat(format); field.y = -((field.height / 2)); } public function enable():void{ visible = true; } public function setText(string:String):void{ text = string; field.htmlText = text; } public function mouseOut(e:MouseEvent):void{ alpha = 0.5; size = (size - increase); format.size = size; field.setTextFormat(format); field.y = -((field.height / 2)); } public function disable():void{ visible = false; } public function mouseClick(e:MouseEvent):void{ if (((visible) && (!((onClick == null))))){ onClick(); }; } } }//package com.mattmakesgames.Menus
Section 120
//OptionsMenu (com.mattmakesgames.Menus.OptionsMenu) package com.mattmakesgames.Menus { import com.mattmakesgames.*; public class OptionsMenu extends Menu { public var logo:Logo; public function OptionsMenu(m:Main, lg:Logo):void{ var temp:MenuItem; var m = m; var lg = lg; super(m); logo = lg; addChild(logo); temp = new MenuItem(main, "Options", true, 72); temp.x = 280; temp.y = 60; addChild(temp); if (Options.sounds){ temp = new MenuItem(main, "Sounds: On", false, 48, 0, 6); } else { temp = new MenuItem(main, "Sounds: Off", false, 48, 0, 6); }; temp.x = 280; temp.y = 190; temp.onClick = function ():void{ Options.sounds = !(Options.sounds); Sounds.playSound(Sounds.SndMenuClick); if (Options.sounds){ this.setText("Sounds: On"); } else { this.setText("Sounds: Off"); }; }; addChild(temp); if (Options.music){ temp = new MenuItem(main, "Music: On", false, 48, 0, 6); } else { temp = new MenuItem(main, "Music: Off", false, 48, 0, 6); }; temp.x = 280; temp.y = 260; temp.onClick = function ():void{ Sounds.playSound(Sounds.SndMenuClick); Options.music = !(Options.music); if (Options.music){ Music.playMusic(Music.SndMenu2); this.setText("Music: On"); } else { Music.stopMusic(); this.setText("Music: Off"); }; }; addChild(temp); if (Options.particles){ temp = new MenuItem(main, "Particles: On", false, 48, 0, 6); } else { temp = new MenuItem(main, "Particles: Off", false, 48, 0, 6); }; temp.x = 280; temp.y = 330; temp.onClick = function ():void{ Sounds.playSound(Sounds.SndMenuClick); Options.particles = !(Options.particles); if (Options.particles){ this.setText("Particles: On"); } else { this.setText("Particles: Off"); }; }; addChild(temp); temp = new MenuItem(main, "Back", false, 32); temp.x = 280; temp.y = 440; temp.onClick = function ():void{ Sounds.playSound(Sounds.SndBack); this.main.removeChild(this.parent); main.addChild(new MainMenu(main, logo, false)); Options.saveOptions(); }; addChild(temp); } override public function tick():void{ logo.tick(); } } }//package com.mattmakesgames.Menus
Section 121
//ShowControls (com.mattmakesgames.Menus.ShowControls) package com.mattmakesgames.Menus { import com.mattmakesgames.*; import flash.display.*; public class ShowControls extends Sprite { public var main:Main; public function ShowControls(main:Main){ super(); this.main = main; addText("[S] [SPACE] - Play", 24, 280, 400); addText("[SHIFT] - Map", 24, 280, 430); addText("[ENTER] - More Games", 24, 280, 460); } public function addText(text:String, size:int, ax:int, ay:int):void{ var temp:MenuItem; temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = (ay - 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = (ay - 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = (ay + 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = (ay + 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = ay; addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = ay; addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = ax; temp.y = (ay - 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = ax; temp.y = (ay + 2); addChild(temp); temp = new MenuItem(main, text, true, size, 0xFFFFFF); temp.x = ax; temp.y = ay; addChild(temp); } } }//package com.mattmakesgames.Menus
Section 122
//Particle (com.mattmakesgames.Particles.Particle) package com.mattmakesgames.Particles { import flash.display.*; public class Particle extends Sprite { public var size:Number; public var color:uint; public var life_max:int; public var gravity:Number; public var system:ParticleSystem; public var vSpeed:Number; public var life:int; public var hSpeed:Number; public function Particle(sys:ParticleSystem, col:uint, spd:Number, dir:Number, sz:Number, lf:int, grav:Number=0):void{ super(); system = sys; color = col; size = sz; life = lf; life_max = life; gravity = grav; hSpeed = (Math.cos(dir) * spd); vSpeed = (Math.sin(dir) * spd); graphics.beginFill(color); graphics.drawRect(0, 0, size, size); graphics.endFill(); } public function tick():void{ life--; if (life == 0){ system.removeChild(this); return; }; if (gravity != 0){ vSpeed = (vSpeed + gravity); }; x = (x + hSpeed); y = (y + vSpeed); alpha = (life / (life_max / 2)); } } }//package com.mattmakesgames.Particles
Section 123
//ParticleSystem (com.mattmakesgames.Particles.ParticleSystem) package com.mattmakesgames.Particles { import com.mattmakesgames.*; import flash.display.*; public class ParticleSystem extends Sprite { public function ParticleSystem():void{ super(); } public function createParticles(amount:int, ax:Number, ay:Number, range:Number, color:uint, spd_min:Number, spd_add:Number, dir_min:Number, dir_add:Number, sz_min:Number, sz_add:Number, lf_min:int, lf_add:int, grav:Number=0):void{ var temp:Particle; if (!Options.particles){ return; }; var i:int; while (i < amount) { temp = new Particle(this, color, (spd_min + (Math.random() * spd_add)), (dir_min + (Math.random() * dir_add)), (sz_min + (Math.random() * sz_add)), (lf_min + Math.round((Math.random() * lf_add))), grav); temp.x = ((ax - range) + ((Math.random() * range) * 2)); temp.y = ((ay - range) + ((Math.random() * range) * 2)); addChild(temp); i++; }; } public function tick():void{ var i:int; while (i < numChildren) { (getChildAt(i) as Particle).tick(); i++; }; } public function clear():void{ while (numChildren > 0) { removeChildAt(0); }; } } }//package com.mattmakesgames.Particles
Section 124
//AnimatedBitmap (com.mattmakesgames.AnimatedBitmap) package com.mattmakesgames { import flash.display.*; public class AnimatedBitmap extends Sprite { public var current:int; public var stop:Boolean;// = false public var loop:Boolean; public var timer:int; public var speed:int; public var animEnd:Function;// = null public var images:Array; public var gfx:Bitmap; public function AnimatedBitmap(imgs:Array, spd:Number, l:Boolean=true):void{ super(); images = imgs; speed = spd; current = 0; loop = l; addChild(images[0]); timer = speed; } public function nextImage():void{ current++; if (current == images.length){ if (loop){ current = 0; } else { stop = true; if (animEnd != null){ animEnd(); }; return; }; }; removeChildAt(0); addChild(images[current]); } public function reset():void{ stop = false; if (current != 0){ removeChildAt(0); addChild(images[0]); current = 0; }; timer = speed; } public function tick():void{ if (stop){ return; }; timer--; if (timer == 0){ nextImage(); timer = speed; }; } } }//package com.mattmakesgames
Section 125
//Clouds (com.mattmakesgames.Clouds) package com.mattmakesgames { import flash.display.*; public class Clouds extends Sprite { public static const cloudArray:Array = new Array(Clouds.GfxCloud1, Clouds.GfxCloud2, Clouds.GfxCloud3); public static const Y_RAND:Number = 40; public static const X_RAND:Number = 106; private static const GfxCloud1:Class = Clouds_GfxCloud1; private static const GfxCloud2:Class = Clouds_GfxCloud2; private static const GfxCloud3:Class = Clouds_GfxCloud3; public static const ROWS:int = 4; public static const COLUMNS:int = 3; public static const CLOUDS:int = 12; public function Clouds():void{ super(); generateClouds(); } public function generateClouds():void{ var gfx:Bitmap; var row:int; var col:int; var a:int; var i:int; while (i < CLOUDS) { row = (i / COLUMNS); col = (i % COLUMNS); a = Math.floor((Math.random() * cloudArray.length)); gfx = new (cloudArray[a]); gfx.scaleX = (12 + (Math.random() * 8)); gfx.scaleY = (12 + (Math.random() * 8)); gfx.alpha = (0.4 + (Math.random() * 0.2)); gfx.x = (((col * (640 / (COLUMNS - 1))) - X_RAND) + (Math.random() * (X_RAND * 2))); gfx.y = (((row * (480 / ROWS)) - Y_RAND) + (Math.random() * (Y_RAND * 2))); addChild(gfx); i++; }; } public function scramble():void{ y = 0; while (numChildren > 0) { removeChildAt(0); }; generateClouds(); } } }//package com.mattmakesgames
Section 126
//Clouds_GfxCloud1 (com.mattmakesgames.Clouds_GfxCloud1) package com.mattmakesgames { import mx.core.*; public class Clouds_GfxCloud1 extends BitmapAsset { } }//package com.mattmakesgames
Section 127
//Clouds_GfxCloud2 (com.mattmakesgames.Clouds_GfxCloud2) package com.mattmakesgames { import mx.core.*; public class Clouds_GfxCloud2 extends BitmapAsset { } }//package com.mattmakesgames
Section 128
//Clouds_GfxCloud3 (com.mattmakesgames.Clouds_GfxCloud3) package com.mattmakesgames { import mx.core.*; public class Clouds_GfxCloud3 extends BitmapAsset { } }//package com.mattmakesgames
Section 129
//Data (com.mattmakesgames.Data) package com.mattmakesgames { import flash.net.*; public class Data { public static const SAVE_NAME:String = "MSsaveData"; public static var lvlCoins:Array; public static var lvlDeaths:Array; public static var switchOrange:Boolean; public static var switchYellow:Boolean; public static var switchPink:Boolean; public static var lvlCompletions:Array; public static var lvlTotalCoins:Array; public static var totalDeaths:int; public static var totalCoins:int; public static var switchGreen:Boolean; public static var recordDeaths:int; public static var totalCompletions:int; public function Data(){ super(); } public static function initVars():void{ var coins:int; var j:int; switchYellow = false; switchOrange = false; switchPink = false; switchGreen = false; totalCoins = 0; totalDeaths = 0; totalCompletions = 0; lvlCoins = new Array(); lvlDeaths = new Array(); lvlCompletions = new Array(); lvlTotalCoins = new Array(); var i:int; while (i < Main.TOTAL_LEVELS) { lvlDeaths[i] = 0; lvlCompletions[i] = false; lvlTotalCoins[i] = 0; if (i >= 40){ coins = Main.COINS_PER_SECRET; } else { coins = Main.COINS_PER_LEVEL; }; lvlCoins[i] = new Array(); j = 0; while (j < coins) { lvlCoins[i][j] = false; j++; }; i++; }; } public static function initSave():void{ var coins:int; var j:int; var shared:SharedObject = SharedObject.getLocal(SAVE_NAME); shared.data.switchYellow = false; shared.data.switchOrange = false; shared.data.switchGreen = false; shared.data.switchPink = false; shared.data.totalCoins = 0; shared.data.totalDeaths = 0; shared.data.totalCompletions = 0; shared.data.lvlCoins = new Array(); shared.data.lvlDeaths = new Array(); shared.data.lvlCompletions = new Array(); shared.data.lvlTotalCoins = new Array(); var i:int; while (i < Main.TOTAL_LEVELS) { shared.data.lvlDeaths[i] = 0; shared.data.lvlCompletions[i] = false; shared.data.lvlTotalCoins[i] = 0; if (i >= 40){ coins = Main.COINS_PER_SECRET; } else { coins = Main.COINS_PER_LEVEL; }; shared.data.lvlCoins[i] = new Array(); j = 0; while (j < coins) { shared.data.lvlCoins[i][j] = false; j++; }; i++; }; shared.close(); } public static function load():void{ var coins:int; var j:int; var shared:SharedObject = SharedObject.getLocal(SAVE_NAME); switchYellow = shared.data.switchYellow; switchOrange = shared.data.switchOrange; switchPink = shared.data.switchPink; switchGreen = shared.data.switchGreen; totalCoins = shared.data.totalCoins; totalDeaths = shared.data.totalDeaths; totalCompletions = shared.data.totalCompletions; var i:int; while (i < Main.TOTAL_LEVELS) { lvlDeaths[i] = shared.data.lvlDeaths[i]; lvlCompletions[i] = shared.data.lvlCompletions[i]; lvlTotalCoins[i] = shared.data.lvlTotalCoins[i]; if (i >= 40){ coins = Main.COINS_PER_SECRET; } else { coins = Main.COINS_PER_LEVEL; }; j = 0; while (j < coins) { lvlCoins[i][j] = shared.data.lvlCoins[i][j]; j++; }; i++; }; shared.close(); if (totalCoins >= 1011){ initVars(); initSave(); }; } public static function saveExists():Boolean{ var shared:SharedObject = SharedObject.getLocal(SAVE_NAME); if (shared.size > 0){ shared.close(); return (true); }; shared.close(); return (false); } public static function save():void{ var coins:int; var j:int; var shared:SharedObject = SharedObject.getLocal(SAVE_NAME); shared.data.switchYellow = switchYellow; shared.data.switchOrange = switchOrange; shared.data.switchGreen = switchGreen; shared.data.switchPink = switchPink; shared.data.totalCoins = totalCoins; shared.data.totalDeaths = totalDeaths; shared.data.totalCompletions = totalCompletions; var i:int; while (i < Main.TOTAL_LEVELS) { shared.data.lvlDeaths[i] = lvlDeaths[i]; shared.data.lvlCompletions[i] = lvlCompletions[i]; shared.data.lvlTotalCoins[i] = lvlTotalCoins[i]; if (i >= 40){ coins = Main.COINS_PER_SECRET; } else { coins = Main.COINS_PER_LEVEL; }; j = 0; while (j < coins) { shared.data.lvlCoins[i][j] = lvlCoins[i][j]; j++; }; i++; }; shared.close(); if (Main.main.kongregate){ trace("loaded!"); Main.main.kongregate.stats.submit("Coins", totalCoins); Main.main.kongregate.stats.submit("Deaths", totalDeaths); Main.main.kongregate.stats.submit("Completions", totalCompletions); if (switchYellow){ Main.main.kongregate.stats.submit("YellowSwitch", 1); } else { Main.main.kongregate.stats.submit("YellowSwitch", 0); }; if (switchOrange){ Main.main.kongregate.stats.submit("OrangeSwitch", 1); } else { Main.main.kongregate.stats.submit("OrangeSwitch", 0); }; if (switchPink){ Main.main.kongregate.stats.submit("PinkSwitch", 1); } else { Main.main.kongregate.stats.submit("PinkSwitch", 0); }; if (switchGreen){ Main.main.kongregate.stats.submit("GreenSwitch", 1); } else { Main.main.kongregate.stats.submit("GreenSwitch", 0); }; }; } } }//package com.mattmakesgames
Section 130
//GameObject (com.mattmakesgames.GameObject) package com.mattmakesgames { import flash.display.*; public class GameObject extends Sprite { public var hitWidth:int;// = 0 public var level:Level; public var hitHeight:int;// = 0 public var carry:Boolean;// = false public var above:Boolean;// = false public var solid:Boolean; public var thru:Boolean; public var main:Main; public var actor:Boolean; public function GameObject():void{ super(); } public function destroy():void{ if (solid){ Utils.removeFromArray(level.solidArray, this); }; if (thru){ Utils.removeFromArray(level.thruArray, this); }; if (actor){ Utils.removeFromArray(level.actorArray, this); }; if (above){ level.gameHolderAbove.removeChild(this); } else { level.gameHolderBelow.removeChild(this); }; } public function hitTest(obj:GameObject):Boolean{ return ((((((x < (obj.x + obj.hitWidth))) && (((x + hitWidth) > obj.x)))) && ((((y < (obj.y + obj.hitHeight))) && (((y + hitHeight) > obj.y)))))); } public function placePlayer(ax:int=0, ay:int=0):Boolean{ x = (x + ax); y = (y + ay); if (((!((level.player == null))) && (hitTest(level.player)))){ x = (x - ax); y = (y - ay); return (true); }; x = (x - ax); y = (y - ay); return (false); } public function move(ax:Number, ay:Number=0):void{ x = (x + ax); y = (y + ay); } public function placeFree(ax:int=0, ay:int=0):Boolean{ var i:GameObject; x = (x + ax); y = (y + ay); for each (i in level.solidArray) { if (hitTest(i)){ x = (x - ax); y = (y - ay); return (false); }; }; x = (x - ax); y = (y - ay); return (true); } public function tick():void{ } public function placeActorAll(ax:int=0, ay:int=0):Array{ var arr:Array; var i:GameObject; arr = new Array(); x = (x + ax); y = (y + ay); for each (i in level.actorArray) { if (hitTest(i)){ arr.push(i); }; }; x = (x - ax); y = (y - ay); return (arr); } public function placeJumpThru(ax:int=0, ay:int=0):Boolean{ var i:GameObject; var arr:Array = new Array(); x = (x + ax); y = (y + ay); for each (i in level.thruArray) { if (hitTest(i)){ x = (x - ax); y = (y - ay); return (true); }; }; x = (x - ax); y = (y - ay); return (false); } public function placeActor(ax:int=0, ay:int=0):GameObject{ var i:GameObject; x = (x + ax); y = (y + ay); for each (i in level.actorArray) { if (hitTest(i)){ x = (x - ax); y = (y - ay); return (i); }; }; x = (x - ax); y = (y - ay); return (null); } public function hitPoint(ax:int, ay:int):Boolean{ return ((((((((ax >= x)) && ((ax <= (x + hitWidth))))) && ((ay >= y)))) && ((ay <= (y + hitHeight))))); } } }//package com.mattmakesgames
Section 131
//GameSaved (com.mattmakesgames.GameSaved) package com.mattmakesgames { import com.mattmakesgames.Menus.*; public class GameSaved extends GameObject { public function GameSaved(level:Level):void{ var temp:MenuItem; super(); solid = false; actor = true; thru = false; this.level = level; level.actorArray.push(this); main = level.main; above = true; temp = new MenuItem(main, "Game Saved", true, 24, 0); temp.x = -1; addChild(temp); temp = new MenuItem(main, "Game Saved", true, 24, 0); temp.x = 1; addChild(temp); temp = new MenuItem(main, "Game Saved", true, 24, 0); temp.y = -1; addChild(temp); temp = new MenuItem(main, "Game Saved", true, 24, 0); temp.y = 1; addChild(temp); temp = new MenuItem(main, "Game Saved", true, 24, 0xFFFFFF); addChild(temp); x = 280; y = (-(level.y) + 240); alpha = 1.5; } override public function tick():void{ alpha = (alpha - 0.02); if (alpha <= 0){ destroy(); return; }; y = (-(level.y) + 240); } } }//package com.mattmakesgames
Section 132
//Level (com.mattmakesgames.Level) package com.mattmakesgames { import flash.display.*; import com.mattmakesgames.Menus.*; public class Level extends Sprite { public var coins:Array; public var shake:int;// = 0 public var gameHolderBelow:Sprite; public var blockHolder:Sprite; public var bgTileHolder:Sprite; public var levelWidth:int;// = 640 public var mode:int;// = 0 public var goldBird:Boolean;// = false public var main:Main; public var pinkBird:Boolean;// = false public var levelHeight:int;// = 480 public var greenBird:Boolean;// = false public var tutorial:SpeechBubble;// = null public var player:Player;// = null public var thruArray:Array; public var actorArray:Array; public var levelNum:int; public var solidArray:Array; public var levelXML:XML; public var gameHolderAbove:Sprite; public function Level(m:Main, num:int):void{ solidArray = new Array(); thruArray = new Array(); actorArray = new Array(); super(); main = m; levelNum = num; initHolders(); main.partSys.clear(); main.clouds.scramble(); } public function addBackgroundTileRect(ax:int, ay:int, w:int, h:int, top:Boolean=false):void{ var j:int; var i:int = ax; while (i < (ax + w)) { j = ay; while (j < (ay + h)) { addBackgroundTile(i, j, top); j = (j + 16); }; i = (i + 16); }; } public function addObjectBottom(o:GameObject):void{ gameHolderBelow.addChildAt(o, 0); } public function initHolders():void{ bgTileHolder = new Sprite(); gameHolderBelow = new Sprite(); blockHolder = new Sprite(); gameHolderAbove = new Sprite(); addChild(bgTileHolder); addChild(gameHolderBelow); addChild(blockHolder); addChild(gameHolderAbove); } public function tick():void{ var i:GameObject; if (((main.kp_pause) && ((mode == 0)))){ backToMap(); }; if (((main.kp_restart) && ((mode == 1)))){ var _local2 = Data.lvlDeaths; var _local3 = (levelNum - 1); var _local4 = (_local2[_local3] + 1); _local2[_local3] = _local4; Data.totalDeaths++; resetLevel(); }; if (shake > 0){ shake--; if ((shake % 2) == 0){ x = 0; y = 0; } else { x = (-5 + (Math.random() * 10)); y = (-5 + (Math.random() * 10)); }; }; if (tutorial != null){ tutorial.tick(); }; if (player != null){ player.tick(); }; for each (i in actorArray) { i.tick(); }; } public function positionFree(ax:int, ay:int):Boolean{ var i:GameObject; for each (i in solidArray) { if (i.hitPoint(ax, ay)){ return (false); }; }; return (true); } public function backToMap():void{ Sounds.playSound(Sounds.SndBack); main.removeChild(this); main.addChildAt(new Map(main), 2); } public function addObjectAbove(o:GameObject):void{ gameHolderAbove.addChild(o); } public function addObjectBelow(o:GameObject):void{ gameHolderBelow.addChild(o); } public function showComplete(coins:Array):void{ var menu:CompleteMenu = new CompleteMenu(this, coins); addObjectAbove(menu); } public function addObjectAboveBottom(o:GameObject):void{ gameHolderAbove.addChildAt(o, 0); } public function showEnter(num:int):void{ var menu:EnterStage = new EnterStage(this, num); addObjectAbove(menu); } public function addBlock(b:GameObject):void{ blockHolder.addChild(b); } public function resetLevel():void{ main.partSys.clear(); mode = 0; gameHolderBelow = null; blockHolder = null; bgTileHolder = null; gameHolderAbove = null; while (numChildren > 0) { removeChildAt(0); }; player = null; tutorial = null; solidArray = new Array(); thruArray = new Array(); actorArray = new Array(); initHolders(); LevelLoader.parseXML(this, levelXML); LevelLoader.checkSecretDoors(this); } public function screenShake(num:int):void{ shake = num; } public function addBackgroundTile(ax:int, ay:int, top:Boolean=false):void{ var bArr:Array; var temp:Bitmap; if (top){ bArr = Tilesets.tileBlockTopBG; } else { bArr = Tilesets.tileBlockBG; }; if (((ax + ay) % 32) == 0){ temp = new (bArr[1]); } else { temp = new (bArr[0]); }; temp.x = (ax - 2); temp.y = (ay - 2); temp.scaleX = 2; temp.scaleY = 2; bgTileHolder.addChild(temp); } public static function getName(levelNum:int):String{ if (levelNum == 50){ return ("SX"); }; if (levelNum > 40){ return (("S" + Number(levelNum).toString().charAt(1))); }; return (Number(levelNum).toString()); } } }//package com.mattmakesgames
Section 133
//LevelLoader (com.mattmakesgames.LevelLoader) package com.mattmakesgames { import flash.display.*; import com.mattmakesgames.Menus.*; import flash.utils.*; import com.mattmakesgames.Actors.*; import com.mattmakesgames.Actors.switches.*; import com.mattmakesgames.Blocks.*; import com.mattmakesgames.Actors.Enemies.*; import com.mattmakesgames.Actors.Birds.*; public class LevelLoader { private static const GfxNest:Class = LevelLoader_GfxNest; public function LevelLoader(){ super(); } public static function addNest(level:Level, ax:int, ay:int):void{ var temp:Bitmap; temp = new GfxNest(); temp.scaleX = 2; temp.scaleY = 2; temp.x = (convertGrid(ax) - 4); temp.y = (convertGrid(ay) + 10); level.gameHolderAbove.addChild(temp); } public static function parseXML(level:Level, xml:XML):void{ var o:XML; var temp:*; var arr:Array; var i:int; var c:int; var objs:XML = xml.OBJECTS[0]; var num:int = (level.levelNum - 1); var coinId:int; for each (o in xml.OBJECTS[0].SPAWN) { temp = new Spawn(level, convertGrid(o.@X), convertGrid(o.@Y)); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].DOOR) { temp = new Door(level, convertGrid(o.@X), convertGrid(o.@Y)); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].TUTORIAL) { temp = new Tutorial(level, convertGrid(o.@X), convertGrid(o.@Y), o.@TEXT); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].BLOCK) { temp = new Block(level, convertGrid(o.@X), convertGrid(o.@Y), convertGrid(o.@WIDTH), convertGrid(o.@HEIGHT)); level.addBlock(temp); }; for each (o in xml.OBJECTS[0].JUMPTHRU) { temp = new JumpThru(level, convertGrid(o.@X), convertGrid(o.@Y), convertGrid(o.@WIDTH)); level.addBlock(temp); }; for each (o in xml.OBJECTS[0].BREAKABLE) { c = -1; if (o.@COIN != 0){ if (!Data.lvlCoins[num][coinId]){ c = coinId; }; coinId++; }; temp = new Breakable(level, convertGrid(o.@X), convertGrid(o.@Y), c); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].COIN) { if (!Data.lvlCoins[num][coinId]){ temp = new Coin(level, convertGrid(o.@X), convertGrid(o.@Y), coinId); level.addObjectBelow(temp); }; coinId++; }; for each (o in xml.OBJECTS[0].CHEST) { arr = new Array(); i = 0; while (i < o.@COINS) { if (!Data.lvlCoins[num][coinId]){ arr.push(coinId); }; coinId++; i++; }; temp = new Chest(level, convertGrid(o.@X), (convertGrid(o.@Y) + 4), arr); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].BALLOON) { c = -1; if (o.@COIN != 0){ if (!Data.lvlCoins[num][coinId]){ c = coinId; }; coinId++; }; temp = new Balloon(level, convertGrid(o.@X), convertGrid(o.@Y), c); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].SPRING) { temp = new Spring(level, convertGrid(o.@X), convertGrid(o.@Y)); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].CANNON) { temp = new Cannon(level, convertGrid(o.@X), convertGrid(o.@Y), o.@HSPEED, convertGrid(o.@XMIN), convertGrid(o.@XMAX), o.@VSPEED, convertGrid(o.@YMIN), convertGrid(o.@YMAX), o.@TURNTIME, o.@RSPEED, o.@STARTDIR, o.@AUTO, o.@RIDER); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].BLADE) { temp = new Blade(level, (convertGrid(o.@X) + 2), (convertGrid(o.@Y) + 2)); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].BLOCK_YELLOW) { temp = new YellowBlock(level, Data.switchYellow, convertGrid(o.@X), convertGrid(o.@Y), convertGrid(o.@WIDTH), convertGrid(o.@HEIGHT)); level.addBlock(temp); }; for each (o in xml.OBJECTS[0].BLOCK_ORANGE) { temp = new OrangeBlock(level, Data.switchOrange, convertGrid(o.@X), convertGrid(o.@Y), convertGrid(o.@WIDTH), convertGrid(o.@HEIGHT)); level.addBlock(temp); }; for each (o in xml.OBJECTS[0].BLOCK_PINK) { temp = new PinkBlock(level, Data.switchPink, convertGrid(o.@X), convertGrid(o.@Y), convertGrid(o.@WIDTH), convertGrid(o.@HEIGHT)); level.addBlock(temp); }; for each (o in xml.OBJECTS[0].BLOCK_GREEN) { temp = new GreenBlock(level, Data.switchGreen, convertGrid(o.@X), convertGrid(o.@Y), convertGrid(o.@WIDTH), convertGrid(o.@HEIGHT)); level.addBlock(temp); }; for each (o in xml.OBJECTS[0].SWITCH_YELLOW) { temp = new YellowSwitch(level, Data.switchYellow, convertGrid(o.@X), convertGrid(o.@Y)); level.addObjectAbove(temp); }; for each (o in xml.OBJECTS[0].SWITCH_ORANGE) { temp = new OrangeSwitch(level, Data.switchOrange, convertGrid(o.@X), convertGrid(o.@Y)); level.addObjectAbove(temp); }; for each (o in xml.OBJECTS[0].SWITCH_PINK) { temp = new PinkSwitch(level, Data.switchPink, convertGrid(o.@X), convertGrid(o.@Y)); level.addObjectAbove(temp); }; for each (o in xml.OBJECTS[0].SWITCH_GREEN) { temp = new GreenSwitch(level, Data.switchGreen, convertGrid(o.@X), convertGrid(o.@Y)); level.addObjectAbove(temp); }; for each (o in xml.OBJECTS[0].BIRD_GREEN) { arr = new Array(); i = 0; while (i < o.@COINS) { if (!Data.lvlCoins[num][coinId]){ arr.push(coinId); }; coinId++; i++; }; if (arr.length == 0){ } else { temp = new GreenBird(level, convertGrid(o.@X), convertGrid(o.@Y), arr); level.addObjectAbove(temp); addNest(level, o.@X, o.@Y); }; }; for each (o in xml.OBJECTS[0].BIRD_GOLD) { arr = new Array(); i = 0; while (i < o.@COINS) { if (!Data.lvlCoins[num][coinId]){ arr.push(coinId); }; coinId++; i++; }; if (arr.length == 0){ } else { temp = new GoldBird(level, convertGrid(o.@X), convertGrid(o.@Y), arr, (o.@TIME * Main.LOGIC_PER_SECOND)); level.addObjectAbove(temp); addNest(level, o.@X, o.@Y); }; }; for each (o in xml.OBJECTS[0].BIRD_PINK) { arr = new Array(); i = 0; while (i < o.@COINS) { if (!Data.lvlCoins[num][coinId]){ arr.push(coinId); }; coinId++; i++; }; if (arr.length == 0){ } else { temp = new PinkBird(level, convertGrid(o.@X), convertGrid(o.@Y), arr); level.addObjectAbove(temp); addNest(level, o.@X, o.@Y); }; }; for each (o in xml.OBJECTS[0].EN_PINK) { c = -1; if (o.@COIN != 0){ if (!Data.lvlCoins[num][coinId]){ c = coinId; }; coinId++; }; temp = new Pinko(level, convertGrid(o.@X), convertGrid(o.@Y), o.@DIR, convertGrid(o.@XMIN), convertGrid(o.@XMAX), c); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].EN_BLUE) { c = -1; if (o.@COIN != 0){ if (!Data.lvlCoins[num][coinId]){ c = coinId; }; coinId++; }; temp = new Blue(level, convertGrid(o.@X), convertGrid(o.@Y), o.@DIR, convertGrid(o.@XMIN), convertGrid(o.@XMAX), c); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].EN_GREEN) { c = -1; if (o.@COIN != 0){ if (!Data.lvlCoins[num][coinId]){ c = coinId; }; coinId++; }; temp = new Green(level, convertGrid(o.@X), (convertGrid(o.@Y) + 4), c); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].SPIKEFLOOR) { temp = new SpikeFloor(level, convertGrid(o.@X), (convertGrid(o.@Y) + 8), convertGrid(o.@WIDTH)); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].SPIKECEIL) { temp = new SpikeCeil(level, convertGrid(o.@X), convertGrid(o.@Y), convertGrid(o.@WIDTH)); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].SPIKERIGHT) { temp = new SpikeRight(level, (convertGrid(o.@X) + 8), convertGrid(o.@Y), convertGrid(o.@HEIGHT)); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].SPIKELEFT) { temp = new SpikeLeft(level, convertGrid(o.@X), convertGrid(o.@Y), convertGrid(o.@HEIGHT)); level.addObjectBelow(temp); }; for each (o in xml.OBJECTS[0].HMOVING) { temp = new HMoving(level, convertGrid(o.@X), convertGrid(o.@Y), convertGrid(o.@WIDTH), convertGrid(o.@XMIN), convertGrid(o.@XMAX), o.@SPEED, o.@TURNTIME, o.@RIDER); level.addBlock(temp); }; for each (o in xml.OBJECTS[0].VMOVING) { temp = new VMoving(level, convertGrid(o.@X), convertGrid(o.@Y), convertGrid(o.@WIDTH), convertGrid(o.@YMIN), convertGrid(o.@YMAX), o.@SPEED, o.@TURNTIME, o.@RIDER); level.addBlock(temp); }; for each (o in xml.OBJECTS[0].BG) { level.addBackgroundTileRect(convertGrid(o.@X), convertGrid(o.@Y), convertGrid(o.@WIDTH), convertGrid(o.@HEIGHT)); }; for each (o in xml.OBJECTS[0].BG2) { level.addBackgroundTileRect(convertGrid(o.@X), convertGrid(o.@Y), convertGrid(o.@WIDTH), convertGrid(o.@HEIGHT), true); }; i = 0; while (i < level.blockHolder.numChildren) { (level.blockHolder.getChildAt(i) as BlockParent).initTiles(); i++; }; level.addObjectAbove(new InitStage(level, Data.lvlTotalCoins[num])); level.coins = new Array(); } public static function convertGrid(a:int):int{ return ((a * 16)); } public static function checkSecretDoors(level:Level):void{ if (level.levelNum == 1){ level.addObjectBelow(new LevelDoor(level, 41, 608, 304, true)); } else { if (level.levelNum == 10){ level.addObjectBelow(new LevelDoor(level, 42, 16, 400, true)); } else { if (level.levelNum == 18){ level.addObjectBelow(new LevelDoor(level, 43, 608, 48, true)); level.addBlock(new JumpThru(level, 608, 64)); } else { if (level.levelNum == 25){ level.addObjectBelow(new LevelDoor(level, 44, 0, 240, true)); level.addBlock(new JumpThru(level, 0, 0x0100)); } else { if (level.levelNum == 36){ level.addObjectBelow(new LevelDoor(level, 45, 0, 240, true)); level.addBlock(new JumpThru(level, 0, 0x0100)); } else { if (level.levelNum == 40){ level.addObjectBelow(new LevelDoor(level, 46, 416, 448, true)); level.addBlock(new JumpThru(level, 416, 464)); } else { if (level.levelNum == 41){ level.addObjectBelow(new LevelDoor(level, 47, 64, 456, true)); level.addBlock(new JumpThru(level, 64, 472)); } else { if (level.levelNum == 44){ level.addObjectBelow(new LevelDoor(level, 49, 16, 176, true)); level.addBlock(new JumpThru(level, 16, 192)); } else { if (level.levelNum == 47){ level.addObjectBelow(new LevelDoor(level, 48, 112, 448, true)); level.addBlock(new JumpThru(level, 112, 464)); }; }; }; }; }; }; }; }; }; } public static function loadLevel(main:Main, num:int):void{ main.lastLevel = num; var ba:ByteArray = new (Levels.lvlArray[(num - 1)]); var s:String = ba.readUTFBytes(ba.length); var xml:XML = new XML(s); main.level = new Level(main, num); var level:Level = main.level; main.addChildAt(level, 2); parseXML(level, xml); level.levelXML = xml; checkSecretDoors(level); Music.stopBG(); Music.setMusicVolume(1); Music.playMusic(Levels.lvlMusic[(num - 1)]); } } }//package com.mattmakesgames
Section 134
//LevelLoader_GfxNest (com.mattmakesgames.LevelLoader_GfxNest) package com.mattmakesgames { import mx.core.*; public class LevelLoader_GfxNest extends BitmapAsset { } }//package com.mattmakesgames
Section 135
//Levels (com.mattmakesgames.Levels) package com.mattmakesgames { public class Levels { public static const lvlMusic:Array = new Array(Music.SndTrack3, Music.SndTrack3, Music.SndTrack3, Music.SndTrack3, Music.SndTrack3, Music.SndTrack3, Music.SndTrack3, Music.SndTrack3, Music.SndTrack1, Music.SndTrack1, Music.SndTrack1, Music.SndTrack1, Music.SndTrack1, Music.SndTrack1, Music.SndTrack1, Music.SndTrack1, Music.SndTrack4, Music.SndTrack4, Music.SndTrack4, Music.SndTrack4, Music.SndTrack4, Music.SndTrack4, Music.SndTrack4, Music.SndTrack4, Music.SndTrack5, Music.SndTrack5, Music.SndTrack5, Music.SndTrack5, Music.SndTrack5, Music.SndTrack5, Music.SndTrack5, Music.SndTrack5, Music.SndTrack2, Music.SndTrack2, Music.SndTrack2, Music.SndTrack2, Music.SndTrack2, Music.SndTrack2, Music.SndTrack2, Music.SndTrack2, Music.SndTrack3, Music.SndTrack1, Music.SndTrack4, Music.SndTrack5, Music.SndTrack2, Music.SndTrack2, Music.SndTrack3, Music.SndTrack3, Music.SndTrack5, Music.SndMapBG); public static const lvlArray:Array = new Array(L1, L2, L3, L4, L5, L6, L7, L8, L9, L10, L11, L12, L13, L14, L15, L16, L17, L18, L19, L20, L21, L22, L23, L24, L25, L26, L27, L28, L29, L30, L31, L32, L33, L34, L35, L36, L37, L38, L39, L40, L41, L42, L43, L44, L45, L46, L47, L48, L49, L50); public static const L1:Class = Levels_L1; public static const L2:Class = Levels_L2; public static const L3:Class = Levels_L3; public static const L4:Class = Levels_L4; public static const L5:Class = Levels_L5; public static const L6:Class = Levels_L6; public static const L10:Class = Levels_L10; public static const L8:Class = Levels_L8; public static const L9:Class = Levels_L9; public static const L13:Class = Levels_L13; public static const L14:Class = Levels_L14; public static const L15:Class = Levels_L15; public static const L16:Class = Levels_L16; public static const L7:Class = Levels_L7; public static const L18:Class = Levels_L18; public static const L19:Class = Levels_L19; public static const L17:Class = Levels_L17; public static const L11:Class = Levels_L11; public static const L12:Class = Levels_L12; public static const L20:Class = Levels_L20; public static const L21:Class = Levels_L21; public static const L22:Class = Levels_L22; public static const L23:Class = Levels_L23; public static const L24:Class = Levels_L24; public static const L25:Class = Levels_L25; public static const L26:Class = Levels_L26; public static const L27:Class = Levels_L27; public static const L28:Class = Levels_L28; public static const L29:Class = Levels_L29; public static const L30:Class = Levels_L30; public static const L31:Class = Levels_L31; public static const L32:Class = Levels_L32; public static const L33:Class = Levels_L33; public static const L34:Class = Levels_L34; public static const L35:Class = Levels_L35; public static const L36:Class = Levels_L36; public static const L37:Class = Levels_L37; public static const L38:Class = Levels_L38; public static const L39:Class = Levels_L39; public static const L40:Class = Levels_L40; public static const L41:Class = Levels_L41; public static const L43:Class = Levels_L43; public static const L45:Class = Levels_L45; public static const L47:Class = Levels_L47; public static const L42:Class = Levels_L42; public static const L44:Class = Levels_L44; public static const L48:Class = Levels_L48; public static const L46:Class = Levels_L46; public static const L50:Class = Levels_L50; public static const L49:Class = Levels_L49; public function Levels(){ super(); } } }//package com.mattmakesgames
Section 136
//Levels_L1 (com.mattmakesgames.Levels_L1) package com.mattmakesgames { import mx.core.*; public class Levels_L1 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 137
//Levels_L10 (com.mattmakesgames.Levels_L10) package com.mattmakesgames { import mx.core.*; public class Levels_L10 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 138
//Levels_L11 (com.mattmakesgames.Levels_L11) package com.mattmakesgames { import mx.core.*; public class Levels_L11 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 139
//Levels_L12 (com.mattmakesgames.Levels_L12) package com.mattmakesgames { import mx.core.*; public class Levels_L12 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 140
//Levels_L13 (com.mattmakesgames.Levels_L13) package com.mattmakesgames { import mx.core.*; public class Levels_L13 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 141
//Levels_L14 (com.mattmakesgames.Levels_L14) package com.mattmakesgames { import mx.core.*; public class Levels_L14 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 142
//Levels_L15 (com.mattmakesgames.Levels_L15) package com.mattmakesgames { import mx.core.*; public class Levels_L15 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 143
//Levels_L16 (com.mattmakesgames.Levels_L16) package com.mattmakesgames { import mx.core.*; public class Levels_L16 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 144
//Levels_L17 (com.mattmakesgames.Levels_L17) package com.mattmakesgames { import mx.core.*; public class Levels_L17 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 145
//Levels_L18 (com.mattmakesgames.Levels_L18) package com.mattmakesgames { import mx.core.*; public class Levels_L18 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 146
//Levels_L19 (com.mattmakesgames.Levels_L19) package com.mattmakesgames { import mx.core.*; public class Levels_L19 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 147
//Levels_L2 (com.mattmakesgames.Levels_L2) package com.mattmakesgames { import mx.core.*; public class Levels_L2 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 148
//Levels_L20 (com.mattmakesgames.Levels_L20) package com.mattmakesgames { import mx.core.*; public class Levels_L20 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 149
//Levels_L21 (com.mattmakesgames.Levels_L21) package com.mattmakesgames { import mx.core.*; public class Levels_L21 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 150
//Levels_L22 (com.mattmakesgames.Levels_L22) package com.mattmakesgames { import mx.core.*; public class Levels_L22 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 151
//Levels_L23 (com.mattmakesgames.Levels_L23) package com.mattmakesgames { import mx.core.*; public class Levels_L23 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 152
//Levels_L24 (com.mattmakesgames.Levels_L24) package com.mattmakesgames { import mx.core.*; public class Levels_L24 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 153
//Levels_L25 (com.mattmakesgames.Levels_L25) package com.mattmakesgames { import mx.core.*; public class Levels_L25 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 154
//Levels_L26 (com.mattmakesgames.Levels_L26) package com.mattmakesgames { import mx.core.*; public class Levels_L26 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 155
//Levels_L27 (com.mattmakesgames.Levels_L27) package com.mattmakesgames { import mx.core.*; public class Levels_L27 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 156
//Levels_L28 (com.mattmakesgames.Levels_L28) package com.mattmakesgames { import mx.core.*; public class Levels_L28 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 157
//Levels_L29 (com.mattmakesgames.Levels_L29) package com.mattmakesgames { import mx.core.*; public class Levels_L29 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 158
//Levels_L3 (com.mattmakesgames.Levels_L3) package com.mattmakesgames { import mx.core.*; public class Levels_L3 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 159
//Levels_L30 (com.mattmakesgames.Levels_L30) package com.mattmakesgames { import mx.core.*; public class Levels_L30 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 160
//Levels_L31 (com.mattmakesgames.Levels_L31) package com.mattmakesgames { import mx.core.*; public class Levels_L31 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 161
//Levels_L32 (com.mattmakesgames.Levels_L32) package com.mattmakesgames { import mx.core.*; public class Levels_L32 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 162
//Levels_L33 (com.mattmakesgames.Levels_L33) package com.mattmakesgames { import mx.core.*; public class Levels_L33 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 163
//Levels_L34 (com.mattmakesgames.Levels_L34) package com.mattmakesgames { import mx.core.*; public class Levels_L34 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 164
//Levels_L35 (com.mattmakesgames.Levels_L35) package com.mattmakesgames { import mx.core.*; public class Levels_L35 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 165
//Levels_L36 (com.mattmakesgames.Levels_L36) package com.mattmakesgames { import mx.core.*; public class Levels_L36 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 166
//Levels_L37 (com.mattmakesgames.Levels_L37) package com.mattmakesgames { import mx.core.*; public class Levels_L37 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 167
//Levels_L38 (com.mattmakesgames.Levels_L38) package com.mattmakesgames { import mx.core.*; public class Levels_L38 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 168
//Levels_L39 (com.mattmakesgames.Levels_L39) package com.mattmakesgames { import mx.core.*; public class Levels_L39 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 169
//Levels_L4 (com.mattmakesgames.Levels_L4) package com.mattmakesgames { import mx.core.*; public class Levels_L4 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 170
//Levels_L40 (com.mattmakesgames.Levels_L40) package com.mattmakesgames { import mx.core.*; public class Levels_L40 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 171
//Levels_L41 (com.mattmakesgames.Levels_L41) package com.mattmakesgames { import mx.core.*; public class Levels_L41 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 172
//Levels_L42 (com.mattmakesgames.Levels_L42) package com.mattmakesgames { import mx.core.*; public class Levels_L42 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 173
//Levels_L43 (com.mattmakesgames.Levels_L43) package com.mattmakesgames { import mx.core.*; public class Levels_L43 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 174
//Levels_L44 (com.mattmakesgames.Levels_L44) package com.mattmakesgames { import mx.core.*; public class Levels_L44 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 175
//Levels_L45 (com.mattmakesgames.Levels_L45) package com.mattmakesgames { import mx.core.*; public class Levels_L45 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 176
//Levels_L46 (com.mattmakesgames.Levels_L46) package com.mattmakesgames { import mx.core.*; public class Levels_L46 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 177
//Levels_L47 (com.mattmakesgames.Levels_L47) package com.mattmakesgames { import mx.core.*; public class Levels_L47 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 178
//Levels_L48 (com.mattmakesgames.Levels_L48) package com.mattmakesgames { import mx.core.*; public class Levels_L48 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 179
//Levels_L49 (com.mattmakesgames.Levels_L49) package com.mattmakesgames { import mx.core.*; public class Levels_L49 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 180
//Levels_L5 (com.mattmakesgames.Levels_L5) package com.mattmakesgames { import mx.core.*; public class Levels_L5 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 181
//Levels_L50 (com.mattmakesgames.Levels_L50) package com.mattmakesgames { import mx.core.*; public class Levels_L50 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 182
//Levels_L6 (com.mattmakesgames.Levels_L6) package com.mattmakesgames { import mx.core.*; public class Levels_L6 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 183
//Levels_L7 (com.mattmakesgames.Levels_L7) package com.mattmakesgames { import mx.core.*; public class Levels_L7 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 184
//Levels_L8 (com.mattmakesgames.Levels_L8) package com.mattmakesgames { import mx.core.*; public class Levels_L8 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 185
//Levels_L9 (com.mattmakesgames.Levels_L9) package com.mattmakesgames { import mx.core.*; public class Levels_L9 extends ByteArrayAsset { } }//package com.mattmakesgames
Section 186
//Main (com.mattmakesgames.Main) package com.mattmakesgames { import flash.events.*; import flash.display.*; import com.mattmakesgames.Menus.*; import flash.utils.*; import com.mattmakesgames.Particles.*; import flash.net.*; public class Main extends Sprite { public var lastTime:int; public var level:Level;// = null public var lastLevel:int;// = 0 public var kp_pause:Boolean;// = false public var kd_pause:Boolean;// = false public var kp_left:Boolean;// = false public var kd_left:Boolean;// = false public var totalTime:int;// = 0 public var kp_restart:Boolean;// = false public var kd_right:Boolean;// = false public var kp_down:Boolean;// = false public var tickTimer:Timer; public var kd_up:Boolean;// = false public var kp_right:Boolean;// = false public var kp_up:Boolean;// = false public var bg:Sprite; public var kp_jump:Boolean;// = false public var kd_down:Boolean;// = false public var kd_jump:Boolean;// = false public var kongregate; public var clouds:Clouds; public var menu:Menu;// = null public var partSys:ParticleSystem; public static const LOGIC_RATE:int = Math.round((1000 / LOGIC_PER_SECOND)); public static const COINS_PER_LEVEL:int = 25; public static const KEY_LEFT:int = 37; public static const KEY_PAUSE:int = 16; public static const LOGIC_PER_SECOND:int = 40; public static const KEY_UP:int = 38; public static const KEY_DOWN:int = 40; public static const TOTAL_LEVELS:int = 50; public static const COINS_PER_SECRET:int = 1; public static const KEY_JUMP:int = 83; public static const KEY_SPONSOR:int = 13; public static const KEY_RIGHT:int = 39; public static const KEY_RESTART:int = 82; public static const KEY_JUMP_ALT:int = 32; public static var main:Main; public function Main():void{ lastTime = getTimer(); super(); main = this; bg = new Sprite(); addChild(bg); setBGColor(11061196); clouds = new Clouds(); addChild(clouds); partSys = new ParticleSystem(); addChild(partSys); tickTimer = new Timer(1); tickTimer.addEventListener(TimerEvent.TIMER, tick); tickTimer.start(); if (stage){ init(); } else { addEventListener(Event.ADDED_TO_STAGE, init); }; Options.loadOptions(); addChild(new SponsorAnim()); } public function init(e:Event=null):void{ removeEventListener(Event.ADDED_TO_STAGE, init); stage.addEventListener(KeyboardEvent.KEY_DOWN, downKey); stage.addEventListener(KeyboardEvent.KEY_UP, upKey); stage.quality = StageQuality.HIGH; loadKongAPI(); } public function tick(e:Event):void{ var nowTime:int = getTimer(); totalTime = (totalTime + (nowTime - lastTime)); lastTime = nowTime; while (totalTime >= LOGIC_RATE) { partSys.tick(); if (level != null){ level.tick(); } else { if (menu != null){ menu.tick(); }; }; resetKeys(); totalTime = (totalTime - LOGIC_RATE); }; } public function changeQuality():void{ stage.quality = StageQuality.LOW; } public function loadComplete(event:Event):void{ kongregate = event.target.content; kongregate.services.connect(); trace(("\n" + kongregate.services)); trace(("\n" + kongregate.user)); trace(("\n" + kongregate.scores)); trace(("\n" + kongregate.stats)); } public function upKey(e:KeyboardEvent):void{ switch (e.keyCode){ case KEY_RIGHT: kd_right = false; break; case KEY_LEFT: kd_left = false; break; case KEY_UP: kd_up = false; break; case KEY_DOWN: kd_down = false; break; case KEY_JUMP: case KEY_JUMP_ALT: kd_jump = false; break; case KEY_PAUSE: kd_pause = false; break; }; } public function downKey(e:KeyboardEvent):void{ switch (e.keyCode){ case KEY_RIGHT: if (!kd_right){ kp_right = true; }; kd_right = true; break; case KEY_LEFT: if (!kd_left){ kp_left = true; }; kd_left = true; break; case KEY_UP: if (!kd_up){ kp_up = true; }; kd_up = true; break; case KEY_DOWN: if (!kd_down){ kp_down = true; }; kd_down = true; break; case KEY_JUMP: case KEY_JUMP_ALT: if (!kd_jump){ kp_jump = true; }; kd_jump = true; break; case KEY_PAUSE: if (!kd_pause){ kp_pause = true; }; kd_pause = true; break; case KEY_RESTART: kp_restart = true; break; case KEY_SPONSOR: gotoSponsorSite(); break; }; } public function resetKeys():void{ kp_right = false; kp_left = false; kp_up = false; kp_down = false; kp_jump = false; kp_pause = false; kp_restart = false; } public function loadKongAPI():void{ var paramObj:Object = LoaderInfo(root.loaderInfo).parameters; if (!paramObj.api_path){ return; }; trace(("API Path: " + paramObj.api_path)); var request:URLRequest = new URLRequest(paramObj.api_path); var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadComplete); loader.load(request); this.addChild(loader); } public function setBGColor(color:uint):void{ bg.graphics.clear(); bg.graphics.beginFill(color); bg.graphics.drawRect(0, 0, 640, 480); bg.graphics.endFill(); } public static function gotoSponsorSite():void{ Sounds.playSound(Sounds.SndMenuClick); navigateToURL(new URLRequest("http://www.kongregate.com/?gamereferral=MoneySeize")); } } }//package com.mattmakesgames
Section 187
//Map (com.mattmakesgames.Map) package com.mattmakesgames { import flash.display.*; import com.mattmakesgames.Menus.*; import com.mattmakesgames.Actors.*; import com.mattmakesgames.Blocks.*; import com.mattmakesgames.Actors.NonGameplay.*; public class Map extends Level { public var coinDisplay:Sprite; public var towerHolder:Sprite; public var clouds:Sprite; private static const GfxStatue:Class = Map_GfxStatue; public function Map(main:Main):void{ var temp:Clouds; var btemp:Bitmap; super(main, 0); Data.save(); clouds = new Sprite(); temp = new Clouds(); clouds.addChild(temp); temp = new Clouds(); temp.y = 480; clouds.addChild(temp); temp = new Clouds(); temp.y = 960; clouds.addChild(temp); clouds.y = 160; addChildAt(clouds, 0); main.level = this; levelWidth = 640; levelHeight = 2080; towerHolder = new Sprite(); addChildAt(towerHolder, 3); initCoinDisplay(); loadLayout(); loadTower(); spawnPlayer(); y = -1600; setView(); mode = 1; if (Data.totalCoins >= 1010){ btemp = new GfxStatue(); btemp.x = (320 - (btemp.width * 2)); btemp.y = (432 - (btemp.height * 4)); btemp.scaleX = 4; btemp.scaleY = 4; bgTileHolder.addChild(btemp); }; if (main.lastLevel != 0){ addObjectAbove(new GameSaved(this)); }; Music.playMusic(Music.SndMap); Music.playBG(Music.SndMapBG); } public function initCoinDisplay():void{ var temp:MenuItem; var ax:int; var ay:int; var size:int; var text:String; var coinAnim:AnimatedBitmap; coinDisplay = new Sprite(); ax = 292; ay = 24; size = 36; text = ("x " + Data.totalCoins); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = (ay - 2); coinDisplay.addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = (ay - 2); coinDisplay.addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax - 2); temp.y = (ay + 2); coinDisplay.addChild(temp); temp = new MenuItem(main, text, true, size, 0); temp.x = (ax + 2); temp.y = (ay + 2); coinDisplay.addChild(temp); temp = new MenuItem(main, text, true, size, 0xFFFFFF); temp.x = ax; temp.y = ay; coinDisplay.addChild(temp); coinAnim = new AnimatedBitmap(new Array(new Coin.GfxCoin1(), new Coin.GfxCoin2(), new Coin.GfxCoin3(), new Coin.GfxCoin4()), 6); coinAnim.scaleX = 4; coinAnim.scaleY = 4; coinAnim.x = 250; coinAnim.y = (ay - 20); coinDisplay.addChild(coinAnim); addChild(coinDisplay); } public function loadTower():void{ var b:Block; var jt:JumpThru; var n:int; var i:int; var j:int; var temp:Bitmap; var c:int = Math.floor((Data.totalCoins / 10)); if (c > 7){ i = 0; while (i < 64) { j = (1920 - ((Math.min(c, 100) - 7) * 16)); while (j < 1936) { addBGTile((i + 288), j); j = (j + 16); }; i = (i + 16); }; }; var cc:int = Math.min(2, (c - 7)); addBGRect(0x0100, (1936 - (cc * 16)), 32, (cc * 16)); addBGRect(352, (1936 - (cc * 16)), 32, (cc * 16)); n = Math.min(7, c); b = new Block(this, 208, (0x0800 - (n * 16)), 224, ((n * 16) + 16)); towerHolder.addChild(b); if (c >= 5){ addObjectBelow(new Spring(this, 176, 0x0800)); }; loadShaftTypeA(c, 9); loadShaftTypeB(c, 22); loadShaftTypeA(c, 35); loadShaftTypeB(c, 48); loadShaftTypeA(c, 61); loadShaftTypeC(c, 74); var k:int; while (k < towerHolder.numChildren) { if ((towerHolder.getChildAt(k) is Block)){ b = (towerHolder.getChildAt(k) as Block); i = 0; while (i < b.hitWidth) { j = 0; while (j < b.hitHeight) { if (((((x + (i * 3)) + (j * 2)) + y) % 96) == 0){ temp = new Tilesets.GfxSet4Block2(); } else { if (((((x + (i * 2)) + j) + (y * 3)) % 112) == 0){ temp = new Tilesets.GfxSet4Block3(); } else { temp = new Tilesets.GfxSet4Block1(); }; }; temp.x = i; temp.y = j; temp.scaleX = 2; temp.scaleY = 2; b.addChild(temp); j = (j + 16); }; i = (i + 16); }; } else { if ((towerHolder.getChildAt(k) is JumpThru)){ jt = (towerHolder.getChildAt(k) as JumpThru); i = 0; while (i < jt.hitWidth) { temp = new Tilesets.GfxSet4JumpThru(); temp.x = i; temp.scaleX = 2; temp.scaleY = 2; jt.addChild(temp); i = (i + 16); }; }; }; k++; }; } public function loadShaftTypeC(c:int, start:int):void{ var startY:int; var jt:JumpThru; var b:Block; var i:int; var n:int; var nn:int; if (c >= start){ startY = (2032 - (start * 16)); n = Math.min(26, (c - start)); b = new Block(this, 0x0100, (startY - (n * 16)), 32, ((n * 16) + 16)); towerHolder.addChild(b); b = new Block(this, 352, (startY - (n * 16)), 32, ((n * 16) + 16)); towerHolder.addChild(b); nn = Math.min(2, n); b = new Block(this, 240, (startY - (nn * 16)), 16, ((nn * 16) + 16)); towerHolder.addChild(b); b = new Block(this, 384, (startY - (nn * 16)), 16, ((nn * 16) + 16)); towerHolder.addChild(b); if (n >= 23){ b = new Block(this, 384, (startY - (n * 16)), 16, ((n - 22) * 16)); towerHolder.addChild(b); b = new Block(this, 240, (startY - (n * 16)), 16, ((n - 22) * 16)); towerHolder.addChild(b); }; if (n >= 24){ b = new Block(this, 400, (startY - (n * 16)), 16, ((n - 23) * 16)); towerHolder.addChild(b); b = new Block(this, 224, (startY - (n * 16)), 16, ((n - 23) * 16)); towerHolder.addChild(b); }; if (n >= 25){ b = new Block(this, 416, (startY - (n * 16)), 16, ((n - 24) * 16)); towerHolder.addChild(b); b = new Block(this, 208, (startY - (n * 16)), 16, ((n - 24) * 16)); towerHolder.addChild(b); }; if (n == 26){ jt = new JumpThru(this, 288, 432, 64); towerHolder.addChild(jt); b = new Block(this, 208, 416, 16, 16); towerHolder.addChild(b); b = new Block(this, 416, 416, 16, 16); towerHolder.addChild(b); addBGRect(288, 400, 64, 32); addBGRect(208, 400, 48, 16); addBGRect(384, 400, 48, 16); addBGRect(224, 416, 32, 16); addBGRect(384, 416, 32, 16); }; }; } public function setView():void{ var top = 289; var bottom = 169; if (player.y > (-(y) + top)){ y = (top - player.y); y = Math.min(y, 0); y = Math.max(y, (-(levelHeight) + 480)); } else { if (player.y < (-(y) + bottom)){ y = (bottom - player.y); y = Math.min(y, 0); y = Math.max(y, (-(levelHeight) + 480)); }; }; coinDisplay.y = -(y); main.setBGColor(interpolateColor(0xFFFFFF, 10402495, (-(y) / (levelHeight - 480)))); main.clouds.y = (y + (levelHeight - 480)); Music.setMusicVolume((-(y) / (levelHeight - 480))); Music.setBGVolume(((1 - (-(y) / (levelHeight - 480))) * 0.4)); } public function spawnPlayer():void{ var o:GameObject; if (main.lastLevel == 0){ addObjectBelow(new Player(this, 32, 2042)); } else { if ((((((main.lastLevel == 41)) || ((main.lastLevel == 47)))) || ((main.lastLevel == 48)))){ main.lastLevel = 1; } else { if (main.lastLevel == 42){ main.lastLevel = 10; } else { if (main.lastLevel == 43){ main.lastLevel = 18; } else { if ((((main.lastLevel == 44)) || ((main.lastLevel == 49)))){ main.lastLevel = 25; } else { if (main.lastLevel == 45){ main.lastLevel = 36; } else { if (main.lastLevel == 46){ main.lastLevel = 40; }; }; }; }; }; }; for each (o in actorArray) { if ((((o is LevelDoor)) && (((o as LevelDoor).num == main.lastLevel)))){ addObjectBelow(new Player(this, o.x, (o.y - 6))); break; }; }; }; } public function loadLayout():void{ addBlock(new Block(this, 0, 2064, 640, 16)); addBlock(new Block(this, 560, 2000, 80, 64)); addBlock(new JumpThru(this, 0, 1920, 112)); addBlock(new JumpThru(this, 528, 1856, 128)); addBlock(new JumpThru(this, 0, 1776, 112)); addBlock(new JumpThru(this, 528, 1680, 112)); addBlock(new JumpThru(this, 0, 1568, 112)); addBlock(new JumpThru(this, 0, 1440, 112)); addBlock(new JumpThru(this, 528, 1440, 112)); addBlock(new JumpThru(this, 0, 1216, 112)); addBlock(new JumpThru(this, 528, 1216, 112)); addBlock(new JumpThru(this, 0, 960, 112)); addBlock(new JumpThru(this, 528, 960, 112)); addBlock(new YellowBlock(this, Data.switchYellow, 464, 1760, 64, 16)); addBlock(new OrangeBlock(this, Data.switchOrange, 112, 1616, 48, 16)); addBlock(new PinkBlock(this, Data.switchPink, 480, 0x0400, 48, 16)); addBlock(new YellowBlock(this, Data.switchYellow, 16, 736, 48, 16)); addBlock(new OrangeBlock(this, Data.switchOrange, 576, 720, 48, 16)); addBlock(new PinkBlock(this, Data.switchPink, 16, 528, 48, 16)); addBlock(new GreenBlock(this, Data.switchGreen, 576, 0x0200, 48, 16)); addBlock(new JumpThru(this, 304, 336, 32)); addBlock(new JumpThru(this, 160, 0x0100, 16)); addBlock(new JumpThru(this, 160, 192, 16)); var i:int; while (i < blockHolder.numChildren) { (blockHolder.getChildAt(i) as BlockParent).initTiles(); i++; }; addObjectBelow(new Tutorial(this, 32, 0x0800, "Use the arrows keys to move, S or SPACE to jump.\nPress UP to enter doors and DOWN to duck.\nIn levels, press R for quick restart.\nPress ENTER to play more games at Kongregate.")); if (Data.totalCoins == 0){ addObjectBelow(new Tutorial(this, 318, 2032, "Ah, this is the future site of the\ntallest tower in the world!\nI simply require 1000 coins\nto fund its construction.")); }; addObjectBelow(new LevelDoor(this, 1, 528, 0x0800)); addObjectBelow(new LevelDoor(this, 2, 576, 1984)); addObjectBelow(new LevelDoor(this, 3, 608, 1984)); addObjectBelow(new LevelDoor(this, 4, 16, 1904)); addObjectBelow(new LevelDoor(this, 5, 48, 1904)); addObjectBelow(new LevelDoor(this, 6, 80, 1904)); addObjectBelow(new LevelDoor(this, 7, 544, 1840)); addObjectBelow(new LevelDoor(this, 8, 576, 1840)); addObjectBelow(new LevelDoor(this, 9, 608, 1840)); addObjectBelow(new LevelDoor(this, 10, 16, 1760)); addObjectBelow(new LevelDoor(this, 11, 48, 1760)); addObjectBelow(new LevelDoor(this, 12, 80, 1760)); addObjectBelow(new LevelDoor(this, 13, 544, 1664)); addObjectBelow(new LevelDoor(this, 14, 576, 1664)); addObjectBelow(new LevelDoor(this, 15, 608, 1664)); addObjectBelow(new LevelDoor(this, 16, 16, 1552)); addObjectBelow(new LevelDoor(this, 17, 48, 1552)); addObjectBelow(new LevelDoor(this, 18, 80, 1552)); addObjectBelow(new LevelDoor(this, 19, 16, 1424)); addObjectBelow(new LevelDoor(this, 20, 48, 1424)); addObjectBelow(new LevelDoor(this, 21, 80, 1424)); addObjectBelow(new LevelDoor(this, 22, 544, 1424)); addObjectBelow(new LevelDoor(this, 23, 576, 1424)); addObjectBelow(new LevelDoor(this, 24, 608, 1424)); addObjectBelow(new LevelDoor(this, 25, 16, 1200)); addObjectBelow(new LevelDoor(this, 26, 48, 1200)); addObjectBelow(new LevelDoor(this, 27, 80, 1200)); addObjectBelow(new LevelDoor(this, 28, 544, 1200)); addObjectBelow(new LevelDoor(this, 29, 576, 1200)); addObjectBelow(new LevelDoor(this, 30, 608, 1200)); addObjectBelow(new LevelDoor(this, 31, 16, 944)); addObjectBelow(new LevelDoor(this, 32, 48, 944)); addObjectBelow(new LevelDoor(this, 33, 80, 944)); addObjectBelow(new LevelDoor(this, 34, 544, 944)); addObjectBelow(new LevelDoor(this, 35, 576, 944)); addObjectBelow(new LevelDoor(this, 36, 608, 944)); addObjectBelow(new LevelDoor(this, 37, 32, 720)); addObjectBelow(new LevelDoor(this, 38, 592, 704)); addObjectBelow(new LevelDoor(this, 39, 32, 0x0200)); addObjectBelow(new LevelDoor(this, 40, 592, 496)); if (Data.totalCoins >= 1000){ addBlock(new JumpThru(this, 158, 96, 16)); addObjectBelow(new LevelDoor(this, 50, 158, 80, true)); addObjectAbove(new TheEnd(this, 320, 150)); }; } public function addBGTile(ax:int, ay:int):void{ var temp:Bitmap; if ((((ax * 3) + (ay * 2)) % 96) == 0){ temp = new Tilesets.GfxSet4BG3(); } else { if ((((ax * 2) + ay) % 112) == 0){ temp = new Tilesets.GfxSet4BG1(); } else { temp = new Tilesets.GfxSet4BG2(); }; }; temp.x = ax; temp.y = ay; temp.scaleX = 2; temp.scaleY = 2; bgTileHolder.addChild(temp); } public function addBGRect(ax:int, ay:int, w:int, h:int):void{ var j:int; var i:int = ax; while (i < (ax + w)) { j = ay; while (j < (ay + h)) { addBGTile(i, j); j = (j + 16); }; i = (i + 16); }; } public function loadShaftTypeA(c:int, start:int):void{ var startY:int; var jt:JumpThru; var b:Block; var i:int; var n:int; if (c >= start){ startY = (2032 - (start * 16)); n = Math.min(9, (c - start)); b = new Block(this, 240, (startY - (n * 16)), 48, ((n * 16) + 16)); towerHolder.addChild(b); b = new Block(this, 352, (startY - (n * 16)), 48, ((n * 16) + 16)); towerHolder.addChild(b); if (n == 9){ b = new Block(this, 224, (startY - 144), 16, 16); towerHolder.addChild(b); b = new Block(this, 400, (startY - 144), 16, 16); towerHolder.addChild(b); jt = new JumpThru(this, 336, startY, 16); towerHolder.addChild(jt); jt = new JumpThru(this, 336, (startY - 112), 16); towerHolder.addChild(jt); addObjectBelow(new Spring(this, 336, (startY - 16))); addObjectBelow(new Spring(this, 336, (startY - 128))); }; i = start; while (i <= (start + 9)) { if (c >= i){ jt = new JumpThru(this, 288, (2032 - (i * 16)), 16); towerHolder.addChild(jt); } else { break; }; i = (i + 3); }; c = Math.min(((c - start) - 9), 3); i = 0; while (i < c) { addBGTile(0x0100, ((startY - 160) - (i * 16))); addBGTile(272, ((startY - 160) - (i * 16))); addBGTile(352, ((startY - 160) - (i * 16))); addBGTile(368, ((startY - 160) - (i * 16))); i++; }; }; } public function loadShaftTypeB(c:int, start:int):void{ var startY:int; var jt:JumpThru; var b:Block; var i:int; var n:int; if (c >= start){ startY = (2032 - (start * 16)); n = Math.min(9, (c - start)); b = new Block(this, 240, (startY - (n * 16)), 48, ((n * 16) + 16)); towerHolder.addChild(b); b = new Block(this, 352, (startY - (n * 16)), 48, ((n * 16) + 16)); towerHolder.addChild(b); if (n == 9){ b = new Block(this, 224, (startY - 144), 16, 16); towerHolder.addChild(b); b = new Block(this, 400, (startY - 144), 16, 16); towerHolder.addChild(b); jt = new JumpThru(this, 288, startY, 16); towerHolder.addChild(jt); jt = new JumpThru(this, 288, (startY - 112), 16); towerHolder.addChild(jt); addObjectBelow(new Spring(this, 288, (startY - 16))); addObjectBelow(new Spring(this, 288, (startY - 128))); }; i = start; while (i <= (start + 9)) { if (c >= i){ jt = new JumpThru(this, 336, (2032 - (i * 16)), 16); towerHolder.addChild(jt); } else { break; }; i = (i + 3); }; c = Math.min(((c - start) - 9), 3); i = 0; while (i < c) { addBGTile(0x0100, ((startY - 160) - (i * 16))); addBGTile(272, ((startY - 160) - (i * 16))); addBGTile(352, ((startY - 160) - (i * 16))); addBGTile(368, ((startY - 160) - (i * 16))); i++; }; }; } override public function tick():void{ var i:GameObject; if (tutorial != null){ tutorial.y = -(y); tutorial.tick(); }; if (player != null){ setView(); player.tick(); }; for each (i in actorArray) { i.tick(); }; (coinDisplay.getChildAt(5) as AnimatedBitmap).tick(); } public static function interpolateColor(fromColor:uint, toColor:uint, progress:Number):uint{ var q:Number = (1 - progress); var fromA:uint = ((fromColor >> 24) & 0xFF); var fromR:uint = ((fromColor >> 16) & 0xFF); var fromG:uint = ((fromColor >> 8) & 0xFF); var fromB:uint = (fromColor & 0xFF); var toA:uint = ((toColor >> 24) & 0xFF); var toR:uint = ((toColor >> 16) & 0xFF); var toG:uint = ((toColor >> 8) & 0xFF); var toB:uint = (toColor & 0xFF); var resultA:uint = ((fromA * q) + (toA * progress)); var resultR:uint = ((fromR * q) + (toR * progress)); var resultG:uint = ((fromG * q) + (toG * progress)); var resultB:uint = ((fromB * q) + (toB * progress)); var resultColor:uint = ((((resultA << 24) | (resultR << 16)) | (resultG << 8)) | resultB); return (resultColor); } } }//package com.mattmakesgames
Section 188
//Map_GfxStatue (com.mattmakesgames.Map_GfxStatue) package com.mattmakesgames { import mx.core.*; public class Map_GfxStatue extends BitmapAsset { } }//package com.mattmakesgames
Section 189
//Music (com.mattmakesgames.Music) package com.mattmakesgames { import flash.events.*; import flash.media.*; public class Music { public static const SndMap:Class = Music_SndMap; public static const SndMapBG:Class = Music_SndMapBG; public static const VOLUME:Number = 0.6; public static const SndMenu1:Class = Music_SndMenu1; public static const SndMenu2:Class = Music_SndMenu2; public static const SndTrack1:Class = Music_SndTrack1; public static const START_TIME:int = 0; public static const SndTrack4:Class = Music_SndTrack4; public static const SndTrack5:Class = Music_SndTrack5; public static const SndTrack2:Class = Music_SndTrack2; public static const SndTrack3:Class = Music_SndTrack3; public static var currentVolume:Number = 1; public static var bgTrack:Class; public static var currentChannel:SoundChannel = null; public static var currentTrack:Class; public static var bgChannel:SoundChannel = null; public static var bgVolume:Number = 1; public function Music(){ super(); } public static function loopBG(e:Event):void{ bgChannel.removeEventListener(Event.SOUND_COMPLETE, Music.loopBG); var snd:Sound = new bgTrack(); bgChannel = snd.play(START_TIME, 1000, new SoundTransform((VOLUME * bgVolume))); bgChannel.addEventListener(Event.SOUND_COMPLETE, Music.loopBG, false, 0, true); } public static function stopMusic():void{ if (currentChannel != null){ currentTrack = null; currentChannel.stop(); currentChannel.removeEventListener(Event.SOUND_COMPLETE, Music.loopMusic); currentChannel = null; }; } public static function stopBG():void{ if (bgChannel != null){ bgTrack = null; bgChannel.stop(); bgChannel.removeEventListener(Event.SOUND_COMPLETE, Music.loopBG); bgChannel = null; }; } public static function playMusic(track:Class):void{ var snd:Sound; if (Options.music){ if (track == currentTrack){ return; }; stopMusic(); snd = new (track); currentChannel = snd.play(START_TIME, 1000, new SoundTransform((VOLUME * currentVolume))); currentChannel.addEventListener(Event.SOUND_COMPLETE, Music.loopMusic, false, 0, true); currentTrack = track; }; } public static function setMusicVolume(v:Number):void{ currentVolume = v; if (currentChannel != null){ currentChannel.soundTransform = new SoundTransform((v * VOLUME)); }; } public static function loopMusic(e:Event):void{ currentChannel.removeEventListener(Event.SOUND_COMPLETE, Music.loopMusic); var snd:Sound = new currentTrack(); currentChannel = snd.play(START_TIME, 1000, new SoundTransform((VOLUME * currentVolume))); currentChannel.addEventListener(Event.SOUND_COMPLETE, Music.loopMusic, false, 0, true); } public static function setBGVolume(v:Number):void{ bgVolume = v; if (bgChannel != null){ bgChannel.soundTransform = new SoundTransform((v * VOLUME)); }; } public static function playBG(track:Class):void{ var snd:Sound; if (Options.music){ if (track == bgTrack){ return; }; stopBG(); snd = new (track); bgChannel = snd.play(START_TIME, 1000, new SoundTransform((VOLUME * bgVolume))); bgChannel.addEventListener(Event.SOUND_COMPLETE, Music.loopBG, false, 0, true); bgTrack = track; }; } } }//package com.mattmakesgames
Section 190
//Music_SndMap (com.mattmakesgames.Music_SndMap) package com.mattmakesgames { import mx.core.*; public class Music_SndMap extends SoundAsset { } }//package com.mattmakesgames
Section 191
//Music_SndMapBG (com.mattmakesgames.Music_SndMapBG) package com.mattmakesgames { import mx.core.*; public class Music_SndMapBG extends SoundAsset { } }//package com.mattmakesgames
Section 192
//Music_SndMenu1 (com.mattmakesgames.Music_SndMenu1) package com.mattmakesgames { import mx.core.*; public class Music_SndMenu1 extends SoundAsset { } }//package com.mattmakesgames
Section 193
//Music_SndMenu2 (com.mattmakesgames.Music_SndMenu2) package com.mattmakesgames { import mx.core.*; public class Music_SndMenu2 extends SoundAsset { } }//package com.mattmakesgames
Section 194
//Music_SndTrack1 (com.mattmakesgames.Music_SndTrack1) package com.mattmakesgames { import mx.core.*; public class Music_SndTrack1 extends SoundAsset { } }//package com.mattmakesgames
Section 195
//Music_SndTrack2 (com.mattmakesgames.Music_SndTrack2) package com.mattmakesgames { import mx.core.*; public class Music_SndTrack2 extends SoundAsset { } }//package com.mattmakesgames
Section 196
//Music_SndTrack3 (com.mattmakesgames.Music_SndTrack3) package com.mattmakesgames { import mx.core.*; public class Music_SndTrack3 extends SoundAsset { } }//package com.mattmakesgames
Section 197
//Music_SndTrack4 (com.mattmakesgames.Music_SndTrack4) package com.mattmakesgames { import mx.core.*; public class Music_SndTrack4 extends SoundAsset { } }//package com.mattmakesgames
Section 198
//Music_SndTrack5 (com.mattmakesgames.Music_SndTrack5) package com.mattmakesgames { import mx.core.*; public class Music_SndTrack5 extends SoundAsset { } }//package com.mattmakesgames
Section 199
//Options (com.mattmakesgames.Options) package com.mattmakesgames { import flash.net.*; public class Options { public static var sounds:Boolean = true; public static var music:Boolean = true; public static var particles:Boolean = true; public function Options(){ super(); } public static function saveOptions():void{ var shared:SharedObject = SharedObject.getLocal("optionsData"); shared.data.particles = particles; shared.data.sounds = sounds; shared.data.music = music; shared.close(); } public static function loadOptions():void{ var shared:SharedObject = SharedObject.getLocal("optionsData"); if (shared.size > 0){ particles = shared.data.particles; sounds = shared.data.sounds; music = shared.data.music; }; shared.close(); } } }//package com.mattmakesgames
Section 200
//Player (com.mattmakesgames.Player) package com.mattmakesgames { import flash.display.*; import com.mattmakesgames.Menus.*; import com.mattmakesgames.Actors.*; import com.mattmakesgames.Actors.Enemies.*; import com.mattmakesgames.Actors.Birds.*; import com.mattmakesgames.Actors.NonGameplay.*; public class Player extends GameObject { public var noCon:int;// = 0 public var wasShot:Boolean;// = false public var anim_stick:Bitmap; public var dir:int;// = 1 public var stick:int;// = 0 public var anim_jump:Bitmap; public var vCounter:Number;// = 0 public var anim_duck:Bitmap; public var anim_stand:Bitmap; public var door:Door;// = null public var lastCannon:Cannon;// = null public var djumpDone:Boolean;// = false public var duck:Boolean;// = false public var hSpeed:Number;// = 0 public var cantCannon:int; public var candj:Boolean;// = true public var pf_d:Boolean;// = false public var anim_run:AnimatedBitmap; public var stickCount:int;// = 0 public var anim_skid:Bitmap; public var anim_djump:AnimatedBitmap; public var anim_fall:Bitmap; public var vSpeed:Number;// = 0 public var skid:int;// = 0 public var hCounter:Number;// = 0 public var vCollide:Boolean;// = false public var gfx;// = null public var shot:int;// = 0 public static const FALL_MAX:Number = 6; public static const WJUMP_SPEED:Number = -5; public static const SJUMP_NOCON:int = 12; private static const GfxPlayer_Stick:Class = Player_GfxPlayer_Stick; public static const DJUMP_HORIZ:Number = 3.5; public static const CLIMB_DIST:int = 7; public static const STICK_SPEED:Number = 1; public static const SKID_TIME:int = 10; public static const DJUMP_SPEED:Number = -5.1; private static const GfxPlayer_Skid:Class = Player_GfxPlayer_Skid; private static const GfxPlayer_Fall:Class = Player_GfxPlayer_Fall; private static const GfxPlayer_DJump1:Class = Player_GfxPlayer_DJump1; private static const GfxPlayer_DJump2:Class = Player_GfxPlayer_DJump2; private static const GfxPlayer_Run1:Class = Player_GfxPlayer_Run1; public static const DUCK_FRIC:Number = 0.2; private static const GfxPlayer_Run3:Class = Player_GfxPlayer_Run3; public static const GRAVITY:Number = 0.4; private static const GfxPlayer_Run2:Class = Player_GfxPlayer_Run2; private static const GfxPlayer_Run4:Class = Player_GfxPlayer_Run4; public static const RUN_FRIC:Number = 0.8; private static const GfxPlayer_DJump3:Class = Player_GfxPlayer_DJump3; public static const WJUMP_NOCON:int = 8; private static const GfxPlayer_Stand:Class = Player_GfxPlayer_Stand; private static const GfxPlayer_Jump:Class = Player_GfxPlayer_Jump; public static const STICK_FRIC:Number = 0.2; public static const AIR_FRIC:Number = 0.3; public static const JUMP_SPEED:Number = -6.3; private static const GfxPlayer_Duck:Class = Player_GfxPlayer_Duck; public static const SKID_NEED:Number = 3.5; public static const DJUMP_MIN:Number = -3.5; public static const SJUMP_SPEED:Number = -7.3; public static const SJUMP_HORIZ:Number = 4.5; public static const RUN_MAX:Number = 4.5; public static const WJUMP_HORIZ:Number = 4.5; public static const AIR_ACCEL:Number = 0.3; public static const RUN_ACCEL:Number = 1; public static const SPRING_SPEED:Number = -9; public static const SKID_ACCEL:Number = 0.5; public static const CLIMB_SPEED:Number = -3.3; public static const HEAD_OFFSET:int = 6; public function Player(lvl:Level, ax:int, ay:int):void{ var lvl = lvl; var ax = ax; var ay = ay; anim_stand = new GfxPlayer_Stand(); anim_duck = new GfxPlayer_Duck(); anim_run = new AnimatedBitmap(new Array(new GfxPlayer_Run1(), new GfxPlayer_Run2(), new GfxPlayer_Run3(), new GfxPlayer_Run4()), 6); anim_skid = new GfxPlayer_Skid(); anim_jump = new GfxPlayer_Jump(); anim_fall = new GfxPlayer_Fall(); anim_stick = new GfxPlayer_Stick(); anim_djump = new AnimatedBitmap(new Array(new GfxPlayer_DJump1(), new GfxPlayer_DJump2(), new GfxPlayer_DJump3()), 6); super(); level = lvl; level.player = this; main = level.main; hitHeight = 22; hitWidth = 16; scaleX = 2; scaleY = 2; x = ax; y = ay; setAnim(anim_stand); anim_djump.loop = false; anim_djump.animEnd = function ():void{ djumpDone = true; }; } public function die():void{ Sounds.playSound(Sounds.SndDie); level.screenShake(20); level.mode = 2; level.addObjectAbove(new Tophat(level, (x + 8), (y - 4), dir)); level.addObjectAbove(new Corpse(level, x, y, -(dir))); level.addObjectAbove(new DeadControl(level)); destroy(); } public function bounce():void{ level.addObjectBelow(new Dust(level, (x + 4), (y + 22), -0.1, (0.2 + (0.3 * Math.random())))); level.addObjectBelow(new Dust(level, (x + 12), (y + 22), 0.1, (0.2 + (0.3 * Math.random())))); level.addObjectBelow(new Dust(level, (x + 8), (y + 22), 0, (0.7 + (0.4 * Math.random())))); candj = true; vSpeed = JUMP_SPEED; } public function greenBirdCheck():void{ var o:GameObject; if (level.greenBird){ for each (o in level.actorArray) { if ((o is GreenBird)){ (o as GreenBird).flyAway(); break; }; }; }; } override public function destroy():void{ level.player = null; level.gameHolderBelow.removeChild(this); } public function setAnim(bitmap):void{ if (gfx == bitmap){ return; }; if (gfx != null){ removeChild(gfx); }; gfx = bitmap; gfx.scaleX = dir; gfx.x = (4 - (6 * gfx.scaleX)); gfx.y = -4; addChild(gfx); if ((bitmap is AnimatedBitmap)){ (bitmap as AnimatedBitmap).reset(); }; } public function spring():void{ Sounds.playSound(Sounds.SndSpring); candj = true; vSpeed = SPRING_SPEED; } public function stickToWall(d:int):void{ dir = d; wasShot = false; djumpDone = true; if (placeFree(d, -(CLIMB_DIST))){ vSpeed = CLIMB_SPEED; } else { stickCount++; if (stickCount == 3){ stickCount = 0; level.addObjectBottom(new Dust(level, ((x + 8) + (6 * d)), (y + 10), 0, (-0.3 - (0.3 * Math.random())))); }; stick = d; }; } public function wallJump(d:int):void{ Sounds.playSound(Sounds.SndWJump); level.addObjectBelow(new Dust(level, ((x + 8) - (6 * d)), (y + 16), 0, (0.3 + (0.3 * Math.random())))); level.addObjectBelow(new Dust(level, ((x + 8) - (6 * d)), (y + 10), 0, (-0.3 - (0.3 * Math.random())))); wasShot = false; vSpeed = WJUMP_SPEED; hSpeed = (WJUMP_HORIZ * d); noCon = WJUMP_NOCON; } override public function tick():void{ var i:GameObject; var m:MainMenu; var fric:Number; var accel:Number; pf_d = ((placeFree(0, 1)) && (((!(placeJumpThru(0, 1))) || (placeJumpThru())))); if (main.kp_pause){ if (level.levelNum != 0){ die(); return; }; Sounds.playSound(Sounds.SndBack); Music.stopBG(); main.removeChild(level); main.level = null; m = new MainMenu(main); main.menu = m; main.addChild(m); }; stick = 0; if (cantCannon > 0){ cantCannon--; if (cantCannon == 0){ lastCannon = null; }; }; if (shot == 0){ if (((((main.kp_up) && (!((door == null))))) && (!(pf_d)))){ win(); door.open(); return; }; if (noCon == 0){ if (pf_d){ fric = AIR_FRIC; accel = AIR_ACCEL; } else { if (duck){ fric = DUCK_FRIC; accel = SKID_ACCEL; if (hSpeed != 0){ level.addObjectBelow(new Dust(level, (x + 8), (y + 16), (-0.1 * Utils.sign(hSpeed)), (0.04 * Math.random()))); }; } else { if (skid){ fric = RUN_FRIC; accel = SKID_ACCEL; } else { fric = RUN_FRIC; accel = RUN_ACCEL; }; }; }; if (((((!(duck)) && (!(pf_d)))) && (main.kd_down))){ duck = true; hitHeight = 16; y = (y + 6); } else { if (((((duck) && (((!(main.kd_down)) || (pf_d))))) && (placeFree(0, -6)))){ duck = false; hitHeight = 22; y = (y - 6); }; }; if (((main.kd_right) && (!(duck)))){ if (((((pf_d) && ((vSpeed > 0)))) && (!(placeFree(1))))){ stickToWall(1); } else { if ((((((hSpeed <= -(SKID_NEED))) && (!(pf_d)))) && ((vSpeed == 0)))){ if (skid == 0){ Sounds.playSound(Sounds.SndSkid); }; skid = SKID_TIME; accel = SKID_ACCEL; level.addObjectBelow(new Dust(level, (x - 8), (y + 22), (-0.4 - (0.4 * Math.random())), (-0.2 - (0.3 * Math.random())))); }; if ((((hSpeed < 0)) && ((skid == 0)))){ hSpeed = Utils.approach(hSpeed, 0, fric); }; hSpeed = Utils.approach(hSpeed, RUN_MAX, accel); }; } else { if (((main.kd_left) && (!(duck)))){ if (((((pf_d) && ((vSpeed > 0)))) && (!(placeFree(-1))))){ stickToWall(-1); } else { if ((((((hSpeed >= SKID_NEED)) && (!(pf_d)))) && ((vSpeed == 0)))){ if (skid == 0){ Sounds.playSound(Sounds.SndSkid); }; skid = -(SKID_TIME); accel = SKID_ACCEL; level.addObjectBelow(new Dust(level, (x + 24), (y + 22), (0.4 + (0.4 * Math.random())), (-0.2 - (0.3 * Math.random())))); }; if ((((hSpeed > 0)) && ((skid == 0)))){ hSpeed = Utils.approach(hSpeed, 0, fric); }; hSpeed = Utils.approach(hSpeed, -(RUN_MAX), accel); }; } else { skid = 0; hSpeed = Utils.approach(hSpeed, 0, fric); }; }; } else { noCon--; }; if (skid != 0){ skid = Utils.approach(skid, 0, 1); }; if (((pf_d) || (!((vSpeed == 0))))){ if (((main.kp_jump) && (!((stick == 0))))){ wallJump(-(stick)); } else { if (((((((main.kp_jump) && ((stick == 0)))) && (main.kd_left))) && (!(placeFree(-3))))){ wallJump(1); } else { if (((((((main.kp_jump) && ((stick == 0)))) && (main.kd_right))) && (!(placeFree(3))))){ wallJump(-1); } else { if (((main.kp_jump) && (candj))){ doubleJump(); } else { if (((!(wasShot)) || ((vSpeed < FALL_MAX)))){ if (stick != 0){ vSpeed = Utils.approach(vSpeed, STICK_SPEED, STICK_FRIC); } else { vSpeed = Utils.approach(vSpeed, FALL_MAX, GRAVITY); }; }; }; }; }; }; } else { if (vSpeed >= -0.5){ vSpeed = 0; }; candj = true; if (main.kp_jump){ if (skid != 0){ skidJump(); } else { jump(); }; }; }; } else { level.addObjectBottom(new Dust(level, (((x + 8) - 2) + (Math.random() * 2)), (((y + 11) - 2) + (Math.random() * 2)), (((hSpeed / 10) - 0.2) + (Math.random() * 0.4)), (((vSpeed / 10) - 0.2) + (Math.random() * 0.4)))); shot--; }; door = null; for each (i in level.actorArray) { if (hitTest(i)){ if (!actorCollision(i)){ break; }; }; }; vCollide = false; move(hSpeed, vSpeed); if (x < 0){ x = 0; hSpeed = 0; } else { if ((x + hitWidth) > level.levelWidth){ x = (level.levelWidth - hitWidth); hSpeed = 0; }; }; if (y < 0){ y = 0; vSpeed = 0; } else { if (y > level.levelHeight){ die(); }; }; if (((pf_d) || (!((vSpeed == 0))))){ if (stick != 0){ setAnim(anim_stick); } else { if (((!(djumpDone)) && (!(candj)))){ setAnim(anim_djump); } else { if (vSpeed < 0){ setAnim(anim_jump); } else { setAnim(anim_fall); }; }; }; } else { if (duck){ setAnim(anim_duck); } else { if (hSpeed == 0){ setAnim(anim_stand); } else { if (skid != 0){ setAnim(anim_skid); } else { setAnim(anim_run); }; }; }; }; if ((gfx is AnimatedBitmap)){ gfx.tick(); }; if (hSpeed != 0){ dir = Utils.sign(hSpeed); }; if (gfx.scaleX != dir){ gfx.scaleX = dir; gfx.x = (4 - (6 * gfx.scaleX)); }; } public function doubleJump():void{ if (vSpeed <= DJUMP_MIN){ return; }; Sounds.playSound(Sounds.SndDJump); level.addObjectBelow(new Dust(level, (x + 4), (y + 22), -0.1, (0.2 + (0.3 * Math.random())))); level.addObjectBelow(new Dust(level, (x + 12), (y + 22), 0.1, (0.2 + (0.3 * Math.random())))); level.addObjectBelow(new Dust(level, (x + 8), (y + 22), 0, (0.7 + (0.4 * Math.random())))); wasShot = false; greenBirdCheck(); vSpeed = DJUMP_SPEED; if (main.kd_right){ hSpeed = Utils.approach(hSpeed, RUN_MAX, DJUMP_HORIZ); } else { if (main.kd_left){ hSpeed = Utils.approach(hSpeed, -(RUN_MAX), DJUMP_HORIZ); }; }; candj = false; djumpDone = false; } public function jump():void{ Sounds.playSound(Sounds.SndJump); level.addObjectBelow(new Dust(level, (x + 4), (y + 22), -0.1, (-0.1 - (0.1 * Math.random())))); level.addObjectBelow(new Dust(level, (x + 12), (y + 22), 0.1, (-0.1 - (0.1 * Math.random())))); vSpeed = JUMP_SPEED; } public function actorCollision(a:GameObject):Boolean{ var b:Balloon; var s:Spring; var t:Tutorial; var c:Chest; if ((a is Balloon)){ if (vSpeed > 0){ b = (a as Balloon); if (b.visible){ b.pop(); bounce(); }; }; } else { if ((a is Spring)){ if ((((vSpeed > 0)) && ((y <= a.y)))){ y = Math.min(y, (a.y - 16)); s = (a as Spring); s.bounce(); spring(); }; } else { if ((a is Coin)){ if (a.visible){ Sounds.playSound(Sounds.SndCoin); level.coins.push((a as Coin).id); (a as Coin).createParticles(); a.destroy(); }; } else { if ((a is Tutorial)){ t = (a as Tutorial); if (level.tutorial == null){ level.tutorial = new SpeechBubble(level, t.text); level.addChild(level.tutorial); } else { if (level.tutorial.text == t.text){ level.tutorial.fade = false; }; }; } else { if ((a is Door)){ door = (a as Door); } else { if ((a is Chest)){ if (vSpeed > 0){ c = (a as Chest); if (!c.open){ c.openChest(); bounce(); }; }; } else { if ((a is Enemy)){ if (((y + 6) - vSpeed) < (a.y + (a as Enemy).coinY)){ (a as Enemy).die(); bounce(); } else { die(); return (false); }; } else { if ((a is Blade)){ die(); return (false); }; if ((a is SpikeFloor)){ if (vSpeed >= 0){ die(); return (false); }; } else { if ((a is SpikeCeil)){ if ((((vSpeed <= GRAVITY)) && (((vCollide) || (checkHitHead(a)))))){ die(); return (false); }; } else { if ((a is SpikeRight)){ if (hSpeed >= 0){ die(); return (false); }; } else { if ((a is SpikeLeft)){ if (hSpeed <= 0){ die(); return (false); }; } else { if ((a is Bird)){ if ((((vSpeed > 0)) && (!((a as Bird).flying)))){ (a as Bird).die(); bounce(); }; } else { if ((((a is Cannon)) && (!((a == lastCannon))))){ (a as Cannon).fill(); destroy(); return (false); }; }; }; }; }; }; }; }; }; }; }; }; }; return (true); } override public function move(hm:Number, vm:Number=0):void{ var c:Boolean; hCounter = (hCounter + hm); var h:int = Math.round(hCounter); hCounter = (hCounter - h); c = false; while (h != 0) { if (placeFree(h)){ x = (x + h); break; }; c = true; h = Utils.approach(h, 0, 1); }; if (c){ solidCollisionH(); }; vCounter = (vCounter + vm); var v:int = Math.round(vCounter); vCounter = (vCounter - v); c = false; if (v > 0){ while (v != 0) { if (((placeFree(0, v)) && (((!(placeJumpThru(0, v))) || (placeJumpThru()))))){ y = (y + v); break; }; c = true; v--; }; } else { while (v != 0) { if (placeFree(0, v)){ y = (y + v); break; }; c = true; v++; }; }; if (c){ solidCollisionV(); }; } public function skidJump():void{ Sounds.playSound(Sounds.SndSJump); level.addObjectBelow(new Dust(level, (x + 4), (y + 22), (-0.1 * Utils.sign(skid)), (-0.5 - (0.4 * Math.random())))); level.addObjectBelow(new Dust(level, (x + 12), (y + 22), (-0.1 * Utils.sign(skid)), (-0.5 - (0.4 * Math.random())))); vSpeed = SJUMP_SPEED; hSpeed = (SJUMP_HORIZ * Utils.sign(skid)); noCon = SJUMP_NOCON; skid = 0; } public function win():void{ Music.stopBG(); level.mode = 3; Sounds.playSound(Sounds.SndDoorOpen); if ((door is LevelDoor)){ level.showEnter((door as LevelDoor).num); } else { level.showComplete(level.coins); }; destroy(); } public function checkHitHead(o:GameObject):Boolean{ return (((((o.x + o.hitWidth) >= (x + HEAD_OFFSET))) && ((o.x <= ((x + hitWidth) - HEAD_OFFSET))))); } public function solidCollisionH():void{ hSpeed = 0; hCounter = 0; noCon = 0; shot = 0; } public function solidCollisionV():void{ vSpeed = 0; vCounter = 0; noCon = 0; shot = 0; wasShot = false; vCollide = true; } } }//package com.mattmakesgames
Section 201
//Player_GfxPlayer_DJump1 (com.mattmakesgames.Player_GfxPlayer_DJump1) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_DJump1 extends BitmapAsset { } }//package com.mattmakesgames
Section 202
//Player_GfxPlayer_DJump2 (com.mattmakesgames.Player_GfxPlayer_DJump2) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_DJump2 extends BitmapAsset { } }//package com.mattmakesgames
Section 203
//Player_GfxPlayer_DJump3 (com.mattmakesgames.Player_GfxPlayer_DJump3) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_DJump3 extends BitmapAsset { } }//package com.mattmakesgames
Section 204
//Player_GfxPlayer_Duck (com.mattmakesgames.Player_GfxPlayer_Duck) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_Duck extends BitmapAsset { } }//package com.mattmakesgames
Section 205
//Player_GfxPlayer_Fall (com.mattmakesgames.Player_GfxPlayer_Fall) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_Fall extends BitmapAsset { } }//package com.mattmakesgames
Section 206
//Player_GfxPlayer_Jump (com.mattmakesgames.Player_GfxPlayer_Jump) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_Jump extends BitmapAsset { } }//package com.mattmakesgames
Section 207
//Player_GfxPlayer_Run1 (com.mattmakesgames.Player_GfxPlayer_Run1) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_Run1 extends BitmapAsset { } }//package com.mattmakesgames
Section 208
//Player_GfxPlayer_Run2 (com.mattmakesgames.Player_GfxPlayer_Run2) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_Run2 extends BitmapAsset { } }//package com.mattmakesgames
Section 209
//Player_GfxPlayer_Run3 (com.mattmakesgames.Player_GfxPlayer_Run3) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_Run3 extends BitmapAsset { } }//package com.mattmakesgames
Section 210
//Player_GfxPlayer_Run4 (com.mattmakesgames.Player_GfxPlayer_Run4) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_Run4 extends BitmapAsset { } }//package com.mattmakesgames
Section 211
//Player_GfxPlayer_Skid (com.mattmakesgames.Player_GfxPlayer_Skid) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_Skid extends BitmapAsset { } }//package com.mattmakesgames
Section 212
//Player_GfxPlayer_Stand (com.mattmakesgames.Player_GfxPlayer_Stand) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_Stand extends BitmapAsset { } }//package com.mattmakesgames
Section 213
//Player_GfxPlayer_Stick (com.mattmakesgames.Player_GfxPlayer_Stick) package com.mattmakesgames { import mx.core.*; public class Player_GfxPlayer_Stick extends BitmapAsset { } }//package com.mattmakesgames
Section 214
//Preloader (com.mattmakesgames.Preloader) package com.mattmakesgames { import flash.events.*; import flash.display.*; import flash.text.*; import flash.utils.*; public class Preloader extends MovieClip { public var format:TextFormat; public var field:TextField; public static const BlackAdderFont:String = "Preloader_BlackAdderFont"; public function Preloader(){ super(); addEventListener(Event.ENTER_FRAME, checkFrame); loaderInfo.addEventListener(ProgressEvent.PROGRESS, progress); format = new TextFormat(); format.font = "Pixel"; format.color = 0; format.size = 36; format.align = "center"; field = new TextField(); field.selectable = false; field.embedFonts = true; field.autoSize = TextFieldAutoSize.CENTER; field.htmlText = "Loading..."; field.setTextFormat(format); field.x = 240; field.y = 225; addChild(field); } private function checkFrame(e:Event):void{ if (currentFrame == totalFrames){ removeEventListener(Event.ENTER_FRAME, checkFrame); startup(); }; } private function startup():void{ stop(); graphics.clear(); loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progress); removeEventListener(Event.ENTER_FRAME, checkFrame); var mainClass:Class = (getDefinitionByName("com.mattmakesgames.Main") as Class); addChild((new (mainClass) as DisplayObject)); } private function progress(e:ProgressEvent):void{ graphics.clear(); graphics.beginFill(0); graphics.drawRect(215, 275, 210, 20); graphics.endFill(); graphics.beginFill(0xFF0000); graphics.drawRect(220, 280, ((e.bytesLoaded / e.bytesTotal) * 200), 10); graphics.endFill(); } } }//package com.mattmakesgames
Section 215
//Preloader_BlackAdderFont (com.mattmakesgames.Preloader_BlackAdderFont) package com.mattmakesgames { import mx.core.*; public class Preloader_BlackAdderFont extends FontAsset { } }//package com.mattmakesgames
Section 216
//Sounds (com.mattmakesgames.Sounds) package com.mattmakesgames { import flash.media.*; public class Sounds { public static const SndDoorOpen:Class = Sounds_SndDoorOpen; public static const SndMenuStart:Class = Sounds_SndMenuStart; public static const SndBirdGoldHit:Class = Sounds_SndBirdGoldHit; public static const SndJump:Class = Sounds_SndJump; public static const SndCannonShoot:Class = Sounds_SndCannonShoot; public static const SndBirdPinkFly:Class = Sounds_SndBirdPinkFly; public static const SndMenuClick:Class = Sounds_SndMenuClick; public static const SndDoorClose:Class = Sounds_SndDoorClose; public static const SndBalloon:Class = Sounds_SndBalloon; public static const SndLoseCoin:Class = Sounds_SndLoseCoin; public static const SndBreakableStart:Class = Sounds_SndBreakableStart; public static const SndSpring:Class = Sounds_SndSpring; public static const SndChest:Class = Sounds_SndChest; public static const SndSpawn:Class = Sounds_SndSpawn; public static const SndBirdPinkHit:Class = Sounds_SndBirdPinkHit; public static const SndCoinAppear:Class = Sounds_SndCoinAppear; public static const SndCannonFill:Class = Sounds_SndCannonFill; public static const SndBirdGreenFly:Class = Sounds_SndBirdGreenFly; public static const SndBreakableBreak:Class = Sounds_SndBreakableBreak; public static const SndBack:Class = Sounds_SndBack; public static const SndBirdGreenHit:Class = Sounds_SndBirdGreenHit; public static const SndEnemyHit:Class = Sounds_SndEnemyHit; public static const SndSkid:Class = Sounds_SndSkid; public static const SndSwitch:Class = Sounds_SndSwitch; public static const Snd100p:Class = Sounds_Snd100p; public static const SndDJump:Class = Sounds_SndDJump; public static const SndDieExplode:Class = Sounds_SndDieExplode; public static const SndBirdGoldFly:Class = Sounds_SndBirdGoldFly; public static const SndSJump:Class = Sounds_SndSJump; public static const SndCoin:Class = Sounds_SndCoin; public static const SndWJump:Class = Sounds_SndWJump; public static const SndDie:Class = Sounds_SndDie; public function Sounds(){ super(); } public static function playSound(sound:Class):void{ var snd:Sound; if (Options.sounds){ snd = new (sound); snd.play(); }; } } }//package com.mattmakesgames
Section 217
//Sounds_Snd100p (com.mattmakesgames.Sounds_Snd100p) package com.mattmakesgames { import mx.core.*; public class Sounds_Snd100p extends SoundAsset { } }//package com.mattmakesgames
Section 218
//Sounds_SndBack (com.mattmakesgames.Sounds_SndBack) package com.mattmakesgames { import mx.core.*; public class Sounds_SndBack extends SoundAsset { } }//package com.mattmakesgames
Section 219
//Sounds_SndBalloon (com.mattmakesgames.Sounds_SndBalloon) package com.mattmakesgames { import mx.core.*; public class Sounds_SndBalloon extends SoundAsset { } }//package com.mattmakesgames
Section 220
//Sounds_SndBirdGoldFly (com.mattmakesgames.Sounds_SndBirdGoldFly) package com.mattmakesgames { import mx.core.*; public class Sounds_SndBirdGoldFly extends SoundAsset { } }//package com.mattmakesgames
Section 221
//Sounds_SndBirdGoldHit (com.mattmakesgames.Sounds_SndBirdGoldHit) package com.mattmakesgames { import mx.core.*; public class Sounds_SndBirdGoldHit extends SoundAsset { } }//package com.mattmakesgames
Section 222
//Sounds_SndBirdGreenFly (com.mattmakesgames.Sounds_SndBirdGreenFly) package com.mattmakesgames { import mx.core.*; public class Sounds_SndBirdGreenFly extends SoundAsset { } }//package com.mattmakesgames
Section 223
//Sounds_SndBirdGreenHit (com.mattmakesgames.Sounds_SndBirdGreenHit) package com.mattmakesgames { import mx.core.*; public class Sounds_SndBirdGreenHit extends SoundAsset { } }//package com.mattmakesgames
Section 224
//Sounds_SndBirdPinkFly (com.mattmakesgames.Sounds_SndBirdPinkFly) package com.mattmakesgames { import mx.core.*; public class Sounds_SndBirdPinkFly extends SoundAsset { } }//package com.mattmakesgames
Section 225
//Sounds_SndBirdPinkHit (com.mattmakesgames.Sounds_SndBirdPinkHit) package com.mattmakesgames { import mx.core.*; public class Sounds_SndBirdPinkHit extends SoundAsset { } }//package com.mattmakesgames
Section 226
//Sounds_SndBreakableBreak (com.mattmakesgames.Sounds_SndBreakableBreak) package com.mattmakesgames { import mx.core.*; public class Sounds_SndBreakableBreak extends SoundAsset { } }//package com.mattmakesgames
Section 227
//Sounds_SndBreakableStart (com.mattmakesgames.Sounds_SndBreakableStart) package com.mattmakesgames { import mx.core.*; public class Sounds_SndBreakableStart extends SoundAsset { } }//package com.mattmakesgames
Section 228
//Sounds_SndCannonFill (com.mattmakesgames.Sounds_SndCannonFill) package com.mattmakesgames { import mx.core.*; public class Sounds_SndCannonFill extends SoundAsset { } }//package com.mattmakesgames
Section 229
//Sounds_SndCannonShoot (com.mattmakesgames.Sounds_SndCannonShoot) package com.mattmakesgames { import mx.core.*; public class Sounds_SndCannonShoot extends SoundAsset { } }//package com.mattmakesgames
Section 230
//Sounds_SndChest (com.mattmakesgames.Sounds_SndChest) package com.mattmakesgames { import mx.core.*; public class Sounds_SndChest extends SoundAsset { } }//package com.mattmakesgames
Section 231
//Sounds_SndCoin (com.mattmakesgames.Sounds_SndCoin) package com.mattmakesgames { import mx.core.*; public class Sounds_SndCoin extends SoundAsset { } }//package com.mattmakesgames
Section 232
//Sounds_SndCoinAppear (com.mattmakesgames.Sounds_SndCoinAppear) package com.mattmakesgames { import mx.core.*; public class Sounds_SndCoinAppear extends SoundAsset { } }//package com.mattmakesgames
Section 233
//Sounds_SndDie (com.mattmakesgames.Sounds_SndDie) package com.mattmakesgames { import mx.core.*; public class Sounds_SndDie extends SoundAsset { } }//package com.mattmakesgames
Section 234
//Sounds_SndDieExplode (com.mattmakesgames.Sounds_SndDieExplode) package com.mattmakesgames { import mx.core.*; public class Sounds_SndDieExplode extends SoundAsset { } }//package com.mattmakesgames
Section 235
//Sounds_SndDJump (com.mattmakesgames.Sounds_SndDJump) package com.mattmakesgames { import mx.core.*; public class Sounds_SndDJump extends SoundAsset { } }//package com.mattmakesgames
Section 236
//Sounds_SndDoorClose (com.mattmakesgames.Sounds_SndDoorClose) package com.mattmakesgames { import mx.core.*; public class Sounds_SndDoorClose extends SoundAsset { } }//package com.mattmakesgames
Section 237
//Sounds_SndDoorOpen (com.mattmakesgames.Sounds_SndDoorOpen) package com.mattmakesgames { import mx.core.*; public class Sounds_SndDoorOpen extends SoundAsset { } }//package com.mattmakesgames
Section 238
//Sounds_SndEnemyHit (com.mattmakesgames.Sounds_SndEnemyHit) package com.mattmakesgames { import mx.core.*; public class Sounds_SndEnemyHit extends SoundAsset { } }//package com.mattmakesgames
Section 239
//Sounds_SndJump (com.mattmakesgames.Sounds_SndJump) package com.mattmakesgames { import mx.core.*; public class Sounds_SndJump extends SoundAsset { } }//package com.mattmakesgames
Section 240
//Sounds_SndLoseCoin (com.mattmakesgames.Sounds_SndLoseCoin) package com.mattmakesgames { import mx.core.*; public class Sounds_SndLoseCoin extends SoundAsset { } }//package com.mattmakesgames
Section 241
//Sounds_SndMenuClick (com.mattmakesgames.Sounds_SndMenuClick) package com.mattmakesgames { import mx.core.*; public class Sounds_SndMenuClick extends SoundAsset { } }//package com.mattmakesgames
Section 242
//Sounds_SndMenuStart (com.mattmakesgames.Sounds_SndMenuStart) package com.mattmakesgames { import mx.core.*; public class Sounds_SndMenuStart extends SoundAsset { } }//package com.mattmakesgames
Section 243
//Sounds_SndSJump (com.mattmakesgames.Sounds_SndSJump) package com.mattmakesgames { import mx.core.*; public class Sounds_SndSJump extends SoundAsset { } }//package com.mattmakesgames
Section 244
//Sounds_SndSkid (com.mattmakesgames.Sounds_SndSkid) package com.mattmakesgames { import mx.core.*; public class Sounds_SndSkid extends SoundAsset { } }//package com.mattmakesgames
Section 245
//Sounds_SndSpawn (com.mattmakesgames.Sounds_SndSpawn) package com.mattmakesgames { import mx.core.*; public class Sounds_SndSpawn extends SoundAsset { } }//package com.mattmakesgames
Section 246
//Sounds_SndSpring (com.mattmakesgames.Sounds_SndSpring) package com.mattmakesgames { import mx.core.*; public class Sounds_SndSpring extends SoundAsset { } }//package com.mattmakesgames
Section 247
//Sounds_SndSwitch (com.mattmakesgames.Sounds_SndSwitch) package com.mattmakesgames { import mx.core.*; public class Sounds_SndSwitch extends SoundAsset { } }//package com.mattmakesgames
Section 248
//Sounds_SndWJump (com.mattmakesgames.Sounds_SndWJump) package com.mattmakesgames { import mx.core.*; public class Sounds_SndWJump extends SoundAsset { } }//package com.mattmakesgames
Section 249
//SpeechBubble (com.mattmakesgames.SpeechBubble) package com.mattmakesgames { import flash.display.*; import com.mattmakesgames.Menus.*; public class SpeechBubble extends Sprite { public var level:Level; public var gfx:Bitmap; public var fade:Boolean;// = false public var text:String; public static const LINE_SEP:int = 24; public function SpeechBubble(lvl:Level, txt:String):void{ var tempArr:Array; var field:MenuItem; var i:int; super(); level = lvl; text = txt; if (level.player.y < 200){ y = 320; }; alpha = 0; graphics.beginFill(0xFFFFFF); graphics.drawRect(0, 26, 640, 110); graphics.endFill(); tempArr = text.split(/\\n/); i = 0; while (i < tempArr.length) { field = new MenuItem(level.main, tempArr[i], true, 22); field.x = 270; field.y = ((95 - ((LINE_SEP * tempArr.length) / 2)) + (LINE_SEP * i)); addChild(field); i++; }; } public function tick():void{ if (fade){ alpha = (alpha - 0.1); if (alpha <= 0){ remove(); }; } else { alpha = Math.min((alpha + 0.1), 1); }; fade = true; } public function remove():void{ level.removeChild(this); level.tutorial = null; } } }//package com.mattmakesgames
Section 250
//SponsorAnim (com.mattmakesgames.SponsorAnim) package com.mattmakesgames { import flash.events.*; import flash.display.*; import com.mattmakesgames.Menus.*; public class SponsorAnim extends MovieClip { public var anim:MovieClip; public var done:int;// = 0 public static const Anim:Class = SponsorAnim_Anim; public static const FRAMES:int = 250; public function SponsorAnim(){ super(); anim = new Anim(); anim.scaleX = 3; anim.scaleY = 3; anim.x = (340 - ((anim.width / 2) * anim.scaleX)); anim.y = (260 - ((anim.height / 2) * anim.scaleY)); addChild(anim); anim.addEventListener(Event.ENTER_FRAME, finishAnim, false, 0, true); } public function finishAnim(e:Event):void{ var m:Main; done++; if (done >= FRAMES){ anim.removeEventListener(Event.ENTER_FRAME, finishAnim); m = (parent as Main); m.removeChild(this); m.changeQuality(); m.menu = new MainMenu(m, null, false); m.addChild(m.menu); }; } } }//package com.mattmakesgames
Section 251
//SponsorAnim_Anim (com.mattmakesgames.SponsorAnim_Anim) package com.mattmakesgames { import mx.core.*; import flash.utils.*; public class SponsorAnim_Anim extends MovieClipLoaderAsset { public var dataClass:Class; private static var bytes:ByteArray = null; public function SponsorAnim_Anim(){ dataClass = SponsorAnim_Anim_dataClass; super(); initialWidth = (6260 / 20); initialHeight = (4520 / 20); } override public function get movieClipData():ByteArray{ if (bytes == null){ bytes = ByteArray(new dataClass()); }; return (bytes); } } }//package com.mattmakesgames
Section 252
//SponsorAnim_Anim_dataClass (com.mattmakesgames.SponsorAnim_Anim_dataClass) package com.mattmakesgames { import mx.core.*; public class SponsorAnim_Anim_dataClass extends ByteArrayAsset { } }//package com.mattmakesgames
Section 253
//Spotlight (com.mattmakesgames.Spotlight) package com.mattmakesgames { import flash.display.*; public class Spotlight extends Bitmap { public function Spotlight(ax:int, ay:int):void{ super(getData(ax, ay)); scaleX = 16; scaleY = 16; } public function getData(ax:int, ay:int):BitmapData{ var gax:int = (ax / 16); var gay:int = (ay / 16); var data:BitmapData = new BitmapData(40, 30, true, 3489660928); data.setPixel32(gax, gay, 0); data.setPixel32((gax + 1), gay, 0); data.setPixel32((gax - 1), gay, 0); data.setPixel32(gax, (gay + 1), 0); data.setPixel32(gax, (gay - 1), 0); data.setPixel32((gax - 1), (gay - 1), 268435456); data.setPixel32((gax - 1), (gay + 1), 268435456); data.setPixel32((gax + 1), (gay - 1), 268435456); data.setPixel32((gax + 1), (gay + 1), 268435456); data.setPixel32((gax - 2), gay, 536870912); data.setPixel32(gax, (gay - 2), 536870912); data.setPixel32((gax + 2), gay, 536870912); data.setPixel32(gax, (gay + 2), 536870912); data.setPixel32((gax - 2), (gay - 1), 805306368); data.setPixel32((gax - 2), (gay + 1), 805306368); data.setPixel32((gax + 2), (gay - 1), 805306368); data.setPixel32((gax + 2), (gay + 1), 805306368); data.setPixel32((gax - 1), (gay - 2), 805306368); data.setPixel32((gax - 1), (gay + 2), 805306368); data.setPixel32((gax + 1), (gay - 2), 805306368); data.setPixel32((gax + 1), (gay + 2), 805306368); data.setPixel32((gax - 3), gay, 1207959552); data.setPixel32(gax, (gay - 3), 1207959552); data.setPixel32((gax + 3), gay, 1207959552); data.setPixel32(gax, (gay + 3), 1207959552); data.setPixel32((gax - 2), (gay - 2), 1207959552); data.setPixel32((gax - 2), (gay + 2), 1207959552); data.setPixel32((gax + 2), (gay - 2), 1207959552); data.setPixel32((gax + 2), (gay + 2), 1207959552); data.setPixel32((gax - 3), (gay - 1), 1610612736); data.setPixel32((gax - 3), (gay + 1), 1610612736); data.setPixel32((gax + 3), (gay - 1), 1610612736); data.setPixel32((gax + 3), (gay + 1), 1610612736); data.setPixel32((gax - 1), (gay - 3), 1610612736); data.setPixel32((gax - 1), (gay + 3), 1610612736); data.setPixel32((gax + 1), (gay - 3), 1610612736); data.setPixel32((gax + 1), (gay + 3), 1610612736); return (data); } } }//package com.mattmakesgames
Section 254
//Tilesets (com.mattmakesgames.Tilesets) package com.mattmakesgames { public class Tilesets { private static const GfxSet1BlockTop1:Class = Tilesets_GfxSet1BlockTop1; private static const GfxSet1BlockTop2:Class = Tilesets_GfxSet1BlockTop2; private static const GfxSet1BlockBG1:Class = Tilesets_GfxSet1BlockBG1; public static const tileBlockBG:Array = new Array(GfxSet1BlockBG1, GfxSet1BlockBG2); private static const GfxSet1BlockBG2:Class = Tilesets_GfxSet1BlockBG2; public static const tileJumpThru:Array = new Array(GfxSet1JumpThru1, GfxSet1JumpThru2); public static const tileBlockTop:Array = new Array(GfxSet1BlockTop1, GfxSet1BlockTop2); public static const tileBlockTopBG:Array = new Array(GfxSet1BlockTopBG1, GfxSet1BlockTopBG2); private static const GfxSet1BlockTopBG1:Class = Tilesets_GfxSet1BlockTopBG1; private static const GfxSet1BlockTopBG2:Class = Tilesets_GfxSet1BlockTopBG2; public static const GfxSet4BG1:Class = Tilesets_GfxSet4BG1; public static const GfxSet4BG3:Class = Tilesets_GfxSet4BG3; private static const GfxSet1JumpThru1:Class = Tilesets_GfxSet1JumpThru1; private static const GfxSet1JumpThru2:Class = Tilesets_GfxSet1JumpThru2; public static const GfxSet4BG2:Class = Tilesets_GfxSet4BG2; private static const GfxSet1Block1:Class = Tilesets_GfxSet1Block1; private static const GfxSet1Block2:Class = Tilesets_GfxSet1Block2; public static const GfxSet4Block1:Class = Tilesets_GfxSet4Block1; public static const GfxSet4Block2:Class = Tilesets_GfxSet4Block2; public static const GfxSet4Block3:Class = Tilesets_GfxSet4Block3; public static const GfxSet4JumpThru:Class = Tilesets_GfxSet4JumpThru; public static const tileBlock:Array = new Array(GfxSet1Block1, GfxSet1Block2); public function Tilesets(){ super(); } } }//package com.mattmakesgames
Section 255
//Tilesets_GfxSet1Block1 (com.mattmakesgames.Tilesets_GfxSet1Block1) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet1Block1 extends BitmapAsset { } }//package com.mattmakesgames
Section 256
//Tilesets_GfxSet1Block2 (com.mattmakesgames.Tilesets_GfxSet1Block2) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet1Block2 extends BitmapAsset { } }//package com.mattmakesgames
Section 257
//Tilesets_GfxSet1BlockBG1 (com.mattmakesgames.Tilesets_GfxSet1BlockBG1) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet1BlockBG1 extends BitmapAsset { } }//package com.mattmakesgames
Section 258
//Tilesets_GfxSet1BlockBG2 (com.mattmakesgames.Tilesets_GfxSet1BlockBG2) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet1BlockBG2 extends BitmapAsset { } }//package com.mattmakesgames
Section 259
//Tilesets_GfxSet1BlockTop1 (com.mattmakesgames.Tilesets_GfxSet1BlockTop1) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet1BlockTop1 extends BitmapAsset { } }//package com.mattmakesgames
Section 260
//Tilesets_GfxSet1BlockTop2 (com.mattmakesgames.Tilesets_GfxSet1BlockTop2) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet1BlockTop2 extends BitmapAsset { } }//package com.mattmakesgames
Section 261
//Tilesets_GfxSet1BlockTopBG1 (com.mattmakesgames.Tilesets_GfxSet1BlockTopBG1) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet1BlockTopBG1 extends BitmapAsset { } }//package com.mattmakesgames
Section 262
//Tilesets_GfxSet1BlockTopBG2 (com.mattmakesgames.Tilesets_GfxSet1BlockTopBG2) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet1BlockTopBG2 extends BitmapAsset { } }//package com.mattmakesgames
Section 263
//Tilesets_GfxSet1JumpThru1 (com.mattmakesgames.Tilesets_GfxSet1JumpThru1) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet1JumpThru1 extends BitmapAsset { } }//package com.mattmakesgames
Section 264
//Tilesets_GfxSet1JumpThru2 (com.mattmakesgames.Tilesets_GfxSet1JumpThru2) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet1JumpThru2 extends BitmapAsset { } }//package com.mattmakesgames
Section 265
//Tilesets_GfxSet4BG1 (com.mattmakesgames.Tilesets_GfxSet4BG1) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet4BG1 extends BitmapAsset { } }//package com.mattmakesgames
Section 266
//Tilesets_GfxSet4BG2 (com.mattmakesgames.Tilesets_GfxSet4BG2) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet4BG2 extends BitmapAsset { } }//package com.mattmakesgames
Section 267
//Tilesets_GfxSet4BG3 (com.mattmakesgames.Tilesets_GfxSet4BG3) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet4BG3 extends BitmapAsset { } }//package com.mattmakesgames
Section 268
//Tilesets_GfxSet4Block1 (com.mattmakesgames.Tilesets_GfxSet4Block1) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet4Block1 extends BitmapAsset { } }//package com.mattmakesgames
Section 269
//Tilesets_GfxSet4Block2 (com.mattmakesgames.Tilesets_GfxSet4Block2) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet4Block2 extends BitmapAsset { } }//package com.mattmakesgames
Section 270
//Tilesets_GfxSet4Block3 (com.mattmakesgames.Tilesets_GfxSet4Block3) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet4Block3 extends BitmapAsset { } }//package com.mattmakesgames
Section 271
//Tilesets_GfxSet4JumpThru (com.mattmakesgames.Tilesets_GfxSet4JumpThru) package com.mattmakesgames { import mx.core.*; public class Tilesets_GfxSet4JumpThru extends BitmapAsset { } }//package com.mattmakesgames
Section 272
//Utils (com.mattmakesgames.Utils) package com.mattmakesgames { import flash.display.*; public class Utils { public function Utils(){ super(); } public static function approach(s:Number, t:Number, a:Number):Number{ if (s < t){ return (Math.min((s + a), t)); }; return (Math.max((s - a), t)); } public static function removeFromArray(arr:Array, entry):void{ var i:int; while (i < arr.length) { if (arr[i] == entry){ arr.splice(i, 1); }; i++; }; } public static function pointDistance(ax:Number, ay:Number, bx:Number, by:Number):Number{ return (Math.sqrt((Math.pow(Math.abs((bx - ax)), 2) + Math.pow(Math.abs((by - ay)), 2)))); } public static function sign(n:Number):int{ if (n == 0){ return (0); }; if (n > 0){ return (1); }; return (-1); } public static function checkDomain(stage:Stage, domain:String):Boolean{ var url:String = stage.loaderInfo.url; var startCheck:int = (url.indexOf("://") + 3); var domainLen:int = (url.indexOf("/", startCheck) - startCheck); var d:String = url.substr(startCheck, domainLen); if (d.indexOf("www.") == 0){ d = d.substr(4); }; if (d == domain){ return (true); }; return (false); } } }//package com.mattmakesgames
Section 273
//BitmapAsset (mx.core.BitmapAsset) package mx.core { import flash.display.*; public class BitmapAsset extends FlexBitmap implements IFlexAsset, IFlexDisplayObject { mx_internal static const VERSION:String = "3.2.0.3958"; public function BitmapAsset(bitmapData:BitmapData=null, pixelSnapping:String="auto", smoothing:Boolean=false){ super(bitmapData, pixelSnapping, smoothing); } public function get measuredWidth():Number{ if (bitmapData){ return (bitmapData.width); }; return (0); } public function get measuredHeight():Number{ if (bitmapData){ return (bitmapData.height); }; return (0); } public function setActualSize(newWidth:Number, newHeight:Number):void{ width = newWidth; height = newHeight; } public function move(x:Number, y:Number):void{ this.x = x; this.y = y; } } }//package mx.core
Section 274
//ByteArrayAsset (mx.core.ByteArrayAsset) package mx.core { import flash.utils.*; public class ByteArrayAsset extends ByteArray implements IFlexAsset { mx_internal static const VERSION:String = "3.2.0.3958"; public function ByteArrayAsset(){ super(); } } }//package mx.core
Section 275
//EdgeMetrics (mx.core.EdgeMetrics) package mx.core { public class EdgeMetrics { public var top:Number; public var left:Number; public var bottom:Number; public var right:Number; mx_internal static const VERSION:String = "3.2.0.3958"; public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0); ; public function EdgeMetrics(left:Number=0, top:Number=0, right:Number=0, bottom:Number=0){ super(); this.left = left; this.top = top; this.right = right; this.bottom = bottom; } public function clone():EdgeMetrics{ return (new EdgeMetrics(left, top, right, bottom)); } } }//package mx.core
Section 276
//FlexBitmap (mx.core.FlexBitmap) package mx.core { import flash.display.*; import mx.utils.*; public class FlexBitmap extends Bitmap { mx_internal static const VERSION:String = "3.2.0.3958"; public function FlexBitmap(bitmapData:BitmapData=null, pixelSnapping:String="auto", smoothing:Boolean=false){ var bitmapData = bitmapData; var pixelSnapping = pixelSnapping; var smoothing = smoothing; super(bitmapData, pixelSnapping, smoothing); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 277
//FlexMovieClip (mx.core.FlexMovieClip) package mx.core { import flash.display.*; import mx.utils.*; public class FlexMovieClip extends MovieClip { mx_internal static const VERSION:String = "3.2.0.3958"; public function FlexMovieClip(){ super(); name = NameUtil.createUniqueName(this); //unresolved jump var _slot1 = e; } override public function toString():String{ return (NameUtil.displayObjectToString(this)); } } }//package mx.core
Section 278
//FontAsset (mx.core.FontAsset) package mx.core { import flash.text.*; public class FontAsset extends Font implements IFlexAsset { mx_internal static const VERSION:String = "3.2.0.3958"; public function FontAsset(){ super(); } } }//package mx.core
Section 279
//IBorder (mx.core.IBorder) package mx.core { public interface IBorder { function get borderMetrics():EdgeMetrics; } }//package mx.core
Section 280
//IFlexAsset (mx.core.IFlexAsset) package mx.core { public interface IFlexAsset { } }//package mx.core
Section 281
//IFlexDisplayObject (mx.core.IFlexDisplayObject) package mx.core { import flash.events.*; import flash.display.*; import flash.geom.*; import flash.accessibility.*; public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher { function get visible():Boolean; function get rotation():Number; function localToGlobal(void:Point):Point; function get name():String; function set width(flash.display:Number):void; function get measuredHeight():Number; function get blendMode():String; function get scale9Grid():Rectangle; function set name(flash.display:String):void; function set scaleX(flash.display:Number):void; function set scaleY(flash.display:Number):void; function get measuredWidth():Number; function get accessibilityProperties():AccessibilityProperties; function set scrollRect(flash.display:Rectangle):void; function get cacheAsBitmap():Boolean; function globalToLocal(void:Point):Point; function get height():Number; function set blendMode(flash.display:String):void; function get parent():DisplayObjectContainer; function getBounds(String:DisplayObject):Rectangle; function get opaqueBackground():Object; function set scale9Grid(flash.display:Rectangle):void; function setActualSize(_arg1:Number, _arg2:Number):void; function set alpha(flash.display:Number):void; function set accessibilityProperties(flash.display:AccessibilityProperties):void; function get width():Number; function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean; function set cacheAsBitmap(flash.display:Boolean):void; function get scaleX():Number; function get scaleY():Number; function get scrollRect():Rectangle; function get mouseX():Number; function get mouseY():Number; function set height(flash.display:Number):void; function set mask(flash.display:DisplayObject):void; function getRect(String:DisplayObject):Rectangle; function get alpha():Number; function set transform(flash.display:Transform):void; function move(_arg1:Number, _arg2:Number):void; function get loaderInfo():LoaderInfo; function get root():DisplayObject; function hitTestObject(mx.core:IFlexDisplayObject/mx.core:IFlexDisplayObject:stage/get:DisplayObject):Boolean; function set opaqueBackground(flash.display:Object):void; function set visible(flash.display:Boolean):void; function get mask():DisplayObject; function set x(flash.display:Number):void; function set y(flash.display:Number):void; function get transform():Transform; function set filters(flash.display:Array):void; function get x():Number; function get y():Number; function get filters():Array; function set rotation(flash.display:Number):void; function get stage():Stage; } }//package mx.core
Section 282
//IRepeaterClient (mx.core.IRepeaterClient) package mx.core { public interface IRepeaterClient { function get instanceIndices():Array; function set instanceIndices(C:\autobuild\3.2.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function get isDocument():Boolean; function set repeaters(C:\autobuild\3.2.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function initializeRepeaterArrays(C:\autobuild\3.2.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:IRepeaterClient):void; function get repeaters():Array; function set repeaterIndices(C:\autobuild\3.2.0\frameworks\projects\framework\src;mx\core;IRepeaterClient.as:Array):void; function get repeaterIndices():Array; } }//package mx.core
Section 283
//MovieClipAsset (mx.core.MovieClipAsset) package mx.core { public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder { private var _measuredHeight:Number; private var _measuredWidth:Number; mx_internal static const VERSION:String = "3.2.0.3958"; public function MovieClipAsset(){ super(); _measuredWidth = width; _measuredHeight = height; } public function get measuredWidth():Number{ return (_measuredWidth); } public function get measuredHeight():Number{ return (_measuredHeight); } public function setActualSize(newWidth:Number, newHeight:Number):void{ width = newWidth; height = newHeight; } public function move(x:Number, y:Number):void{ this.x = x; this.y = y; } public function get borderMetrics():EdgeMetrics{ if (scale9Grid == null){ return (EdgeMetrics.EMPTY); }; return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((measuredWidth - scale9Grid.right)), Math.ceil((measuredHeight - scale9Grid.bottom)))); } } }//package mx.core
Section 284
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset) package mx.core { import flash.events.*; import flash.display.*; import flash.utils.*; import flash.system.*; public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject { protected var initialHeight:Number;// = 0 private var loader:Loader;// = null private var initialized:Boolean;// = false protected var initialWidth:Number;// = 0 private var requestedHeight:Number; private var requestedWidth:Number; mx_internal static const VERSION:String = "3.2.0.3958"; public function MovieClipLoaderAsset(){ super(); var loaderContext:LoaderContext = new LoaderContext(); loaderContext.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain); if (("allowLoadBytesCodeExecution" in loaderContext)){ loaderContext["allowLoadBytesCodeExecution"] = true; }; loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler); loader.loadBytes(movieClipData, loaderContext); addChild(loader); } override public function get width():Number{ if (!initialized){ return (initialWidth); }; return (super.width); } override public function set width(value:Number):void{ if (!initialized){ requestedWidth = value; } else { loader.width = value; }; } override public function get measuredHeight():Number{ return (initialHeight); } private function completeHandler(event:Event):void{ initialized = true; initialWidth = loader.width; initialHeight = loader.height; if (!isNaN(requestedWidth)){ loader.width = requestedWidth; }; if (!isNaN(requestedHeight)){ loader.height = requestedHeight; }; dispatchEvent(event); } override public function set height(value:Number):void{ if (!initialized){ requestedHeight = value; } else { loader.height = value; }; } override public function get measuredWidth():Number{ return (initialWidth); } override public function get height():Number{ if (!initialized){ return (initialHeight); }; return (super.height); } public function get movieClipData():ByteArray{ return (null); } } }//package mx.core
Section 285
//mx_internal (mx.core.mx_internal) package mx.core { public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal"; }//package mx.core
Section 286
//SoundAsset (mx.core.SoundAsset) package mx.core { import flash.media.*; public class SoundAsset extends Sound implements IFlexAsset { mx_internal static const VERSION:String = "3.2.0.3958"; public function SoundAsset(){ super(); } } }//package mx.core
Section 287
//NameUtil (mx.utils.NameUtil) package mx.utils { import flash.display.*; import mx.core.*; import flash.utils.*; public class NameUtil { mx_internal static const VERSION:String = "3.2.0.3958"; private static var counter:int = 0; public function NameUtil(){ super(); } public static function displayObjectToString(displayObject:DisplayObject):String{ var result:String; var o:DisplayObject; var s:String; var indices:Array; var displayObject = displayObject; o = displayObject; while (o != null) { if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){ break; }; s = o.name; if ((o is IRepeaterClient)){ indices = IRepeaterClient(o).instanceIndices; if (indices){ s = (s + (("[" + indices.join("][")) + "]")); }; }; result = ((result == null)) ? s : ((s + ".") + result); o = o.parent; }; //unresolved jump var _slot1 = e; return (result); } public static function createUniqueName(object:Object):String{ if (!object){ return (null); }; var name:String = getQualifiedClassName(object); var index:int = name.indexOf("::"); if (index != -1){ name = name.substr((index + 2)); }; var charCode:int = name.charCodeAt((name.length - 1)); if ((((charCode >= 48)) && ((charCode <= 57)))){ name = (name + "_"); }; return ((name + counter++)); } } }//package mx.utils

Library Items

Symbol 1 Font {com.mattmakesgames.Preloader_BlackAdderFont}
Symbol 2 Sound {com.mattmakesgames.Sounds_SndChest} [chest.wav]
Symbol 3 Sound {com.mattmakesgames.Sounds_SndBack} [back.wav]
Symbol 4 Sound {com.mattmakesgames.Sounds_SndBreakableBreak} [breakableBreak.wav]
Symbol 5 Sound {com.mattmakesgames.Sounds_Snd100p} [s100p.wav]
Symbol 6 Sound {com.mattmakesgames.Sounds_SndSpring} [spring.wav]
Symbol 7 Sound {com.mattmakesgames.Sounds_SndSkid} [skid.wav]
Symbol 8 Sound {com.mattmakesgames.Sounds_SndDoorOpen} [doorOpen.wav]
Symbol 9 Sound {com.mattmakesgames.Sounds_SndBalloon} [balloon.wav]
Symbol 10 Sound {com.mattmakesgames.Sounds_SndWJump} [wjump.wav]
Symbol 11 Sound {com.mattmakesgames.Sounds_SndSwitch} [switch.wav]
Symbol 12 Sound {com.mattmakesgames.Sounds_SndDie} [die.wav]
Symbol 13 Sound {com.mattmakesgames.Sounds_SndDieExplode} [dieExplode.wav]
Symbol 14 Sound {com.mattmakesgames.Sounds_SndDoorClose} [doorClose.wav]
Symbol 15 Sound {com.mattmakesgames.Sounds_SndCoin} [coin.wav]
Symbol 16 Sound {com.mattmakesgames.Sounds_SndLoseCoin} [loseCoin.wav]
Symbol 17 Sound {com.mattmakesgames.Sounds_SndBirdPinkFly} [birdPinkFly.wav]
Symbol 18 Sound {com.mattmakesgames.Sounds_SndCannonFill} [cannonFill.wav]
Symbol 19 Sound {com.mattmakesgames.Sounds_SndMenuStart} [menuStart.wav]
Symbol 20 Sound {com.mattmakesgames.Sounds_SndBreakableStart} [breakableStart.wav]
Symbol 21 Sound {com.mattmakesgames.Sounds_SndBirdGreenFly} [birdGreenFly.wav]
Symbol 22 Sound {com.mattmakesgames.Sounds_SndBirdGreenHit} [birdGreenHit.wav]
Symbol 23 Sound {com.mattmakesgames.Sounds_SndDJump} [djump.wav]
Symbol 24 Sound {com.mattmakesgames.Sounds_SndSJump} [sjump.wav]
Symbol 25 Sound {com.mattmakesgames.Sounds_SndMenuClick} [menuClick.wav]
Symbol 26 Sound {com.mattmakesgames.Sounds_SndEnemyHit} [enemyHit.wav]
Symbol 27 Sound {com.mattmakesgames.Sounds_SndSpawn} [spawn.wav]
Symbol 28 Sound {com.mattmakesgames.Sounds_SndCoinAppear} [coinAppear.wav]
Symbol 29 Sound {com.mattmakesgames.Sounds_SndCannonShoot} [cannonShoot.wav]
Symbol 30 Sound {com.mattmakesgames.Sounds_SndBirdGoldHit} [birdGoldHit.wav]
Symbol 31 Sound {com.mattmakesgames.Sounds_SndBirdPinkHit} [birdPinkHit.wav]
Symbol 32 Sound {com.mattmakesgames.Sounds_SndJump} [jump.wav]
Symbol 33 Sound {com.mattmakesgames.Sounds_SndBirdGoldFly} [birdGoldFly.wav]
Symbol 34 Sound {com.mattmakesgames.Music_SndMapBG} [mapBG.wav]
Symbol 35 Sound {com.mattmakesgames.Music_SndMap} [map.wav]
Symbol 36 Sound {com.mattmakesgames.Music_SndMenu1} [menu1.wav]
Symbol 37 Sound {com.mattmakesgames.Music_SndTrack4} [track4.wav]
Symbol 38 Sound {com.mattmakesgames.Music_SndMenu2} [menu2.wav]
Symbol 39 Sound {com.mattmakesgames.Music_SndTrack3} [track3.wav]
Symbol 40 Sound {com.mattmakesgames.Music_SndTrack2} [track2.wav]
Symbol 41 Sound {com.mattmakesgames.Music_SndTrack1} [track1.wav]
Symbol 42 Sound {com.mattmakesgames.Music_SndTrack5} [track5.wav]
Symbol 43 BinaryData {com.mattmakesgames.Levels_L3}
Symbol 44 BinaryData {com.mattmakesgames.Levels_L4}
Symbol 45 BinaryData {com.mattmakesgames.Levels_L1}
Symbol 46 Bitmap {com.mattmakesgames.Player_GfxPlayer_Skid}
Symbol 47 BinaryData {com.mattmakesgames.Levels_L2}
Symbol 48 Bitmap {com.mattmakesgames.LevelLoader_GfxNest}
Symbol 49 MovieClip {com.mattmakesgames.SponsorAnim_Anim}
Symbol 50 Bitmap {com.mattmakesgames.Tilesets_GfxSet1BlockBG2}
Symbol 51 Bitmap {com.mattmakesgames.Tilesets_GfxSet1BlockBG1}
Symbol 52 BinaryData {com.mattmakesgames.Levels_L9}
Symbol 53 Bitmap {com.mattmakesgames.Blocks.PinkBlock_GfxBlock}
Symbol 54 BinaryData {com.mattmakesgames.Levels_L7}
Symbol 55 BinaryData {com.mattmakesgames.Levels_L8}
Symbol 56 BinaryData {com.mattmakesgames.Levels_L5}
Symbol 57 BinaryData {com.mattmakesgames.Levels_L6}
Symbol 58 Bitmap {com.mattmakesgames.Player_GfxPlayer_Run3}
Symbol 59 Bitmap {com.mattmakesgames.Player_GfxPlayer_Run4}
Symbol 60 Bitmap {com.mattmakesgames.Player_GfxPlayer_Run1}
Symbol 61 Bitmap {com.mattmakesgames.Player_GfxPlayer_Run2}
Symbol 62 BinaryData {com.mattmakesgames.Levels_L50}
Symbol 63 Bitmap {com.mattmakesgames.Blocks.OrangeBlock_GfxBlock}
Symbol 64 Bitmap {com.mattmakesgames.Actors.Blade_GfxBlade}
Symbol 65 Bitmap {com.mattmakesgames.Tilesets_GfxSet1BlockTopBG2}
Symbol 66 Bitmap {com.mattmakesgames.Tilesets_GfxSet1BlockTopBG1}
Symbol 67 Bitmap {com.mattmakesgames.Actors.Birds.GreenBird_GfxBird3}
Symbol 68 Bitmap {com.mattmakesgames.Tilesets_GfxSet1BlockTop2}
Symbol 69 Bitmap {com.mattmakesgames.Actors.Door_GfxDoor4}
Symbol 70 Bitmap {com.mattmakesgames.Actors.Birds.GreenBird_GfxBird2}
Symbol 71 Bitmap {com.mattmakesgames.Tilesets_GfxSet1BlockTop1}
Symbol 72 Bitmap {com.mattmakesgames.Actors.Door_GfxDoor3}
Symbol 73 Bitmap {com.mattmakesgames.Actors.Chest_GfxChest2}
Symbol 74 Bitmap {com.mattmakesgames.Actors.Birds.GreenBird_GfxBird1}
Symbol 75 Bitmap {com.mattmakesgames.Actors.Door_GfxDoor2}
Symbol 76 Bitmap {com.mattmakesgames.Actors.Chest_GfxChest1}
Symbol 77 Bitmap {com.mattmakesgames.Actors.Door_GfxDoor1}
Symbol 78 Bitmap {com.mattmakesgames.Actors.Balloon_GfxBalloon}
Symbol 79 Bitmap {com.mattmakesgames.Player_GfxPlayer_DJump3}
Symbol 80 Bitmap {com.mattmakesgames.Player_GfxPlayer_DJump2}
Symbol 81 Bitmap {com.mattmakesgames.Actors.NonGameplay.Corpse_GfxDead}
Symbol 82 Bitmap {com.mattmakesgames.Player_GfxPlayer_DJump1}
Symbol 83 Bitmap {com.mattmakesgames.Actors.switches.OrangeSwitch_GfxSwitchUp}
Symbol 84 Bitmap {com.mattmakesgames.Clouds_GfxCloud1}
Symbol 85 Bitmap {com.mattmakesgames.Clouds_GfxCloud2}
Symbol 86 Bitmap {com.mattmakesgames.Clouds_GfxCloud3}
Symbol 87 Bitmap {com.mattmakesgames.Tilesets_GfxSet1Block1}
Symbol 88 Bitmap {com.mattmakesgames.Tilesets_GfxSet1Block2}
Symbol 89 Bitmap {com.mattmakesgames.Menus.MainMenu_GfxKong}
Symbol 90 Bitmap {com.mattmakesgames.Tilesets_GfxSet4Block3}
Symbol 91 Bitmap {com.mattmakesgames.Tilesets_GfxSet4Block1}
Symbol 92 Bitmap {com.mattmakesgames.Tilesets_GfxSet4Block2}
Symbol 93 Bitmap {com.mattmakesgames.Actors.switches.GreenSwitch_GfxSwitchDown}
Symbol 94 Bitmap {com.mattmakesgames.Actors.NonGameplay.Tophat_GfxTophat}
Symbol 95 Bitmap {com.mattmakesgames.Player_GfxPlayer_Stand}
Symbol 96 Bitmap {com.mattmakesgames.Actors.Birds.GoldBird_GfxBird3}
Symbol 97 Bitmap {com.mattmakesgames.Actors.Birds.GoldBird_GfxBird2}
Symbol 98 Bitmap {com.mattmakesgames.Blocks.YellowBlock_GfxBlock}
Symbol 99 Bitmap {com.mattmakesgames.Actors.Birds.GoldBird_GfxBird1}
Symbol 100 Bitmap {com.mattmakesgames.Actors.Coin_GfxCoin4}
Symbol 101 Bitmap {com.mattmakesgames.Actors.Enemies.Green_GfxGreen3}
Symbol 102 Bitmap {com.mattmakesgames.Actors.Coin_GfxCoin3}
Symbol 103 Bitmap {com.mattmakesgames.Actors.Enemies.Green_GfxGreen2}
Symbol 104 Bitmap {com.mattmakesgames.Actors.Enemies.Green_GfxGreen1}
Symbol 105 Bitmap {com.mattmakesgames.Actors.NonGameplay.Dust_GfxDust}
Symbol 106 Bitmap {com.mattmakesgames.Actors.Coin_GfxCoin2}
Symbol 107 Bitmap {com.mattmakesgames.Actors.Coin_GfxCoin1}
Symbol 108 Bitmap {com.mattmakesgames.Actors.switches.PinkSwitch_GfxSwitchDown}
Symbol 109 Bitmap {com.mattmakesgames.Actors.Spring_GfxSpring1}
Symbol 110 Bitmap {com.mattmakesgames.Actors.Spring_GfxSpring2}
Symbol 111 BinaryData {com.mattmakesgames.Levels_L46}
Symbol 112 BinaryData {com.mattmakesgames.Levels_L45}
Symbol 113 BinaryData {com.mattmakesgames.Levels_L44}
Symbol 114 BinaryData {com.mattmakesgames.Levels_L43}
Symbol 115 BinaryData {com.mattmakesgames.Levels_L42}
Symbol 116 BinaryData {com.mattmakesgames.Levels_L41}
Symbol 117 Bitmap {com.mattmakesgames.Player_GfxPlayer_Duck}
Symbol 118 BinaryData {com.mattmakesgames.Levels_L40}
Symbol 119 BinaryData {com.mattmakesgames.Levels_L49}
Symbol 120 BinaryData {com.mattmakesgames.Levels_L47}
Symbol 121 Bitmap {com.mattmakesgames.Player_GfxPlayer_Jump}
Symbol 122 BinaryData {com.mattmakesgames.Levels_L48}
Symbol 123 Bitmap {com.mattmakesgames.Player_GfxPlayer_Stick}
Symbol 124 Bitmap {com.mattmakesgames.Tilesets_GfxSet1JumpThru1}
Symbol 125 Bitmap {com.mattmakesgames.Tilesets_GfxSet1JumpThru2}
Symbol 126 Bitmap {com.mattmakesgames.Actors.Cannon_GfxCannon}
Symbol 127 Bitmap {com.mattmakesgames.Actors.Spawn_GfxSpawn}
Symbol 128 Bitmap {com.mattmakesgames.Player_GfxPlayer_Fall}
Symbol 129 Bitmap {com.mattmakesgames.Actors.Tutorial_GfxBalloon}
Symbol 130 BinaryData {com.mattmakesgames.Levels_L33}
Symbol 131 BinaryData {com.mattmakesgames.Levels_L32}
Symbol 132 Bitmap {com.mattmakesgames.Actors.SpikeFloor_GfxSpikeFloor}
Symbol 133 Bitmap {com.mattmakesgames.Actors.LevelDoor_Gfx100p}
Symbol 134 BinaryData {com.mattmakesgames.Levels_L35}
Symbol 135 Bitmap {com.mattmakesgames.Menus.Logo_GfxLogo2}
Symbol 136 BinaryData {com.mattmakesgames.Levels_L34}
Symbol 137 Bitmap {com.mattmakesgames.Actors.NonGameplay.EnemyCorpse_GfxPinkoX}
Symbol 138 BinaryData {com.mattmakesgames.Levels_L31}
Symbol 139 Bitmap {com.mattmakesgames.Actors.SpikeLeft_GfxSpikeLeft}
Symbol 140 BinaryData {com.mattmakesgames.Levels_L30}
Symbol 141 Bitmap {com.mattmakesgames.Menus.Logo_GfxLogo}
Symbol 142 BinaryData {com.mattmakesgames.Levels_L36}
Symbol 143 BinaryData {com.mattmakesgames.Levels_L37}
Symbol 144 BinaryData {com.mattmakesgames.Levels_L38}
Symbol 145 BinaryData {com.mattmakesgames.Levels_L39}
Symbol 146 Bitmap {com.mattmakesgames.Actors.Spring_GfxSpring4}
Symbol 147 Bitmap {com.mattmakesgames.Actors.Spring_GfxSpring3}
Symbol 148 Bitmap {com.mattmakesgames.Map_GfxStatue}
Symbol 149 Bitmap {com.mattmakesgames.Actors.NonGameplay.EnemyCorpse_GfxBlueX}
Symbol 150 BinaryData {com.mattmakesgames.Levels_L20}
Symbol 151 BinaryData {com.mattmakesgames.Levels_L24}
Symbol 152 BinaryData {com.mattmakesgames.Levels_L23}
Symbol 153 BinaryData {com.mattmakesgames.Levels_L22}
Symbol 154 BinaryData {com.mattmakesgames.Levels_L21}
Symbol 155 BinaryData {com.mattmakesgames.Levels_L27}
Symbol 156 BinaryData {com.mattmakesgames.Levels_L28}
Symbol 157 BinaryData {com.mattmakesgames.Levels_L25}
Symbol 158 Bitmap {com.mattmakesgames.Actors.switches.PinkSwitch_GfxSwitchUp}
Symbol 159 Bitmap {com.mattmakesgames.Actors.Enemies.Blue_GfxBlue2}
Symbol 160 BinaryData {com.mattmakesgames.Levels_L26}
Symbol 161 Bitmap {com.mattmakesgames.Actors.Enemies.Blue_GfxBlue1}
Symbol 162 BinaryData {com.mattmakesgames.Levels_L29}
Symbol 163 Bitmap {com.mattmakesgames.Blocks.GreenBlock_GfxBlock}
Symbol 164 Bitmap {com.mattmakesgames.Actors.Enemies.Pinko_GfxPinko2}
Symbol 165 Bitmap {com.mattmakesgames.Actors.Enemies.Pinko_GfxPinko1}
Symbol 166 Bitmap {com.mattmakesgames.Menus.Logo_GfxLogoBG}
Symbol 167 Bitmap {com.mattmakesgames.Tilesets_GfxSet4BG3}
Symbol 168 Bitmap {com.mattmakesgames.Actors.switches.YellowSwitch_GfxSwitchDown}
Symbol 169 Bitmap {com.mattmakesgames.Blocks.Breakable_GfxBreakable}
Symbol 170 Bitmap {com.mattmakesgames.Tilesets_GfxSet4BG2}
Symbol 171 Bitmap {com.mattmakesgames.Menus.MainMenu_GfxMMG}
Symbol 172 Bitmap {com.mattmakesgames.Tilesets_GfxSet4BG1}
Symbol 173 Bitmap {com.mattmakesgames.Actors.NonGameplay.EnemyCorpse_GfxGreenX}
Symbol 174 Bitmap {com.mattmakesgames.Actors.switches.OrangeSwitch_GfxSwitchDown}
Symbol 175 Bitmap {com.mattmakesgames.Actors.switches.GreenSwitch_GfxSwitchUp}
Symbol 176 Bitmap {com.mattmakesgames.Tilesets_GfxSet4JumpThru}
Symbol 177 Bitmap {com.mattmakesgames.Actors.SpikeRight_GfxSpikeRight}
Symbol 178 Bitmap {com.mattmakesgames.Actors.SpikeCeil_GfxSpikeCeil}
Symbol 179 BinaryData {com.mattmakesgames.Levels_L11}
Symbol 180 BinaryData {com.mattmakesgames.Levels_L10}
Symbol 181 BinaryData {com.mattmakesgames.Levels_L13}
Symbol 182 BinaryData {com.mattmakesgames.Levels_L12}
Symbol 183 Bitmap {com.mattmakesgames.Actors.switches.YellowSwitch_GfxSwitchUp}
Symbol 184 BinaryData {com.mattmakesgames.SponsorAnim_Anim_dataClass}
Symbol 185 BinaryData {com.mattmakesgames.Levels_L14}
Symbol 186 BinaryData {com.mattmakesgames.Levels_L15}
Symbol 187 BinaryData {com.mattmakesgames.Levels_L16}
Symbol 188 BinaryData {com.mattmakesgames.Levels_L17}
Symbol 189 BinaryData {com.mattmakesgames.Levels_L18}
Symbol 190 BinaryData {com.mattmakesgames.Levels_L19}
Symbol 191 Bitmap {com.mattmakesgames.Actors.Birds.PinkBird_GfxBird3}
Symbol 192 Bitmap {com.mattmakesgames.Actors.Birds.PinkBird_GfxBird1}
Symbol 193 Bitmap {com.mattmakesgames.Actors.Birds.PinkBird_GfxBird2}

Special Tags

FileAttributes (69)Timeline Frame 1Access network only, Metadata present, AS3.
SWFMetaData (77)Timeline Frame 1458 bytes "<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'><rdf:Description rdf:about='' xmlns ..."
ScriptLimits (65)Timeline Frame 1MaxRecursionDepth: 1000, ScriptTimeout: 60 seconds
ExportAssets (56)Timeline Frame 2Symbol 2 as "chest.wav"
ExportAssets (56)Timeline Frame 2Symbol 3 as "back.wav"
ExportAssets (56)Timeline Frame 2Symbol 4 as "breakableBreak.wav"
ExportAssets (56)Timeline Frame 2Symbol 5 as "s100p.wav"
ExportAssets (56)Timeline Frame 2Symbol 6 as "spring.wav"
ExportAssets (56)Timeline Frame 2Symbol 7 as "skid.wav"
ExportAssets (56)Timeline Frame 2Symbol 8 as "doorOpen.wav"
ExportAssets (56)Timeline Frame 2Symbol 9 as "balloon.wav"
ExportAssets (56)Timeline Frame 2Symbol 10 as "wjump.wav"
ExportAssets (56)Timeline Frame 2Symbol 11 as "switch.wav"
ExportAssets (56)Timeline Frame 2Symbol 12 as "die.wav"
ExportAssets (56)Timeline Frame 2Symbol 13 as "dieExplode.wav"
ExportAssets (56)Timeline Frame 2Symbol 14 as "doorClose.wav"
ExportAssets (56)Timeline Frame 2Symbol 15 as "coin.wav"
ExportAssets (56)Timeline Frame 2Symbol 16 as "loseCoin.wav"
ExportAssets (56)Timeline Frame 2Symbol 17 as "birdPinkFly.wav"
ExportAssets (56)Timeline Frame 2Symbol 18 as "cannonFill.wav"
ExportAssets (56)Timeline Frame 2Symbol 19 as "menuStart.wav"
ExportAssets (56)Timeline Frame 2Symbol 20 as "breakableStart.wav"
ExportAssets (56)Timeline Frame 2Symbol 21 as "birdGreenFly.wav"
ExportAssets (56)Timeline Frame 2Symbol 22 as "birdGreenHit.wav"
ExportAssets (56)Timeline Frame 2Symbol 23 as "djump.wav"
ExportAssets (56)Timeline Frame 2Symbol 24 as "sjump.wav"
ExportAssets (56)Timeline Frame 2Symbol 25 as "menuClick.wav"
ExportAssets (56)Timeline Frame 2Symbol 26 as "enemyHit.wav"
ExportAssets (56)Timeline Frame 2Symbol 27 as "spawn.wav"
ExportAssets (56)Timeline Frame 2Symbol 28 as "coinAppear.wav"
ExportAssets (56)Timeline Frame 2Symbol 29 as "cannonShoot.wav"
ExportAssets (56)Timeline Frame 2Symbol 30 as "birdGoldHit.wav"
ExportAssets (56)Timeline Frame 2Symbol 31 as "birdPinkHit.wav"
ExportAssets (56)Timeline Frame 2Symbol 32 as "jump.wav"
ExportAssets (56)Timeline Frame 2Symbol 33 as "birdGoldFly.wav"
ExportAssets (56)Timeline Frame 2Symbol 34 as "mapBG.wav"
ExportAssets (56)Timeline Frame 2Symbol 35 as "map.wav"
ExportAssets (56)Timeline Frame 2Symbol 36 as "menu1.wav"
ExportAssets (56)Timeline Frame 2Symbol 37 as "track4.wav"
ExportAssets (56)Timeline Frame 2Symbol 38 as "menu2.wav"
ExportAssets (56)Timeline Frame 2Symbol 39 as "track3.wav"
ExportAssets (56)Timeline Frame 2Symbol 40 as "track2.wav"
ExportAssets (56)Timeline Frame 2Symbol 41 as "track1.wav"
ExportAssets (56)Timeline Frame 2Symbol 42 as "track5.wav"
EnableDebugger2 (64)Timeline Frame 131 bytes "u.$1$pE$bVA/k4vJ3oKmwpqxoaWr21."
DebugMX1 (63)Timeline Frame 1
SerialNumber (41)Timeline Frame 1

Labels

"com_mattmakesgames_Preloader"Frame 1
"start"Frame 2




http://swfchan.com/42/205676/info.shtml
Created: 25/7 -2019 00:03:19 Last modified: 25/7 -2019 00:03:19 Server time: 03/05 -2024 05:14:41