Section 1
//alllevelup_98 (CrazyShooting_fla.alllevelup_98)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class alllevelup_98 extends MovieClip {
public function alllevelup_98(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package CrazyShooting_fla
Section 2
//ambushinstruction_133 (CrazyShooting_fla.ambushinstruction_133)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class ambushinstruction_133 extends MovieClip {
public function ambushinstruction_133(){
addFrameScript(192, frame193);
}
function frame193(){
stop();
}
}
}//package CrazyShooting_fla
Section 3
//betrayainstruction_126 (CrazyShooting_fla.betrayainstruction_126)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class betrayainstruction_126 extends MovieClip {
public function betrayainstruction_126(){
addFrameScript(252, frame253);
}
function frame253(){
stop();
}
}
}//package CrazyShooting_fla
Section 4
//BlastFull_32 (CrazyShooting_fla.BlastFull_32)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class BlastFull_32 extends MovieClip {
public function BlastFull_32(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
}
}
}//package CrazyShooting_fla
Section 5
//bullet_fire_anim_42 (CrazyShooting_fla.bullet_fire_anim_42)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class bullet_fire_anim_42 extends MovieClip {
public function bullet_fire_anim_42(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CrazyShooting_fla
Section 6
//currentweapon_204 (CrazyShooting_fla.currentweapon_204)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class currentweapon_204 extends MovieClip {
public function currentweapon_204(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package CrazyShooting_fla
Section 7
//destructioninstruction_132 (CrazyShooting_fla.destructioninstruction_132)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class destructioninstruction_132 extends MovieClip {
public function destructioninstruction_132(){
addFrameScript(169, frame170);
}
function frame170(){
stop();
}
}
}//package CrazyShooting_fla
Section 8
//flameBugHitClip_67 (CrazyShooting_fla.flameBugHitClip_67)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class flameBugHitClip_67 extends MovieClip {
public function flameBugHitClip_67(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package CrazyShooting_fla
Section 9
//flashanimation_4 (CrazyShooting_fla.flashanimation_4)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class flashanimation_4 extends MovieClip {
public function flashanimation_4(){
addFrameScript(94, frame95);
}
function frame95(){
stop();
}
}
}//package CrazyShooting_fla
Section 10
//freeaominstruction_134 (CrazyShooting_fla.freeaominstruction_134)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class freeaominstruction_134 extends MovieClip {
public function freeaominstruction_134(){
addFrameScript(216, frame217);
}
function frame217(){
stop();
}
}
}//package CrazyShooting_fla
Section 11
//graphics_26 (CrazyShooting_fla.graphics_26)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class graphics_26 extends MovieClip {
public function graphics_26(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CrazyShooting_fla
Section 12
//healthbar_202 (CrazyShooting_fla.healthbar_202)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class healthbar_202 extends MovieClip {
public var healthClip:MovieClip;
}
}//package CrazyShooting_fla
Section 13
//heroDie_156 (CrazyShooting_fla.heroDie_156)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class heroDie_156 extends MovieClip {
public function heroDie_156(){
addFrameScript(20, frame21);
}
function frame21(){
stop();
}
}
}//package CrazyShooting_fla
Section 14
//heroHit_155 (CrazyShooting_fla.heroHit_155)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class heroHit_155 extends MovieClip {
public function heroHit_155(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package CrazyShooting_fla
Section 15
//highscorescreen_245 (CrazyShooting_fla.highscorescreen_245)
package CrazyShooting_fla {
import flash.display.*;
import flash.text.*;
public dynamic class highscorescreen_245 extends MovieClip {
public var score1:TextField;
public var score5:TextField;
public var score10:TextField;
public var backhs:SimpleButton;
public var score6:TextField;
public var date1:TextField;
public var date2:TextField;
public var date3:TextField;
public var date6:TextField;
public var date7:TextField;
public var date5:TextField;
public var date9:TextField;
public var player1:TextField;
public var player2:TextField;
public var player6:TextField;
public var player7:TextField;
public var player8:TextField;
public var player5:TextField;
public var date4:TextField;
public var date8:TextField;
public var player3:TextField;
public var player9:TextField;
public var player4:TextField;
public var date10:TextField;
public var playMorehs:SimpleButton;
public var player10:TextField;
public var score2:TextField;
public var score3:TextField;
public var score7:TextField;
public var score8:TextField;
public var score9:TextField;
public var score4:TextField;
}
}//package CrazyShooting_fla
Section 16
//levelup_mc_122 (CrazyShooting_fla.levelup_mc_122)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class levelup_mc_122 extends MovieClip {
public var inst2:MovieClip;
public var inst1:MovieClip;
public function levelup_mc_122(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10);
}
function frame10(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package CrazyShooting_fla
Section 17
//lives_205 (CrazyShooting_fla.lives_205)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class lives_205 extends MovieClip {
public function lives_205(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package CrazyShooting_fla
Section 18
//LogoAniFlashA_73 (CrazyShooting_fla.LogoAniFlashA_73)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class LogoAniFlashA_73 extends MovieClip {
public function LogoAniFlashA_73(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package CrazyShooting_fla
Section 19
//message_mc_248 (CrazyShooting_fla.message_mc_248)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class message_mc_248 extends MovieClip {
public var weaponBtn:SimpleButton;
public var playMore:SimpleButton;
public var weaponIntro:MovieClip;
public var backintro:SimpleButton;
public function message_mc_248(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CrazyShooting_fla
Section 20
//mop_128 (CrazyShooting_fla.mop_128)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class mop_128 extends MovieClip {
public function mop_128(){
addFrameScript(192, frame193);
}
function frame193(){
stop();
}
}
}//package CrazyShooting_fla
Section 21
//phaserBeam_anim_59 (CrazyShooting_fla.phaserBeam_anim_59)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class phaserBeam_anim_59 extends MovieClip {
public function phaserBeam_anim_59(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package CrazyShooting_fla
Section 22
//planeMove_114 (CrazyShooting_fla.planeMove_114)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class planeMove_114 extends MovieClip {
public function planeMove_114(){
addFrameScript(648, frame649);
}
function frame649(){
stop();
}
}
}//package CrazyShooting_fla
Section 23
//plasmaBugHitClip_170 (CrazyShooting_fla.plasmaBugHitClip_170)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class plasmaBugHitClip_170 extends MovieClip {
public function plasmaBugHitClip_170(){
addFrameScript(16, frame17);
}
function frame17(){
stop();
}
}
}//package CrazyShooting_fla
Section 24
//plasmafireanim_86 (CrazyShooting_fla.plasmafireanim_86)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class plasmafireanim_86 extends MovieClip {
public function plasmafireanim_86(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CrazyShooting_fla
Section 25
//powerups_207 (CrazyShooting_fla.powerups_207)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class powerups_207 extends MovieClip {
public var power1:MovieClip;
public var power2:MovieClip;
public var power3:MovieClip;
public function powerups_207(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CrazyShooting_fla
Section 26
//progressbar_200 (CrazyShooting_fla.progressbar_200)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class progressbar_200 extends MovieClip {
public var progressClip:MovieClip;
}
}//package CrazyShooting_fla
Section 27
//purificationinstruction_130 (CrazyShooting_fla.purificationinstruction_130)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class purificationinstruction_130 extends MovieClip {
public function purificationinstruction_130(){
addFrameScript(220, frame221);
}
function frame221(){
stop();
}
}
}//package CrazyShooting_fla
Section 28
//shieldbar_203 (CrazyShooting_fla.shieldbar_203)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class shieldbar_203 extends MovieClip {
public var shieldClip:MovieClip;
}
}//package CrazyShooting_fla
Section 29
//stats_canon_mc_209 (CrazyShooting_fla.stats_canon_mc_209)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class stats_canon_mc_209 extends MovieClip {
public function stats_canon_mc_209(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package CrazyShooting_fla
Section 30
//stats_missile_mc_208 (CrazyShooting_fla.stats_missile_mc_208)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class stats_missile_mc_208 extends MovieClip {
public function stats_missile_mc_208(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package CrazyShooting_fla
Section 31
//stats_ray_mc_210 (CrazyShooting_fla.stats_ray_mc_210)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class stats_ray_mc_210 extends MovieClip {
public function stats_ray_mc_210(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package CrazyShooting_fla
Section 32
//su_guardian_life_88 (CrazyShooting_fla.su_guardian_life_88)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class su_guardian_life_88 extends MovieClip {
public function su_guardian_life_88(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CrazyShooting_fla
Section 33
//Supergardianrepair_212 (CrazyShooting_fla.Supergardianrepair_212)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class Supergardianrepair_212 extends MovieClip {
public function Supergardianrepair_212(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package CrazyShooting_fla
Section 34
//surpriseinstruction_129 (CrazyShooting_fla.surpriseinstruction_129)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class surpriseinstruction_129 extends MovieClip {
public function surpriseinstruction_129(){
addFrameScript(220, frame221);
}
function frame221(){
stop();
}
}
}//package CrazyShooting_fla
Section 35
//thesentinelinstruction_131 (CrazyShooting_fla.thesentinelinstruction_131)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class thesentinelinstruction_131 extends MovieClip {
public function thesentinelinstruction_131(){
addFrameScript(192, frame193);
}
function frame193(){
stop();
}
}
}//package CrazyShooting_fla
Section 36
//total_mc_1 (CrazyShooting_fla.total_mc_1)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class total_mc_1 extends MovieClip {
public function total_mc_1(){
addFrameScript(179, frame180);
}
function frame180(){
stop();
}
}
}//package CrazyShooting_fla
Section 37
//trackBullet_start_142 (CrazyShooting_fla.trackBullet_start_142)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class trackBullet_start_142 extends MovieClip {
public function trackBullet_start_142(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CrazyShooting_fla
Section 38
//Turretgun_198 (CrazyShooting_fla.Turretgun_198)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class Turretgun_198 extends MovieClip {
public function Turretgun_198(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package CrazyShooting_fla
Section 39
//weaponClip_254 (CrazyShooting_fla.weaponClip_254)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class weaponClip_254 extends MovieClip {
public var closeBtn:SimpleButton;
public function weaponClip_254(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package CrazyShooting_fla
Section 40
//wellcomescreen_256 (CrazyShooting_fla.wellcomescreen_256)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class wellcomescreen_256 extends MovieClip {
public var highscore:SimpleButton;
public var intro:SimpleButton;
public var playGame:SimpleButton;
public var addMore:SimpleButton;
public var playMore:SimpleButton;
}
}//package CrazyShooting_fla
Section 41
//vengeanceinstruction_135 (CrazyShooting_fla.vengeanceinstruction_135)
package CrazyShooting_fla {
import flash.display.*;
public dynamic class vengeanceinstruction_135 extends MovieClip {
public function vengeanceinstruction_135(){
addFrameScript(216, frame217);
}
function frame217(){
stop();
}
}
}//package CrazyShooting_fla
Section 42
//Asteroids (Asteroids)
package {
import flash.events.*;
import flash.display.*;
public class Asteroids extends Enemy {
private var speedy:int;
private var speedx:int;
public var hitAreaClip:MovieClip;
private var trackCounter:Boolean;// = false
private var speed:int;// = 20
public var health:int;// = 10
public var hitClip:MovieClip;
private var heroPlane:MyPlane;
public var dieClip:MovieClip;
public function Asteroids(){
health = 10;
trackCounter = false;
speed = 20;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
type = 7;
}
override public function init(){
var _local1:Number;
health = GParams.DRONETHREEHEALTH;
heroPlane = CrazyShooting.myPlane;
_local1 = (0.6 + (Math.random() * 1));
if (_local1 > 1){
_local1 = 1;
};
scaleX = (scaleY = _local1);
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removeEnemy(this);
};
};
};
}
override public function moveEnemy(){
if (currentLabel != "die"){
super.moveEnemy();
this.rotation = (this.rotation + 5);
};
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
health = (health - 15);
if (health > 0){
if (currentLabel != "hit"){
addEventListener(Event.ENTER_FRAME, playHit);
gotoAndStop("hit");
};
} else {
if (currentLabel != "die"){
addEventListener(Event.ENTER_FRAME, playBlast);
gotoAndStop("die");
};
};
}
private function playHit(_arg1:Event){
if (currentLabel == "hit"){
if (this.hitClip != null){
if (this.hitClip.currentFrame >= this.hitClip.totalFrames){
this.hitClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playHit);
};
};
};
}
}
}//package
Section 43
//Beam (Beam)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class Beam extends Bullet {
private var beamSpeed:uint;// = 10
private var rad:int;
private var beamLine:Line;
public var beamAnim:MovieClip;
private var vx:int;
private var vy:int;
public function Beam(){
beamSpeed = 10;
super();
}
override public function init(_arg1:Point, _arg2:int=8, _arg3:int=0){
var _local4:Number;
super.init(_arg1);
_local4 = ((_arg3 / 180) * Math.PI);
vx = (Math.cos(_local4) * beamSpeed);
vy = (Math.sin(_local4) * beamSpeed);
beamAnim.rotation = _arg3;
beamAnim.gotoAndPlay(1);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
override public function moveBullet(){
}
private function onEnterFrame(_arg1:Event){
if (beamAnim != null){
if (beamAnim.currentFrame == beamAnim.totalFrames){
beamAnim.gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
CrazyShooting.container.removeBullet(this);
};
};
}
}
}//package
Section 44
//BGSound (BGSound)
package {
import flash.media.*;
public class BGSound extends Sound {
}
}//package
Section 45
//Bullet (Bullet)
package {
import flash.geom.*;
import flash.display.*;
public class Bullet extends MovieClip {
protected var currentPos:Point;
public var moveObject:Movement;// = null
public function Bullet(){
moveObject = null;
currentPos = new Point();
super();
}
public function init(_arg1:Point, _arg2:int=0, _arg3:int=0){
this.x = _arg1.x;
this.y = _arg1.y;
}
public function removeAllListeners(){
}
public function showBlast(){
}
public function moveBullet(){
}
public function removeBullet(){
(this.parent as Container).removeBullet(this);
}
}
}//package
Section 46
//BulletFactory (BulletFactory)
package {
public class BulletFactory {
private var heroBulletOneIndex:int;// = -1
private var heroBulletOneArray:Array;
private var beamOneIndex:int;// = -1
private var beamOneArray:Array;
private var trackBulletIndex:int;// = -1
private var heroBulletTwoIndex:int;// = -1
private var trackBulletArray:Array;
private var bulletOneIndex:int;// = -1
private var heroBulletTwoArray:Array;
private var bulletOneArray:Array;
public function BulletFactory(){
bulletOneIndex = -1;
bulletOneArray = new Array(30);
beamOneIndex = -1;
beamOneArray = new Array(30);
trackBulletIndex = -1;
trackBulletArray = new Array(30);
heroBulletOneIndex = -1;
heroBulletOneArray = new Array(30);
heroBulletTwoIndex = -1;
heroBulletTwoArray = new Array(30);
super();
}
public function getBulletOne():BulletOne{
bulletOneIndex = ((bulletOneIndex + 1) % bulletOneArray.length);
if (bulletOneArray[bulletOneIndex] == null){
bulletOneArray[bulletOneIndex] = new BulletOne();
};
return (bulletOneArray[bulletOneIndex]);
}
public function getBeamOne():Beam{
beamOneIndex = ((beamOneIndex + 1) % beamOneArray.length);
if (beamOneArray[beamOneIndex] == null){
beamOneArray[beamOneIndex] = new Beam();
};
return (beamOneArray[beamOneIndex]);
}
public function getHeroBulletTwo():HeroBulletTwo{
heroBulletTwoIndex = ((heroBulletTwoIndex + 1) % heroBulletTwoArray.length);
if (heroBulletTwoArray[heroBulletTwoIndex] == null){
heroBulletTwoArray[heroBulletTwoIndex] = new HeroBulletTwo();
};
return (heroBulletTwoArray[heroBulletTwoIndex]);
}
public function getHeroBulletOne():HeroBulletOne{
heroBulletOneIndex = ((heroBulletOneIndex + 1) % heroBulletOneArray.length);
if (heroBulletOneArray[heroBulletOneIndex] == null){
heroBulletOneArray[heroBulletOneIndex] = new HeroBulletOne();
};
return (heroBulletOneArray[heroBulletOneIndex]);
}
public function getTrackBullet():TrackBullet{
trackBulletIndex = ((trackBulletIndex + 1) % trackBulletArray.length);
if (trackBulletArray[trackBulletIndex] == null){
trackBulletArray[trackBulletIndex] = new TrackBullet();
};
return (trackBulletArray[trackBulletIndex]);
}
public function getBullet(_arg1):Bullet{
switch (_arg1){
case 0:
return (getBulletOne());
case 1:
return (getHeroBulletOne());
case 2:
return (getHeroBulletTwo());
case 3:
return (getTrackBullet());
case 4:
return (getBeamOne());
};
return (null);
}
}
}//package
Section 47
//BulletOne (BulletOne)
package {
import flash.geom.*;
import flash.display.*;
public class BulletOne extends Bullet {
public var hitAreaClip:MovieClip;
private var bulletSpeed:uint;// = 22
public function BulletOne(){
bulletSpeed = 22;
super();
}
override public function init(_arg1:Point, _arg2:int=8, _arg3:int=0){
super.init(_arg1);
moveObject = MovementFactory.getMovementObject(_arg2);
moveObject.init(_arg1.x, _arg1.y, bulletSpeed);
}
override public function moveBullet(){
if (moveObject.getNextPosition()){
this.x = moveObject.currentPos.x;
this.y = moveObject.currentPos.y;
} else {
(this.parent as Container).removeBullet(this);
};
}
}
}//package
Section 48
//BulletSound (BulletSound)
package {
import flash.media.*;
public dynamic class BulletSound extends Sound {
}
}//package
Section 49
//CanonSound (CanonSound)
package {
import flash.media.*;
public dynamic class CanonSound extends Sound {
}
}//package
Section 50
//Container (Container)
package {
import flash.geom.*;
import flash.display.*;
public class Container extends MovieClip {
private var missile:Missile;// = null
private var bulletFactory:BulletFactory;// = null
private var userBulletArray:Array;
public var enemyArray:Array;
public var powerUpArray:Array;
private var missile2:Missile2;// = null
private var missile3:Missile3;// = null
private var missile4:Missile4;// = null
private var enemyBulletArray:Array;
public function Container(){
enemyBulletArray = new Array();
userBulletArray = new Array();
enemyArray = new Array();
powerUpArray = new Array();
bulletFactory = null;
missile = null;
missile2 = null;
missile3 = null;
missile4 = null;
super();
bulletFactory = new BulletFactory();
}
public function checkHeroCanonCollision(){
var _local1:uint;
_local1 = 0;
while (_local1 < enemyArray.length) {
if (missile4 != null){
if (missile4.hitAreaClip.hitTestObject(enemyArray[_local1].hitAreaClip)){
enemyArray[_local1].health = (enemyArray[_local1].health - 80);
enemyArray[_local1].hit();
missile4.destroyMissile4();
};
};
_local1++;
};
}
public function movePowerUps(){
var _local1:uint;
_local1 = 0;
while (_local1 < powerUpArray.length) {
powerUpArray[_local1].movePowerUps();
_local1++;
};
}
public function removeMissile(){
if (missile != null){
if (contains(missile)){
removeChild(missile);
};
};
}
public function generateHeroAirMissile(){
var _local1:Point;
missile2 = Missile2.getMissile();
addChild(missile2);
_local1 = getNearestAirEnemy();
missile2.init(_local1.x, _local1.y);
}
public function moveEnemies(){
var _local1:uint;
_local1 = 0;
while (_local1 < enemyArray.length) {
enemyArray[_local1].moveEnemy();
_local1++;
};
}
public function getNearestSurfaceEnemy():Point{
var _local1:int;
var _local2:int;
var _local3:uint;
_local1 = 750;
_local2 = 500;
_local3 = 0;
while (_local3 < enemyArray.length) {
if ((((enemyArray[_local3].type == 4)) || ((enemyArray[_local3].type == 10)))){
_local2 = enemyArray[_local3].y;
_local1 = enemyArray[_local3].x;
};
_local3++;
};
return (new Point(_local1, _local2));
}
public function removeAllEnemyBullets(){
var _local1:*;
_local1 = (enemyBulletArray.length - 1);
while (_local1 >= 0) {
if (enemyBulletArray[_local1] != null){
removeBullet(enemyBulletArray[_local1]);
};
_local1--;
};
}
public function checkHeroBeamCollision(){
var _local1:uint;
_local1 = 0;
while (_local1 < enemyArray.length) {
if (missile3 != null){
if (missile3.hitTestObject(enemyArray[_local1].hitAreaClip)){
if (enemyArray[_local1].type != 11){
enemyArray[_local1].health = (enemyArray[_local1].health - 5);
} else {
enemyArray[_local1].health = (enemyArray[_local1].health - 2);
};
enemyArray[_local1].hit();
};
};
_local1++;
};
}
public function checkHeroEnemyCollision(){
var _local1:MyPlane;
var _local2:uint;
_local1 = CrazyShooting.myPlane;
_local2 = 0;
while (_local2 < enemyArray.length) {
if (_local1.hitTestObject(enemyArray[_local2].hitAreaClip)){
if ((((((((enemyArray[_local2].type == 1)) || ((enemyArray[_local2].type == 2)))) || ((enemyArray[_local2].type == 3)))) || ((enemyArray[_local2].type == 7)))){
enemyArray[_local2].health = 0;
enemyArray[_local2].hit();
};
_local1.bulletHit();
};
_local2++;
};
}
public function removeEnemy(_arg1:Enemy){
var _local2:int;
var _local3:MyPlane;
_local2 = enemyArray.indexOf(_arg1);
_local3 = CrazyShooting.myPlane;
if (_local2 >= 0){
enemyArray.splice(_local2, 1);
if (contains(_arg1)){
if ((((_arg1.type == 10)) || ((_arg1.type == 4)))){
_local3.surfaceEnemyState = false;
};
removeChild(_arg1);
};
};
}
public function generateHeroBeam(){
missile3 = Missile3.getMissile();
addChild(missile3);
swapChildren(missile3, CrazyShooting.myPlane);
missile3.init();
}
public function removeMissile2(){
if (missile2 != null){
if (contains(missile2)){
removeChild(missile2);
};
};
}
public function removeMissile3(){
if (missile3 != null){
if (contains(missile3)){
missile3.removeAllListeners();
removeChild(missile3);
};
};
}
public function addEnemy(_arg1:Enemy){
enemyArray.push(_arg1);
addChild(_arg1);
}
public function generateBullets(_arg1:int, _arg2:Point, _arg3:int=0):DisplayObject{
var _local4:Bullet;
_local4 = bulletFactory.getBullet(_arg1);
_local4.x = _arg2.x;
_local4.y = _arg2.y;
_local4.init(_arg2, 8, _arg3);
enemyBulletArray.push(_local4);
return (addChild(_local4));
}
public function removeAllPowerUps(){
var _local1:*;
_local1 = (powerUpArray.length - 1);
while (_local1 >= 0) {
if (powerUpArray[_local1] != null){
removePowerUps(powerUpArray[_local1]);
};
_local1--;
};
}
public function removeUserBullet(_arg1:Bullet){
var _local2:int;
_local2 = userBulletArray.indexOf(_arg1);
if (_local2 >= 0){
userBulletArray.splice(_local2, 1);
if (contains(_arg1)){
removeChild(_arg1);
};
};
}
public function removeMissile4(){
if (missile4 != null){
if (contains(missile4)){
removeChild(missile4);
};
};
}
public function removeBullet(_arg1:Bullet){
var _local2:int;
_local2 = enemyBulletArray.indexOf(_arg1);
if (_local2 >= 0){
enemyBulletArray.splice(_local2, 1);
if (contains(_arg1)){
_arg1.removeAllListeners();
removeChild(_arg1);
};
};
}
public function moveBullets(){
var _local1:uint;
var _local2:uint;
_local1 = 0;
while (_local1 < enemyBulletArray.length) {
enemyBulletArray[_local1].moveBullet();
_local1++;
};
_local2 = 0;
while (_local2 < userBulletArray.length) {
userBulletArray[_local2].moveBullet();
_local2++;
};
}
public function removeAllUserBullets(){
var _local1:*;
_local1 = (userBulletArray.length - 1);
while (_local1 >= 0) {
if (userBulletArray[_local1] != null){
removeUserBullet(userBulletArray[_local1]);
};
_local1--;
};
}
public function generateHeroSurfaceMissile(){
var _local1:Point;
missile = Missile.getMissile();
addChild(missile);
_local1 = getNearestSurfaceEnemy();
missile.init(_local1.x, _local1.y);
}
public function getNearestAirEnemy():Point{
var _local1:int;
var _local2:int;
var _local3:uint;
var _local4:int;
var _local5:int;
_local1 = 750;
_local2 = 450;
_local3 = 0;
while (_local3 < enemyArray.length) {
_local4 = enemyArray[_local3].y;
_local5 = enemyArray[_local3].x;
if ((((_local5 < _local1)) && ((_local5 > 400)))){
if (_local4 < 400){
_local1 = _local5;
_local2 = _local4;
};
};
_local3++;
};
return (new Point(_local1, _local2));
}
public function generateHeroBullets(_arg1:int, _arg2:Point, _arg3:int){
var _local4:Bullet;
_local4 = bulletFactory.getBullet(_arg1);
addChild(_local4);
_local4.x = _arg2.x;
_local4.y = _arg2.y;
_local4.init(_arg2, _arg3);
userBulletArray.push(_local4);
}
public function addPowerUps(_arg1:PowerUps){
powerUpArray.push(_arg1);
addChild(_arg1);
}
public function removeAllMissiles(){
removeMissile();
removeMissile2();
removeMissile3();
removeMissile4();
}
public function removePowerUps(_arg1:PowerUps){
var _local2:int;
_local2 = powerUpArray.indexOf(_arg1);
if (_local2 >= 0){
powerUpArray.splice(_local2, 1);
if (contains(_arg1)){
removeChild(_arg1);
};
};
}
public function checkHeroMissile2Collision(){
var _local1:uint;
_local1 = 0;
while (_local1 < enemyArray.length) {
if (missile2 != null){
if (missile2.hitTestObject(enemyArray[_local1].hitAreaClip)){
enemyArray[_local1].health = (enemyArray[_local1].health - 30);
enemyArray[_local1].hit();
missile2.destroyMissile2();
};
};
_local1++;
};
}
public function checkHeroBulletCollision(){
var _local1:uint;
var _local2:Bullet;
var _local3:uint;
_local1 = 0;
while (_local1 < userBulletArray.length) {
_local2 = userBulletArray[_local1];
_local3 = 0;
while (_local3 < enemyArray.length) {
if (enemyArray[_local3].hitAreaClip.hitTestPoint(_local2.x, _local2.y)){
enemyArray[_local3].hit();
removeUserBullet(_local2);
};
_local3++;
};
_local1++;
};
}
public function checkEnemyBulletCollision(){
var _local1:MyPlane;
var _local2:uint;
_local1 = CrazyShooting.myPlane;
_local2 = 0;
while (_local2 < enemyBulletArray.length) {
if (enemyBulletArray[_local2].hitTestObject(_local1.hitAreaClip)){
enemyBulletArray[_local2].removeBullet();
_local1.bulletHit();
};
_local2++;
};
}
public function generateHeroCanon(){
missile4 = Missile4.getMissile();
addChild(missile4);
missile4.init();
}
public function destroyAllEnemies(){
var _local1:*;
_local1 = (enemyArray.length - 1);
while (_local1 >= 0) {
if (enemyArray[_local1] != null){
enemyArray[_local1].health = 0;
enemyArray[_local1].hit();
};
_local1--;
};
}
public function removeAllEnemies(){
var _local1:*;
_local1 = (enemyArray.length - 1);
while (_local1 >= 0) {
if (enemyArray[_local1] != null){
enemyArray[_local1].removeAllListeners();
removeEnemy(enemyArray[_local1]);
};
_local1--;
};
}
public function checkHeroMissileCollision(){
var _local1:uint;
_local1 = 0;
while (_local1 < enemyArray.length) {
if ((((enemyArray[_local1].type == 10)) || ((enemyArray[_local1].type == 4)))){
if (missile != null){
if (missile.hitTestObject(enemyArray[_local1].hitAreaClip)){
if (enemyArray[_local1].type == 10){
enemyArray[_local1].health = 0;
} else {
enemyArray[_local1].health = (enemyArray[_local1].health - 30);
};
enemyArray[_local1].hit();
missile.destroyMissile();
};
};
};
_local1++;
};
}
}
}//package
Section 51
//CrazyShooting (CrazyShooting)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.net.*;
public class CrazyShooting extends MovieClip {
private var drone2IndexCounter:int;// = 0
private var drone2TimerCounter:uint;// = 0
private var enemyGroupDetails:Array;// = null
private var drone2Groups:Array;
public var gameOverSound:GameOverSound;// = null
public var welcomeSound:WelcomeSound;// = null
public var bgs:BGSound;// = null
private var nextGroupIndex:int;// = 0
private var drone1MaxCounter:uint;// = 0
public var levelUpSound:LevelUpSound;// = null
private var welcomePage:Welcome;// = null
private var youWin:YouWin;// = null
public var levelUp:LevelUp;// = null
private var drone1Groups:Array;
private var drone1IndexCounter:int;// = 0
public var levelEndStatus:Boolean;// = false
private var drone1TimerCounter:uint;// = 0
private var drone2MaxCounter:uint;// = 0
private var powerUpArray:Array;
private var timerIntervalIndex:uint;// = 0
public var surfaceBg:Surface;// = null
var _channel:SoundChannel;
public var youWinSound:YouWinSound;// = null
private var gameOver:GameOver;// = null
private var powerUpMaxArray:Array;
public static var gameScore:int = 0;
public static var container:Container = null;
public static var swapKeyDown:Boolean = false;
public static var myPlane:MyPlane = null;
public static var specialType:Boolean = false;
public static var powerUpCounterIndex:int = -1;
public static var powerUpMaxCounter:uint = 300;
public static var gameEndStatus:Boolean = false;
public static var powerUpCounter:uint = 0;
public static var missileKeyDown:Boolean = false;
public static var powerUpIndex:int = -1;
public static var statistics:Statistics = null;
public static var levelUpCounter:int = 0;
public function CrazyShooting(){
timerIntervalIndex = 0;
nextGroupIndex = 0;
enemyGroupDetails = null;
drone1TimerCounter = 0;
drone1MaxCounter = 0;
drone1IndexCounter = 0;
drone1Groups = new Array();
drone2TimerCounter = 0;
drone2MaxCounter = 0;
drone2IndexCounter = 0;
drone2Groups = new Array();
powerUpArray = new Array();
powerUpMaxArray = new Array();
levelEndStatus = false;
welcomeSound = null;
welcomePage = null;
gameOver = null;
youWin = null;
surfaceBg = null;
levelUp = null;
levelUpSound = null;
bgs = null;
gameOverSound = null;
youWinSound = null;
super();
container = new Container();
addChild(container);
bgs = new BGSound();
welcomeSound = new WelcomeSound();
levelUpSound = new LevelUpSound();
gameOverSound = new GameOverSound();
youWinSound = new YouWinSound();
createWelcome();
}
private function removeLevelUp(){
if (levelUp != null){
if (container.contains(levelUp)){
container.removeChild(levelUp);
};
};
}
private function shoot(_arg1:MouseEvent){
if (!myPlane.dieStatus){
myPlane.shoot();
};
}
private function createSurfaceBg(){
if (surfaceBg != null){
if (container.contains(surfaceBg)){
container.removeChild(surfaceBg);
};
};
surfaceBg = SurfaceFactory.createInstance();
container.addChild(surfaceBg);
surfaceBg.init();
surfaceBg.x = 0;
}
private function removePlane(){
if (myPlane != null){
if (container.contains(myPlane)){
myPlane.removeListeners();
container.removeChild(myPlane);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, shoot);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownEvent);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpEvent);
missileKeyDown = false;
swapKeyDown = false;
};
};
}
public function removeWelcome(){
if (welcomePage != null){
if (contains(welcomePage)){
welcomePage.ipwelcome.playGame.removeEventListener(MouseEvent.CLICK, gotoLEVEL1);
welcomePage.ipwelcome.intro.removeEventListener(MouseEvent.CLICK, gameMessage);
welcomePage.ipwelcome.highscore.removeEventListener(MouseEvent.CLICK, fetchHighScore);
welcomePage.hs.backhs.removeEventListener(MouseEvent.CLICK, playWelcome);
_channel.stop();
_channel.removeEventListener(Event.SOUND_COMPLETE, welcomeHandler);
removeChild(welcomePage);
};
};
}
private function checkEnemyInterval(){
if (((!(levelEndStatus)) && (!(CrazyShooting.specialType)))){
drone1TimerCounter = (drone1TimerCounter + 1);
if (drone1TimerCounter > drone1MaxCounter){
drone1TimerCounter = 0;
generateDrone1Enemies();
};
};
}
public function nextLevel(){
clearGraphics();
levelUpCounter = 0;
CrazyShooting.specialType = false;
levelEndStatus = false;
init();
}
public function generateDrone1Enemies(){
var _local1:Array;
var _local2:uint;
var _local3:GroupData;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:Enemy;
var _local8:int;
drone1IndexCounter = ((drone1IndexCounter + 1) % drone1Groups.length);
_local1 = drone1Groups[drone1IndexCounter];
_local2 = 0;
while (_local2 < _local1.length) {
_local3 = _local1[_local2];
_local3.generateEnemyData();
_local4 = _local3.enemyType;
_local5 = _local3.moveType;
_local6 = 0;
while (_local6 < _local3.enemyDataArray.length) {
_local7 = EnemyFactory.getEnemy(_local4);
_local7.x = _local3.enemyDataArray[_local6].pos.x;
_local7.y = _local3.enemyDataArray[_local6].pos.y;
_local8 = GParams.enemySpeed[(_local4 - 1)];
_local7.init();
_local7.setMType(_local5, _local8);
container.addEnemy(_local7);
_local6++;
};
_local2++;
};
}
public function sendGameOverData(_arg1:String, _arg2:Number):Boolean{
var request:URLRequest;
var variables:URLVariables;
var playerName = _arg1;
var score = _arg2;
try {
request = new URLRequest("http://www.flasharcade.com/setscores.php");
request.method = URLRequestMethod.POST;
variables = new URLVariables();
variables.scoreName = playerName;
variables.scoreText = score;
variables.gameId = "ace029";
variables.gameName = "CrazyShooting";
request.data = variables;
sendToURL(request);
} catch(e:Error) {
gameOver.setErrorMesg("Could not submit the score");
return (false);
} catch(e:SecurityError) {
gameOver.setErrorMesg("Security Error ");
return (false);
};
return (true);
}
public function gotoLEVEL1(_arg1:MouseEvent){
_arg1.stopImmediatePropagation();
clearGraphics();
GParams.currentLevel = 0;
gameScore = 0;
createLevelUp();
}
public function fetchHighScore(_arg1:MouseEvent){
var _local2:URLRequest;
var _local3:URLLoader;
var _local4:URLVariables;
welcomePage.setChildIndex(welcomePage.hs, 2);
welcomePage.emptyScores();
_local2 = new URLRequest("http://www.flasharcade.com/getscoresas3.php");
_local2.method = URLRequestMethod.POST;
_local3 = new URLLoader();
_local3.dataFormat = URLLoaderDataFormat.VARIABLES;
_local4 = new URLVariables();
_local4.gameId = "ace029";
_local2.data = _local4;
_local3.load(_local2);
_local3.addEventListener(Event.COMPLETE, completeHandler);
}
public function gameOverHandler(_arg1:Event){
_channel.removeEventListener(Event.SOUND_COMPLETE, gameOverHandler);
_channel = gameOverSound.play();
_channel.addEventListener(Event.SOUND_COMPLETE, gameOverHandler);
}
public function removeGameOver(){
if (gameOver != null){
if (this.contains(gameOver)){
gameOver.removeAllListener();
gameOver.playAgain1.removeEventListener(MouseEvent.CLICK, clickPlayAgain);
gameOver.submitScore.removeEventListener(MouseEvent.CLICK, submitScoreGameOver);
_channel.stop();
_channel.removeEventListener(Event.SOUND_COMPLETE, gameOverHandler);
removeChild(gameOver);
};
};
}
private function generatePowerUps(){
var _local1:Array;
var _local2:PowerUps;
if (((!(levelEndStatus)) && (!(gameEndStatus)))){
powerUpIndex = ((powerUpIndex + 1) % powerUpArray.length);
_local1 = powerUpArray[powerUpIndex];
if (_local1[0] == myPlane.upgradeCount){
powerUpIndex = ((powerUpIndex + 1) % powerUpArray.length);
_local1 = powerUpArray[powerUpIndex];
};
_local2 = PowerUpFactory.getPowerUps(_local1[0]);
_local2.init(_local1[1]);
container.addPowerUps(_local2);
};
}
private function addSkipListener(){
stage.stageFocusRect = false;
stage.focus = this;
stage.addEventListener(KeyboardEvent.KEY_DOWN, instruction);
}
public function instruction(_arg1:KeyboardEvent){
var _local2:Number;
_local2 = _arg1.keyCode;
switch (_local2){
case 32:
stage.removeEventListener(KeyboardEvent.KEY_DOWN, instruction);
stage.addEventListener(KeyboardEvent.KEY_DOWN, nextInstruction);
levelUp.gotoAndPlay(101);
break;
};
}
public function createLevelUp(){
clearGraphics();
if (levelUp == null){
levelUp = LevelUp.getInstance();
};
container.addChild(levelUp);
if (GParams.currentLevel != 0){
levelUp.gotoAndPlay(1);
} else {
levelUp.gotoAndStop(100);
};
levelUp.init();
levelUp.addEventListener(Event.ENTER_FRAME, checkAnimation);
_channel = levelUpSound.play();
_channel.addEventListener(Event.SOUND_COMPLETE, levelUpHandler);
}
public function completeBGSHandler(_arg1:Event){
_channel.removeEventListener(Event.SOUND_COMPLETE, completeBGSHandler);
_channel = bgs.play();
_channel.addEventListener(Event.SOUND_COMPLETE, completeBGSHandler);
}
public function onEnterFrame(_arg1:Event){
if (gameEndStatus){
gameEnd();
gameEndStatus = false;
return;
};
if (((!(levelEndStatus)) && (!(gameEndStatus)))){
myPlane.movePlane(mouseX, mouseY);
if (levelUpCounter < GParams.enemyLimit[GParams.currentLevel]){
checkEnemyInterval();
checkPowerUpInterval();
};
container.moveEnemies();
container.moveBullets();
container.movePowerUps();
container.checkEnemyBulletCollision();
container.checkHeroBulletCollision();
container.checkHeroEnemyCollision();
statistics.updateStats();
checkLevelUp();
};
}
public function createWelcome(){
clearGraphics();
welcomePage = Welcome.getInstance();
welcomePage.setChildIndex(welcomePage.ipwelcome, 2);
addChild(welcomePage);
welcomePage.x = 0;
welcomePage.y = 0;
welcomePage.ipwelcome.playGame.addEventListener(MouseEvent.CLICK, gotoLEVEL1);
welcomePage.ipwelcome.intro.addEventListener(MouseEvent.CLICK, gameMessage);
welcomePage.ipwelcome.highscore.addEventListener(MouseEvent.CLICK, fetchHighScore);
welcomePage.hs.backhs.addEventListener(MouseEvent.CLICK, playWelcome);
welcomePage.introframe.weaponIntro.gotoAndStop(1);
_channel = welcomeSound.play();
_channel.addEventListener(Event.SOUND_COMPLETE, welcomeHandler);
}
public function removeStatistics(){
if (statistics != null){
statistics.x = 1000;
};
}
public function removeYouWin(){
if (youWin != null){
if (this.contains(youWin)){
youWin.playAgain1.removeEventListener(MouseEvent.CLICK, clickPlayAgain);
youWin.submitScore.removeEventListener(MouseEvent.CLICK, submitScore);
_channel.stop();
_channel.removeEventListener(Event.SOUND_COMPLETE, youWinHandler);
removeChild(youWin);
};
};
}
private function checkMouseClick(_arg1:MouseEvent){
stage.stageFocusRect = false;
stage.focus = this;
}
public function generateEnemyArray(){
drone1IndexCounter = -1;
drone1TimerCounter = 0;
drone1MaxCounter = GParams.drone1MaxCounter[GParams.currentLevel];
drone1Groups = GParams.drone1Groups[GParams.currentLevel];
powerUpIndex = -1;
powerUpCounter = 0;
levelUpCounter = 0;
powerUpCounterIndex = 0;
powerUpMaxArray = GParams.powerUpMaxCounter[GParams.currentLevel];
powerUpArray = GParams.powerUps[GParams.currentLevel];
powerUpMaxCounter = powerUpMaxArray[powerUpCounterIndex];
levelEndStatus = false;
}
public function init(){
createSurfaceBg();
createMyPlane();
createStatistics();
generateEnemyArray();
addEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(MouseEvent.CLICK, checkMouseClick);
}
public function levelUpHandler(_arg1:Event){
_channel.removeEventListener(Event.SOUND_COMPLETE, levelUpHandler);
_channel = levelUpSound.play();
_channel.addEventListener(Event.SOUND_COMPLETE, levelUpHandler);
}
private function checkLevelUp(){
var _local1:Array;
_local1 = CrazyShooting.container.enemyArray;
trace(("levelUpCounter = " + levelUpCounter));
if (levelUpCounter >= GParams.enemyLimit[GParams.currentLevel]){
drone1TimerCounter = 0;
container.destroyAllEnemies();
if ((((_local1.length == 0)) && ((myPlane.currentFrame == 1)))){
levelEndStatus = true;
trace(("levelEndStatus after = " + levelEndStatus));
GParams.currentLevel = (GParams.currentLevel + 1);
_channel.stop();
_channel.removeEventListener(Event.SOUND_COMPLETE, completeBGSHandler);
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
if (GParams.currentLevel <= GParams.totalLevels){
createLevelUp();
} else {
createYouWin();
};
};
};
}
private function checkPowerUpInterval(){
trace(("powerUpCounter = " + powerUpCounter));
if (powerUpCounter > powerUpMaxCounter){
generatePowerUps();
powerUpCounterIndex = ((powerUpCounterIndex + 1) % powerUpMaxArray.length);
powerUpMaxCounter = powerUpMaxArray[powerUpCounterIndex];
};
}
public function youWinHandler(_arg1:Event){
_channel.removeEventListener(Event.SOUND_COMPLETE, youWinHandler);
_channel = youWinSound.play();
_channel.addEventListener(Event.SOUND_COMPLETE, youWinHandler);
}
private function createStatistics(){
if (statistics != null){
if (contains(statistics)){
removeChild(statistics);
};
};
statistics = Statistics.getInstance();
addChild(statistics);
statistics.init();
statistics.x = 0;
}
private function clearStatistics(){
if (statistics != null){
if (contains(statistics)){
removeChild(statistics);
statistics = null;
};
};
}
public function sendData(_arg1:String, _arg2:Number):Boolean{
var request:URLRequest;
var variables:URLVariables;
var playerName = _arg1;
var score = _arg2;
try {
request = new URLRequest("http://www.flasharcade.com/setscores.php");
request.method = URLRequestMethod.POST;
variables = new URLVariables();
variables.scoreName = playerName;
variables.scoreText = score;
variables.gameId = "ace029";
variables.gameName = "CrazyShooting";
request.data = variables;
sendToURL(request);
} catch(e:Error) {
youWin.setErrorMesg("Could not submit the score");
return (false);
} catch(e:SecurityError) {
youWin.setErrorMesg("Security Error ");
return (false);
};
return (true);
}
public function submitScore(_arg1:MouseEvent){
var _local2:String;
var _local3:Number;
youWin.setErrorMesg("");
_local2 = null;
_local2 = youWin.getPlayerName();
_local3 = gameScore;
if ((((_local2 == null)) || ((_local2 == "")))){
youWin.setErrorMesg("Please enter your name");
} else {
if (sendData(_local2, _local3) == false){
return;
};
displayHighScoreScreen();
};
}
public function checkAnimation(_arg1:Event){
if (levelUp.currentFrame == 100){
addSkipListener();
};
if (levelUp.currentFrame >= levelUp.endFrame){
levelUp.gotoAndStop(1);
levelUp.removeEventListener(Event.ENTER_FRAME, checkAnimation);
nextLevel();
};
}
public function createYouWin(){
clearGraphics();
clearStatistics();
myPlane = null;
youWin = YouWin.getInstance();
youWin.init();
youWin.updateScores();
addChild(youWin);
youWin.playAgain1.addEventListener(MouseEvent.CLICK, clickPlayAgain);
youWin.submitScore.addEventListener(MouseEvent.CLICK, submitScore);
_channel.stop();
_channel.removeEventListener(Event.SOUND_COMPLETE, completeBGSHandler);
_channel = youWinSound.play();
_channel.addEventListener(Event.SOUND_COMPLETE, youWinHandler);
}
public function keyUpEvent(_arg1:KeyboardEvent){
var _local2:Number;
_local2 = _arg1.keyCode;
switch (_local2){
case 87:
swapKeyDown = false;
myPlane.swapStatus = false;
break;
case 32:
missileKeyDown = false;
break;
};
}
public function keyDownEvent(_arg1:KeyboardEvent){
var _local2:Number;
_local2 = _arg1.keyCode;
switch (_local2){
case 87:
swapKeyDown = true;
break;
case 32:
missileKeyDown = true;
break;
};
}
public function displayHighScoreScreen(){
createWelcome();
fetchHighScore(null);
welcomePage.setChildIndex(welcomePage.hs, 2);
}
public function createMyPlane(){
if (myPlane == null){
myPlane = new MyPlane();
};
myPlane.init();
stage.addEventListener(MouseEvent.MOUSE_DOWN, shoot);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownEvent);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUpEvent);
container.addChild(myPlane);
}
public function submitScoreGameOver(_arg1:MouseEvent){
var _local2:String;
var _local3:Number;
gameOver.setErrorMesg("");
_local2 = null;
_local2 = gameOver.getPlayerName();
_local3 = gameScore;
if ((((_local2 == null)) || ((_local2 == "")))){
gameOver.setErrorMesg("Please enter your name");
} else {
if (sendGameOverData(_local2, _local3) == false){
return;
};
displayHighScoreScreen();
};
}
public function playWelcome(_arg1:MouseEvent){
welcomePage.introframe.backintro.removeEventListener(MouseEvent.CLICK, playWelcome);
welcomePage.introframe.weaponIntro.gotoAndStop(1);
welcomePage.setChildIndex(welcomePage.ipwelcome, 2);
}
public function welcomeHandler(_arg1:Event){
_channel.removeEventListener(Event.SOUND_COMPLETE, welcomeHandler);
_channel = welcomeSound.play();
_channel.addEventListener(Event.SOUND_COMPLETE, welcomeHandler);
}
public function gameEnd(){
clearGraphics();
myPlane = null;
gameOver = GameOver.getInstance();
addChild(gameOver);
gameOver.init();
gameOver.updateScores();
gameOver.playAgain1.addEventListener(MouseEvent.CLICK, clickPlayAgain);
gameOver.submitScore.addEventListener(MouseEvent.CLICK, submitScoreGameOver);
_channel.stop();
_channel.removeEventListener(Event.SOUND_COMPLETE, completeBGSHandler);
_channel = gameOverSound.play();
_channel.addEventListener(Event.SOUND_COMPLETE, gameOverHandler);
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function nextInstruction(_arg1:KeyboardEvent){
var _local2:Number;
_local2 = _arg1.keyCode;
switch (_local2){
case 32:
_channel.stop();
_channel.removeEventListener(Event.SOUND_COMPLETE, levelUpHandler);
_channel = bgs.play();
_channel.addEventListener(Event.SOUND_COMPLETE, completeBGSHandler);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, nextInstruction);
levelUp.gotoAndPlay(111);
break;
};
}
public function gameMessage(_arg1:MouseEvent){
welcomePage.setChildIndex(welcomePage.introframe, 2);
welcomePage.introframe.weaponIntro.gotoAndStop(1);
welcomePage.introframe.backintro.addEventListener(MouseEvent.CLICK, playWelcome);
}
private function completeHandler(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:URLLoader;
var _local5:String;
var _local6:Array;
_local3 = 0;
_local4 = URLLoader(_arg1.target);
_local5 = "";
_local6 = null;
if (_local4.data.data0 != undefined){
_local6 = _local4.data.data0.split("|", 3);
welcomePage.hs.player1.text = _local6[0];
welcomePage.hs.score1.text = _local6[1];
welcomePage.hs.date1.text = _local6[2];
};
if (_local4.data.data1 != undefined){
_local6 = _local4.data.data1.split("|", 3);
welcomePage.hs.player2.text = _local6[0];
welcomePage.hs.score2.text = _local6[1];
welcomePage.hs.date2.text = _local6[2];
};
if (_local4.data.data2 != undefined){
_local6 = _local4.data.data2.split("|", 3);
welcomePage.hs.player3.text = _local6[0];
welcomePage.hs.score3.text = _local6[1];
welcomePage.hs.date3.text = _local6[2];
};
if (_local4.data.data3 != undefined){
_local6 = _local4.data.data3.split("|", 3);
welcomePage.hs.player4.text = _local6[0];
welcomePage.hs.score4.text = _local6[1];
welcomePage.hs.date4.text = _local6[2];
};
if (_local4.data.data4 != undefined){
_local6 = _local4.data.data4.split("|", 3);
welcomePage.hs.player5.text = _local6[0];
welcomePage.hs.score5.text = _local6[1];
welcomePage.hs.date5.text = _local6[2];
};
if (_local4.data.data5 != undefined){
_local6 = _local4.data.data5.split("|", 3);
welcomePage.hs.player6.text = _local6[0];
welcomePage.hs.score6.text = _local6[1];
welcomePage.hs.date6.text = _local6[2];
};
if (_local4.data.data6 != undefined){
_local6 = _local4.data.data6.split("|", 3);
welcomePage.hs.player7.text = _local6[0];
welcomePage.hs.score7.text = _local6[1];
welcomePage.hs.date7.text = _local6[2];
};
if (_local4.data.data7 != undefined){
_local6 = _local4.data.data7.split("|", 3);
welcomePage.hs.player8.text = _local6[0];
welcomePage.hs.score8.text = _local6[1];
welcomePage.hs.date8.text = _local6[2];
};
if (_local4.data.data8 != undefined){
_local6 = _local4.data.data8.split("|", 3);
welcomePage.hs.player9.text = _local6[0];
welcomePage.hs.score9.text = _local6[1];
welcomePage.hs.date9.text = _local6[2];
};
if (_local4.data.data9 != undefined){
_local6 = _local4.data.data9.split("|", 3);
welcomePage.hs.player10.text = _local6[0];
welcomePage.hs.score10.text = _local6[1];
welcomePage.hs.date10.text = _local6[2];
};
}
public function clickPlayAgain(_arg1:MouseEvent){
clearGraphics();
createWelcome();
}
private function removeBg(){
if (surfaceBg != null){
if (container.contains(surfaceBg)){
container.removeChild(surfaceBg);
};
};
}
public function clearGraphics(){
container.removeAllEnemies();
container.removeAllUserBullets();
container.removeAllEnemyBullets();
container.removeAllMissiles();
container.removeAllPowerUps();
removeWelcome();
removePlane();
removeBg();
removeLevelUp();
removeGameOver();
removeYouWin();
removeStatistics();
removeEventListener(MouseEvent.CLICK, checkMouseClick);
}
}
}//package
Section 52
//Drone2 (Drone2)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class Drone2 extends Enemy {
public var hitAreaClip:MovieClip;
public var health:int;// = 10
public var bulletOrigin2:MovieClip;
public var hitClip:MovieClip;
private var heroPlane:MyPlane;
public var bulletOrigin:MovieClip;
public var dieClip:MovieClip;
public function Drone2(){
health = 10;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
type = 2;
}
override public function init(){
health = GParams.DRONETWOHEALTH;
heroPlane = CrazyShooting.myPlane;
shoot1Count = 0;
shoot1CountMax = (20 + Math.floor((Math.random() * 40)));
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
CrazyShooting.levelUpCounter++;
CrazyShooting.powerUpCounter++;
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removeEnemy(this);
};
};
};
}
override public function moveEnemy(){
if (currentLabel != "die"){
super.moveEnemy();
shoot1Count = (shoot1Count + 1);
if (shoot1Count == shoot1CountMax){
shoot1Count = 0;
if (this.x > heroPlane.x){
shootOne();
shoot1CountMax = (20 + Math.floor((Math.random() * 20)));
};
};
};
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
health = (health - 15);
if (health > 0){
if (currentLabel != "hit"){
addEventListener(Event.ENTER_FRAME, playHit);
gotoAndStop("hit");
};
} else {
if (currentLabel != "die"){
addEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.gameScore = (CrazyShooting.gameScore + 1);
gotoAndStop("die");
};
};
}
public function shootOne(){
var _local1:Point;
var _local2:Point;
_local1 = new Point();
_local1.x = this.bulletOrigin.x;
_local1.y = this.bulletOrigin.y;
_local1 = localToGlobal(_local1);
this.bulletOrigin.gotoAndPlay(2);
CrazyShooting.container.generateBullets(0, _local1);
_local2 = new Point();
_local2.x = this.bulletOrigin2.x;
_local2.y = this.bulletOrigin2.y;
_local2 = localToGlobal(_local2);
this.bulletOrigin2.gotoAndPlay(2);
CrazyShooting.container.generateBullets(0, _local2);
}
private function playHit(_arg1:Event){
if (currentLabel == "hit"){
if (this.hitClip != null){
if (this.hitClip.currentFrame >= this.hitClip.totalFrames){
this.hitClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playHit);
};
};
};
}
}
}//package
Section 53
//Drone3 (Drone3)
package {
import flash.events.*;
import flash.display.*;
public class Drone3 extends Enemy {
private var speedy:int;
private var speedx:int;
public var hitAreaClip:MovieClip;
private var trackCounter:Boolean;// = false
private var speed:int;// = 20
public var health:int;// = 10
public var hitClip:MovieClip;
private var heroPlane:MyPlane;
private var angle:int;
public var dieClip:MovieClip;
public function Drone3(){
health = 10;
trackCounter = false;
speed = 20;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
type = 3;
}
override public function init(){
health = GParams.DRONETHREEHEALTH;
heroPlane = CrazyShooting.myPlane;
}
private function playBlast(_arg1:Event){
this.rotation = angle;
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
CrazyShooting.levelUpCounter++;
CrazyShooting.powerUpCounter++;
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removeEnemy(this);
};
};
};
}
override public function moveEnemy(){
super.moveEnemy();
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
health = (health - 25);
if (health > 0){
if (currentLabel != "hit"){
addEventListener(Event.ENTER_FRAME, playHit);
gotoAndStop("hit");
};
} else {
if (currentLabel != "die"){
addEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.gameScore = (CrazyShooting.gameScore + 1);
gotoAndStop("die");
};
};
}
private function playHit(_arg1:Event){
this.rotation = angle;
if (currentLabel == "hit"){
if (this.hitClip != null){
if (this.hitClip.currentFrame >= this.hitClip.totalFrames){
this.hitClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playHit);
};
};
};
}
}
}//package
Section 54
//Drone4 (Drone4)
package {
import flash.events.*;
import flash.display.*;
public class Drone4 extends Enemy {
private var speedy:int;
private var speedx:int;
public var hitAreaClip:MovieClip;
private var trackCounter:Boolean;// = false
private var speed:int;// = 20
public var health:int;// = 100
public var hitClip:MovieClip;
private var heroPlane:MyPlane;
private var angle:int;
public var dieClip:MovieClip;
public function Drone4(){
health = 100;
trackCounter = false;
speed = 20;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
type = 13;
}
override public function init(){
health = GParams.DRONEFOURHEALTH;
heroPlane = CrazyShooting.myPlane;
}
private function playBlast(_arg1:Event){
this.rotation = angle;
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removeEnemy(this);
};
};
};
}
override public function moveEnemy(){
var _local1:Number;
super.moveEnemy();
_local1 = Math.ceil((x - heroPlane.x));
if (_local1 < 100){
health = 0;
heroPlane.missileHit();
hit();
};
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
health = (health - 6);
if (health > 0){
if (currentLabel != "hit"){
addEventListener(Event.ENTER_FRAME, playHit);
gotoAndStop("hit");
};
} else {
if (currentLabel != "die"){
addEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.gameScore = (CrazyShooting.gameScore + 1);
gotoAndStop("die");
};
};
}
private function playHit(_arg1:Event){
this.rotation = angle;
if (currentLabel == "hit"){
if (this.hitClip != null){
if (this.hitClip.currentFrame >= this.hitClip.totalFrames){
this.hitClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playHit);
};
};
};
}
}
}//package
Section 55
//Drones (Drones)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class Drones extends Enemy {
public var hitAreaClip:MovieClip;
public var health:int;// = 10
public var hitClip:MovieClip;
private var heroPlane:MyPlane;
public var bulletOrigin:MovieClip;
public var dieClip:MovieClip;
public function Drones(){
health = 10;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
type = 1;
}
override public function init(){
shoot1Count = (65 + (Math.random() * 5));
shoot1CountMax = 80;
health = GParams.DRONEONEHEALTH;
heroPlane = CrazyShooting.myPlane;
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
CrazyShooting.levelUpCounter++;
CrazyShooting.powerUpCounter++;
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removeEnemy(this);
};
};
};
}
override public function moveEnemy(){
var _local1:int;
if (currentLabel != "die"){
super.moveEnemy();
shoot1Count = (shoot1Count + 1);
if (shoot1Count == shoot1CountMax){
_local1 = Math.abs((CrazyShooting.myPlane.y - this.y));
if ((((_local1 <= 150)) && ((this.x > heroPlane.x)))){
shootOne();
shoot1Count = (60 + (Math.random() * 5));
};
};
};
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
health = (health - 15);
if (health > 0){
if (currentLabel != "hit"){
addEventListener(Event.ENTER_FRAME, playHit);
gotoAndStop("hit");
};
} else {
if (currentLabel != "die"){
addEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.gameScore = (CrazyShooting.gameScore + 1);
gotoAndStop("die");
};
};
}
public function shootOne(){
var _local1:Point;
_local1 = new Point();
_local1.x = this.bulletOrigin.x;
_local1.y = this.bulletOrigin.y;
_local1 = localToGlobal(_local1);
this.bulletOrigin.gotoAndPlay(2);
CrazyShooting.container.generateBullets(0, _local1);
}
private function playHit(_arg1:Event){
if (currentLabel == "hit"){
if (this.hitClip != null){
if (this.hitClip.currentFrame >= this.hitClip.totalFrames){
this.hitClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playHit);
};
};
};
}
}
}//package
Section 56
//Enemy (Enemy)
package {
import flash.geom.*;
import flash.display.*;
public class Enemy extends MovieClip {
protected var currentPos:Point;
public var bullettype:int;// = 0
protected var shoot1Count:uint;// = 0
public var moveObject:Movement;// = null
public var movetype:int;// = 0
public var type:int;// = 0
protected var shoot1CountMax:uint;// = 10
protected var shootType:int;// = 0
public static var SHOOT_ANGULAR = 2;
public static var SHOOT_STRAIGHT = 1;
public static var SHOOT_ANGULAR_TARGET = 3;
public function Enemy(){
movetype = 0;
bullettype = 0;
moveObject = null;
currentPos = new Point();
shootType = 0;
type = 0;
shoot1Count = 0;
shoot1CountMax = 10;
super();
}
public function setMType(_arg1:int, _arg2:int){
this.movetype = _arg1;
moveObject = MovementFactory.getMovementObject(_arg1);
trace((((" object is : " + moveObject) + " mtype : ") + _arg1));
moveObject.init(this.x, this.y, _arg2);
}
public function init(){
}
public function shoot(){
}
public function moveEnemy(){
if (moveObject.getNextPosition()){
this.x = moveObject.currentPos.x;
this.y = moveObject.currentPos.y;
} else {
removeEnemy();
};
}
public function removeEnemy(){
CrazyShooting.container.removeEnemy(this);
}
public function setBulletType(){
}
public function removeAllListeners(){
}
}
}//package
Section 57
//EnemyBeam (EnemyBeam)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class EnemyBeam extends Bullet {
private var beamSpeed:uint;// = 10
private var rad:int;
private var blastStatus:Boolean;// = false
private var beamLine:Line;
public var fireAnim:MovieClip;
public var beamAnim:MovieClip;
private var vx:int;
private var vy:int;
public function EnemyBeam(){
beamSpeed = 10;
blastStatus = false;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
override public function init(_arg1:Point, _arg2:int=8, _arg3:int=0){
var _local4:Number;
super.init(_arg1);
x = _arg1.x;
y = _arg1.y;
_local4 = ((_arg3 / 180) * Math.PI);
vx = (Math.cos(_local4) * beamSpeed);
vy = (Math.sin(_local4) * beamSpeed);
beamAnim.gotoAndPlay(1);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
override public function moveBullet(){
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
private function onEnterFrame(_arg1:Event){
if (!blastStatus){
if (beamAnim != null){
if (beamAnim.currentFrame >= beamAnim.totalFrames){
clearBeam();
return;
};
};
};
}
public function clearBeam(){
blastStatus = true;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
gotoAndStop(1);
(this.parent as Container).removeBullet(this);
}
}
}//package
Section 58
//EnemyData (EnemyData)
package {
import flash.geom.*;
public class EnemyData {
private var position:Point;
public function EnemyData(_arg1:Point){
position = new Point();
super();
position.x = _arg1.x;
position.y = _arg1.y;
}
public function get pos():Point{
return (position);
}
}
}//package
Section 59
//EnemyFactory (EnemyFactory)
package {
public class EnemyFactory {
private static var enemyPlasmaIndex:int = -1;
public static var enemyPlasmaArray:Array = new Array(10);
private static var enemyGuardianIndex:int = -1;
public static var enemyGuardianArray:Array = new Array(10);
private static var enemySenitalIndex:int = -1;
private static var enemySuperGuardianIndex:int = -1;
private static var enemyAsteroidIndex:int = -1;
private static var enemyDrone2Index:int = -1;
public static var enemySuperGuardianArray:Array = new Array(3);
public static var enemyDrone2Array:Array = new Array(30);
public static var enemyAsteroidArray:Array = new Array(10);
public static var enemySenitalArray:Array = new Array(3);
private static var enemyDroneIndex:int = -1;
private static var enemyDrone3Index:int = -1;
public static var enemyDroneArray:Array = new Array(30);
public static var enemyDrone3Array:Array = new Array(10);
private static var enemyBlackHoleIndex:int = -1;
private static var enemyOverlordIndex:int = -1;
public static var enemyBlackHoleArray:Array = new Array(10);
public static var enemyOverlordArray:Array = new Array(10);
private static var enemyFlameBugIndex:int = -1;
public static var enemyFlameBugArray:Array = new Array(10);
public static var enemyDrone4Array:Array = new Array(10);
public static var enemyIonStormArray:Array = new Array(10);
private static var enemyIonStormIndex:int = -1;
private static var enemyDrone4Index:int = -1;
private static function getEnemyGuardian():Enemy{
enemyGuardianIndex = ((enemyGuardianIndex + 1) % enemyGuardianArray.length);
if (enemyGuardianArray[enemyGuardianIndex] == null){
enemyGuardianArray[enemyGuardianIndex] = new Guardians();
};
return (enemyGuardianArray[enemyGuardianIndex]);
}
private static function getEnemyDrone2():Enemy{
enemyDrone2Index = ((enemyDrone2Index + 1) % enemyDrone2Array.length);
if (enemyDrone2Array[enemyDrone2Index] == null){
enemyDrone2Array[enemyDrone2Index] = new Drone2();
};
return (enemyDrone2Array[enemyDrone2Index]);
}
private static function getEnemyDrone3():Enemy{
enemyDrone3Index = ((enemyDrone3Index + 1) % enemyDrone3Array.length);
if (enemyDrone3Array[enemyDrone3Index] == null){
enemyDrone3Array[enemyDrone3Index] = new Drone3();
};
return (enemyDrone3Array[enemyDrone3Index]);
}
private static function getEnemyDrone4():Enemy{
enemyDrone4Index = ((enemyDrone4Index + 1) % enemyDrone4Array.length);
if (enemyDrone4Array[enemyDrone4Index] == null){
enemyDrone4Array[enemyDrone4Index] = new Drone4();
};
return (enemyDrone4Array[enemyDrone4Index]);
}
private static function getEnemyAsteroid():Enemy{
enemyAsteroidIndex = ((enemyAsteroidIndex + 1) % enemyAsteroidArray.length);
if (enemyAsteroidArray[enemyAsteroidIndex] == null){
enemyAsteroidArray[enemyAsteroidIndex] = new Asteroids();
};
return (enemyAsteroidArray[enemyAsteroidIndex]);
}
private static function getEnemyIonStorm():Enemy{
enemyIonStormIndex = ((enemyIonStormIndex + 1) % enemyIonStormArray.length);
if (enemyIonStormArray[enemyIonStormIndex] == null){
enemyIonStormArray[enemyIonStormIndex] = new IonStorm();
};
return (enemyIonStormArray[enemyIonStormIndex]);
}
private static function getEnemyPlasma():Enemy{
enemyPlasmaIndex = ((enemyPlasmaIndex + 1) % enemyPlasmaArray.length);
if (enemyPlasmaArray[enemyPlasmaIndex] == null){
enemyPlasmaArray[enemyPlasmaIndex] = new PlasmaBug();
};
return (enemyPlasmaArray[enemyPlasmaIndex]);
}
private static function getEnemyFlameBug():Enemy{
enemyFlameBugIndex = ((enemyFlameBugIndex + 1) % enemyFlameBugArray.length);
if (enemyFlameBugArray[enemyFlameBugIndex] == null){
enemyFlameBugArray[enemyFlameBugIndex] = new FlameBug();
};
return (enemyFlameBugArray[enemyFlameBugIndex]);
}
private static function getEnemyOverlord():Enemy{
enemyOverlordIndex = ((enemyOverlordIndex + 1) % enemyOverlordArray.length);
if (enemyOverlordArray[enemyOverlordIndex] == null){
enemyOverlordArray[enemyOverlordIndex] = new Overlords();
};
return (enemyOverlordArray[enemyOverlordIndex]);
}
private static function getEnemyBlackHole():Enemy{
enemyBlackHoleIndex = ((enemyBlackHoleIndex + 1) % enemyBlackHoleArray.length);
if (enemyBlackHoleArray[enemyBlackHoleIndex] == null){
enemyBlackHoleArray[enemyBlackHoleIndex] = new MiniBlackHole();
};
return (enemyBlackHoleArray[enemyBlackHoleIndex]);
}
private static function getEnemyDrone():Enemy{
enemyDroneIndex = ((enemyDroneIndex + 1) % enemyDroneArray.length);
if (enemyDroneArray[enemyDroneIndex] == null){
enemyDroneArray[enemyDroneIndex] = new Drones();
};
return (enemyDroneArray[enemyDroneIndex]);
}
private static function getEnemySenitalTurret():Enemy{
enemySenitalIndex = ((enemySenitalIndex + 1) % enemySenitalArray.length);
if (enemySenitalArray[enemySenitalIndex] == null){
enemySenitalArray[enemySenitalIndex] = new SenitalTurrets();
};
return (enemySenitalArray[enemySenitalIndex]);
}
public static function getEnemy(_arg1):Enemy{
switch (_arg1){
case 1:
return (getEnemyDrone());
case 2:
return (getEnemyDrone2());
case 3:
return (getEnemyDrone3());
case 4:
return (getEnemyPlasma());
case 5:
return (getEnemyOverlord());
case 6:
return (getEnemyGuardian());
case 7:
return (getEnemyAsteroid());
case 8:
return (getEnemyIonStorm());
case 9:
return (getEnemyBlackHole());
case 10:
return (getEnemyFlameBug());
case 11:
return (getEnemySuperGuardian());
case 12:
return (getEnemySenitalTurret());
case 13:
return (getEnemyDrone4());
default:
return (null);
};
}
private static function getEnemySuperGuardian():Enemy{
enemySuperGuardianIndex = ((enemySuperGuardianIndex + 1) % enemySuperGuardianArray.length);
if (enemySuperGuardianArray[enemySuperGuardianIndex] == null){
enemySuperGuardianArray[enemySuperGuardianIndex] = new SuperGuardians();
};
return (enemySuperGuardianArray[enemySuperGuardianIndex]);
}
}
}//package
Section 60
//enemyFire (enemyFire)
package {
import flash.display.*;
public dynamic class enemyFire extends MovieClip {
}
}//package
Section 61
//FlameBug (FlameBug)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class FlameBug extends Enemy {
public var hitAreaClip:MovieClip;
public var health:int;// = 100
public var hitClip:MovieClip;
private var heroPlane:MyPlane;// = null
public var bulletOrigin:BulletOne;
public var dieClip:MovieClip;
public function FlameBug(){
health = 100;
heroPlane = null;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
override public function init(){
type = 10;
shoot1Count = 0;
shoot1CountMax = 25;
health = GParams.FLAMEBUGHEALTH;
heroPlane = CrazyShooting.myPlane;
heroPlane.surfaceEnemyState = true;
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
heroPlane.surfaceEnemyState = false;
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removeEnemy(this);
};
};
};
}
override public function moveEnemy(){
var _local1:int;
var _local2:int;
var _local3:int;
if (currentLabel != "die"){
heroPlane.surfaceEnemyState = true;
super.moveEnemy();
shoot1Count = (shoot1Count + 1);
if (shoot1Count == shoot1CountMax){
shoot1Count = 0;
heroPlane = CrazyShooting.myPlane;
_local1 = (heroPlane.y - y);
_local2 = (heroPlane.x - x);
_local3 = ((Math.atan((_local1 / _local2)) / (Math.PI / 180)) - 180);
shootOne(_local3);
};
};
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
override public function removeAllListeners(){
}
public function hit(){
health = (health - 1);
trace(("flame bug health = " + health));
if (health > 0){
if (currentLabel != "hit"){
addEventListener(Event.ENTER_FRAME, playHit);
gotoAndStop("hit");
};
} else {
if (currentLabel != "die"){
CrazyShooting.gameScore = (CrazyShooting.gameScore + 1);
addEventListener(Event.ENTER_FRAME, playBlast);
gotoAndStop("die");
};
};
}
public function shootOne(_arg1:int){
var _local2:Point;
_local2 = new Point();
_local2.x = this.bulletOrigin.x;
_local2.y = this.bulletOrigin.y;
_local2 = localToGlobal(_local2);
trace((" beam added at : " + _local2));
CrazyShooting.container.generateBullets(4, _local2, _arg1);
}
private function playHit(_arg1:Event){
if (currentLabel == "hit"){
if (this.hitClip != null){
if (this.hitClip.currentFrame >= this.hitClip.totalFrames){
this.hitClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playHit);
};
};
};
}
}
}//package
Section 62
//GameOver (GameOver)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
public class GameOver extends MovieClip {
public var playAgain1:SimpleButton;
public var errormesg:TextField;
var urlPlayMore:String;// = "http://www.flasharcade.com"
var requestPlayMore:URLRequest;// = null
public var submitScore:SimpleButton;
public var endFrame:Boolean;// = false
public var playMore:SimpleButton;
public var gameScore:TextField;
public var player:TextField;
private static var gameOver:GameOver = null;
public function GameOver(){
urlPlayMore = "http://www.flasharcade.com";
requestPlayMore = null;
endFrame = false;
super();
}
public function getPlayerName():String{
var _local1:String;
_local1 = player.text;
if (_local1 == null){
return (null);
};
errormesg.text = "";
return (_local1);
}
public function init(){
gotoAndStop(1);
requestPlayMore = new URLRequest(urlPlayMore);
playMore.addEventListener(MouseEvent.CLICK, handleClick);
}
public function handleClick(_arg1:MouseEvent){
var event = _arg1;
try {
navigateToURL(requestPlayMore, "_blank");
} catch(e:Error) {
};
}
public function updateScores(){
CrazyShooting.gameScore = Math.ceil(CrazyShooting.gameScore);
gameScore.text = CrazyShooting.gameScore.toString();
}
public function removeAllListener(){
playMore.removeEventListener(MouseEvent.CLICK, handleClick);
}
public function resetData(){
gameScore.text = " ";
player.text = "";
errormesg.text = " ";
}
public function setErrorMesg(_arg1:String){
errormesg.text = _arg1;
}
public static function getInstance():GameOver{
if (gameOver == null){
gameOver = new (GameOver);
};
gameOver.resetData();
return (gameOver);
}
}
}//package
Section 63
//GameOverSound (GameOverSound)
package {
import flash.media.*;
public class GameOverSound extends Sound {
}
}//package
Section 64
//GParams (GParams)
package {
import flash.geom.*;
public class GParams {
public static var levelOneEnemies:Array = new Array(new GroupData(4, 1, 8, new Point(600, 100), 1), new GroupData(2, 2, 4, new Point(600, 150), 2), new GroupData(2, 1, 8, new Point(600, 200), 1), new GroupData(2, 2, 4, new Point(600, 200), 1), new GroupData(1, 3, 10, new Point(600, 100), 1), new GroupData(1, 7, 10, new Point(600, 400), 1), new GroupData(1, 4, 4, new Point(600, 250), 1), new GroupData(1, 5, 4, new Point(600, 250), 1), new GroupData(4, 1, 8, new Point(600, 100), 1), new GroupData(2, 2, 4, new Point(600, 150), 2), new GroupData(1, 8, 8, new Point(600, 300), 1), new GroupData(1, 10, 8, new Point(600, 450), 1), new GroupData(2, 1, 8, new Point(600, 200), 1), new GroupData(2, 2, 4, new Point(600, 200), 1), new GroupData(1, 6, 9, new Point(600, 250), 1), new GroupData(2, 2, 4, new Point(600, 150), 1), new GroupData(1, 1, 8, new Point(600, 100), 1));
public static var set6Groups:Array = new Array([new GroupData(4, 1, 12, new Point(650, 200), 0, 150, 0), new GroupData(4, 1, 13, new Point(650, 350), 0, 150, 0)], [new GroupData(4, 1, 12, new Point(650, 200), 0, 150, 0), new GroupData(4, 1, 13, new Point(650, 350), 0, 150, 0)], [new GroupData(1, 7, 8, new Point(650, 250), 0, 150, 0)], [new GroupData(2, 2, 8, new Point(650, 100), 0, 100, 300), new GroupData(1, 7, 8, new Point(650, 200), 0, 0, 0)], [new GroupData(1, 10, 8, new Point(650, 490), 0, 150, 0)], [new GroupData(1, 2, 4, new Point(650, 100), 0, 150, 0), new GroupData(1, 2, 5, new Point(650, 350), 0, 150, 0)], [new GroupData(3, 1, 11, new Point(600, 600), 0, 200, 0), new GroupData(3, 1, 11, new Point(600, 0), 0, 200, 0)], [new GroupData(1, 7, 8, new Point(650, 150), 0, 150, 0)], [new GroupData(2, 2, 2, new Point(600, 100), 0, 150, -25), new GroupData(2, 2, 1, new Point(600, 400), 0, 150, -25)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 100, 100)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 0, 100)], [new GroupData(1, 7, 8, new Point(650, 250), 0, 150, 0)], [new GroupData(1, 6, 9, new Point(700, 250), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 150, 0), new GroupData(1, 5, 9, new Point(700, 250), 0, 150, 0), new GroupData(2, 1, 8, new Point(650, 400), 0, 150, 0)], [new GroupData(1, 8, 8, new Point(650, 250), 0, 150, 0)], [new GroupData(4, 2, 8, new Point(600, 75), 0, 150, 150)], [new GroupData(1, 7, 8, new Point(650, 350), 0, 150, 0)], [new GroupData(2, 2, 8, new Point(650, 100), 0, 100, 300), new GroupData(1, 7, 8, new Point(650, 200), 0, 0, 0)], [new GroupData(1, 10, 8, new Point(650, 490), 0, 150, 0)], [new GroupData(5, 1, 8, new Point(600, 75), 0, 0, 100), new GroupData(5, 1, 8, new Point(700, 425), 0, 0, -100)], [new GroupData(1, 5, 9, new Point(700, 250), 0, 150, 0)]);
public static var currentLevel:int = 0;
public static var set4Groups:Array = new Array([new GroupData(1, 10, 8, new Point(650, 480), 0, 150, 0)], [new GroupData(4, 1, 8, new Point(650, 100), 0, -50, 100), new GroupData(4, 1, 8, new Point(600, 400), 0, -50, -100)], [new GroupData(2, 2, 2, new Point(550, 100), 0, 150, -25), new GroupData(2, 2, 2, new Point(650, 250), 0, 150, -25)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 450), 0, 100, 125), new GroupData(1, 2, 8, new Point(650, 250), 0, 200, 0)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(2, 2, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 2, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 100, 125), new GroupData(2, 1, 8, new Point(650, 450), 0, 100, -125)], [new GroupData(2, 2, 8, new Point(650, 50), 0, 0, 100), new GroupData(2, 1, 8, new Point(650, 300), 0, 0, 100)], [new GroupData(2, 1, 8, new Point(650, 50), 0, 0, 100), new GroupData(2, 2, 8, new Point(650, 300), 0, 0, 100)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 100, 100)], [new GroupData(4, 2, 4, new Point(650, 100), 0, 150, 0), new GroupData(4, 1, 5, new Point(650, 350), 0, 150, 0)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(5, 1, 2, new Point(650, 100), 0, 150, 50), new GroupData(5, 1, 1, new Point(650, 400), 0, 150, -50)], [new GroupData(1, 10, 8, new Point(650, 490), 0, 150, 0)], [new GroupData(2, 2, 8, new Point(650, 100), 0, -100, 100), new GroupData(2, 1, 8, new Point(650, 450), 0, -100, -125)], [new GroupData(5, 1, 2, new Point(650, 250), 0, 150, 0), new GroupData(5, 1, 1, new Point(650, 200), 0, 150, 0)], [new GroupData(1, 1, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 100, 75), new GroupData(2, 1, 8, new Point(650, 400), 0, 100, -75)], [new GroupData(4, 1, 8, new Point(650, 50), 0, 0, 125), new GroupData(1, 1, 8, new Point(650, 300), 0, 150, 0)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(3, 1, 8, new Point(650, 100), 0, 100, 75), new GroupData(3, 1, 8, new Point(650, 400), 0, 100, -75)], [new GroupData(2, 1, 8, new Point(600, 250), 0, -150, 0), new GroupData(3, 2, 8, new Point(650, 100), 0, -100, 75), new GroupData(3, 1, 8, new Point(650, 400), 0, -100, -75)], [new GroupData(2, 1, 6, new Point(650, 100), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 125), new GroupData(1, 2, 8, new Point(600, 450), 0, 300, 0), new GroupData(2, 1, 8, new Point(600, 50), 0, 300, 200)], [new GroupData(3, 1, 13, new Point(650, 400), 0, 150, 0), new GroupData(3, 1, 12, new Point(650, 100), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(650, 50), 0, 0, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(1, 10, 8, new Point(600, 490), 0, 150, 0)], [new GroupData(3, 1, 2, new Point(600, 100), 0, 200, -25), new GroupData(3, 1, 2, new Point(650, 300), 0, 150, -25)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 100, 125), new GroupData(2, 1, 8, new Point(650, 450), 0, 100, -125)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 450), 0, 100, 125), new GroupData(2, 2, 8, new Point(650, 250), 0, 200, 0)]);
public static var stageDimension:Point = new Point(600, 500);
public static var set8Groups:Array = new Array([new GroupData(3, 2, 12, new Point(650, 150), 0, 150, 0), new GroupData(3, 2, 13, new Point(650, 400), 0, 150, 0)], [new GroupData(2, 2, 8, new Point(650, 100), 0, 100, 300), new GroupData(1, 13, 8, new Point(650, 200), 0, 0, 0)], [new GroupData(4, 1, 2, new Point(600, 100), 0, 150, 100)], [new GroupData(4, 2, 8, new Point(600, 75), 0, 100, 100)], [new GroupData(1, 4, 8, new Point(650, 480), 0, 150, 0)], [new GroupData(3, 1, 13, new Point(650, 400), 0, 150, 0), new GroupData(3, 1, 12, new Point(650, 100), 0, 150, 0)], [new GroupData(1, 2, 6, new Point(650, 100), 0, 0, 300), new GroupData(1, 2, 7, new Point(650, 400), 0, 0, 300)], [new GroupData(3, 1, 2, new Point(600, 100), 0, 200, -25), new GroupData(3, 1, 2, new Point(650, 300), 0, 150, -25)], [new GroupData(1, 5, 9, new Point(700, 250), 0, 150, 0)], [new GroupData(2, 2, 8, new Point(650, 100), 0, 100, 300), new GroupData(1, 13, 8, new Point(650, 200), 0, 0, 0)], [new GroupData(4, 1, 8, new Point(650, 50), 0, 0, 125), new GroupData(1, 1, 8, new Point(650, 300), 0, 150, 0)], [new GroupData(1, 10, 8, new Point(650, 480), 0, 150, 0)], [new GroupData(1, 1, 8, new Point(600, 250), 0, 0, 0), new GroupData(2, 1, 8, new Point(650, 50), 0, -100, 75), new GroupData(2, 1, 8, new Point(650, 450), 0, -100, -75)], [new GroupData(3, 2, 8, new Point(650, 100), 0, 100, 75), new GroupData(3, 2, 8, new Point(650, 400), 0, 100, -75)], [new GroupData(1, 7, 8, new Point(650, 250), 0, 150, 0)], [new GroupData(1, 2, 6, new Point(650, 100), 0, 0, 300), new GroupData(1, 2, 7, new Point(650, 400), 0, 0, 300)], [new GroupData(2, 2, 8, new Point(650, 100), 0, 100, 300), new GroupData(1, 7, 8, new Point(650, 200), 0, 0, 0)], [new GroupData(3, 1, 12, new Point(650, 150), 0, 150, 0)], [new GroupData(1, 4, 8, new Point(650, 480), 0, 150, 0)], [new GroupData(3, 7, 8, new Point(650, 50), 0, 150, 200)], [new GroupData(1, 6, 9, new Point(700, 250), 0, 0, 0)], [new GroupData(2, 2, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 2, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(2, 1, 6, new Point(650, 100), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 125), new GroupData(1, 2, 8, new Point(600, 450), 0, 300, 0), new GroupData(2, 1, 8, new Point(600, 50), 0, 300, 200)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 100, 100)], [new GroupData(2, 2, 8, new Point(650, 100), 0, 100, 300), new GroupData(1, 13, 8, new Point(650, 200), 0, 0, 0)], [new GroupData(3, 1, 2, new Point(600, 100), 0, 200, -25), new GroupData(3, 1, 2, new Point(650, 300), 0, 150, -25)], [new GroupData(1, 9, 8, new Point(650, 250), 0, 150, 0)], [new GroupData(4, 1, 2, new Point(600, 100), 0, 150, 0), new GroupData(4, 1, 1, new Point(600, 400), 0, 150, 0)], [new GroupData(3, 1, 8, new Point(650, 100), 0, 100, 75), new GroupData(3, 1, 8, new Point(650, 400), 0, 100, -75)], [new GroupData(1, 7, 8, new Point(650, 250), 0, 150, 0)]);
public static var enemyLimit = [80, 90, 100, 110, 120, 140, 160, 180, 250];
public static var powerUpMaxCounter = [[15, 45, 60, 75, 90, 105], [10, 20, 30, 45, 60, 75, 90, 105, 120, 200], [10, 20, 30, 45, 60, 75, 90, 105, 150, 200], [10, 20, 30, 45, 60, 75, 85, 105, 120, 155, 200], [10, 20, 30, 45, 60, 75, 90, 105, 120, 135, 155, 200], [10, 20, 30, 45, 60, 75, 90, 105, 120, 135, 160, 200], [10, 20, 30, 45, 60, 75, 90, 105, 120, 135, 150, 175, 190, 200], [10, 20, 30, 45, 60, 75, 90, 105, 120, 135, 150, 175, 190, 210], [10, 20, 30, 45, 60, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 210]];
public static var SIMPLE_GROUP:uint = 1;
public static var set2Groups:Array = new Array([new GroupData(3, 1, 4, new Point(650, 100), 0, 150, 0), new GroupData(3, 1, 5, new Point(650, 350), 0, 150, 0)], [new GroupData(1, 2, 7, new Point(650, 450), 0, 0, 300), new GroupData(1, 2, 6, new Point(650, 100), 0, 0, 300)], [new GroupData(2, 2, 8, new Point(650, 50), 0, 100, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 450), 0, 100, 125), new GroupData(1, 2, 8, new Point(650, 250), 0, 200, 0)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(2, 2, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 2, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(2, 1, 6, new Point(650, 100), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 125), new GroupData(1, 2, 8, new Point(600, 450), 0, 300, 0), new GroupData(2, 1, 8, new Point(600, 50), 0, 300, 200)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 100, 100)], [new GroupData(3, 1, 13, new Point(650, 400), 0, 150, 0), new GroupData(3, 1, 12, new Point(650, 100), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(650, 50), 0, 0, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 0, 150), new GroupData(4, 1, 8, new Point(600, 425), 0, 0, -150)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(650, 50), 0, 0, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(3, 1, 8, new Point(650, 100), 0, 0, 150)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 100, 125), new GroupData(2, 1, 8, new Point(650, 450), 0, 100, -125)], [new GroupData(4, 1, 8, new Point(650, 75), 0, 150, 150), new GroupData(4, 1, 8, new Point(650, 450), 0, 150, -150)], [new GroupData(1, 2, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 100, 75), new GroupData(2, 1, 8, new Point(650, 400), 0, 100, -75)]);
public static var DRONETWOHEALTH:uint = 2;
public static var DRONEONEHEALTH:uint = 2;
public static var enemySpeed = [10, 8, 14, 2, 2, 2, 16, 6, 5, 1, 2, 4, 7];
public static var drone2MaxCounter = [140, 80, 80];
public static var PLASMABUGHEALTH:uint = 60;
public static var set1Groups:Array = new Array([new GroupData(2, 1, 8, new Point(650, 100), 0, 100, 75), new GroupData(2, 1, 8, new Point(650, 400), 0, 100, -75)], [new GroupData(1, 1, 8, new Point(600, 250), 0, 0, 0), new GroupData(2, 1, 8, new Point(650, 50), 0, -100, 75), new GroupData(2, 1, 8, new Point(650, 450), 0, -100, -75)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 100, 100)], [new GroupData(1, 2, 6, new Point(650, 100), 0, 0, 300), new GroupData(1, 2, 7, new Point(650, 400), 0, 0, 300)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 0, 150), new GroupData(4, 1, 8, new Point(600, 425), 0, 0, -150)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(2, 1, 6, new Point(650, 100), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 125), new GroupData(1, 1, 8, new Point(600, 450), 0, 300, 0), new GroupData(2, 1, 8, new Point(600, 50), 0, 300, 200)], [new GroupData(2, 1, 8, new Point(650, 50), 0, 0, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(3, 1, 2, new Point(600, 100), 0, 200, -25), new GroupData(3, 1, 2, new Point(650, 300), 0, 150, -25)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 100, 125), new GroupData(2, 1, 8, new Point(650, 450), 0, 100, -125)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 450), 0, 100, 125), new GroupData(2, 2, 8, new Point(650, 250), 0, 200, 0)], [new GroupData(3, 1, 12, new Point(650, 150), 0, 150, 0), new GroupData(3, 1, 13, new Point(650, 400), 0, 150, 0)], [new GroupData(1, 2, 6, new Point(650, 100), 0, 0, 300), new GroupData(1, 2, 7, new Point(650, 400), 0, 0, 300)], [new GroupData(3, 1, 13, new Point(650, 300), 0, 150, 0), new GroupData(3, 1, 12, new Point(650, 100), 0, 150, 0)]);
public static var set3Groups:Array = new Array([new GroupData(2, 2, 8, new Point(650, 100), 0, -100, 100), new GroupData(2, 1, 8, new Point(650, 450), 0, -100, -125)], [new GroupData(4, 1, 8, new Point(650, 100), 0, -50, 100), new GroupData(4, 1, 8, new Point(650, 400), 0, -50, -100)], [new GroupData(4, 1, 8, new Point(650, 50), 0, 0, 125), new GroupData(1, 1, 8, new Point(650, 300), 0, 150, 0)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(1, 10, 8, new Point(600, 490), 0, 150, 0)], [new GroupData(2, 2, 2, new Point(600, 100), 0, 150, -25), new GroupData(2, 2, 2, new Point(650, 250), 0, 150, -25)], [new GroupData(4, 1, 4, new Point(650, 100), 0, 150, 0), new GroupData(4, 1, 5, new Point(650, 350), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 150, 0), new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0), new GroupData(2, 1, 8, new Point(650, 400), 0, 150, 0)], [new GroupData(4, 1, 11, new Point(650, 600), 0, 200, 0), new GroupData(4, 1, 11, new Point(600, 0), 0, 200, 0)], [new GroupData(1, 10, 8, new Point(600, 490), 0, 150, 0)], [new GroupData(2, 2, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 2, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(2, 1, 6, new Point(650, 100), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 125), new GroupData(1, 2, 8, new Point(600, 450), 0, 300, 0), new GroupData(2, 1, 8, new Point(600, 50), 0, 300, 200)], [new GroupData(3, 1, 13, new Point(650, 400), 0, 150, 0), new GroupData(3, 1, 12, new Point(650, 100), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(650, 50), 0, 0, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(1, 10, 8, new Point(600, 490), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(650, 50), 0, 0, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(3, 1, 8, new Point(650, 100), 0, 0, 150)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(4, 1, 11, new Point(600, 600), 0, 200, 0), new GroupData(4, 1, 11, new Point(600, 0), 0, 200, 0)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 100, 125), new GroupData(2, 1, 8, new Point(650, 450), 0, 100, -125)], [new GroupData(3, 1, 13, new Point(650, 400), 0, 150, 0), new GroupData(3, 1, 12, new Point(650, 100), 0, 150, 0)], [new GroupData(1, 10, 8, new Point(600, 490), 0, 150, 0)], [new GroupData(4, 1, 8, new Point(600, 50), 0, 0, 120), new GroupData(4, 1, 8, new Point(600, 300), 0, 100, 0)], [new GroupData(1, 2, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 100, 75), new GroupData(2, 1, 8, new Point(650, 400), 0, 100, -75)], [new GroupData(4, 1, 8, new Point(600, 100), 0, -50, 100), new GroupData(4, 1, 8, new Point(650, 400), 0, -50, -100)]);
public static var set5Groups:Array = new Array([new GroupData(2, 1, 8, new Point(600, 250), 0, -150, 0), new GroupData(3, 1, 8, new Point(650, 100), 0, -100, 75), new GroupData(3, 1, 8, new Point(650, 400), 0, -100, -75)], [new GroupData(2, 2, 2, new Point(600, 100), 0, 150, -25), new GroupData(2, 2, 1, new Point(600, 400), 0, 150, -25)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(5, 1, 5, new Point(600, 250), 0, 100, 0)], [new GroupData(4, 1, 2, new Point(600, 100), 0, 150, 0), new GroupData(4, 1, 1, new Point(600, 400), 0, 150, 0)], [new GroupData(3, 1, 8, new Point(650, 100), 0, 100, 75), new GroupData(3, 1, 8, new Point(650, 400), 0, 100, -75)], [new GroupData(1, 7, 8, new Point(650, 250), 0, 150, 0)], [new GroupData(3, 1, 8, new Point(600, 75), 0, 0, 150), new GroupData(3, 2, 8, new Point(600, 425), 0, 0, -150)], [new GroupData(4, 2, 8, new Point(600, 75), 0, 100, 100)], [new GroupData(2, 1, 2, new Point(600, 100), 0, 150, -25), new GroupData(2, 1, 1, new Point(650, 400), 0, 150, -25)], [new GroupData(2, 2, 8, new Point(650, 100), 0, -100, 100), new GroupData(2, 1, 8, new Point(650, 450), 0, -100, -125)], [new GroupData(3, 1, 2, new Point(600, 100), 0, 150, -25), new GroupData(3, 2, 2, new Point(650, 250), 0, 150, -25)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(2, 1, 6, new Point(650, 100), 0, 100, -125), new GroupData(2, 2, 7, new Point(650, 400), 0, 100, 125), new GroupData(1, 2, 8, new Point(650, 250), 0, 200, 0)], [new GroupData(2, 1, 2, new Point(550, 100), 0, 150, -25), new GroupData(2, 1, 2, new Point(650, 250), 0, 150, -25)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 100, 125), new GroupData(2, 1, 8, new Point(650, 450), 0, 100, -125)], [new GroupData(1, 7, 8, new Point(650, 250), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 150, 0), new GroupData(1, 5, 9, new Point(700, 250), 0, 150, 0), new GroupData(2, 1, 8, new Point(650, 400), 0, 150, 0)], [new GroupData(3, 1, 11, new Point(650, 600), 0, 200, 0), new GroupData(3, 1, 11, new Point(600, 0), 0, 200, 0)], [new GroupData(3, 1, 6, new Point(650, 100), 0, 75, -125), new GroupData(3, 1, 7, new Point(650, 450), 0, 75, 125)], [new GroupData(1, 6, 9, new Point(700, 250), 0, 150, 0)]);
public static var set7Groups:Array = new Array([new GroupData(2, 2, 8, new Point(650, 100), 0, 100, 300), new GroupData(1, 3, 8, new Point(650, 200), 0, 0, 0)], [new GroupData(4, 1, 8, new Point(650, 100), 0, 100, 75), new GroupData(4, 1, 8, new Point(650, 400), 0, 100, -75)], [new GroupData(4, 1, 6, new Point(650, 100), 0, 75, -75), new GroupData(4, 1, 7, new Point(650, 350), 0, 75, 75)], [new GroupData(1, 5, 9, new Point(700, 250), 0, 0, 0)], [new GroupData(2, 2, 2, new Point(600, 100), 0, 150, -25), new GroupData(2, 2, 1, new Point(600, 400), 0, 150, -25)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 100, 100)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 0, 100)], [new GroupData(2, 2, 8, new Point(650, 100), 0, 100, 300), new GroupData(1, 13, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(1, 7, 11, new Point(650, 100), 0, 150, 0), new GroupData(1, 9, 8, new Point(700, 300), 0, 150, 0), new GroupData(1, 7, 11, new Point(650, 400), 0, 150, 0)], [new GroupData(2, 2, 8, new Point(650, 50), 0, 100, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(3, 7, 8, new Point(650, 50), 0, 150, 200)], [new GroupData(2, 2, 8, new Point(650, 100), 0, 100, 300), new GroupData(1, 3, 8, new Point(650, 200), 0, 0, 0)], [new GroupData(4, 1, 12, new Point(650, 200), 0, 150, 0), new GroupData(4, 1, 13, new Point(650, 350), 0, 150, 0)], [new GroupData(4, 2, 8, new Point(600, 75), 0, 150, 150)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 150, 0), new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0), new GroupData(2, 1, 8, new Point(650, 400), 0, 150, 0)], [new GroupData(3, 1, 6, new Point(650, 100), 0, 100, -75), new GroupData(3, 2, 7, new Point(650, 400), 0, 100, 75), new GroupData(4, 1, 8, new Point(600, 250), 0, 200, 0)], [new GroupData(1, 8, 8, new Point(650, 250), 0, 150, 0)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 100, 100)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 0, 100)], [new GroupData(2, 2, 2, new Point(600, 100), 0, 150, -25), new GroupData(2, 2, 1, new Point(600, 400), 0, 150, -25)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 0, 150), new GroupData(4, 1, 8, new Point(600, 425), 0, 0, -150)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(1, 3, 11, new Point(650, 350), 0, 0, 0)], [new GroupData(1, 6, 9, new Point(700, 250), 0, 0, 0)], [new GroupData(3, 1, 6, new Point(650, 100), 0, 100, -75), new GroupData(3, 1, 7, new Point(650, 400), 0, 100, 75), new GroupData(4, 3, 8, new Point(600, 250), 0, 200, 0)], [new GroupData(4, 1, 6, new Point(650, 100), 0, 75, -75), new GroupData(4, 1, 7, new Point(650, 350), 0, 75, 75)], [new GroupData(1, 9, 8, new Point(650, 250), 0, 150, 0)]);
public static var set9Groups:Array = new Array([new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 450), 0, 100, 125), new GroupData(1, 2, 8, new Point(650, 250), 0, 200, 0)], [new GroupData(2, 2, 2, new Point(600, 150), 0, 150, -25), new GroupData(2, 2, 2, new Point(650, 250), 0, 150, -25)], [new GroupData(4, 1, 4, new Point(650, 200), 0, 150, 0), new GroupData(4, 1, 5, new Point(650, 250), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(650, 200), 0, 150, 200), new GroupData(1, 6, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 0, 150), new GroupData(4, 1, 8, new Point(600, 425), 0, 0, -150)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(2, 1, 6, new Point(650, 100), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 125), new GroupData(1, 1, 8, new Point(600, 450), 0, 300, 0), new GroupData(2, 1, 8, new Point(600, 50), 0, 300, 200)], [new GroupData(3, 2, 8, new Point(650, 100), 0, 0, 150)], [new GroupData(2, 1, 8, new Point(650, 150), 0, 0, 250), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(3, 3, 8, new Point(650, 100), 0, 0, 150)], [new GroupData(1, 12, 8, new Point(700, 50), 0, 0, 0)], [new GroupData(1, 2, 7, new Point(650, 450), 0, 0, 300), new GroupData(1, 2, 6, new Point(650, 100), 0, 0, 300)], [new GroupData(2, 2, 8, new Point(650, 50), 0, 100, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 450), 0, 100, 125), new GroupData(1, 2, 8, new Point(650, 250), 0, 200, 0)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(2, 2, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 2, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(2, 1, 6, new Point(650, 100), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 125), new GroupData(1, 2, 8, new Point(600, 450), 0, 300, 0), new GroupData(2, 1, 8, new Point(600, 50), 0, 300, 200)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 100, 100)], [new GroupData(1, 12, 8, new Point(700, 50), 0, 0, 0)], [new GroupData(3, 1, 13, new Point(650, 400), 0, 150, 0), new GroupData(3, 1, 12, new Point(650, 100), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(650, 50), 0, 0, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 0, 150), new GroupData(4, 1, 8, new Point(600, 425), 0, 0, -150)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(2, 1, 8, new Point(600, 250), 0, -150, 0), new GroupData(3, 1, 8, new Point(650, 100), 0, -100, 75), new GroupData(3, 1, 8, new Point(650, 400), 0, -100, -75)], [new GroupData(2, 2, 2, new Point(600, 100), 0, 150, -25), new GroupData(2, 2, 1, new Point(600, 400), 0, 150, -25)], [new GroupData(1, 6, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(5, 1, 5, new Point(600, 250), 0, 100, 0)], [new GroupData(4, 1, 2, new Point(600, 100), 0, 150, 0), new GroupData(4, 1, 1, new Point(600, 400), 0, 150, 0)], [new GroupData(3, 1, 8, new Point(650, 100), 0, 100, 75), new GroupData(3, 1, 8, new Point(650, 400), 0, 100, -75)], [new GroupData(1, 12, 8, new Point(700, 50), 0, 0, 0)], [new GroupData(1, 3, 8, new Point(650, 250), 0, 150, 0)], [new GroupData(3, 1, 8, new Point(600, 75), 0, 0, 150), new GroupData(3, 2, 8, new Point(600, 425), 0, 0, -150)], [new GroupData(4, 2, 8, new Point(600, 75), 0, 100, 100)], [new GroupData(2, 1, 2, new Point(600, 100), 0, 150, -25), new GroupData(2, 1, 1, new Point(650, 400), 0, 150, -25)], [new GroupData(2, 2, 8, new Point(650, 100), 0, -100, 100), new GroupData(2, 1, 8, new Point(650, 450), 0, -100, -125)], [new GroupData(3, 1, 2, new Point(600, 100), 0, 150, -25), new GroupData(3, 2, 2, new Point(650, 250), 0, 150, -25)], [new GroupData(1, 2, 6, new Point(650, 100), 0, 0, 300), new GroupData(1, 2, 7, new Point(650, 400), 0, 0, 300)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 0, 150), new GroupData(4, 1, 8, new Point(600, 425), 0, 0, -150)], [new GroupData(1, 6, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(2, 1, 6, new Point(650, 100), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 125), new GroupData(1, 1, 8, new Point(600, 450), 0, 300, 0), new GroupData(2, 1, 8, new Point(600, 50), 0, 300, 200)], [new GroupData(2, 1, 8, new Point(650, 50), 0, 0, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(3, 1, 2, new Point(600, 100), 0, 200, -25), new GroupData(3, 1, 2, new Point(650, 300), 0, 150, -25)], [new GroupData(2, 1, 8, new Point(650, 100), 0, 100, 125), new GroupData(2, 1, 8, new Point(650, 450), 0, 100, -125)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 450), 0, 100, 125), new GroupData(2, 2, 8, new Point(650, 250), 0, 200, 0)], [new GroupData(3, 1, 12, new Point(650, 150), 0, 150, 0), new GroupData(3, 1, 13, new Point(650, 400), 0, 150, 0)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(1, 2, 7, new Point(650, 450), 0, 0, 300), new GroupData(1, 2, 6, new Point(650, 100), 0, 0, 300)], [new GroupData(2, 2, 8, new Point(650, 50), 0, 100, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 450), 0, 100, 125), new GroupData(1, 2, 8, new Point(650, 250), 0, 200, 0)], [new GroupData(1, 5, 9, new Point(700, 300), 0, 150, 0)], [new GroupData(2, 2, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 2, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(2, 1, 6, new Point(650, 100), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 125), new GroupData(1, 2, 8, new Point(600, 450), 0, 300, 0), new GroupData(2, 1, 8, new Point(600, 50), 0, 300, 200)], [new GroupData(4, 1, 8, new Point(600, 75), 0, 100, 100)], [new GroupData(1, 12, 8, new Point(700, 50), 0, 0, 0)], [new GroupData(1, 11, 9, new Point(700, 250), 0, 0, 0)], [new GroupData(2, 1, 6, new Point(650, 50), 0, 100, -120), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 120)], [new GroupData(2, 1, 6, new Point(650, 100), 0, 100, -125), new GroupData(2, 1, 7, new Point(650, 400), 0, 100, 125), new GroupData(1, 1, 8, new Point(600, 450), 0, 300, 0), new GroupData(2, 1, 8, new Point(600, 50), 0, 300, 200)], [new GroupData(2, 1, 8, new Point(650, 50), 0, 0, 400), new GroupData(1, 2, 8, new Point(650, 250), 0, 0, 0)]);
public static var drone1Groups:Array = new Array(set1Groups, set2Groups, set3Groups, set4Groups, set5Groups, set6Groups, set7Groups, set8Groups, set9Groups);
public static var totalLevels:int = 8;
public static var lifeRemaining = 3;
public static var DRONETHREEHEALTH:uint = 10;
public static var frameRate:uint = 40;
public static var drone1MaxCounter = [60, 60, 60, 60, 60, 60, 50, 50, 50];
public static var powerUps:Array = new Array(new Array([2, new Point(700, 250)], [3, new Point(700, 350)]), new Array([2, new Point(700, 250)], [3, new Point(700, 350)]), new Array([4, new Point(700, 250)], [2, new Point(700, 350)], [3, new Point(700, 350)]), new Array([4, new Point(700, 250)], [5, new Point(700, 250)], [2, new Point(700, 350)], [3, new Point(700, 350)]), new Array([4, new Point(700, 250)], [5, new Point(700, 250)], [2, new Point(700, 250)], [3, new Point(700, 350)], [2, new Point(700, 250)], [3, new Point(700, 350)]), new Array([4, new Point(700, 250)], [5, new Point(700, 250)], [6, new Point(700, 250)], [2, new Point(700, 250)], [3, new Point(700, 350)], [2, new Point(700, 250)], [3, new Point(700, 350)]), new Array([4, new Point(700, 250)], [5, new Point(700, 250)], [6, new Point(700, 250)], [7, new Point(700, 250)], [2, new Point(700, 250)], [3, new Point(700, 350)], [2, new Point(700, 250)], [3, new Point(700, 350)], [2, new Point(700, 250)], [3, new Point(700, 350)], [4, new Point(700, 250)], [5, new Point(700, 250)], [6, new Point(700, 250)]), new Array([2, new Point(700, 350)], [3, new Point(700, 350)], [4, new Point(700, 250)], [5, new Point(700, 250)], [6, new Point(700, 250)], [2, new Point(700, 250)], [3, new Point(700, 350)], [2, new Point(700, 250)], [3, new Point(700, 350)], [2, new Point(700, 250)], [3, new Point(700, 350)]), new Array([2, new Point(700, 250)], [3, new Point(700, 350)], [4, new Point(700, 250)], [5, new Point(700, 250)], [6, new Point(700, 250)], [7, new Point(700, 250)], [2, new Point(700, 250)], [3, new Point(700, 350)], [4, new Point(700, 250)], [5, new Point(700, 250)], [6, new Point(700, 250)], [2, new Point(700, 250)], [3, new Point(700, 350)], [4, new Point(700, 250)], [5, new Point(700, 250)], [6, new Point(700, 250)]), new Array([2, new Point(700, 250)], [3, new Point(700, 350)]));
public static var DRONEFOURHEALTH:uint = 120;
public static var FLAMEBUGHEALTH:uint = 40;
}
}//package
Section 65
//GroupData (GroupData)
package {
import flash.geom.*;
public class GroupData {
private var enemytype:uint;// = 0
private var totalEnemyCount:uint;// = 0
private var startPos:Point;
private var gap:Point;
public var isCreated:Boolean;// = false
private var gtype:int;// = -1
private var mtype:int;// = -1
public var enemyDataArray:Array;
private var ti:int;// = 0
public function GroupData(_arg1:int, _arg2:uint, _arg3:int, _arg4:Point, _arg5:uint=4, _arg6:uint=0, _arg7:uint=100){
gtype = -1;
mtype = -1;
enemytype = 0;
ti = 0;
totalEnemyCount = 0;
startPos = new Point();
gap = new Point();
enemyDataArray = new Array();
isCreated = false;
super();
this.mtype = _arg3;
this.totalEnemyCount = _arg1;
this.enemytype = _arg2;
startPos.x = _arg4.x;
startPos.y = _arg4.y;
gap.x = _arg6;
gap.y = _arg7;
this.ti = _arg5;
}
public function set timegap(_arg1:int):void{
ti = _arg1;
}
public function get enemyType():uint{
return (enemytype);
}
public function get startPoint():Point{
return (startPos);
}
public function get timegap():int{
return (ti);
}
public function get moveType():uint{
return (mtype);
}
public function get enemyCount():uint{
return (totalEnemyCount);
}
public function get grouptype():int{
return (gtype);
}
public function resetGroupData(){
var _local1:int;
_local1 = enemyDataArray.length;
while (_local1 > 0) {
enemyDataArray.pop();
_local1--;
};
}
public function get gapValue():Point{
return (gap);
}
public function generateEnemyData(){
var _local1:Point;
var _local2:uint;
var _local3:EnemyData;
if (isCreated){
return;
};
_local1 = startPoint;
isCreated = true;
_local2 = 0;
while (_local2 < enemyCount) {
_local3 = new EnemyData(_local1);
_local1.x = (_local1.x + gapValue.x);
_local1.y = (_local1.y + gapValue.y);
enemyDataArray.push(_local3);
_local2++;
};
}
}
}//package
Section 66
//Guardians (Guardians)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class Guardians extends Enemy {
public var hitAreaClip:MovieClip;
public var health:int;// = 10
public var bulletOrigin2:BulletOne;
public var hitClip:MovieClip;
private var heroPlane:MyPlane;
public var bulletOrigin3:MovieClip;
public var beamAnim:EnemyBeam;
public var healthMeter:MovieClip;
public var bulletOrigin:BulletOne;
public var dieClip:MovieClip;
public function Guardians(){
health = 10;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
type = 6;
}
private function updateHealthParam(){
var _local1:int;
_local1 = Math.ceil(((health / 150) * 100));
if (healthMeter != null){
healthMeter.gotoAndStop(_local1);
};
}
override public function init(){
health = 150;
CrazyShooting.specialType = true;
heroPlane = CrazyShooting.myPlane;
healthMeter.gotoAndStop(100);
shoot1CountMax = 15;
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
stopBeam();
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
CrazyShooting.specialType = false;
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removeEnemy(this);
};
};
};
}
override public function moveEnemy(){
var _local1:int;
super.moveEnemy();
if (currentLabel != "die"){
if (beamAnim != null){
if (beamAnim.currentLabel == "fire"){
if (beamAnim.fireAnim.currentFrame >= beamAnim.fireAnim.totalFrames){
beamAnim.fireAnim.gotoAndStop(1);
beamAnim.gotoAndStop(1);
};
checkRayCollision();
};
};
shoot1Count = (shoot1Count + 1);
if (shoot1Count == shoot1CountMax){
shoot1Count = 0;
_local1 = (Math.random() * 20);
if (_local1 <= 5){
shootOne();
} else {
if ((((_local1 > 5)) && ((_local1 < 15)))){
shootBeam();
} else {
shootRay();
};
};
};
};
}
private function checkRayCollision(){
if (beamAnim.fireAnim.hitTestObject(heroPlane)){
heroPlane.missileHit();
};
}
function frame3(){
stop();
}
public function shootBeam(){
var _local1:Point;
_local1 = new Point();
_local1.x = this.bulletOrigin3.x;
_local1.y = this.bulletOrigin3.y;
_local1 = localToGlobal(_local1);
this.bulletOrigin3.gotoAndPlay(2);
CrazyShooting.container.generateBullets(4, _local1, -180);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
private function shootRay(){
if (beamAnim != null){
if (beamAnim.currentLabel != "fire"){
beamAnim.gotoAndStop("fire");
};
};
}
override public function removeAllListeners(){
stopBeam();
}
public function hit(){
health = (health - 1);
updateHealthParam();
if (health > 0){
if (currentLabel != "hit"){
addEventListener(Event.ENTER_FRAME, playHit);
gotoAndStop("hit");
};
} else {
if (currentLabel != "die"){
stopBeam();
CrazyShooting.gameScore = (CrazyShooting.gameScore + 1);
addEventListener(Event.ENTER_FRAME, playBlast);
gotoAndStop("die");
};
};
}
private function stopBeam(){
if (beamAnim != null){
if (beamAnim.currentLabel == "fire"){
beamAnim.fireAnim.gotoAndStop(1);
beamAnim.gotoAndStop(1);
};
};
}
private function playHit(_arg1:Event){
if (currentLabel == "hit"){
if (this.hitClip != null){
if (this.hitClip.currentFrame >= this.hitClip.totalFrames){
this.hitClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playHit);
};
};
};
}
public function shootOne(){
var _local1:Point;
_local1 = new Point();
_local1.x = this.bulletOrigin.x;
_local1.y = this.bulletOrigin.y;
_local1 = localToGlobal(_local1);
CrazyShooting.container.generateBullets(3, _local1);
}
}
}//package
Section 67
//HeroBulletOne (HeroBulletOne)
package {
import flash.geom.*;
import flash.display.*;
public class HeroBulletOne extends Bullet {
public var hitAreaClip:MovieClip;
private var bulletSpeed:int;// = -25
public function HeroBulletOne(){
bulletSpeed = -25;
super();
addFrameScript(6, frame7);
}
override public function init(_arg1:Point, _arg2:int=8, _arg3:int=0){
super.init(_arg1);
moveObject = MovementFactory.getMovementObject(_arg2);
moveObject.init(_arg1.x, _arg1.y, bulletSpeed);
if (_arg2 == 14){
rotation = -30;
} else {
if (_arg2 == 15){
rotation = 30;
} else {
rotation = 0;
};
};
}
override public function moveBullet(){
if (moveObject.getNextPosition()){
this.x = moveObject.currentPos.x;
this.y = moveObject.currentPos.y;
} else {
CrazyShooting.container.removeUserBullet(this);
};
}
function frame7(){
stop();
}
}
}//package
Section 68
//HeroBulletTwo (HeroBulletTwo)
package {
import flash.geom.*;
import flash.display.*;
public class HeroBulletTwo extends Bullet {
public var hitAreaClip:MovieClip;
private var bulletSpeed:int;// = -25
public function HeroBulletTwo(){
bulletSpeed = -25;
super();
addFrameScript(5, frame6);
}
override public function init(_arg1:Point, _arg2:int=8, _arg3:int=0){
super.init(_arg1);
moveObject = MovementFactory.getMovementObject(_arg2);
moveObject.init(_arg1.x, _arg1.y, bulletSpeed);
}
override public function moveBullet(){
trace("herobullet1");
if (moveObject.getNextPosition()){
trace("herobullet2");
this.x = moveObject.currentPos.x;
this.y = moveObject.currentPos.y;
} else {
trace("herobullet3");
trace(("removed = " + this.parent));
CrazyShooting.container.removeUserBullet(this);
trace("removed");
};
}
function frame6(){
stop();
}
}
}//package
Section 69
//IonStorm (IonStorm)
package {
import flash.geom.*;
import flash.display.*;
public class IonStorm extends Enemy {
public var hitAreaClip:MovieClip;
public var health:int;// = 100
private var beam:DisplayObject;
public var bulletOrigin:BulletOne;
private var ang:int;// = 30
public function IonStorm(){
health = 100;
ang = 30;
super();
addFrameScript(0, frame1, 1, frame2);
type = 8;
}
override public function init(){
shoot1Count = 0;
shoot1CountMax = 15;
health = GParams.PLASMABUGHEALTH;
}
override public function moveEnemy(){
super.moveEnemy();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
health = (health - 4);
}
public function shootOne(_arg1:int){
var _local2:Point;
_local2 = new Point();
_local2.x = this.bulletOrigin.x;
_local2.y = this.bulletOrigin.y;
_local2 = localToGlobal(_local2);
trace((" beam added at : " + _local2));
beam = CrazyShooting.container.generateBullets(4, _local2, _arg1);
CrazyShooting.container.swapChildren(this, beam);
}
}
}//package
Section 70
//JumpSound (JumpSound)
package {
import flash.media.*;
public dynamic class JumpSound extends Sound {
}
}//package
Section 71
//LevelUp (LevelUp)
package {
import flash.display.*;
public class LevelUp extends MovieClip {
public var endFrame:Number;// = 207
public var levelUpMap:MovieClip;
public var levelUp_Ins:MovieClip;
private static var levelup:LevelUp;
public function LevelUp(){
endFrame = 207;
super();
addFrameScript(0, frame1, 99, frame100, 109, frame110, 122, frame123, 206, frame207);
}
public function init(){
trace(("called from levelup class - levelup prob = " + levelUpMap));
levelUpMap.gotoAndStop((GParams.currentLevel + 1));
if (GParams.currentLevel != 8){
endFrame = 207;
} else {
endFrame = 470;
};
}
function frame207(){
stop();
}
public function removeClip(){
}
function frame1(){
}
function frame100(){
stop();
}
function frame110(){
levelUp_Ins.gotoAndStop((GParams.currentLevel + 2));
stop();
}
function frame123(){
if (GParams.currentLevel != 8){
gotoAndPlay(124);
} else {
gotoAndPlay(208);
};
stop();
}
public static function getInstance():LevelUp{
if (levelup == null){
levelup = new (LevelUp);
};
return (levelup);
}
}
}//package
Section 72
//LevelUpSound (LevelUpSound)
package {
import flash.media.*;
public class LevelUpSound extends Sound {
}
}//package
Section 73
//Line (Line)
package {
import flash.display.*;
public class Line extends Sprite {
public var len:Number;// = 0
private var isCenter:Boolean;// = false
private var color:Number;// = 0x660099
private var thickness;// = 1
public function Line(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Boolean=false){
len = 0;
color = 0x660099;
thickness = 1;
isCenter = false;
super();
this.len = _arg1;
this.x = _arg2;
this.y = _arg3;
this.rotation = _arg4;
this.isCenter = _arg5;
draw();
}
public function draw(){
if (isCenter == false){
graphics.lineStyle(5, color, 5);
graphics.moveTo((-(len) / 2), 0);
graphics.lineTo((len / 2), 0);
} else {
graphics.lineStyle(2, color, 0.5);
graphics.moveTo(0, 0);
graphics.lineTo(len, 0);
};
}
public function redrawLine(_arg1:Number){
graphics.clear();
graphics.lineStyle(2, color, 0.5);
graphics.moveTo(0, 0);
graphics.lineTo(_arg1, 0);
}
public function setPosition(_arg1:Number, _arg2:Number, _arg3:Number){
x = _arg1;
y = _arg2;
this.rotation = _arg3;
}
}
}//package
Section 74
//MiniBlackHole (MiniBlackHole)
package {
import flash.events.*;
import flash.display.*;
public class MiniBlackHole extends Enemy {
private var speedy:int;
private var speedx:int;
public var hitAreaClip:MovieClip;
private var trackCounter:Boolean;// = false
public var dangerArea:MovieClip;
private var speed:int;// = 20
public var health:int;// = 10
public var hitClip:MovieClip;
private var heroPlane:MyPlane;
public var dieClip:MovieClip;
public function MiniBlackHole(){
health = 10;
trackCounter = false;
speed = 20;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
type = 9;
}
override public function init(){
health = GParams.DRONETHREEHEALTH;
heroPlane = CrazyShooting.myPlane;
}
private function playBlast(_arg1:Event){
}
private function checkCollision():Boolean{
if (x > heroPlane.x){
if (this.dangerArea.hitTestObject(heroPlane)){
return (true);
};
};
return (false);
}
override public function moveEnemy(){
var _local1:Boolean;
super.moveEnemy();
_local1 = checkCollision();
if (_local1){
heroPlane.pullStatus = true;
heroPlane.x = (heroPlane.x + ((x - heroPlane.x) / 10));
heroPlane.y = (heroPlane.y + ((y - heroPlane.y) / 10));
} else {
heroPlane.pullStatus = false;
};
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
}
private function playHit(_arg1:Event){
}
}
}//package
Section 75
//Missile (Missile)
package {
import flash.events.*;
import flash.display.*;
public class Missile extends MovieClip {
private var speedy:Number;// = 0
private var speedx:Number;// = 0
private var blastStatus:Boolean;// = false
public var blastClip:MovieClip;
private var dy:Number;// = 0
private var totDist:int;// = 0
private var dx:Number;// = 0
private var angle:Number;// = 0
private var targetY:int;// = 0
private var targetX:int;// = 0
private static var missile:Missile = null;
public function Missile(){
targetX = 0;
targetY = 0;
speedx = 0;
speedy = 0;
dx = 0;
dy = 0;
angle = 0;
totDist = 0;
blastStatus = false;
super();
addFrameScript(0, frame1, 1, frame2);
}
public function init(_arg1:int, _arg2:int){
gotoAndStop(1);
x = CrazyShooting.myPlane.x;
y = CrazyShooting.myPlane.y;
targetX = _arg1;
targetY = _arg2;
dx = (targetX - x);
dy = (targetY - y);
angle = Math.atan2(dy, dx);
this.rotation = ((angle * 180) / Math.PI);
scaleX = (scaleY = 0.1);
blastStatus = false;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
function frame1(){
stop();
}
private function showBlast(_arg1:Event){
if (currentLabel == "blast"){
if (blastClip != null){
if (this.blastClip.currentFrame >= this.blastClip.totalFrames){
removeEventListener(Event.ENTER_FRAME, showBlast);
CrazyShooting.container.removeMissile();
};
};
};
}
function frame2(){
stop();
}
private function onEnterFrame(_arg1:Event){
if (!blastStatus){
trace(("distx = " + dx));
trace(("disty = " + dy));
scaleX = (scaleX + ((1 - scaleX) / 5));
scaleY = (scaleY + ((1 - scaleY) / 5));
angle = Math.atan2(dy, dx);
speedx = (Math.cos(angle) * 20);
speedy = (Math.sin(angle) * 20);
x = (x + speedx);
y = (y + speedy);
this.rotation = ((angle * 180) / Math.PI);
totDist = Math.sqrt(((dx * dx) + (dy * dy)));
if ((((x > 600)) || ((x < -50)))){
destroyMissile();
return;
};
if (y > 600){
destroyMissile();
return;
};
CrazyShooting.container.checkHeroMissileCollision();
};
}
public function destroyMissile(){
trace("blast");
blastStatus = true;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(Event.ENTER_FRAME, showBlast);
gotoAndStop("blast");
}
public static function getMissile():Missile{
if (missile == null){
missile = new (Missile);
};
return (missile);
}
}
}//package
Section 76
//Missile2 (Missile2)
package {
import flash.events.*;
import flash.display.*;
public class Missile2 extends MovieClip {
private var speedy:Number;// = 0
private var speedx:Number;// = 0
private var blastStatus:Boolean;// = false
public var blastClip:MovieClip;
private var dy:Number;// = 0
private var totDist:int;// = 0
private var dx:Number;// = 0
private var angle:Number;// = 0
private var targetY:int;// = 0
private var targetX:int;// = 0
private static var missile2:Missile2 = null;
public function Missile2(){
targetX = 0;
targetY = 0;
speedx = 0;
speedy = 0;
dx = 0;
dy = 0;
angle = 0;
totDist = 0;
blastStatus = false;
super();
addFrameScript(0, frame1, 1, frame2);
}
public function init(_arg1:int, _arg2:int){
gotoAndStop(1);
x = CrazyShooting.myPlane.x;
y = CrazyShooting.myPlane.y;
targetX = _arg1;
targetY = _arg2;
dx = (targetX - x);
dy = (targetY - y);
angle = Math.atan2(dy, dx);
this.rotation = ((angle * 180) / Math.PI);
blastStatus = false;
scaleX = (scaleY = 0.1);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
function frame1(){
stop();
}
private function showBlast(_arg1:Event){
if (currentLabel == "blast"){
if (blastClip != null){
if (this.blastClip.currentFrame >= this.blastClip.totalFrames){
removeEventListener(Event.ENTER_FRAME, showBlast);
CrazyShooting.container.removeMissile2();
};
};
};
}
function frame2(){
stop();
}
private function onEnterFrame(_arg1:Event){
if (!blastStatus){
scaleX = (scaleX + ((1 - scaleX) / 5));
scaleY = (scaleY + ((1 - scaleY) / 5));
trace(("distx = " + dx));
trace(("disty = " + dy));
angle = Math.atan2(dy, dx);
speedx = (Math.cos(angle) * 20);
speedy = (Math.sin(angle) * 20);
x = (x + speedx);
y = (y + speedy);
this.rotation = ((angle * 180) / Math.PI);
totDist = Math.sqrt(((dx * dx) + (dy * dy)));
if ((((x > 600)) || ((x < -50)))){
destroyMissile2();
return;
};
if (y > 600){
destroyMissile2();
return;
};
CrazyShooting.container.checkHeroMissile2Collision();
};
}
public function destroyMissile2(){
trace("blast");
blastStatus = true;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(Event.ENTER_FRAME, showBlast);
gotoAndStop("blast");
}
public static function getMissile():Missile2{
if (missile2 == null){
missile2 = new (Missile2);
};
return (missile2);
}
}
}//package
Section 77
//Missile3 (Missile3)
package {
import flash.events.*;
import flash.display.*;
public class Missile3 extends MovieClip {
private var speedy:Number;// = 0
private var speedx:Number;// = 0
private var blastStatus:Boolean;// = false
public var fireClip:MovieClip;
private static var missile3:Missile3 = null;
public function Missile3(){
speedx = 0;
speedy = 0;
blastStatus = false;
super();
addFrameScript(0, frame1, 1, frame2);
}
public function init(){
gotoAndStop(1);
x = (CrazyShooting.myPlane.x + 20);
y = (CrazyShooting.myPlane.y + 10);
speedx = 10;
speedy = 0;
blastStatus = false;
fireClip.gotoAndPlay(1);
trace("shoot beam");
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
function frame1(){
stop();
}
public function removeAllListeners(){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
removeEventListener(Event.ENTER_FRAME, showBlast);
}
private function showBlast(_arg1:Event){
x = (CrazyShooting.myPlane.x + 20);
y = (CrazyShooting.myPlane.y + 10);
if (currentLabel == "blast"){
this.gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, showBlast);
CrazyShooting.container.removeMissile3();
};
}
function frame2(){
stop();
}
private function onEnterFrame(_arg1:Event){
x = (CrazyShooting.myPlane.x + 20);
y = (CrazyShooting.myPlane.y + 10);
if (!blastStatus){
if (fireClip != null){
if (fireClip.currentFrame >= fireClip.totalFrames){
fireClip.gotoAndStop(1);
destroyMissile3();
return;
};
CrazyShooting.container.checkHeroBeamCollision();
};
};
}
public function destroyMissile3(){
blastStatus = true;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(Event.ENTER_FRAME, showBlast);
gotoAndStop("blast");
}
public static function getMissile():Missile3{
if (missile3 == null){
missile3 = new (Missile3);
};
return (missile3);
}
}
}//package
Section 78
//Missile4 (Missile4)
package {
import flash.events.*;
import flash.display.*;
public class Missile4 extends MovieClip {
private var speedy:Number;// = 0
private var speedx:Number;// = 0
private var blastStatus:Boolean;// = false
public var hitAreaClip:MovieClip;
public var blastClip:MovieClip;
private var dy:Number;// = 0
private var totDist:int;// = 0
private var dx:Number;// = 0
private var angle:Number;// = 0
private var targetY:int;// = 0
private var targetX:int;// = 0
private static var missile4:Missile4 = null;
public function Missile4(){
targetX = 0;
targetY = 0;
speedx = 0;
speedy = 0;
dx = 0;
dy = 0;
angle = 0;
totDist = 0;
blastStatus = false;
super();
addFrameScript(0, frame1, 1, frame2);
}
public function init(){
gotoAndStop(1);
x = (CrazyShooting.myPlane.x + 20);
y = (CrazyShooting.myPlane.y + 20);
speedx = 15;
speedy = 0;
blastStatus = false;
scaleX = (scaleY = 0.1);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
function frame1(){
stop();
}
private function showBlast(_arg1:Event){
if (currentLabel == "blast"){
if (blastClip != null){
if (this.blastClip.currentFrame >= this.blastClip.totalFrames){
removeEventListener(Event.ENTER_FRAME, showBlast);
CrazyShooting.container.removeMissile4();
};
};
};
}
function frame2(){
stop();
}
private function onEnterFrame(_arg1:Event){
if (!blastStatus){
scaleX = (scaleX + ((1 - scaleX) / 5));
scaleY = (scaleY + ((1 - scaleY) / 5));
x = (x + speedx);
y = (y + speedy);
if ((((x > 600)) || ((x < -50)))){
destroyMissile4();
return;
};
if (y > 600){
destroyMissile4();
return;
};
CrazyShooting.container.checkHeroCanonCollision();
};
}
public function destroyMissile4(){
trace("blast");
blastStatus = true;
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(Event.ENTER_FRAME, showBlast);
gotoAndStop("blast");
}
public static function getMissile():Missile4{
if (missile4 == null){
missile4 = new (Missile4);
};
return (missile4);
}
}
}//package
Section 79
//Movement (Movement)
package {
import flash.geom.*;
public class Movement {
public var attachedMC:Enemy;// = null
protected var movedir:int;// = 0
protected var dir:int;// = 0
protected var v0:int;// = 0
public var currentPos:Point;
public var nextPosition:Point;
public var velocity:Point;
protected static var targetYMin:int = 0;
protected static var targetXMin:int = -100;
protected static var targetYMax:int = (GParams.stageDimension.y + 20);
protected static var targetXMax:int = (GParams.stageDimension.x + 50);
public function Movement(){
nextPosition = new Point();
attachedMC = null;
currentPos = new Point();
dir = 0;
velocity = new Point();
v0 = 0;
movedir = 0;
super();
}
public function attachMC(){
}
public function init(_arg1:int, _arg2:int, _arg3:int){
currentPos.x = _arg1;
currentPos.y = _arg2;
if (currentPos.x <= 0){
dir = 1;
velocity.x = _arg3;
velocity.y = 0;
v0 = _arg3;
movedir = 1;
} else {
dir = -1;
velocity.x = (_arg3 * -1);
velocity.y = 0;
v0 = (_arg3 * -1);
movedir = -1;
};
}
public function getNextPosition(_arg1:Point=null):Boolean{
return (false);
}
public function boundaryCheck():Boolean{
if (velocity.x > 0){
if (currentPos.x > targetXMax){
return (true);
};
} else {
if (currentPos.x < targetXMin){
return (true);
};
};
if (velocity.y > 0){
if (currentPos.y > targetYMax){
return (true);
};
} else {
if (velocity.y < 0){
if (currentPos.y < targetYMin){
return (true);
};
};
};
return (false);
}
}
}//package
Section 80
//MovementAngular (MovementAngular)
package {
import flash.geom.*;
public class MovementAngular extends Movement {
private var heroPlane:MyPlane;
private var counter:int;// = 0
private var speed:int;// = 10
private var speedx:int;
private var midPosition:uint;// = 0
private var speedy:int;
private var targetX:int;
private var targetY:int;
private var maxCounter:int;// = 15
public function MovementAngular(){
midPosition = 0;
speed = 10;
counter = 0;
maxCounter = 15;
super();
midPosition = (GParams.stageDimension.x / 2);
speedx = (-1 * speed);
speedy = 0;
heroPlane = CrazyShooting.myPlane;
}
override public function init(_arg1:int, _arg2:int, _arg3:int){
var _local4:Number;
currentPos.x = 650;
currentPos.y = (50 + Math.floor((Math.random() * 400)));
v0 = -(_arg3);
targetX = -100;
targetY = (100 + Math.floor((Math.random() * 300)));
_local4 = Math.atan(((targetY - currentPos.y) / (targetX - currentPos.x)));
velocity.x = (Math.cos(_local4) * v0);
velocity.y = (Math.sin(_local4) * v0);
}
override public function getNextPosition(_arg1:Point=null):Boolean{
currentPos.x = (currentPos.x + velocity.x);
currentPos.y = (currentPos.y + velocity.y);
if (boundaryCheck()){
return (false);
};
return (true);
}
}
}//package
Section 81
//MovementEllipse (MovementEllipse)
package {
import flash.geom.*;
public class MovementEllipse extends MovementSpiral {
private var radiusX:uint;// = 50
private var radiusY:uint;// = 110
private var center:Point;
public function MovementEllipse(){
radiusY = 110;
radiusX = 50;
center = new Point();
super();
}
override public function init(_arg1:int, _arg2:int, _arg3:int){
currentPos.x = _arg1;
currentPos.y = _arg2;
center.x = (GParams.stageDimension.x - 150);
center.y = _arg2;
v0 = (_arg3 * -1);
angle = 0;
dir = 1;
angularVelocity = ((_arg3 * Math.PI) / 180);
}
override public function getNextPosition(_arg1:Point=null):Boolean{
var _local2:Number;
var _local3:Number;
if (dir == 1){
if (currentPos.x > center.x){
currentPos.x = (currentPos.x + v0);
} else {
currentPos.x = center.x;
dir = 2;
};
} else {
angle = ((angularVelocity + angle) % (Math.PI * 2));
_local2 = (Math.cos(angle) * radiusX);
_local3 = (Math.sin(angle) * radiusY);
currentPos.x = (center.x + _local2);
currentPos.y = (center.y + _local3);
};
return (true);
}
}
}//package
Section 82
//MovementFactory (MovementFactory)
package {
public class MovementFactory {
private static var spiralNormalArray:Array = new Array(250);
private static var spreadBottomIndex:int = -1;
private static var stepdownIndex:int = -1;
private static var spiralNarrowIndex:int = -1;
private static var spreadBottomArray:Array = new Array(250);
private static var stepdownArray:Array = new Array(250);
private static var spiralNarrowArray:Array = new Array(250);
private static var spiralTopIndex:int = -1;
private static var angularIndex:int = -1;
private static var straightBottomIndex:int = -1;
private static var spiralTopArray:Array = new Array(250);
private static var straightTopIndex:int = -1;
private static var straightBottomArray:Array = new Array(250);
private static var straightTopArray:Array = new Array(250);
private static var spreadTopIndex:int = -1;
private static var angularArray:Array = new Array(250);
private static var stepupIndex:int = -1;
private static var ellipseIndex:int = -1;
private static var stepupArray:Array = new Array(250);
private static var ellipseArray:Array = new Array(250);
private static var spreadTopArray:Array = new Array(250);
private static var spiralBottomIndex:int = -1;
private static var spiralBottomArray:Array = new Array(250);
private static var spiralWideIndex:int = -1;
private static var spiralWideArray:Array = new Array(250);
private static var spiralIndex:int = -1;
private static var trackHeroIndex:int = -1;
private static var spiralArray:Array = new Array(250);
private static var straightIndex:int = -1;
private static var spiralNormalIndex:int = -1;
private static var trackHeroArray:Array = new Array(250);
private static var straightArray:Array = new Array(250);
private static function getMovementStepUp():MovementStepUp{
stepupIndex = ((stepupIndex + 1) % stepupArray.length);
if (stepupArray[stepupIndex] == null){
stepupArray[stepupIndex] = new MovementStepUp();
};
return (stepupArray[stepupIndex]);
}
private static function getMovementStraightTop():MovementStraightTop{
straightTopIndex = ((straightTopIndex + 1) % straightTopArray.length);
if (straightTopArray[straightTopIndex] == null){
straightTopArray[straightTopIndex] = new MovementStraightTop();
};
return (straightTopArray[straightTopIndex]);
}
private static function getMovementSpiralTop():MovementSpiralTop{
spiralTopIndex = ((spiralTopIndex + 1) % spiralTopArray.length);
if (spiralTopArray[spiralTopIndex] == null){
spiralTopArray[spiralTopIndex] = new MovementSpiralTop();
};
return (spiralTopArray[spiralTopIndex]);
}
private static function getMovementStraight():MovementStraight{
straightIndex = ((straightIndex + 1) % straightArray.length);
if (straightArray[straightIndex] == null){
straightArray[straightIndex] = new MovementStraight();
};
return (straightArray[straightIndex]);
}
private static function getMovementTrackHero():MovementTrackHero{
trackHeroIndex = ((trackHeroIndex + 1) % trackHeroArray.length);
if (trackHeroArray[trackHeroIndex] == null){
trackHeroArray[trackHeroIndex] = new MovementTrackHero();
};
return (trackHeroArray[trackHeroIndex]);
}
private static function getMovementSpiralBottom():MovementSpiralBottom{
spiralBottomIndex = ((spiralBottomIndex + 1) % spiralBottomArray.length);
if (spiralBottomArray[spiralBottomIndex] == null){
spiralBottomArray[spiralBottomIndex] = new MovementSpiralBottom();
};
return (spiralBottomArray[spiralBottomIndex]);
}
private static function getMovementAngular():MovementAngular{
angularIndex = ((angularIndex + 1) % angularArray.length);
if (angularArray[angularIndex] == null){
angularArray[angularIndex] = new MovementAngular();
};
return (angularArray[angularIndex]);
}
private static function getMovementStraightBottom():MovementStraightBottom{
straightBottomIndex = ((straightBottomIndex + 1) % straightBottomArray.length);
if (straightBottomArray[straightBottomIndex] == null){
straightBottomArray[straightBottomIndex] = new MovementStraightBottom();
};
return (straightBottomArray[straightBottomIndex]);
}
public static function getMovementObject(_arg1):Movement{
switch (_arg1){
case 1:
return (getMovementStraightTop());
case 2:
return (getMovementStraightBottom());
case 3:
return (getMovementSpiralNormal());
case 4:
return (getMovementSpiralNarrow());
case 5:
return (getMovementSpiralWide());
case 6:
return (getMovementStepUp());
case 7:
return (getMovementStepDown());
case 8:
return (getMovementStraight());
case 9:
return (getMovementEllipse());
case 10:
return (getMovementTrackHero());
case 11:
return (getMovementAngular());
case 12:
return (getMovementSpiralTop());
case 13:
return (getMovementSpiralBottom());
case 14:
return (getMovementSpreadTop());
case 15:
return (getMovementSpreadBottom());
};
return (null);
}
private static function getMovementSpreadTop():MovementSpreadTop{
spreadTopIndex = ((spreadTopIndex + 1) % spreadTopArray.length);
if (spreadTopArray[spreadTopIndex] == null){
spreadTopArray[spreadTopIndex] = new MovementSpreadTop();
};
return (spreadTopArray[spreadTopIndex]);
}
private static function getMovementSpreadBottom():MovementSpreadBottom{
spreadBottomIndex = ((spreadBottomIndex + 1) % spreadBottomArray.length);
if (spreadBottomArray[spreadBottomIndex] == null){
spreadBottomArray[spreadBottomIndex] = new MovementSpreadBottom();
};
return (spreadBottomArray[spreadBottomIndex]);
}
private static function getMovementStepDown():MovementStepDown{
stepdownIndex = ((stepdownIndex + 1) % stepdownArray.length);
if (stepdownArray[stepdownIndex] == null){
stepdownArray[stepdownIndex] = new MovementStepDown();
};
return (stepdownArray[stepdownIndex]);
}
private static function getMovementSpiralWide():MovementSpiralWide{
spiralWideIndex = ((spiralWideIndex + 1) % spiralWideArray.length);
if (spiralWideArray[spiralWideIndex] == null){
spiralWideArray[spiralWideIndex] = new MovementSpiralWide();
};
return (spiralWideArray[spiralWideIndex]);
}
private static function getMovementSpiralNarrow():MovementSpiralNarrow{
spiralNarrowIndex = ((spiralNarrowIndex + 1) % spiralNarrowArray.length);
if (spiralNarrowArray[spiralNarrowIndex] == null){
spiralNarrowArray[spiralNarrowIndex] = new MovementSpiralNarrow();
};
return (spiralNarrowArray[spiralNarrowIndex]);
}
private static function getMovementEllipse():MovementEllipse{
ellipseIndex = ((ellipseIndex + 1) % ellipseArray.length);
if (ellipseArray[ellipseIndex] == null){
ellipseArray[ellipseIndex] = new MovementEllipse();
};
return (ellipseArray[ellipseIndex]);
}
private static function getMovementSpiralNormal():MovementSpiralNormal{
spiralNormalIndex = ((spiralNormalIndex + 1) % spiralNormalArray.length);
if (spiralNormalArray[spiralNormalIndex] == null){
spiralNormalArray[spiralNormalIndex] = new MovementSpiralNormal();
};
return (spiralNormalArray[spiralNormalIndex]);
}
}
}//package
Section 83
//MovementSpiral (MovementSpiral)
package {
import flash.geom.*;
public class MovementSpiral extends Movement {
protected var yRange:uint;// = 150
protected var angle:Number;// = 0
protected var angularVelocity:Number;// = 0.08
protected var centerY:int;// = 0
public function MovementSpiral(){
yRange = 150;
angularVelocity = 0.08;
angle = 0;
centerY = 0;
super();
angle = 0;
}
override public function init(_arg1:int, _arg2:int, _arg3:int){
currentPos.x = _arg1;
currentPos.y = _arg2;
centerY = _arg2;
v0 = (_arg3 * -1);
}
override public function getNextPosition(_arg1:Point=null):Boolean{
if (currentPos.x > 650){
currentPos.x = (currentPos.x + v0);
return (true);
};
currentPos.x = (currentPos.x + v0);
angle = (angle + angularVelocity);
currentPos.y = (centerY + (Math.sin(angle) * yRange));
if (v0 < 0){
if (currentPos.x < targetXMin){
return (false);
};
} else {
if (v0 > 0){
if (currentPos.x > targetXMax){
return (false);
};
};
};
return (true);
}
}
}//package
Section 84
//MovementSpiralBottom (MovementSpiralBottom)
package {
public class MovementSpiralBottom extends MovementSpiral {
public function MovementSpiralBottom(){
yRange = 80;
angle = 90;
}
}
}//package
Section 85
//MovementSpiralNarrow (MovementSpiralNarrow)
package {
public class MovementSpiralNarrow extends MovementSpiral {
public function MovementSpiralNarrow(){
yRange = 50;
}
}
}//package
Section 86
//MovementSpiralNormal (MovementSpiralNormal)
package {
public class MovementSpiralNormal extends MovementSpiral {
public function MovementSpiralNormal(){
yRange = 100;
}
}
}//package
Section 87
//MovementSpiralTop (MovementSpiralTop)
package {
public class MovementSpiralTop extends MovementSpiral {
public function MovementSpiralTop(){
yRange = 80;
angle = -90;
}
}
}//package
Section 88
//MovementSpiralWide (MovementSpiralWide)
package {
public class MovementSpiralWide extends MovementSpiral {
public function MovementSpiralWide(){
yRange = 150;
}
}
}//package
Section 89
//MovementSpreadBottom (MovementSpreadBottom)
package {
import flash.geom.*;
public class MovementSpreadBottom extends Movement {
private var midPosition:uint;// = 0
public function MovementSpreadBottom(){
midPosition = 0;
super();
midPosition = (GParams.stageDimension.x / 2);
}
override public function init(_arg1:int, _arg2:int, _arg3:int){
currentPos.x = _arg1;
currentPos.y = _arg2;
if (currentPos.x <= 0){
dir = 1;
velocity.x = _arg3;
v0 = _arg3;
movedir = 1;
} else {
dir = -1;
velocity.x = (_arg3 * -1);
v0 = (_arg3 * -1);
movedir = -1;
};
velocity.y = (v0 - 13);
}
override public function getNextPosition(_arg1:Point=null):Boolean{
currentPos.x = (currentPos.x + velocity.x);
currentPos.y = (currentPos.y + velocity.y);
if (boundaryCheck()){
return (false);
};
return (true);
}
}
}//package
Section 90
//MovementSpreadTop (MovementSpreadTop)
package {
import flash.geom.*;
public class MovementSpreadTop extends Movement {
private var midPosition:uint;// = 0
public function MovementSpreadTop(){
midPosition = 0;
super();
midPosition = (GParams.stageDimension.x / 2);
}
override public function init(_arg1:int, _arg2:int, _arg3:int){
currentPos.x = _arg1;
currentPos.y = _arg2;
if (currentPos.x <= 0){
dir = 1;
velocity.x = _arg3;
v0 = _arg3;
movedir = 1;
} else {
dir = -1;
velocity.x = (_arg3 * -1);
v0 = (_arg3 * -1);
movedir = -1;
};
velocity.y = ((v0 - 13) * -1);
}
override public function getNextPosition(_arg1:Point=null):Boolean{
currentPos.x = (currentPos.x + velocity.x);
currentPos.y = (currentPos.y + velocity.y);
if (boundaryCheck()){
return (false);
};
return (true);
}
}
}//package
Section 91
//MovementStepDown (MovementStepDown)
package {
import flash.geom.*;
public class MovementStepDown extends Movement {
private var midPosition:uint;// = 0
public function MovementStepDown(){
midPosition = 0;
super();
midPosition = ((GParams.stageDimension.x / 2) - 100);
}
override public function init(_arg1:int, _arg2:int, _arg3:int){
currentPos.x = _arg1;
currentPos.y = _arg2;
if (currentPos.x <= 0){
dir = 1;
v0 = _arg3;
} else {
dir = -1;
v0 = (_arg3 * -1);
};
velocity.x = v0;
velocity.y = (v0 / 4);
}
override public function getNextPosition(_arg1:Point=null):Boolean{
currentPos.x = (currentPos.x + velocity.x);
currentPos.y = (currentPos.y + velocity.y);
if (dir == 1){
if (currentPos.x >= midPosition){
dir = 2;
velocity.x = v0;
velocity.y = 0;
};
} else {
if (dir == -1){
if (currentPos.x <= midPosition){
dir = 2;
velocity.x = v0;
velocity.y = 0;
};
} else {
if (boundaryCheck()){
return (false);
};
};
};
return (true);
}
}
}//package
Section 92
//MovementStepUp (MovementStepUp)
package {
import flash.geom.*;
public class MovementStepUp extends Movement {
private var midPosition:uint;// = 0
public function MovementStepUp(){
midPosition = 0;
super();
midPosition = ((GParams.stageDimension.x / 2) - 100);
}
override public function init(_arg1:int, _arg2:int, _arg3:int){
currentPos.x = _arg1;
currentPos.y = _arg2;
if (currentPos.x <= 0){
dir = 1;
v0 = _arg3;
} else {
dir = -1;
v0 = (_arg3 * -1);
};
velocity.x = v0;
velocity.y = (v0 / 4);
}
override public function getNextPosition(_arg1:Point=null):Boolean{
currentPos.x = (currentPos.x + velocity.x);
currentPos.y = (currentPos.y - velocity.y);
if (dir == 1){
if (currentPos.x >= midPosition){
dir = 2;
velocity.x = v0;
velocity.y = 0;
};
} else {
if (dir == -1){
if (currentPos.x <= midPosition){
dir = 2;
velocity.x = v0;
velocity.y = 0;
};
} else {
if (boundaryCheck()){
return (false);
};
};
};
return (true);
}
}
}//package
Section 93
//MovementStraight (MovementStraight)
package {
import flash.geom.*;
public class MovementStraight extends Movement {
protected var yRange:uint;// = 150
private var angle:Number;// = 0
private var angularVelocity:Number;// = 0.1
private var centerY:int;// = 0
public function MovementStraight(){
yRange = 150;
angularVelocity = 0.1;
angle = 0;
centerY = 0;
super();
}
override public function init(_arg1:int, _arg2:int, _arg3:int){
currentPos.x = _arg1;
currentPos.y = _arg2;
if (currentPos.x <= 0){
} else {
dir = -1;
velocity.x = (_arg3 * -1);
velocity.y = 0;
v0 = (_arg3 * -1);
};
}
override public function getNextPosition(_arg1:Point=null):Boolean{
currentPos.x = (currentPos.x + velocity.x);
currentPos.y = (currentPos.y + velocity.y);
if (boundaryCheck()){
return (false);
};
return (true);
}
}
}//package
Section 94
//MovementStraightBottom (MovementStraightBottom)
package {
import flash.geom.*;
public class MovementStraightBottom extends Movement {
private var midPosition:uint;// = 0
public function MovementStraightBottom(){
midPosition = 0;
super();
midPosition = (GParams.stageDimension.x / 2);
}
override public function init(_arg1:int, _arg2:int, _arg3:int){
super.init(_arg1, _arg2, _arg3);
midPosition = (GParams.stageDimension.x / 2);
}
override public function getNextPosition(_arg1:Point=null):Boolean{
currentPos.x = (currentPos.x + velocity.x);
currentPos.y = (currentPos.y + velocity.y);
if (dir == 2){
};
if (dir == 1){
if (currentPos.x >= midPosition){
dir = 2;
velocity.x = v0;
velocity.y = Math.abs((v0 / 2));
};
} else {
if (dir == -1){
if (currentPos.x <= midPosition){
dir = 2;
velocity.x = v0;
velocity.y = Math.abs((v0 / 2));
};
} else {
if (boundaryCheck()){
return (false);
};
};
};
return (true);
}
}
}//package
Section 95
//MovementStraightTop (MovementStraightTop)
package {
import flash.geom.*;
public class MovementStraightTop extends Movement {
private var midPosition:uint;// = 0
public function MovementStraightTop(){
midPosition = 0;
super();
midPosition = (GParams.stageDimension.x / 2);
}
override public function init(_arg1:int, _arg2:int, _arg3:int){
super.init(_arg1, _arg2, _arg3);
midPosition = (GParams.stageDimension.x / 2);
}
override public function getNextPosition(_arg1:Point=null):Boolean{
currentPos.x = (currentPos.x + velocity.x);
currentPos.y = (currentPos.y + velocity.y);
if (dir == 2){
};
if (dir == 1){
if (currentPos.x >= midPosition){
dir = 2;
velocity.y = (Math.abs((v0 / 2)) * -1);
};
} else {
if (dir == -1){
if (currentPos.x <= midPosition){
dir = 2;
velocity.y = (Math.abs((v0 / 2)) * -1);
};
} else {
if (boundaryCheck()){
return (false);
};
};
};
return (true);
}
}
}//package
Section 96
//MovementTrackHero (MovementTrackHero)
package {
import flash.geom.*;
public class MovementTrackHero extends Movement {
private var heroPlane:MyPlane;
private var counter:int;// = 100
private var speed:int;// = 20
private var speedx:int;
private var midPosition:uint;// = 0
private var speedy:int;
private var dragger:int;// = 0
private var maxCounter:int;// = 100
public function MovementTrackHero(){
midPosition = 0;
speed = 20;
counter = 100;
maxCounter = 100;
dragger = 0;
super();
midPosition = (GParams.stageDimension.x / 2);
speedx = (-1 * speed);
speedy = 0;
heroPlane = CrazyShooting.myPlane;
}
override public function init(_arg1:int, _arg2:int, _arg3:int){
var _local4:*;
var _local5:*;
heroPlane = CrazyShooting.myPlane;
currentPos.x = _arg1;
currentPos.y = _arg2;
_local4 = Math.atan2((heroPlane.y - currentPos.y), (heroPlane.x - currentPos.x));
_local5 = Math.ceil(((_local4 / Math.PI) * 180));
speedx = (Math.cos(_local4) * _arg3);
speedy = (Math.sin(_local4) * _arg3);
}
override public function getNextPosition(_arg1:Point=null):Boolean{
currentPos.x = (currentPos.x + speedx);
currentPos.y = (currentPos.y + speedy);
if ((((currentPos.x < targetXMin)) || ((currentPos.x > targetXMax)))){
return (false);
};
return (true);
}
}
}//package
Section 97
//MyPlane (MyPlane)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
import flash.media.*;
public class MyPlane extends MovieClip {
public var blastStatus:Boolean;// = false
public var weapon2Num:uint;// = 0
private var beamReloadMax;
private var canonReloadMax;
public var hitAreaClip:MovieClip;
private var prev:Point;// = null
private var multipleWeapon:Boolean;// = true
public var currentWeaponNum:uint;// = 1
public var health:int;// = 100
public var upgradeCount:int;// = 0
public var bulletOrigin1:MovieClip;
public var bulletOrigin2:MovieClip;
public var bulletOrigin3:MovieClip;
public var weapon3Num:uint;// = 0
public var surfaceEnemyState:Boolean;// = false
public var fireSound:Sound;
private var bulletTransform:SoundTransform;
public var pullStatus:Boolean;// = false
public var dieStatus:Boolean;// = false
public var canonSound:Sound;
private var beamReloadCounter:int;// = 0
private var canonReloadCounter:int;// = 0
public var weapon4Num:uint;// = 0
public var airMissileShootStatus:Boolean;// = false
private var surfaceMissileReloadCounter:int;// = 0
public var life:int;// = 0
private var airMissileReloadCounter:int;// = 0
public var halfHeight:uint;// = 10
private var surfaceMissileReloadMax;
public var halfWidth:uint;// = 40
public var swapStatus:Boolean;// = false
public var shield:int;// = 100
public var surfaceMissileShootStatus:Boolean;// = false
public var hitClip:MovieClip;
private var bulletChannel:SoundChannel;
public var weapon1Num:uint;// = 0
public var beamShootStatus:Boolean;// = false
public var canonShootStatus:Boolean;// = false
private var bulletMovement:Array;
private var mouseSwap:Boolean;// = false
private var airMissileReloadMax;
public var dieClip:MovieClip;
public function MyPlane(){
prev = null;
halfWidth = 40;
halfHeight = 10;
dieStatus = false;
pullStatus = false;
currentWeaponNum = 1;
weapon1Num = 0;
weapon2Num = 0;
weapon3Num = 0;
weapon4Num = 0;
multipleWeapon = true;
swapStatus = false;
mouseSwap = false;
surfaceEnemyState = false;
surfaceMissileShootStatus = false;
airMissileShootStatus = false;
beamShootStatus = false;
canonShootStatus = false;
upgradeCount = 0;
blastStatus = false;
surfaceMissileReloadCounter = 0;
surfaceMissileReloadMax = (1 * GParams.frameRate);
airMissileReloadCounter = 0;
airMissileReloadMax = (1 * GParams.frameRate);
beamReloadCounter = 0;
beamReloadMax = (1 * GParams.frameRate);
canonReloadCounter = 0;
canonReloadMax = (1 * GParams.frameRate);
health = 100;
life = 0;
shield = 100;
bulletMovement = new Array([-1, 8, -1], [8, -1, 8], [8, 8, 8], [14, 8, 15], [-1, 7, -1]);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
prev = new Point();
halfWidth = (this.width / 2);
halfHeight = (this.height / 2);
health = 100;
shield = 100;
life = (GParams.lifeRemaining + 1);
fireSound = new BulletSound();
canonSound = new CanonSound();
}
public function getPowerStarFire(){
weapon2Num = (weapon2Num + 2);
CrazyShooting.statistics.setMissileOn();
if (weapon2Num >= 2){
weapon2Num = 2;
};
}
public function removeListeners(){
removeEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function shoot(){
switch (currentWeaponNum){
case 1:
shootOne();
break;
case 2:
missileShoot2();
break;
case 3:
missileShoot3();
break;
case 4:
missileShoot4();
break;
};
}
private function checkWeaponStatus(_arg1:uint):Boolean{
if (_arg1 == 1){
return (true);
};
if (_arg1 == 2){
if (weapon2Num > 0){
return (true);
};
} else {
if (_arg1 == 3){
if (weapon3Num > 0){
return (true);
};
} else {
if (_arg1 == 4){
if (weapon4Num > 0){
return (true);
};
};
};
};
return (false);
}
public function shootParticleTwo(){
var _local1:int;
var _local2:Point;
_local1 = bulletMovement[upgradeCount][1];
if (_local1 == -1){
return;
};
_local2 = new Point();
_local2.x = this.bulletOrigin2.x;
_local2.y = this.bulletOrigin2.y;
_local2 = localToGlobal(_local2);
CrazyShooting.container.generateHeroBullets(1, _local2, _local1);
}
public function shootParticleOne(){
var _local1:int;
var _local2:Point;
_local1 = bulletMovement[upgradeCount][0];
if (_local1 == -1){
return;
};
_local2 = new Point();
_local2.x = this.bulletOrigin1.x;
_local2.y = this.bulletOrigin1.y;
_local2 = localToGlobal(_local2);
CrazyShooting.container.generateHeroBullets(1, _local2, _local1);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
public function missileHit(){
if (!dieStatus){
if (shield > 0){
shield = (shield - 4);
} else {
health = (health - 4);
if (health > 0){
if (currentLabel != "hit"){
gotoAndStop("hit");
};
} else {
health = 0;
CrazyShooting.container.removeMissile3();
dieStatus = true;
life = (life - 1);
gotoAndStop("die");
};
};
};
}
public function missileShoot(){
CrazyShooting.container.generateHeroSurfaceMissile();
}
function frame2(){
stop();
}
private function checkGameEndStatus(){
if (life > 0){
health = 100;
newLife();
} else {
health = 0;
CrazyShooting.gameEndStatus = true;
};
}
private function missileShoot2(){
if (weapon2Num > 0){
if (!airMissileShootStatus){
CrazyShooting.container.generateHeroAirMissile();
weapon2Num = (weapon2Num - 1);
airMissileShootStatus = true;
playBulletSound();
if (weapon2Num <= 0){
CrazyShooting.statistics.setMissileOff();
currentWeaponNum = 0;
swapWeapon();
};
};
} else {
CrazyShooting.statistics.setMissileOff();
currentWeaponNum = 0;
swapWeapon();
shoot();
};
}
private function missileShoot3(){
if (weapon3Num > 0){
if (!canonShootStatus){
CrazyShooting.container.generateHeroCanon();
weapon3Num = (weapon3Num - 1);
canonShootStatus = true;
playCanonSound();
if (weapon3Num <= 0){
CrazyShooting.statistics.setCanonOff();
currentWeaponNum = 0;
swapWeapon();
};
};
} else {
CrazyShooting.statistics.setCanonOff();
currentWeaponNum = 0;
swapWeapon();
shoot();
};
}
private function missileShoot4(){
if (weapon4Num > 0){
if (!beamShootStatus){
CrazyShooting.container.generateHeroBeam();
weapon4Num = (weapon4Num - 1);
beamShootStatus = true;
playBulletSound();
if (weapon4Num <= 0){
CrazyShooting.statistics.setRayOff();
currentWeaponNum = 0;
swapWeapon();
};
return;
};
} else {
CrazyShooting.statistics.setRayOff();
currentWeaponNum = 0;
swapWeapon();
shoot();
};
}
private function newLife(){
upgradeCount = 1;
currentWeaponNum = 1;
airMissileShootStatus = false;
surfaceEnemyState = false;
surfaceMissileShootStatus = false;
canonShootStatus = false;
beamShootStatus = false;
blastStatus = false;
swapStatus = false;
dieStatus = false;
gotoAndStop(1);
}
private function onEnterFrame(_arg1:Event){
if (dieStatus){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
dieStatus = false;
checkGameEndStatus();
};
};
};
} else {
if (currentLabel == "hit"){
if (this.hitClip != null){
if (this.hitClip.currentFrame >= this.hitClip.totalFrames){
this.hitClip.gotoAndStop(1);
gotoAndStop("stand");
};
};
};
if (surfaceMissileShootStatus){
surfaceMissileReloadCounter++;
if (surfaceMissileReloadCounter >= surfaceMissileReloadMax){
surfaceMissileReloadCounter = 0;
surfaceMissileShootStatus = false;
};
};
if (airMissileShootStatus){
airMissileReloadCounter++;
if (airMissileReloadCounter >= airMissileReloadMax){
airMissileReloadCounter = 0;
airMissileShootStatus = false;
};
};
if (beamShootStatus){
beamReloadCounter++;
if (beamReloadCounter >= beamReloadMax){
beamReloadCounter = 0;
beamShootStatus = false;
};
};
if (canonShootStatus){
canonReloadCounter++;
if (canonReloadCounter >= canonReloadMax){
canonReloadCounter = 0;
canonShootStatus = false;
};
};
if (((CrazyShooting.swapKeyDown) && (!(swapStatus)))){
checkWeapon();
swapStatus = true;
};
if (((((CrazyShooting.missileKeyDown) && (!(surfaceMissileShootStatus)))) && ((surfaceEnemyState == true)))){
surfaceMissileShootStatus = true;
missileShoot();
};
};
}
public function shootParticleThree(){
var _local1:int;
var _local2:Point;
_local1 = bulletMovement[upgradeCount][2];
if (_local1 == -1){
return;
};
_local2 = new Point();
_local2.x = this.bulletOrigin3.x;
_local2.y = this.bulletOrigin3.y;
_local2 = localToGlobal(_local2);
CrazyShooting.container.generateHeroBullets(1, _local2, _local1);
}
public function getPowerLife(){
life = (life + 1);
if (life > (GParams.lifeRemaining + 2)){
life = (GParams.lifeRemaining + 2);
};
}
public function init(){
airMissileShootStatus = false;
surfaceMissileShootStatus = false;
canonShootStatus = false;
beamShootStatus = false;
surfaceEnemyState = false;
blastStatus = false;
upgradeCount = 1;
currentWeaponNum = 1;
gotoAndStop(1);
weapon2Num = 0;
weapon3Num = 0;
weapon4Num = 0;
swapStatus = false;
dieStatus = false;
CrazyShooting.powerUpIndex = -1;
addEventListener(Event.ENTER_FRAME, onEnterFrame);
addEventListener(MouseEvent.MOUSE_WHEEL, setSwapKey);
}
public function movePlane(_arg1:Number, _arg2:Number){
var _local3:Boolean;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
_local3 = false;
_local4 = (0 + halfWidth);
_local5 = (0 + halfHeight);
_local6 = 300;
_local7 = (500 - halfHeight);
if (!pullStatus){
x = (x + ((_arg1 - x) / 5));
y = (y + ((_arg2 - y) / 5));
};
if (this.x > _local6){
this.x = _local6;
} else {
if (this.x < _local4){
this.x = _local4;
};
};
if (this.y > _local7){
this.y = _local7;
} else {
if (this.y < _local5){
this.y = _local5;
};
};
}
public function setSwapKey(_arg1:MouseEvent){
checkWeapon();
}
private function playCanonSound(){
bulletChannel = canonSound.play();
bulletTransform = bulletChannel.soundTransform;
bulletTransform.volume = 0.2;
bulletChannel.soundTransform = bulletTransform;
}
public function bulletHit(){
if (!dieStatus){
if (shield > 0){
shield = (shield - 2);
} else {
health = (health - 2);
if (health > 0){
if (currentLabel != "hit"){
gotoAndStop("hit");
};
} else {
if (currentLabel != "die"){
health = 0;
CrazyShooting.container.removeMissile3();
dieStatus = true;
life = (life - 1);
gotoAndStop("die");
};
};
};
};
}
public function getCurrentWeapon():uint{
return (currentWeaponNum);
}
public function checkWeapon(){
if (multipleWeapon){
swapWeapon();
} else {
currentWeaponNum = 1;
};
}
public function checkBoundary(_arg1:int, _arg2:int):Boolean{
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:int;
_local3 = (_arg1 - halfWidth);
_local4 = (_arg2 - halfHeight);
_local5 = (_arg1 + halfWidth);
_local6 = (_arg2 + halfHeight);
if ((((((((_local3 <= 0)) || ((_local4 <= 0)))) || ((_local5 >= GParams.stageDimension.x)))) || ((_local6 >= GParams.stageDimension.y)))){
return (true);
};
return (false);
}
private function playBulletSound(){
bulletChannel = fireSound.play();
bulletTransform = bulletChannel.soundTransform;
bulletTransform.volume = 0.1;
bulletChannel.soundTransform = bulletTransform;
}
public function getPowerRays(){
CrazyShooting.statistics.setRayOn();
weapon4Num = 1;
}
private function swapWeapon(){
var _local1:uint;
_local1 = (currentWeaponNum + 1);
while (!(checkWeaponStatus(_local1))) {
currentWeaponNum = (currentWeaponNum + 1);
if (currentWeaponNum > 4){
currentWeaponNum = 0;
};
_local1 = (currentWeaponNum + 1);
};
currentWeaponNum = _local1;
}
public function getPowerCanon(){
weapon3Num = (weapon3Num + 2);
CrazyShooting.statistics.setCanonOn();
if (weapon3Num >= 2){
weapon3Num = 2;
};
}
public function getPowerSpread(){
upgradeCount = 3;
}
public function getPowerBlastTwo(){
upgradeCount = 2;
}
public function getPowerBlastOne(){
upgradeCount = 1;
}
private function shootOne(){
shootParticleOne();
shootParticleTwo();
shootParticleThree();
playBulletSound();
}
}
}//package
Section 98
//Overlords (Overlords)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class Overlords extends Enemy {
public var hitAreaClip:MovieClip;
public var health:int;// = 10
public var bulletOrigin2:MovieClip;
public var hitClip:MovieClip;
private var heroPlane:MyPlane;
public var bulletOrigin3:MovieClip;
public var healthMeter:MovieClip;
public var bulletOrigin:MovieClip;
public var dieClip:MovieClip;
public function Overlords(){
health = 10;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
type = 5;
}
private function updateHealthParam(){
var _local1:int;
_local1 = Math.ceil(((health / 70) * 100));
if (healthMeter != null){
healthMeter.gotoAndStop(_local1);
};
}
public function shootMissile(){
var _local1:Point;
_local1 = new Point();
_local1.x = this.bulletOrigin.x;
_local1.y = this.bulletOrigin.y;
_local1 = localToGlobal(_local1);
this.bulletOrigin.gotoAndPlay(2);
CrazyShooting.container.generateBullets(3, _local1);
}
override public function init(){
heroPlane = CrazyShooting.myPlane;
health = 70;
shoot1Count = 18;
CrazyShooting.specialType = true;
healthMeter.gotoAndStop(100);
shoot1CountMax = 30;
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
CrazyShooting.specialType = false;
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removeEnemy(this);
};
};
};
}
override public function moveEnemy(){
var _local1:*;
if (currentLabel != "die"){
super.moveEnemy();
shoot1Count = (shoot1Count + 1);
if (shoot1Count == shoot1CountMax){
shoot1Count = 5;
if (heroPlane.x < x){
_local1 = Math.floor((Math.random() * 10));
if (_local1 < 4){
shootOne();
} else {
shootMissile();
};
};
};
};
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
override public function removeAllListeners(){
}
public function hit(){
health = (health - 2);
updateHealthParam();
if (health > 0){
if (currentLabel != "hit"){
addEventListener(Event.ENTER_FRAME, playHit);
gotoAndStop("hit");
};
} else {
if (currentLabel != "die"){
CrazyShooting.gameScore = (CrazyShooting.gameScore + 1);
addEventListener(Event.ENTER_FRAME, playBlast);
gotoAndStop("die");
};
};
}
private function playHit(_arg1:Event){
if (currentLabel == "hit"){
if (this.hitClip != null){
if (this.hitClip.currentFrame >= this.hitClip.totalFrames){
this.hitClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playHit);
};
};
};
}
public function shootOne(){
var _local1:Point;
var _local2:Point;
_local1 = new Point();
_local1.x = this.bulletOrigin2.x;
_local1.y = this.bulletOrigin2.y;
_local1 = localToGlobal(_local1);
this.bulletOrigin2.gotoAndPlay(2);
CrazyShooting.container.generateBullets(0, _local1);
_local2 = new Point();
_local2.x = this.bulletOrigin3.x;
_local2.y = this.bulletOrigin3.y;
_local2 = localToGlobal(_local2);
this.bulletOrigin3.gotoAndPlay(2);
CrazyShooting.container.generateBullets(0, _local2);
}
}
}//package
Section 99
//PlasmaBug (PlasmaBug)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class PlasmaBug extends Enemy {
public var hitAreaClip:MovieClip;
private var fire:DisplayObject;
public var health:int;// = 100
public var hitClip:MovieClip;
private var heroPlane:MyPlane;// = null
public var gunClip:MovieClip;
public var bulletOrigin:BulletOne;
private var ang:int;// = -30
public var dieClip:MovieClip;
public function PlasmaBug(){
health = 100;
ang = -30;
heroPlane = null;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
type = 4;
}
override public function init(){
shoot1Count = 0;
shoot1CountMax = 5;
health = GParams.PLASMABUGHEALTH;
heroPlane = CrazyShooting.myPlane;
heroPlane.surfaceEnemyState = true;
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
heroPlane.surfaceEnemyState = false;
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removeEnemy(this);
};
};
};
}
override public function moveEnemy(){
if (currentLabel != "die"){
heroPlane.surfaceEnemyState = true;
super.moveEnemy();
shoot1Count = (shoot1Count + 1);
if (shoot1Count == shoot1CountMax){
shoot1Count = 0;
shootOne(ang);
gunClip.rotation = ang;
ang = (ang - 30);
if (ang < -180){
ang = -30;
};
};
};
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
override public function removeAllListeners(){
}
public function hit(){
health = (health - 2);
trace(("plasma bug health = " + health));
if (health > 0){
if (currentLabel != "hit"){
addEventListener(Event.ENTER_FRAME, playHit);
gotoAndStop("hit");
};
} else {
if (currentLabel != "die"){
CrazyShooting.gameScore = (CrazyShooting.gameScore + 1);
addEventListener(Event.ENTER_FRAME, playBlast);
gotoAndStop("die");
};
};
}
public function shootOne(_arg1:int){
var _local2:Point;
_local2 = new Point();
_local2.x = this.gunClip.x;
_local2.y = this.gunClip.y;
_local2 = localToGlobal(_local2);
trace((" beam added at : " + _local2));
fire = CrazyShooting.container.generateBullets(4, _local2, _arg1);
CrazyShooting.container.swapChildren(this, fire);
}
private function playHit(_arg1:Event){
if (currentLabel == "hit"){
if (this.hitClip != null){
if (this.hitClip.currentFrame >= this.hitClip.totalFrames){
this.hitClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playHit);
};
};
};
}
}
}//package
Section 100
//PowerBlastOne (PowerBlastOne)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class PowerBlastOne extends PowerUps {
public var hitAreaClip:MovieClip;
private var health:int;// = 10
public var hitClip:MovieClip;
private var heroPlane:MyPlane;
public var dieClip:MovieClip;
public function PowerBlastOne(){
health = 10;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
type = 1;
}
override public function init(_arg1:Point){
x = _arg1.x;
y = _arg1.y;
heroPlane = CrazyShooting.myPlane;
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removePowerUps(this);
};
};
};
}
private function checkHeroCollision(){
if (this.hitTestObject(heroPlane)){
this.hit();
};
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
if (currentLabel != "die"){
addEventListener(Event.ENTER_FRAME, playBlast);
heroPlane.getPowerBlastOne();
gotoAndStop("die");
};
}
override public function movePowerUps(){
if (currentLabel != "die"){
super.movePowerUps();
checkHeroCollision();
};
}
}
}//package
Section 101
//PowerBlastTwo (PowerBlastTwo)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class PowerBlastTwo extends PowerUps {
public var hitAreaClip:MovieClip;
private var health:int;// = 10
private var heroPlane:MyPlane;
public var dieClip:MovieClip;
public function PowerBlastTwo(){
health = 10;
super();
addFrameScript(0, frame1, 1, frame2);
type = 2;
}
override public function init(_arg1:Point){
x = _arg1.x;
y = _arg1.y;
heroPlane = CrazyShooting.myPlane;
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removePowerUps(this);
};
};
};
}
private function checkHeroCollision(){
if (this.hitTestObject(heroPlane)){
this.hit();
};
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
if (currentLabel != "die"){
addEventListener(Event.ENTER_FRAME, playBlast);
heroPlane.getPowerBlastTwo();
gotoAndStop("die");
};
}
override public function movePowerUps(){
if (currentLabel != "die"){
super.movePowerUps();
checkHeroCollision();
};
}
}
}//package
Section 102
//PowerCanon (PowerCanon)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class PowerCanon extends PowerUps {
public var hitAreaClip:MovieClip;
private var health:int;// = 10
private var heroPlane:MyPlane;
public var dieClip:MovieClip;
public function PowerCanon(){
health = 10;
super();
addFrameScript(0, frame1, 1, frame2);
type = 5;
}
override public function init(_arg1:Point){
x = _arg1.x;
y = _arg1.y;
heroPlane = CrazyShooting.myPlane;
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removePowerUps(this);
};
};
};
}
private function checkHeroCollision(){
if (this.hitTestObject(heroPlane)){
this.hit();
};
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
if (currentLabel != "die"){
addEventListener(Event.ENTER_FRAME, playBlast);
heroPlane.getPowerCanon();
gotoAndStop("die");
};
}
override public function movePowerUps(){
if (currentLabel != "die"){
super.movePowerUps();
checkHeroCollision();
};
}
}
}//package
Section 103
//PowerLife (PowerLife)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class PowerLife extends PowerUps {
public var hitAreaClip:MovieClip;
private var health:int;// = 10
private var heroPlane:MyPlane;
public var dieClip:MovieClip;
public function PowerLife(){
health = 10;
super();
addFrameScript(0, frame1, 1, frame2);
type = 7;
}
override public function init(_arg1:Point){
x = _arg1.x;
y = _arg1.y;
heroPlane = CrazyShooting.myPlane;
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removePowerUps(this);
};
};
};
}
private function checkHeroCollision(){
if (this.hitTestObject(heroPlane)){
this.hit();
};
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
if (currentLabel != "die"){
addEventListener(Event.ENTER_FRAME, playBlast);
heroPlane.getPowerLife();
gotoAndStop("die");
};
}
override public function movePowerUps(){
if (currentLabel != "die"){
super.movePowerUps();
checkHeroCollision();
};
}
}
}//package
Section 104
//PowerRay (PowerRay)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class PowerRay extends PowerUps {
public var hitAreaClip:MovieClip;
private var health:int;// = 10
private var heroPlane:MyPlane;
public var dieClip:MovieClip;
public function PowerRay(){
health = 10;
super();
addFrameScript(0, frame1, 1, frame2);
type = 6;
}
override public function init(_arg1:Point){
x = _arg1.x;
y = _arg1.y;
heroPlane = CrazyShooting.myPlane;
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removePowerUps(this);
};
};
};
}
private function checkHeroCollision(){
if (this.hitTestObject(heroPlane)){
this.hit();
};
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
if (currentLabel != "die"){
addEventListener(Event.ENTER_FRAME, playBlast);
heroPlane.getPowerRays();
gotoAndStop("die");
};
}
override public function movePowerUps(){
if (currentLabel != "die"){
super.movePowerUps();
checkHeroCollision();
};
}
}
}//package
Section 105
//PowerSpread (PowerSpread)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class PowerSpread extends PowerUps {
public var hitAreaClip:MovieClip;
private var health:int;// = 10
private var heroPlane:MyPlane;
public var dieClip:MovieClip;
public function PowerSpread(){
health = 10;
super();
addFrameScript(0, frame1, 1, frame2);
type = 3;
}
override public function init(_arg1:Point){
x = _arg1.x;
y = _arg1.y;
heroPlane = CrazyShooting.myPlane;
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removePowerUps(this);
};
};
};
}
private function checkHeroCollision(){
if (this.hitTestObject(heroPlane)){
this.hit();
};
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
if (currentLabel != "die"){
addEventListener(Event.ENTER_FRAME, playBlast);
heroPlane.getPowerSpread();
gotoAndStop("die");
};
}
override public function movePowerUps(){
if (currentLabel != "die"){
super.movePowerUps();
checkHeroCollision();
};
}
}
}//package
Section 106
//PowerStarFire (PowerStarFire)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class PowerStarFire extends PowerUps {
public var hitAreaClip:MovieClip;
private var health:int;// = 10
private var heroPlane:MyPlane;
public var dieClip:MovieClip;
public function PowerStarFire(){
health = 10;
super();
addFrameScript(0, frame1, 1, frame2);
type = 4;
}
override public function init(_arg1:Point){
x = _arg1.x;
y = _arg1.y;
heroPlane = CrazyShooting.myPlane;
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removePowerUps(this);
};
};
};
}
private function checkHeroCollision(){
if (this.hitTestObject(heroPlane)){
this.hit();
};
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function hit(){
if (currentLabel != "die"){
addEventListener(Event.ENTER_FRAME, playBlast);
heroPlane.getPowerStarFire();
gotoAndStop("die");
};
}
override public function movePowerUps(){
if (currentLabel != "die"){
super.movePowerUps();
checkHeroCollision();
};
}
}
}//package
Section 107
//PowerUpFactory (PowerUpFactory)
package {
public class PowerUpFactory {
public static var powerBlastTwoArray:Array = new Array(arraySize);
public static var powerRayArray:Array = new Array(arraySize);
private static var powerCanonIndex:int = -1;
public static var powerCanonArray:Array = new Array(arraySize);
private static var powerStarIndex:int = -1;
private static var powerBlastOneIndex:int = -1;
public static var powerSpreadArray:Array = new Array(arraySize);
public static var powerBlastOneArray:Array = new Array(arraySize);
public static var powerStarArray:Array = new Array(arraySize);
private static var powerRayIndex:int = -1;
private static var powerLifeIndex:int = -1;
public static var powerLifeArray:Array = new Array(arraySize);
private static var powerBlastTwoIndex:int = -1;
private static var arraySize:int = 3;
private static var powerSpreadIndex:int = -1;
public static function getPowerUps(_arg1):PowerUps{
switch (_arg1){
case 1:
return (getBlasterPackOne());
case 2:
return (getBlasterPackTwo());
case 3:
return (getSpreadShotPack());
case 4:
return (getStarFirePack());
case 5:
return (getCanonPack());
case 6:
return (getRayPack());
case 7:
return (getLifePack());
default:
return (null);
};
}
private static function getCanonPack():PowerUps{
powerCanonIndex = ((powerCanonIndex + 1) % powerCanonArray.length);
if (powerCanonArray[powerCanonIndex] == null){
powerCanonArray[powerCanonIndex] = new PowerCanon();
};
return (powerCanonArray[powerCanonIndex]);
}
private static function getBlasterPackTwo():PowerUps{
powerBlastTwoIndex = ((powerBlastTwoIndex + 1) % powerBlastTwoArray.length);
if (powerBlastTwoArray[powerBlastTwoIndex] == null){
powerBlastTwoArray[powerBlastTwoIndex] = new PowerBlastTwo();
};
return (powerBlastTwoArray[powerBlastTwoIndex]);
}
private static function getSpreadShotPack():PowerUps{
powerSpreadIndex = ((powerSpreadIndex + 1) % powerSpreadArray.length);
if (powerSpreadArray[powerSpreadIndex] == null){
powerSpreadArray[powerSpreadIndex] = new PowerSpread();
};
return (powerSpreadArray[powerSpreadIndex]);
}
private static function getStarFirePack():PowerUps{
powerStarIndex = ((powerStarIndex + 1) % powerStarArray.length);
if (powerStarArray[powerStarIndex] == null){
powerStarArray[powerStarIndex] = new PowerStarFire();
};
return (powerStarArray[powerStarIndex]);
}
private static function getBlasterPackOne():PowerUps{
powerBlastOneIndex = ((powerBlastOneIndex + 1) % powerBlastOneArray.length);
if (powerBlastOneArray[powerBlastOneIndex] == null){
powerBlastOneArray[powerBlastOneIndex] = new PowerBlastOne();
};
return (powerBlastOneArray[powerBlastOneIndex]);
}
private static function getLifePack():PowerUps{
powerLifeIndex = ((powerLifeIndex + 1) % powerLifeArray.length);
if (powerLifeArray[powerLifeIndex] == null){
powerLifeArray[powerLifeIndex] = new PowerLife();
};
return (powerLifeArray[powerLifeIndex]);
}
private static function getRayPack():PowerUps{
powerRayIndex = ((powerRayIndex + 1) % powerRayArray.length);
if (powerRayArray[powerRayIndex] == null){
powerRayArray[powerRayIndex] = new PowerRay();
};
return (powerRayArray[powerRayIndex]);
}
}
}//package
Section 108
//PowerUps (PowerUps)
package {
import flash.geom.*;
import flash.display.*;
public class PowerUps extends MovieClip {
protected var currentPos:Point;
protected var speedx:int;// = 12
public var type:int;// = 0
public function PowerUps(){
currentPos = new Point();
speedx = 12;
type = 0;
super();
}
public function movePowerUps(){
if (this.x >= -100){
this.x = (this.x - speedx);
} else {
removePowerUps();
};
}
public function init(_arg1:Point){
}
public function removePowerUps(){
CrazyShooting.container.removePowerUps(this);
}
}
}//package
Section 109
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
public class Preloader extends MovieClip {
private var percentText:TextField;
var urlPlayMore:String;// = "http://www.flasharcade.com"
public var percent:TextField;
var requestPlayMore:URLRequest;// = null
var timer:Timer;
private var progressBar:Sprite;
public var percentbar:MovieClip;
public var logo:MovieClip;
public static const startFrame:Number = 3;
public static const mainClass:String = "CrazyShooting";
public function Preloader(){
requestPlayMore = null;
urlPlayMore = "http://www.flasharcade.com";
addFrameScript(2, frame3);
stop();
super();
requestPlayMore = new URLRequest(urlPlayMore);
progressBar = (getChildByName("percentbar") as Sprite);
progressBar.scaleX = 0;
percentText = (getChildByName("percent") as TextField);
percentText.text = "0";
timer = new Timer(100, 0);
timer.addEventListener(TimerEvent.TIMER, afterSecond);
timer.start();
logo.buttonMode = true;
logo.useHandCursor = true;
logo.addEventListener(MouseEvent.CLICK, handleClick);
}
private function enterFrameHandler(_arg1:Event):void{
trace(" loading complete");
if (currentFrame >= _slot1.startFrame){
removeEventListener(Event.ENTER_FRAME, enterFrameHandler);
stop();
initApp();
};
}
private function onComplete(_arg1:Event):void{
play();
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
}
function frame3(){
stop();
}
public function handleClick(_arg1:MouseEvent){
var event = _arg1;
try {
navigateToURL(requestPlayMore, "_blank");
} catch(e:Error) {
};
}
public function afterSecond(_arg1:TimerEvent){
var _local2:uint;
var _local3:uint;
var _local4:Number;
_local2 = loaderInfo.bytesLoaded;
_local3 = loaderInfo.bytesTotal;
_local4 = (_local2 / _local3);
progressBar.scaleX = ((_local2 / _local3) * 4);
percentText.text = (Math.round((_local4 * 100)).toString() + "%");
if (_local2 >= _local3){
timer.stop();
play();
addEventListener(Event.ENTER_FRAME, enterFrameHandler);
};
}
private function showProgress(_arg1:ProgressEvent):void{
var _local2:uint;
var _local3:uint;
var _local4:Number;
_local2 = _arg1.bytesLoaded;
_local3 = _arg1.bytesTotal;
_local4 = (_local2 / _local3);
progressBar.scaleX = ((_local2 / _local3) * 4);
percentText.text = (Math.round((_local4 * 100)).toString() + "%");
}
private function initApp():void{
var _local1:Boolean;
var _local2:Class;
var _local3:MovieClip;
_local1 = loaderInfo.applicationDomain.hasDefinition(_slot1.mainClass);
trace((" definition : " + _local1));
_local2 = (loaderInfo.applicationDomain.getDefinition(_slot1.mainClass) as Class);
_local3 = (new (_local2) as MovieClip);
addChild(_local3);
}
}
}//package
Section 110
//SenitalTurrets (SenitalTurrets)
package {
import flash.geom.*;
import flash.display.*;
public class SenitalTurrets extends Enemy {
public var hitAreaClip:MovieClip;
private var fire:DisplayObject;
public var health:int;// = 100
public var gunClip:MovieClip;
private var ang:int;// = 30
public function SenitalTurrets(){
health = 100;
ang = 30;
super();
type = 12;
}
override public function init(){
shoot1Count = 0;
shoot1CountMax = 10;
health = GParams.PLASMABUGHEALTH;
}
override public function moveEnemy(){
super.moveEnemy();
shoot1Count = (shoot1Count + 1);
if (shoot1Count == shoot1CountMax){
shoot1Count = 0;
shootOne(ang);
gunClip.rotation = ang;
gunClip.gotoAndPlay(2);
ang = (ang + 15);
if (ang >= 180){
ang = 0;
};
};
}
public function hit(){
}
public function shootOne(_arg1:int){
var _local2:Point;
_local2 = new Point();
_local2.x = this.gunClip.x;
_local2.y = this.gunClip.y;
_local2 = localToGlobal(_local2);
trace((" beam added at : " + _local2));
fire = CrazyShooting.container.generateBullets(4, _local2, _arg1);
CrazyShooting.container.swapChildren(this, fire);
}
}
}//package
Section 111
//Statistics (Statistics)
package {
import flash.display.*;
import flash.text.*;
public class Statistics extends MovieClip {
public var healthBar:MovieClip;
public var weaponBar:MovieClip;
public var lifeBar:MovieClip;
public var powerUp:MovieClip;
public var progressBar:MovieClip;
public var scoretextClip:TextField;
public var shieldBar:MovieClip;
public static var statistics:Statistics = null;
public function init(){
x = 0;
y = 0;
resetAll();
updateScore();
updateLevel();
updateHealth();
updateLife();
updateShield();
}
public function updateProgress(){
var _local1:int;
_local1 = Math.ceil(((CrazyShooting.levelUpCounter / GParams.enemyLimit[GParams.currentLevel]) * 100));
if (_local1 > progressBar.progressClip.totalFrames){
_local1 = progressBar.progressClip.totalFrames;
};
progressBar.progressClip.gotoAndStop(_local1);
}
public function setCanonOn(){
powerUp.power2.gotoAndStop(2);
}
public function updateLevel(){
}
public function updateWeapon(){
weaponBar.gotoAndStop(CrazyShooting.myPlane.currentWeaponNum);
}
public function updateScore(){
var _local1:Number;
_local1 = Math.floor(CrazyShooting.gameScore);
scoretextClip.text = _local1.toString();
}
public function updateStats(){
updateScore();
updateLevel();
updateShield();
updateHealth();
updateWeapon();
updateProgress();
updateLife();
}
public function setMissileOn(){
powerUp.power1.gotoAndStop(2);
}
public function setMissileOff(){
powerUp.power1.gotoAndStop(1);
}
public function setRayOn(){
powerUp.power3.gotoAndStop(2);
}
public function updateShield(){
var _local1:int;
_local1 = CrazyShooting.myPlane.shield;
shieldBar.shieldClip.gotoAndStop(CrazyShooting.myPlane.shield);
}
public function updateHealth(){
var _local1:int;
_local1 = CrazyShooting.myPlane.health;
healthBar.healthClip.gotoAndStop(CrazyShooting.myPlane.health);
}
public function updateLife(){
var _local1:int;
_local1 = CrazyShooting.myPlane.life;
lifeBar.gotoAndStop(CrazyShooting.myPlane.life);
}
public function setCanonOff(){
powerUp.power2.gotoAndStop(1);
}
public function resetAll(){
scoretextClip.text = "";
healthBar.healthClip.gotoAndStop(100);
shieldBar.shieldClip.gotoAndStop(100);
lifeBar.gotoAndStop(5);
weaponBar.gotoAndStop(1);
powerUp.power1.gotoAndStop(1);
powerUp.power2.gotoAndStop(1);
powerUp.power3.gotoAndStop(1);
}
public function setRayOff(){
powerUp.power3.gotoAndStop(1);
}
public static function getInstance():Statistics{
if (statistics == null){
statistics = new (Statistics);
};
return (statistics);
}
}
}//package
Section 112
//SuperGuardians (SuperGuardians)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class SuperGuardians extends Enemy {
private var counter:int;// = 0
public var repairMC:MovieClip;
public var hitAreaClip:MovieClip;
public var health:int;// = 10
public var hitClip:MovieClip;
private var heroPlane:MyPlane;
public var healthMeter:MovieClip;
public var beamAnim:EnemyBeam;
public var neutronOrigin1:MovieClip;
public var neutronOrigin2:MovieClip;
public var beamAnim2:EnemyBeam;
public var neutronOrigin4:MovieClip;
public var neutronOrigin5:MovieClip;
public var neutronOrigin3:MovieClip;
private var repairStatus:Boolean;// = false
public var dieClip:MovieClip;
public function SuperGuardians(){
health = 10;
repairStatus = false;
counter = 0;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
type = 11;
}
private function updateHealthParam(){
var _local1:int;
_local1 = Math.ceil(((health / 450) * 100));
if (healthMeter != null){
healthMeter.gotoAndStop(_local1);
};
}
public function shootMissile(){
var _local1:Point;
_local1 = new Point();
_local1.x = this.neutronOrigin5.x;
_local1.y = this.neutronOrigin5.y;
_local1 = localToGlobal(_local1);
CrazyShooting.container.generateBullets(3, _local1);
}
override public function init(){
health = 450;
CrazyShooting.specialType = true;
heroPlane = CrazyShooting.myPlane;
shoot1CountMax = 15;
repairStatus = false;
healthMeter.gotoAndStop(100);
}
private function playBlast(_arg1:Event){
if (currentLabel == "die"){
stopBeam();
if (this.dieClip != null){
if (this.dieClip.currentFrame >= this.dieClip.totalFrames){
this.dieClip.gotoAndStop(1);
CrazyShooting.levelUpCounter = 300;
CrazyShooting.powerUpMaxCounter = 400;
gotoAndStop("stand");
CrazyShooting.specialType = false;
removeEventListener(Event.ENTER_FRAME, playBlast);
CrazyShooting.container.removeEnemy(this);
};
};
};
}
override public function moveEnemy(){
var _local1:int;
if (currentLabel != "die"){
super.moveEnemy();
if (currentLabel != "hit"){
counter++;
if (counter > 13){
repairHealth();
};
};
if (beamAnim != null){
if (beamAnim.currentLabel == "fire"){
if (beamAnim.fireAnim.currentFrame >= beamAnim.fireAnim.totalFrames){
beamAnim.fireAnim.gotoAndStop(1);
beamAnim.gotoAndStop(1);
beamAnim2.fireAnim.gotoAndStop(1);
beamAnim2.gotoAndStop(1);
};
checkRayCollision();
};
};
shoot1Count = (shoot1Count + 1);
if (shoot1Count == shoot1CountMax){
shoot1Count = 0;
_local1 = (Math.random() * 20);
if (_local1 <= 5){
shootTurrets();
} else {
if ((((_local1 > 5)) && ((_local1 < 10)))){
shootCanons();
} else {
if ((((_local1 > 10)) && ((_local1 < 15)))){
shootMissile();
} else {
shootCanons();
shootRay();
};
};
};
};
};
}
private function checkRayCollision(){
if (beamAnim.fireAnim.hitTestObject(heroPlane)){
heroPlane.missileHit();
};
if (beamAnim2.fireAnim.hitTestObject(heroPlane)){
heroPlane.missileHit();
};
}
function frame3(){
stop();
}
private function repairHealth(){
if (health < 450){
health = (health + 4);
repairStatus = true;
repairMC.gotoAndStop(2);
updateHealthParam();
};
}
public function shootTurrets(){
var _local1:Point;
var _local2:Point;
var _local3:Point;
var _local4:Point;
_local1 = new Point();
_local1.x = this.neutronOrigin1.x;
_local1.y = this.neutronOrigin1.y;
_local1 = localToGlobal(_local1);
CrazyShooting.container.generateBullets(0, _local1);
_local2 = new Point();
_local2.x = this.neutronOrigin2.x;
_local2.y = this.neutronOrigin2.y;
_local2 = localToGlobal(_local2);
CrazyShooting.container.generateBullets(0, _local2);
_local3 = new Point();
_local3.x = this.neutronOrigin3.x;
_local3.y = this.neutronOrigin3.y;
_local3 = localToGlobal(_local3);
CrazyShooting.container.generateBullets(0, _local3);
_local4 = new Point();
_local4.x = this.neutronOrigin4.x;
_local4.y = this.neutronOrigin4.y;
_local4 = localToGlobal(_local4);
CrazyShooting.container.generateBullets(0, _local4);
}
function frame2(){
stop();
}
private function shootRay(){
if (beamAnim != null){
if (beamAnim.currentLabel != "fire"){
beamAnim.gotoAndStop("fire");
};
};
if (beamAnim2 != null){
if (beamAnim2.currentLabel != "fire"){
beamAnim2.gotoAndStop("fire");
};
};
}
override public function removeAllListeners(){
stopBeam();
}
public function shootCanons(){
var _local1:Point;
var _local2:Point;
var _local3:Point;
var _local4:Point;
_local1 = new Point();
_local1.x = this.neutronOrigin5.x;
_local1.y = this.neutronOrigin5.y;
_local1 = localToGlobal(_local1);
CrazyShooting.container.generateBullets(4, _local1, -210);
_local2 = new Point();
_local2.x = this.neutronOrigin5.x;
_local2.y = this.neutronOrigin5.y;
_local2 = localToGlobal(_local2);
CrazyShooting.container.generateBullets(4, _local2, -150);
_local3 = new Point();
_local3.x = this.neutronOrigin5.x;
_local3.y = this.neutronOrigin5.y;
_local3 = localToGlobal(_local3);
CrazyShooting.container.generateBullets(4, _local3, -180);
_local4 = new Point();
_local4.x = this.neutronOrigin5.x;
_local4.y = this.neutronOrigin5.y;
_local4 = localToGlobal(_local4);
CrazyShooting.container.generateBullets(4, _local4, -120);
}
public function hit(){
health = (health - 1);
counter = 0;
repairMC.gotoAndStop(1);
updateHealthParam();
if (health > 0){
if (currentLabel != "hit"){
addEventListener(Event.ENTER_FRAME, playHit);
gotoAndStop("hit");
};
} else {
if (currentLabel != "die"){
stopBeam();
CrazyShooting.gameScore = (CrazyShooting.gameScore + 1);
addEventListener(Event.ENTER_FRAME, playBlast);
gotoAndStop("die");
};
};
}
private function playHit(_arg1:Event){
if (currentLabel == "hit"){
if (this.hitClip != null){
if (this.hitClip.currentFrame >= this.hitClip.totalFrames){
this.hitClip.gotoAndStop(1);
gotoAndStop("stand");
removeEventListener(Event.ENTER_FRAME, playHit);
};
};
};
}
function frame1(){
stop();
}
private function stopBeam(){
if (beamAnim != null){
if (beamAnim.currentLabel == "fire"){
beamAnim.fireAnim.gotoAndStop(1);
beamAnim.gotoAndStop(1);
};
};
if (beamAnim2 != null){
if (beamAnim2.currentLabel == "fire"){
beamAnim2.fireAnim.gotoAndStop(1);
beamAnim2.gotoAndStop(1);
};
};
}
}
}//package
Section 113
//Surface (Surface)
package {
import flash.display.*;
public class Surface extends MovieClip {
var bgNumber:Number;
public function init(){
gotoAndPlay(2);
}
public function removeClip(){
}
}
}//package
Section 114
//SurfaceFactory (SurfaceFactory)
package {
public class SurfaceFactory {
private static var surfaceL1:SurfaceL1 = null;
private static var surfaceL2:SurfaceL2 = null;
private static var surfaceL3:SurfaceL3 = null;
private static var surfaceL4:SurfaceL4 = null;
private static var surfaceL5:SurfaceL5 = null;
private static var surfaceL6:SurfaceL6 = null;
private static var surfaceL7:SurfaceL7 = null;
private static var surfaceL8:SurfaceL8 = null;
private static var surfaceL9:SurfaceL9 = null;
public static function createInstance():Surface{
switch ((GParams.currentLevel + 1)){
case 1:
if (surfaceL1 == null){
surfaceL1 = new SurfaceL1();
};
return (surfaceL1);
case 2:
if (surfaceL2 == null){
surfaceL2 = new SurfaceL2();
};
return (surfaceL2);
case 3:
if (surfaceL3 == null){
surfaceL3 = new SurfaceL3();
};
return (surfaceL3);
case 4:
if (surfaceL4 == null){
surfaceL4 = new SurfaceL4();
};
return (surfaceL4);
case 5:
if (surfaceL5 == null){
surfaceL5 = new SurfaceL5();
};
return (surfaceL5);
case 6:
if (surfaceL6 == null){
surfaceL6 = new SurfaceL6();
};
return (surfaceL6);
case 7:
if (surfaceL7 == null){
surfaceL7 = new SurfaceL7();
};
return (surfaceL7);
case 8:
if (surfaceL8 == null){
surfaceL8 = new SurfaceL8();
};
return (surfaceL8);
case 9:
if (surfaceL9 == null){
surfaceL9 = new SurfaceL9();
};
return (surfaceL9);
default:
return (null);
};
}
}
}//package
Section 115
//SurfaceL1 (SurfaceL1)
package {
import flash.display.*;
public class SurfaceL1 extends Surface {
public var planetMove:MovieClip;
public function SurfaceL1(){
bgNumber = 1;
}
}
}//package
Section 116
//SurfaceL2 (SurfaceL2)
package {
public class SurfaceL2 extends Surface {
public function SurfaceL2(){
bgNumber = 2;
}
}
}//package
Section 117
//SurfaceL3 (SurfaceL3)
package {
import flash.display.*;
public class SurfaceL3 extends Surface {
public var planetMove:MovieClip;
public function SurfaceL3(){
bgNumber = 3;
}
}
}//package
Section 118
//SurfaceL4 (SurfaceL4)
package {
public class SurfaceL4 extends Surface {
public function SurfaceL4(){
bgNumber = 4;
}
}
}//package
Section 119
//SurfaceL5 (SurfaceL5)
package {
public class SurfaceL5 extends Surface {
public function SurfaceL5(){
bgNumber = 5;
}
}
}//package
Section 120
//SurfaceL6 (SurfaceL6)
package {
public class SurfaceL6 extends Surface {
public function SurfaceL6(){
bgNumber = 6;
}
}
}//package
Section 121
//SurfaceL7 (SurfaceL7)
package {
import flash.display.*;
public class SurfaceL7 extends Surface {
public var planetMove:MovieClip;
public function SurfaceL7(){
bgNumber = 7;
}
}
}//package
Section 122
//SurfaceL8 (SurfaceL8)
package {
import flash.display.*;
public class SurfaceL8 extends Surface {
public var planetMove:MovieClip;
public function SurfaceL8(){
bgNumber = 8;
}
}
}//package
Section 123
//SurfaceL9 (SurfaceL9)
package {
public class SurfaceL9 extends Surface {
public function SurfaceL9(){
bgNumber = 9;
}
}
}//package
Section 124
//TrackBullet (TrackBullet)
package {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
public class TrackBullet extends Bullet {
public var hitAreaClip:MovieClip;
public var blastClip:MovieClip;
private var bulletSpeed:uint;// = 20
private var heroPlane:MyPlane;
public function TrackBullet(){
bulletSpeed = 20;
super();
addFrameScript(0, frame1, 1, frame2);
}
override public function init(_arg1:Point, _arg2:int=8, _arg3:int=0){
var _local4:int;
var _local5:int;
var _local6:int;
super.init(_arg1);
heroPlane = CrazyShooting.myPlane;
_local4 = (heroPlane.y - y);
_local5 = (heroPlane.x - x);
_local6 = (Math.atan((_local4 / _local5)) / (Math.PI / 180));
rotation = _local6;
moveObject = MovementFactory.getMovementObject(10);
moveObject.init(_arg1.x, _arg1.y, bulletSpeed);
gotoAndStop(1);
}
override public function moveBullet(){
if (currentFrame == 1){
if (moveObject.getNextPosition()){
this.x = moveObject.currentPos.x;
this.y = moveObject.currentPos.y;
} else {
removeBullet();
return;
};
};
}
override public function removeAllListeners(){
if (hasEventListener(Event.ENTER_FRAME)){
removeEventListener(Event.ENTER_FRAME, checkBlast);
};
}
function frame1(){
stop();
}
override public function removeBullet(){
if (currentFrame != 2){
addEventListener(Event.ENTER_FRAME, checkBlast);
gotoAndStop(2);
};
}
public function clearBullet(){
if (CrazyShooting.container.contains(this)){
CrazyShooting.container.removeBullet(this);
};
}
function frame2(){
stop();
}
private function checkBlast(_arg1:Event){
if (this.blastClip != null){
if (this.blastClip.currentFrame >= this.blastClip.totalFrames){
this.blastClip.gotoAndStop(1);
gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, checkBlast);
clearBullet();
};
};
}
}
}//package
Section 125
//Welcome (Welcome)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class Welcome extends MovieClip {
public var hs:MovieClip;
var requestAddMore:URLRequest;// = null
var urlPlayMore:String;// = "http://www.flasharcade.com"
public var ipwelcome:MovieClip;
var requestPlayMore:URLRequest;// = null
public var introframe:MovieClip;
var urlAddMoreGames:String;// = "http://www.flasharcade.com/flash-games/"
private static var welcome:Welcome = null;
public function Welcome(){
urlPlayMore = "http://www.flasharcade.com";
requestPlayMore = null;
urlAddMoreGames = "http://www.flasharcade.com/flash-games/";
requestAddMore = null;
super();
requestPlayMore = new URLRequest(urlPlayMore);
requestAddMore = new URLRequest(urlAddMoreGames);
ipwelcome.playMore.addEventListener(MouseEvent.CLICK, handleClick);
ipwelcome.addMore.addEventListener(MouseEvent.CLICK, handleClickAddMore);
introframe.playMore.addEventListener(MouseEvent.CLICK, handleClick);
hs.playMorehs.addEventListener(MouseEvent.CLICK, handleClick);
introframe.weaponBtn.addEventListener(MouseEvent.CLICK, showWeapon);
introframe.weaponIntro.closeBtn.addEventListener(MouseEvent.CLICK, closeWeaponIntro);
}
public function handleClickAddMore(_arg1:MouseEvent){
var event = _arg1;
try {
navigateToURL(requestAddMore, "_blank");
} catch(e:Error) {
};
}
public function handleClick(_arg1:MouseEvent){
var event = _arg1;
try {
navigateToURL(requestPlayMore, "_blank");
} catch(e:Error) {
};
}
private function showWeapon(_arg1:MouseEvent){
introframe.weaponIntro.gotoAndStop(2);
}
private function closeWeaponIntro(_arg1:MouseEvent){
introframe.weaponIntro.gotoAndStop(1);
}
public function emptyScores(){
var _local1:String;
_local1 = "";
hs.player1.text = _local1;
hs.score1.text = _local1;
hs.date1.text = _local1;
hs.player2.text = _local1;
hs.score2.text = _local1;
hs.date2.text = _local1;
hs.player3.text = _local1;
hs.score3.text = _local1;
hs.date3.text = _local1;
hs.player4.text = _local1;
hs.score4.text = _local1;
hs.date4.text = _local1;
hs.player5.text = _local1;
hs.score5.text = _local1;
hs.date5.text = _local1;
hs.player6.text = _local1;
hs.score6.text = _local1;
hs.date6.text = _local1;
hs.player7.text = _local1;
hs.score7.text = _local1;
hs.date7.text = _local1;
hs.player8.text = _local1;
hs.score8.text = _local1;
hs.date8.text = _local1;
hs.player9.text = _local1;
hs.score9.text = _local1;
hs.date9.text = _local1;
hs.player10.text = _local1;
hs.score10.text = _local1;
hs.date10.text = _local1;
}
public static function getInstance():Welcome{
if (welcome == null){
welcome = new (Welcome);
};
return (welcome);
}
}
}//package
Section 126
//WelcomeSound (WelcomeSound)
package {
import flash.media.*;
public class WelcomeSound extends Sound {
}
}//package
Section 127
//YouWin (YouWin)
package {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.net.*;
public class YouWin extends MovieClip {
public var playAgain1:SimpleButton;
public var errormesg:TextField;
var urlPlayMore:String;// = "http://www.flasharcade.com"
var requestPlayMore:URLRequest;// = null
public var submitScore:SimpleButton;
public var playMore:SimpleButton;
public var gameScore:TextField;
public var player:TextField;
private static var youWin:YouWin = null;
public function YouWin(){
urlPlayMore = "http://www.flasharcade.com";
requestPlayMore = null;
super();
requestPlayMore = new URLRequest(urlPlayMore);
}
public function getPlayerName():String{
var _local1:String;
_local1 = this.player.text;
if (_local1 == null){
return (null);
};
this.errormesg.text = "";
return (_local1);
}
public function init(){
requestPlayMore = new URLRequest(urlPlayMore);
playMore.addEventListener(MouseEvent.CLICK, handleClick);
}
public function handleClick(_arg1:MouseEvent){
var event = _arg1;
try {
navigateToURL(requestPlayMore, "_blank");
} catch(e:Error) {
};
}
public function updateScores(){
CrazyShooting.gameScore = Math.ceil(CrazyShooting.gameScore);
this.gameScore.text = CrazyShooting.gameScore.toString();
}
public function resetData(){
this.gameScore.text = " ";
this.player.text = "";
this.errormesg.text = " ";
}
public function setErrorMesg(_arg1:String){
this.errormesg.text = _arg1;
}
public static function getInstance():YouWin{
if (youWin == null){
youWin = new (YouWin);
};
youWin.resetData();
return (youWin);
}
}
}//package
Section 128
//YouWinSound (YouWinSound)
package {
import flash.media.*;
public class YouWinSound extends Sound {
}
}//package