Section 1
//AdLoader (CPMStar.AdLoader)
package CPMStar {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public class AdLoader {
private static var cpmstarLoader:Loader;
public static function LoadAd(_arg1:int, _arg2:int):DisplayObject{
var _local3:String;
Security.allowDomain("server.cpmstar.com");
_local3 = "http://server.cpmstar.com/adviewas3.swf";
cpmstarLoader = new Loader();
cpmstarLoader.load(new URLRequest(((((_local3 + "?poolid=") + _arg1) + "&subpoolid=") + _arg2)));
return (cpmstarLoader);
}
}
}//package CPMStar
Section 2
//achi_51 (SX5MSEU2_fla.achi_51)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class achi_51 extends MovieClip {
public var achiL:MovieClip;
public var lockM:MovieClip;
public var achi:MovieClip;
}
}//package SX5MSEU2_fla
Section 3
//achis_52 (SX5MSEU2_fla.achis_52)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class achis_52 extends MovieClip {
public function achis_52(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SX5MSEU2_fla
Section 4
//achiunlock_130 (SX5MSEU2_fla.achiunlock_130)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class achiunlock_130 extends MovieClip {
public var achi:MovieClip;
}
}//package SX5MSEU2_fla
Section 5
//achiwindow_49 (SX5MSEU2_fla.achiwindow_49)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class achiwindow_49 extends MovieClip {
public var clearbtn:SimpleButton;
public var closebtn:SimpleButton;
public var achi1:MovieClip;
public var achi2:MovieClip;
public var achi4:MovieClip;
public var achi5:MovieClip;
public var achi3:MovieClip;
}
}//package SX5MSEU2_fla
Section 6
//ag_intro_mc_23 (SX5MSEU2_fla.ag_intro_mc_23)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class ag_intro_mc_23 extends MovieClip {
public var agbtn:SimpleButton;
public function ag_intro_mc_23(){
addFrameScript(0, frame1, 217, frame218);
}
function frame218(){
stop();
}
function frame1(){
stop();
}
}
}//package SX5MSEU2_fla
Section 7
//arr2_127 (SX5MSEU2_fla.arr2_127)
package SX5MSEU2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class arr2_127 extends MovieClip {
public var word:TextField;
}
}//package SX5MSEU2_fla
Section 8
//arrow_126 (SX5MSEU2_fla.arrow_126)
package SX5MSEU2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class arrow_126 extends MovieClip {
public var word:TextField;
}
}//package SX5MSEU2_fla
Section 9
//cloudmove_79 (SX5MSEU2_fla.cloudmove_79)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class cloudmove_79 extends MovieClip {
public var clouds:MovieClip;
}
}//package SX5MSEU2_fla
Section 10
//cooliologoanimate_10 (SX5MSEU2_fla.cooliologoanimate_10)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class cooliologoanimate_10 extends MovieClip {
public function cooliologoanimate_10(){
addFrameScript(0, frame1, 139, frame140);
}
function frame1(){
stop();
}
function frame140(){
stop();
}
}
}//package SX5MSEU2_fla
Section 11
//darkovermenu_57 (SX5MSEU2_fla.darkovermenu_57)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class darkovermenu_57 extends MovieClip {
public function darkovermenu_57(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package SX5MSEU2_fla
Section 12
//dingsound_84 (SX5MSEU2_fla.dingsound_84)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class dingsound_84 extends MovieClip {
public function dingsound_84(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SX5MSEU2_fla
Section 13
//endgamescreen_122 (SX5MSEU2_fla.endgamescreen_122)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class endgamescreen_122 extends MovieClip {
public function endgamescreen_122(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SX5MSEU2_fla
Section 14
//followon2_35 (SX5MSEU2_fla.followon2_35)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class followon2_35 extends MovieClip {
public var hitarea:MovieClip;
}
}//package SX5MSEU2_fla
Section 15
//glow_38 (SX5MSEU2_fla.glow_38)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class glow_38 extends MovieClip {
public function glow_38(){
addFrameScript(112, frame113);
}
function frame113(){
stop();
}
}
}//package SX5MSEU2_fla
Section 16
//key_48 (SX5MSEU2_fla.key_48)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class key_48 extends MovieClip {
public function key_48(){
addFrameScript(64, frame65);
}
function frame65(){
stop();
}
}
}//package SX5MSEU2_fla
Section 17
//lives_93 (SX5MSEU2_fla.lives_93)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class lives_93 extends MovieClip {
public function lives_93(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SX5MSEU2_fla
Section 18
//logo_39 (SX5MSEU2_fla.logo_39)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class logo_39 extends MovieClip {
public function logo_39(){
addFrameScript(55, frame56);
}
function frame56(){
stop();
}
}
}//package SX5MSEU2_fla
Section 19
//lvlup_87 (SX5MSEU2_fla.lvlup_87)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class lvlup_87 extends MovieClip {
public function lvlup_87(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SX5MSEU2_fla
Section 20
//MainTimeline (SX5MSEU2_fla.MainTimeline)
package SX5MSEU2_fla {
import flash.display.*;
import flash.events.*;
import CPMStar.*;
import flash.media.*;
import flash.ui.*;
import flash.geom.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var deg;
public var dec;
public var clock;
public var b1:Bitmap;
public var b2:Bitmap;
public var b3:Bitmap;
public var my_menu:ContextMenu;
public var b5:Bitmap;
public var dMov;
public var b4:Bitmap;
public var ySize;
public var lvl:Array;
public var ad:DisplayObject;
public var drawing:MovieClip;
public var lbar:MovieClip;
public var white;
public var clicked;
public var startW;
public var c2;
public var rad;
public var startbx;
public var startby;
public var startP;
public var winner;
public var bulletsBitmap:BitmapData;
public var cF;
public var sdx;
public var scoreS1;
public var sdy;
public var sponsor2;
public var c1;
public var scoreS2;
public var c:ColorTransform;
public var starty;
public var gridSize;
public var programmed2;
public var ftyp;
public var m:Matrix;
public var startx;
public var skipbtn:SimpleButton;
public var spawnTimer;
public var percent1;
public var finish;
public var xSize;
public var percent2;
public var deadship;
public var fire2:Array;
public var armorbtn:SimpleButton;
public var hold;
public var fulldist;
public var CPMStarSubPoolID:int;
public var programmed;
public var CPMStarPoolID:int;
public var effectsBitmap:BitmapData;
public var inter;
public var clouds:MovieClip;
public var tanksArr:Array;
public var level1p;
public var turret:MovieClip;
public var mscale;
public var ding:MovieClip;
public var bullet:MovieClip;
public var lives:Array;
public var level2p;
public var pauseM;
public var sWidth;
public var level3p;
public var pboost;
public var xelu:MovieClip;
public var loading:MovieClip;
public var armor:MovieClip;
public var scale;
public var shipPatterns;
public var qual;
public var eGrid:Array;
public var mGrid:Array;
public var menu:MovieClip;
public var level4p;
public var myLocalData:SharedObject;
public var ship1;
public var ship2;
public var ground:MovieClip;
public var finishMc;
public var groundBitmap:BitmapData;
public var rankM;
public var animated;
public var pPress;
public var congrats;
public var ships:Array;
public var mainS;
public var wings:Array;
public var shipsBitmap:BitmapData;
public var lvlups;
public var q1;
public var q2;
public var q3;
public var achisMc;
public var st2:SoundTransform;
public var keys:Array;
public var pi;
public var counter:MovieClip;
public var finalBoss;
public var bulletPatterns:Array;
public var achisT;
public var music;
public var achisU;
public var coolio:MovieClip;
public var fire:Array;
public var finishR;
public var ship:MovieClip;
public var lvlup;
public var qPress;
public var achiwindow:MovieClip;
public var sc:SoundChannel;
public var sn;
public var enemiesArr:Array;
public var st:SoundTransform;
public var doorsT;
public var scoreBitmap:BitmapData;
public var lcolor;
public var mBullets:Array;
public var doors;
public var levelPatterns;
public var adBox:MovieClip;
public var music2;
public var playbtn:SimpleButton;
public var qua;
public var laser1;
public var laser2;
public var laser;
public var menuS;
public var animated2;
public var scoreH1;
public var scoreH2;
public var clouds2;
public var qShow;
public var sponsor;
public var shadowM:MovieClip;
public var warmor;
public var bestScore;
public var timer;
public var backspd;
public var sHeight;
public var level;
public var cdown;
public var tmplvlup;
public var eMissiles:Array;
public var pulse;
public var mMissiles:Array;
public var eBullets:Array;
public var ldraw;
public var bitmapHolder:MovieClip;
public var copyright;
public var openbtn:SimpleButton;
public var bitmapHolder2:MovieClip;
public var bitmapHolder3:MovieClip;
public var winner1;
public var score2;
public var sc2:SoundChannel;
public var score1;
public var drawingL;
public var dWait:Array;
public var explosions;
public function MainTimeline(){
addFrameScript(0, frame1, 3, frame4, 4, frame5, 5, frame6);
}
public function onSkip(_arg1:MouseEvent):void{
if (currentFrame == 4){
armor.gotoAndStop(218);
coolio.gotoAndStop(140);
xelu.gotoAndStop(104);
stage.removeEventListener(Event.ENTER_FRAME, enterframe4);
nextFrame();
};
}
public function showLives(){
var _local1:*;
_local1 = 0;
while (_local1 < 2) {
if (dWait[_local1] > 0){
var _local2 = dWait;
var _local3 = _local1;
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
if (dWait[_local1] == 5){
addExplosion(ships[_local1].x, ships[_local1].y, 20, 3);
addExplosion(ships[_local1].x, ships[_local1].y, 20, 3);
addExplosion(ships[_local1].x, ships[_local1].y, 20, 3);
addExplosion(ships[_local1].x, ships[_local1].y, 20, 3);
};
if ((((dWait[_local1] > 100)) && ((lives[_local1] > 0)))){
dWait[_local1] = 0;
};
};
_local1++;
};
if (ships.length == 1){
if ((((level == 0)) && ((spawnTimer <= 200)))){
inter.lives2.gotoAndStop(1);
if (keys[87] == true){
ships.push(ship2);
pboost = 2;
ships[1].y = ships[0].y;
if (shipDist(ships[0].x, ships[0].y, ships[1].x, ships[1].y) < 30){
ships[1].x = (ships[1].x - 150);
};
};
} else {
inter.lives2.gotoAndStop(12);
};
} else {
inter.lives2.gotoAndStop((12 - lives[1]));
};
inter.lives1.gotoAndStop((12 - lives[0]));
}
public function onCloseW(_arg1:MouseEvent):void{
achiwindow.visible = false;
}
public function drawEnemies(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
var _local21:*;
var _local22:*;
var _local23:*;
var _local24:*;
var _local25:*;
var _local26:*;
var _local27:*;
var _local28:*;
var _local29:*;
var _local30:*;
var _local31:*;
var _local32:*;
var _local33:*;
var _local34:*;
var _local35:*;
var _local36:*;
var _local37:*;
var _local38:*;
var _local39:*;
var _local40:*;
var _local41:*;
var _local42:*;
var _local43:*;
var _local44:*;
var _local45:*;
var _local46:*;
var _local47:*;
var _local48:*;
var _local49:*;
var _local50:*;
var _local51:*;
var _local52:*;
_local1 = new Array();
_local2 = new Array();
_local3 = false;
_local5 = 0;
for (;_local5 < (enemiesArr.length + tanksArr.length);_local5++) {
if (ships.length > 1){
if ((((lives[0] <= 0)) && ((lives[1] <= 0)))){
finish = true;
} else {
if (lives[0] == 0){
deadship++;
pboost = 1;
lives[0] = -100;
} else {
if (lives[1] == 0){
deadship++;
pboost = 1;
lives[1] = -100;
};
};
};
} else {
if (lives[0] <= 0){
finish = true;
};
};
if (finish){
break;
} else {
if (_local5 < tanksArr.length){
_local6 = tanksArr[_local5];
_local4 = _local5;
} else {
_local4 = (_local5 - tanksArr.length);
_local6 = enemiesArr[_local4];
};
if (deadship == 1){
_local6.l = Math.ceil((_local6.l / 1.7));
_local6.score = Math.ceil((_local6.score / 2));
};
_local7 = _local6.rot;
_local12 = shipPatterns[_local6.p];
if (lives[_local6.ts] == -100){
if (_local6.ts == 1){
_local6.ts = 0;
} else {
_local6.ts = 1;
};
};
if (!_local6.currF){
if (_local12[_local6.curr] == 1){
_local6.spd = _local12[(_local6.curr + 1)];
_local6.curr = (_local6.curr + 2);
} else {
if (_local12[_local6.curr] == 2){
_local6.nRot = (_local12[(_local6.curr + 1)] + _local6.rot);
_local6.movTyp = 2;
_local6.currF = true;
} else {
if (_local12[_local6.curr] == 3){
_local6.currF = true;
_local6.timer = 0;
_local6.twait = _local12[(_local6.curr + 1)];
_local6.movTyp = 3;
} else {
if (_local12[_local6.curr] == 4){
_local6.currF = true;
_local6.timer = 0;
_local6.twait = _local12[(_local6.curr + 1)];
_local6.movTyp = 4;
} else {
if (_local12[_local6.curr] == 5){
_local6.movTyp = 5;
} else {
if (_local12[_local6.curr] == 6){
_local6.curr = (_local6.curr - _local12[(_local6.curr + 1)]);
};
};
};
};
};
};
} else {
if ((((_local6.movTyp == 2)) || ((_local6.movTyp == 4)))){
_local10 = _local12[(_local6.curr + 2)];
if (_local6.movTyp == 4){
_local8 = (ships[_local6.ts].x - _local6.xpos);
_local9 = (ships[_local6.ts].y - _local6.ypos);
_local6.nRot = ((-(Math.atan2(_local8, _local9)) / rad) + 90);
};
if (_local6.nRot != _local6.rot){
if (Math.abs((_local6.rot - _local6.nRot)) > Math.abs(((_local6.rot - _local6.nRot) - 360))){
_local6.nRot = (_local6.nRot + 360);
};
if (_local6.nRot > _local6.rot){
_local6.rot = (_local6.rot + _local10);
} else {
if (_local6.nRot < _local6.rot){
_local6.rot = (_local6.rot - _local10);
};
};
if (Math.abs((_local6.nRot - _local6.rot)) < _local10){
_local6.rot = _local6.nRot;
if (_local6.movTyp == 2){
_local6.currF = false;
_local6.curr = (_local6.curr + 3);
};
};
};
};
if (_local6.timer < _local6.twait){
_local6.timer++;
} else {
_local6.timer = 0;
_local6.twait = 0;
if (_local6.movTyp == 3){
_local6.currF = false;
_local6.curr = (_local6.curr + 2);
} else {
if (_local6.movTyp == 4){
_local6.currF = false;
_local6.curr = (_local6.curr + 3);
};
};
};
};
if (_local6.spd != 0){
_local21 = (-(Math.cos(((_local6.rot + 90) * rad))) * _local6.spd);
_local22 = (Math.sin(((_local6.rot + 90) * rad)) * _local6.spd);
_local6.xpos = (_local6.xpos + _local22);
_local6.ypos = (_local6.ypos + _local21);
if (_local5 < tanksArr.length){
_local23 = false;
_local24 = 0;
while (_local24 < tanksArr.length) {
if (_local24 != _local5){
_local25 = tanksArr[_local24];
if (_local25.l > 0){
if (shipDist(_local25.xpos, _local25.ypos, _local6.xpos, _local6.ypos) < ((_local25.rad + _local6.rad) * 1.35)){
_local23 = true;
break;
};
};
};
_local24++;
};
if (_local23){
_local6.rot = _local7;
_local6.xpos = (_local6.xpos - _local22);
_local6.ypos = (_local6.ypos - _local21);
};
};
};
if (_local5 < tanksArr.length){
_local6.ypos = (_local6.ypos + backspd);
};
if (_local6.rot > 360){
_local6.rot = (_local6.rot - 360);
};
if (_local6.trot > 360){
_local6.trot = (_local6.trot - 360);
};
_local13 = false;
_local34 = 0;
while (_local34 < ships.length) {
if (((((!(_local13)) && ((_local5 >= tanksArr.length)))) && (!((_local6.t == 16))))){
_local14 = (ships[_local34].x - _local6.xpos);
_local15 = (ships[_local34].y - _local6.ypos);
_local16 = Math.sqrt(((_local14 * _local14) + (_local15 * _local15)));
if (_local6.t == 19){
_local16 = (_local16 + 18);
};
if (_local16 < (14 + _local6.rad)){
c = new ColorTransform();
c.color = 0xFF0000;
c.alphaMultiplier = 0.6;
ship.rotation = 0;
ship.x = ships[_local34].x;
ship.y = ships[_local34].y;
ship.gotoAndStop(ships[_local34].f);
m = ship.transform.matrix;
m.scale(scale, scale);
if (dWait[_local34] == 0){
effectsBitmap.draw(ship, m, c);
};
c.alphaMultiplier = 0.6;
m = ground.transform.matrix;
m.scale(scale, scale);
if (dWait[_local34] == 0){
scoreBitmap.draw(ground, m, c);
_local13 = true;
var _local53 = lives;
var _local54 = _local34;
var _local55 = (_local53[_local54] - 1);
_local53[_local54] = _local55;
_local53 = dWait;
_local54 = _local34;
_local55 = (_local53[_local54] + 1);
_local53[_local54] = _local55;
};
};
};
_local34++;
};
if ((((_local6.t < 29)) || ((_local6.t >= 35)))){
ship.gotoAndStop(_local6.t);
} else {
if ((((_local6.t == 29)) || ((_local6.t == 30)))){
if (_local6.touchable){
ship.gotoAndStop(30);
} else {
ship.gotoAndStop(29);
};
} else {
if (_local6.t == 31){
if (_local6.l > 230){
ship.gotoAndStop(31);
} else {
if (_local6.l > 150){
ship.gotoAndStop(32);
} else {
ship.gotoAndStop(33);
};
};
};
};
};
if (_local6.t == 31){
if ((((((finalBoss[9].l <= 0)) && ((finalBoss[10].l <= 0)))) && ((finalBoss[11].l <= 0)))){
finalBoss[12].touchable = true;
};
};
if (_local6.t == 23){
if ((((finalBoss[1].l <= 0)) && ((finalBoss[7].l <= 0)))){
finalBoss[5].touchable = true;
finalBoss[6].touchable = true;
finalBoss[8].touchable = true;
if (_local6.moving < 150){
_local6.moving++;
_local6.xpos = (_local6.xpos - 2);
};
} else {
finalBoss[5].touchable = false;
finalBoss[6].touchable = false;
finalBoss[8].touchable = false;
};
if ((((finalBoss[2].l <= 0)) && ((finalBoss[8].l <= 0)))){
if (_local6.moving < 152){
finalBoss[9].touchable = true;
finalBoss[10].touchable = true;
finalBoss[11].touchable = true;
};
if (_local6.moving < (150 + 78)){
_local6.moving++;
_local6.xpos = (_local6.xpos + 2);
};
};
if (finalBoss[12].l <= 0){
finalBoss[0].touchable = true;
};
};
if (_local6.t == 24){
if ((((finalBoss[3].l <= 0)) && ((finalBoss[4].l <= 0)))){
finalBoss[1].touchable = true;
};
} else {
if (_local6.t == 25){
if ((((finalBoss[5].l <= 0)) && ((finalBoss[6].l <= 0)))){
finalBoss[2].touchable = true;
};
};
};
if (_local6.t == 24){
_local6.xpos = (finalBoss[0].xpos - 175);
_local6.ypos = (finalBoss[0].ypos - 2);
} else {
if (_local6.t == 25){
_local6.xpos = (finalBoss[0].xpos + 175);
_local6.ypos = (finalBoss[0].ypos - 2);
} else {
if (_local6.t == 22){
if (finalBoss[3] == _local6){
_local26 = (Math.cos((((finalBoss[1].nrot + 90) * Math.PI) / 180)) * 57);
_local27 = (Math.sin((((finalBoss[1].nrot + 90) * Math.PI) / 180)) * 57);
_local6.xpos = (_local26 + finalBoss[1].xpos);
_local6.ypos = (_local27 + finalBoss[1].ypos);
} else {
if (finalBoss[4] == _local6){
_local26 = (Math.cos((((finalBoss[1].nrot + 90) * Math.PI) / 180)) * 110);
_local27 = (Math.sin((((finalBoss[1].nrot + 90) * Math.PI) / 180)) * 110);
_local6.xpos = (_local26 + finalBoss[1].xpos);
_local6.ypos = (_local27 + finalBoss[1].ypos);
} else {
if (finalBoss[5] == _local6){
_local26 = (Math.cos((((finalBoss[2].nrot + 90) * Math.PI) / 180)) * 57);
_local27 = (Math.sin((((finalBoss[2].nrot + 90) * Math.PI) / 180)) * 57);
_local6.xpos = (_local26 + finalBoss[2].xpos);
_local6.ypos = (_local27 + finalBoss[2].ypos);
} else {
if (finalBoss[6] == _local6){
_local26 = (Math.cos((((finalBoss[2].nrot + 90) * Math.PI) / 180)) * 110);
_local27 = (Math.sin((((finalBoss[2].nrot + 90) * Math.PI) / 180)) * 110);
_local6.xpos = (_local26 + finalBoss[2].xpos);
_local6.ypos = (_local27 + finalBoss[2].ypos);
};
};
};
};
} else {
if (_local6.t == 27){
_local6.xpos = (finalBoss[0].xpos - 327);
_local6.ypos = (finalBoss[0].ypos + 109);
} else {
if (_local6.t == 28){
_local6.xpos = (finalBoss[0].xpos + 215);
_local6.ypos = (finalBoss[0].ypos + 95);
} else {
if (_local6.t == 26){
_local6.xpos = finalBoss[0].xpos;
_local6.ypos = (finalBoss[0].ypos - 2);
} else {
if (_local6.t == 29){
_local6.xpos = (finalBoss[0].xpos - 115);
_local6.ypos = (finalBoss[0].ypos + 70);
} else {
if (_local6.t == 30){
_local6.xpos = (finalBoss[0].xpos + 115);
_local6.ypos = (finalBoss[0].ypos + 70);
} else {
if (_local6.t == 31){
_local6.xpos = finalBoss[0].xpos;
_local6.ypos = (finalBoss[0].ypos + 110);
};
};
};
};
};
};
};
};
};
if (_local6.t == 27){
_local6.timeV++;
if (_local6.timeV < 30){
_local6.xpos = (_local6.xpos + ((_local6.w * _local6.timeV) / 30));
_local6.ypos = (_local6.ypos + ((-(_local6.h) * _local6.timeV) / 30));
} else {
if (_local6.timeV >= 30){
_local6.xpos = (_local6.xpos + (_local6.w * (1 - (((_local6.timeV - 30) - 1) / 30))));
_local6.ypos = (_local6.ypos + (-(_local6.h) * (1 - (((_local6.timeV - 30) - 1) / 30))));
};
};
if (_local6.timeV > 60){
_local6.timeV = 0;
};
} else {
if (_local6.t == 28){
_local6.timeV++;
if (_local6.timeV < 30){
_local6.xpos = (_local6.xpos + ((_local6.w * _local6.timeV) / 30));
_local6.ypos = (_local6.ypos + ((_local6.h * _local6.timeV) / 30));
} else {
if (_local6.timeV >= 30){
_local6.xpos = (_local6.xpos + (_local6.w * (1 - (((_local6.timeV - 30) - 1) / 30))));
_local6.ypos = (_local6.ypos + (_local6.h * (1 - (((_local6.timeV - 30) - 1) / 30))));
};
};
if (_local6.timeV > 60){
_local6.timeV = 0;
};
};
};
ship.x = _local6.xpos;
ship.y = _local6.ypos;
if (_local6.l > 0){
if ((((_local6.t == 27)) || ((_local6.t == 28)))){
_local6.ltime++;
if (_local6.ltime > 174){
_local6.ltime = 1;
};
if (_local6.t == 27){
_local28 = laser1;
_local28.x = (_local6.xpos + 5);
_local28.y = (_local6.ypos + 55);
} else {
if (_local6.t == 28){
_local28 = laser2;
_local28.x = (_local6.xpos - 5);
_local28.y = (_local6.ypos + 55);
};
};
_local28.gotoAndStop(_local6.ltime);
_local29 = _local28.transform.matrix;
_local29.scale(scale, scale);
effectsBitmap.draw(_local28, _local29);
if ((((_local28.currentFrame >= 68)) && ((_local28.currentFrame < 105)))){
if (((((_local28.hitTestPoint(ships[0].x, ships[0].y, true)) || (_local28.hitTestPoint((ships[0].x + 10), ships[0].y, true)))) || (_local28.hitTestPoint((ships[0].x - 10), ships[0].y, true)))){
c = new ColorTransform();
c.color = 0xFF0000;
c.alphaMultiplier = 0.6;
_local29 = ground.transform.matrix;
_local29.scale(scale, scale);
if (dWait[0] == 0){
scoreBitmap.draw(ground, _local29, c);
_local13 = true;
_local53 = lives;
_local54 = 0;
_local55 = (_local53[_local54] - 1);
_local53[_local54] = _local55;
_local53 = dWait;
_local54 = 0;
_local55 = (_local53[_local54] + 1);
_local53[_local54] = _local55;
};
};
if (ships.length > 1){
if (((((_local28.hitTestPoint(ships[1].x, ships[1].y, true)) || (_local28.hitTestPoint((ships[1].x + 10), ships[1].y, true)))) || (_local28.hitTestPoint((ships[1].x - 10), ships[1].y, true)))){
c = new ColorTransform();
c.color = 0xFF0000;
c.alphaMultiplier = 0.6;
_local29 = ground.transform.matrix;
_local29.scale(scale, scale);
if (dWait[1] == 0){
scoreBitmap.draw(ground, _local29, c);
_local13 = true;
_local53 = lives;
_local54 = 1;
_local55 = (_local53[_local54] - 1);
_local53[_local54] = _local55;
_local53 = dWait;
_local54 = 1;
_local55 = (_local53[_local54] + 1);
_local53[_local54] = _local55;
};
};
};
};
};
};
_local6.nrot = (_local6.nrot + _local6.nroti);
if (_local6.t == 24){
_local6.timeV++;
if (_local6.timeV < 20){
_local6.nrot = (_local6.nrot + 1);
} else {
if ((((_local6.timeV > 25)) && ((_local6.timeV < 45)))){
_local6.nrot = (_local6.nrot - 1);
};
};
if (_local6.timeV > 50){
_local6.timeV = 0;
};
wings[0] = new Array(_local6.xpos, _local6.ypos, _local6.nrot);
} else {
if (_local6.t == 25){
_local6.timeV++;
if (_local6.timeV < 20){
_local6.nrot = (_local6.nrot - 1);
} else {
if ((((_local6.timeV > 25)) && ((_local6.timeV < 45)))){
_local6.nrot = (_local6.nrot + 1);
};
};
if (_local6.timeV > 50){
_local6.timeV = 0;
};
wings[1] = new Array(_local6.xpos, _local6.ypos, _local6.nrot);
};
};
if (((((!((_local6.t == 29))) && (!((_local6.t == 30))))) && (!((_local6.t == 26))))){
if (_local6.rf){
ship.rotation = ((_local6.rot + 90) + _local6.nrot);
} else {
ship.rotation = (180 + _local6.nrot);
};
} else {
if (_local6.t == 26){
_local6.rot = (_local6.rot + 3);
};
if (_local6.touchable){
ship.rotation = (_local6.rot + 90);
} else {
ship.rotation = 180;
};
};
if (_local5 >= tanksArr.length){
shadowM.x = (ship.x + sdx);
shadowM.y = (ship.y + sdy);
} else {
shadowM.x = (ship.x + (sdx / 5));
shadowM.y = (ship.y + (sdy / 5));
};
shadowM.rotation = ship.rotation;
shadowM.gotoAndStop(_local6.t);
if (_local6.t != 20){
_local29 = ship.transform.matrix;
_local29.scale(scale, scale);
shipsBitmap.draw(ship, _local29);
};
shadowM.scaleX = (((365 - cF) / 365) * 0.8);
shadowM.scaleY = (((365 - cF) / 365) * 0.8);
c = new ColorTransform();
c.color = 0;
c.alphaMultiplier = ((0.2 * (365 - cF)) / 365);
_local29 = shadowM.transform.matrix;
_local29.scale(scale, scale);
if (level < 2){
groundBitmap.draw(shadowM, _local29, c);
};
if (_local6.turret > 0){
if (_local6.t != 20){
_local8 = (ships[_local6.ts].x - _local6.xpos);
_local9 = (ships[_local6.ts].y - _local6.ypos);
} else {
_local21 = (-(Math.cos(((_local6.rot + 90) * rad))) * 20);
_local22 = (Math.sin(((_local6.rot + 90) * rad)) * 20);
_local8 = ((ships[_local6.ts].x - _local6.xpos) - _local22);
_local9 = ((ships[_local6.ts].y - _local6.ypos) - _local21);
};
_local30 = ((-(Math.atan2(_local8, _local9)) / rad) + 90);
_local10 = 7;
if (_local30 != _local6.trot){
if (Math.abs((_local6.trot - _local30)) > Math.abs(((_local6.trot - _local30) - 360))){
_local30 = (_local30 + 360);
};
if (_local30 > _local6.trot){
_local6.trot = (_local6.trot + _local10);
} else {
if (_local30 < _local6.trot){
_local6.trot = (_local6.trot - _local10);
};
};
if (Math.abs((_local30 - _local6.trot)) < _local10){
_local6.trot = _local30;
};
};
turret.x = _local6.xpos;
turret.y = _local6.ypos;
if (_local6.t == 20){
turret.x = (turret.x + _local22);
turret.y = (turret.y + _local21);
};
turret.gotoAndStop(_local6.turret);
turret.rotation = (_local6.trot + 90);
_local29 = turret.transform.matrix;
_local29.scale(scale, scale);
shipsBitmap.draw(turret, _local29);
if (_local6.t == 20){
_local29 = ship.transform.matrix;
_local29.scale(scale, scale);
shipsBitmap.draw(ship, _local29);
turret.x = ship.x;
turret.y = ship.y;
turret.rotation = _local6.hrot;
_local6.hrot = (_local6.hrot + 34);
turret.gotoAndStop(5);
_local29 = turret.transform.matrix;
_local29.scale(scale, scale);
shipsBitmap.draw(turret, _local29);
shadowM.gotoAndStop(21);
shadowM.rotation = turret.rotation;
shadowM.scaleX = (((365 - cF) / 365) * 0.8);
shadowM.scaleY = (((365 - cF) / 365) * 0.8);
c = new ColorTransform();
c.color = 0;
c.alphaMultiplier = ((0.2 * (365 - cF)) / 365);
_local29 = shadowM.transform.matrix;
_local29.scale(scale, scale);
if (level < 2){
groundBitmap.draw(shadowM, _local29, c);
};
};
};
_local17 = (Math.round((_local6.xpos / gridSize)) + 5);
if (_local6.t == 23){
_local18 = (Math.round(((_local6.ypos + 110) / gridSize)) + 5);
} else {
_local18 = (Math.round((_local6.ypos / gridSize)) + 5);
};
_local19 = true;
_local20 = _local6.l;
if ((((((((_local18 < 0)) || ((_local17 < 2)))) || ((_local17 > (xSize - 2))))) || ((_local18 > (ySize - 3))))){
if (_local6.t < 22){
if (_local5 < tanksArr.length){
tanksArr[_local4].l = 0;
tanksArr.splice(_local4, 1);
_local5--;
continue;
} else {
if (enemiesArr[_local4].t != 15){
enemiesArr[_local4].l = 0;
enemiesArr.splice(_local4, 1);
_local5--;
continue;
};
};
} else {
if (_local6.t == 36){
if (_local6.movTyp == 5){
enemiesArr[_local4].l = 0;
enemiesArr.splice(_local4, 1);
_local5--;
continue;
};
};
};
} else {
_local31 = Math.ceil((_local6.rad / gridSize));
_local32 = (_local18 - _local31);
while (_local32 <= (_local18 + _local31)) {
_local33 = (_local17 - _local31);
while (_local33 <= (_local17 + _local31)) {
if ((((((((_local32 < 3)) || ((_local33 < 2)))) || ((_local33 > (xSize - 2))))) || ((_local32 > (ySize - 2))))){
} else {
_local34 = 0;
while (_local34 < mGrid[_local32][_local33].length) {
if (_local6.l > 0){
_local35 = mGrid[_local32][_local33][(_local34 + 1)];
_local36 = mGrid[_local32][_local33][_local34];
if (_local36 == 1){
_local37 = mBullets[_local35];
} else {
if (_local36 == 2){
_local37 = mMissiles[_local35];
};
};
if (_local6.touchable){
if (((!((_local35 == 9999))) && (!((_local37 == undefined))))){
_local38 = _local37;
_local39 = _local6.xpos;
_local40 = _local6.ypos;
if (_local6.t == 24){
_local14 = ((_local39 - _local38[0]) - 110);
_local15 = ((_local40 - _local38[1]) - 70);
} else {
if (_local6.t == 25){
_local14 = ((_local39 - _local38[0]) + 110);
_local15 = ((_local40 - _local38[1]) - 70);
} else {
if (_local6.t == 23){
_local14 = (_local39 - _local38[0]);
_local15 = ((_local40 - _local38[1]) + 110);
} else {
_local14 = (_local39 - _local38[0]);
_local15 = (_local40 - _local38[1]);
};
};
};
_local16 = Math.sqrt(((_local14 * _local14) + (_local15 * _local15)));
if (_local16 < _local6.rad){
_local6.l--;
if ((_local6.l % 2) == 0){
addExplosion(_local38[0], (_local38[1] - 10), 20, 1);
};
if (_local38[6] == 1){
_local6.p1++;
score1 = (score1 + 25);
} else {
if (_local38[6] == 2){
_local6.p2++;
score2 = (score2 + 25);
};
};
if (_local6.l == 0){
if (_local20 != 0){
addExplosion(_local6.xpos, _local6.ypos, ((_local6.rad * 3) / 2), 2);
addExplosion(_local6.xpos, _local6.ypos, ((_local6.rad * 3) / 2), 2);
addExplosion(_local6.xpos, _local6.ypos, ((_local6.rad * 3) / 2), 2);
addExplosion(_local6.xpos, _local6.ypos, ((_local6.rad * 3) / 2), 2);
addExplosion(_local6.xpos, _local6.ypos, ((_local6.rad * 3) / 2), 2);
};
if (_local6.t == 15){
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
};
if (_local6.t == 23){
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
addExplosion(_local6.xpos, _local6.ypos, 600, ((Math.random() * 7) + 2));
};
_local11 = (_local6.p1 + _local6.p2);
score1 = (score1 + ((_local6.score * _local6.p1) / _local11));
score2 = (score2 + ((_local6.score * _local6.p2) / _local11));
};
if (_local36 == 1){
_local1.push(_local35);
} else {
if (_local36 == 2){
_local2.push(_local35);
};
};
mGrid[_local32][_local33][_local34] = 9999;
mGrid[_local32][_local33][(_local34 + 1)] = 9999;
};
};
};
};
_local34 = (_local34 + 2);
};
};
_local33++;
};
_local32++;
};
if (_local6.l <= 0){
if (_local5 < tanksArr.length){
tanksArr[_local4].l = 0;
tanksArr.splice(_local4, 1);
_local5--;
} else {
enemiesArr[_local4].l = 0;
enemiesArr.splice(_local4, 1);
_local5--;
};
drawScore(_local6.score, _local6.xpos, _local6.ypos);
sn = 1;
if ((((_local6.t == 3)) || ((_local6.t == 4)))){
_local41 = Math.round(Math.random());
_local42 = Math.round((Math.random() * 3));
if ((_local41 + _local42) < 1){
_local42 = 1;
};
_local43 = ((5 - _local41) - _local42);
if (_local43 < 0){
_local43 = 0;
};
_local44 = 0;
while (_local44 < _local41) {
createEnemy(_local6.xpos, _local6.ypos, 8, 0, (Math.random() * 360), ((Math.random() * 12) + 3));
_local44++;
};
_local44 = 0;
while (_local44 < _local42) {
createEnemy(_local6.xpos, _local6.ypos, 5, 0, (Math.random() * 360), ((Math.random() * 12) + 3));
_local44++;
};
_local44 = 0;
while (_local44 < _local43) {
if (Math.random() < 0.33){
createEnemy(_local6.xpos, _local6.ypos, 6, 0, (Math.random() * 360), ((Math.random() * 12) + 3));
} else {
createEnemy(_local6.xpos, _local6.ypos, 7, 0, (Math.random() * 360), ((Math.random() * 12) + 3));
};
_local44++;
};
} else {
if (_local6.t == 8){
_local44 = 0;
while (_local44 < 2) {
if (Math.random() < 0.5){
createEnemy(_local6.xpos, _local6.ypos, 5, 0, (Math.random() * 360), ((Math.random() * 12) + 3));
} else {
createEnemy(_local6.xpos, _local6.ypos, 6, 0, (Math.random() * 360), ((Math.random() * 12) + 3));
};
_local44++;
};
} else {
if (_local6.t == 23){
winner++;
} else {
if (_local6.t == 15){
laser = false;
winner1++;
_local45 = 0;
while (_local45 < (enemiesArr.length + tanksArr.length)) {
if (_local45 < tanksArr.length){
tanksArr[_local45].l = 0;
if (_local11 != 0){
score1 = (score1 + ((tanksArr[_local45].score * tanksArr[_local45].p1) / _local11));
score2 = (score2 + ((tanksArr[_local45].score * tanksArr[_local45].p2) / _local11));
drawScore(tanksArr[_local45].score, tanksArr[_local45].xpos, tanksArr[_local45].ypos);
};
tanksArr.splice(_local4, 1);
_local45--;
} else {
enemiesArr[_local45].l = 0;
drawScore(enemiesArr[_local45].score, enemiesArr[_local45].xpos, (enemiesArr[_local45].ypos + 100));
if (enemiesArr[_local45] != _local6){
_local11 = (enemiesArr[_local45].p1 + enemiesArr[_local45].p2);
if (_local11 != 0){
score1 = (score1 + ((enemiesArr[_local45].score * enemiesArr[_local45].p1) / _local11));
score2 = (score2 + ((enemiesArr[_local45].score * enemiesArr[_local45].p2) / _local11));
};
enemiesArr.splice(_local45, 1);
_local45--;
};
};
_local45++;
};
};
};
};
};
continue;
};
if (_local6.l != _local20){
c = new ColorTransform();
if (_local6.touchable){
c.color = 0xFF0000;
} else {
c.color = 0xFFFFFF;
_local6.l = _local20;
};
if (_local6.t != 15){
if (_local6.touchable){
c.alphaMultiplier = 0.6;
} else {
c.alphaMultiplier = 0;
};
} else {
c.alphaMultiplier = 0.3;
};
_local29 = ship.transform.matrix;
_local29.scale(scale, scale);
shipsBitmap.draw(ship, _local29, c);
if (_local6.turret > 0){
_local29 = turret.transform.matrix;
_local29.scale(scale, scale);
c.alphaMultiplier = 0.25;
shipsBitmap.draw(turret, _local29, c);
};
};
};
if (_local6.t == 15){
startbx = _local6.xpos;
startby = (_local6.ypos + 210);
};
_local6.fr++;
if ((((((((_local18 < 5)) || ((_local17 < 5)))) || ((_local17 > (xSize - 5))))) || ((_local18 > (ySize - 5))))){
} else {
if (_local6.fr >= _local6.fr3[_local6.fr2]){
if (_local6.fr3[_local6.fr2] == -1){
_local6.fr2 = 0;
_local6.fr = 0;
} else {
_local6.fr2++;
if (_local6.turret > 0){
_local47 = (-(Math.cos(((_local6.trot + 90) * rad))) * 34);
_local46 = (Math.sin(((_local6.trot + 90) * rad)) * 34);
if (_local6.turret == 1){
angleBullet((_local6.xpos + _local46), (_local6.ypos + _local47), (_local6.trot + 90), 10, _local6.bt);
angleBullet((_local6.xpos + _local46), (_local6.ypos + _local47), ((_local6.trot + 90) - 5), 10, _local6.bt);
angleBullet((_local6.xpos + _local46), (_local6.ypos + _local47), ((_local6.trot + 90) + 5), 10, _local6.bt);
} else {
if (_local6.turret == 2){
angleBullet((_local6.xpos + (_local46 * 1.3)), (_local6.ypos + (_local47 * 1.3)), (_local6.trot + 90), 10, _local6.bt);
_local21 = (-(Math.cos((_local6.trot * rad))) * 13);
_local22 = (Math.sin((_local6.trot * rad)) * 13);
angleBullet(((_local6.xpos + _local46) + _local22), ((_local6.ypos + _local47) + _local21), (_local6.trot + 90), 10, _local6.bt);
_local21 = (-(Math.cos(((_local6.trot + 180) * rad))) * 13);
_local22 = (Math.sin(((_local6.trot + 180) * rad)) * 13);
angleBullet(((_local6.xpos + _local46) + _local22), ((_local6.ypos + _local47) + _local21), (_local6.trot + 90), 10, _local6.bt);
} else {
if (_local6.turret == 4){
angleBullet((_local6.xpos + _local46), (_local6.ypos + _local47), (_local6.trot + 90), 14, _local6.bt);
} else {
angleBullet((_local6.xpos + _local46), (_local6.ypos + _local47), (_local6.trot + 90), 10, _local6.bt);
};
};
};
} else {
if (_local6.t == 15){
if (_local6.fr == 100){
startbx = _local6.xpos;
startby = (_local6.ypos + 210);
pulse = 0;
deg = 0;
startW = 0;
dec = 0.1;
lcolor = 0;
ldraw = false;
laser = true;
} else {
angleBullet2((_local6.xpos - 55), (_local6.ypos + 185), 180, 8, _local6.bt, 10, 15);
angleBullet2((_local6.xpos + 55), (_local6.ypos + 185), 180, 8, _local6.bt, 10, 15);
};
} else {
if (_local6.t == 22){
if (_local6.touchable){
_local48 = (-(Math.cos(((_local6.rot + 90) * rad))) * 34);
_local49 = (Math.sin(((_local6.rot + 90) * rad)) * 34);
angleBullet((_local6.xpos + _local49), (_local6.ypos + _local48), (_local6.rot + 90), 12, _local6.bt);
};
} else {
if (_local6.t == 26){
if (_local6.touchable){
if (((((((!((_local6.fr == 200))) && (!((_local6.fr == 207))))) && (!((_local6.fr == 214))))) && (!((_local6.fr == 221))))){
_local50 = (-(Math.cos(((_local6.rot + 90) * rad))) * 15);
_local51 = (Math.sin(((_local6.rot + 90) * rad)) * 15);
angleBullet((_local6.xpos + _local51), (_local6.ypos + _local50), (_local6.rot + 90), 15, _local6.bt);
angleBullet((_local6.xpos - _local51), (_local6.ypos - _local50), (_local6.rot - 90), 15, _local6.bt);
angleBullet((_local6.xpos + _local51), (_local6.ypos + _local50), _local6.rot, 15, _local6.bt);
angleBullet((_local6.xpos - _local51), (_local6.ypos - _local50), (_local6.rot + 180), 15, _local6.bt);
} else {
bulletsCircle(_local6.xpos, _local6.ypos, 10, 20, (90 + _local6.fr), _local6.bt);
};
};
} else {
if ((((_local6.t == 29)) || ((_local6.t == 30)))){
if (_local6.touchable){
_local47 = (-(Math.cos(((_local6.rot + 90) * rad))) * 34);
_local46 = (Math.sin(((_local6.rot + 90) * rad)) * 34);
angleBullet((_local6.xpos + (_local46 * 1.3)), (_local6.ypos + (_local47 * 1.3)), (_local6.rot + 90), 10, _local6.bt);
_local21 = (-(Math.cos((_local6.rot * rad))) * 13);
_local22 = (Math.sin((_local6.rot * rad)) * 13);
angleBullet(((_local6.xpos + _local46) + _local22), ((_local6.ypos + _local47) + _local21), (_local6.rot + 90), 10, _local6.bt);
_local21 = (-(Math.cos(((_local6.rot + 180) * rad))) * 13);
_local22 = (Math.sin(((_local6.rot + 180) * rad)) * 13);
angleBullet(((_local6.xpos + _local46) + _local22), ((_local6.ypos + _local47) + _local21), (_local6.rot + 90), 10, _local6.bt);
};
} else {
if (_local6.rf){
angleBullet(_local6.xpos, _local6.ypos, (_local6.rot + 90), 20, _local6.bt);
} else {
if (_local6.t == 12){
angleBullet((_local6.xpos - 10), (_local6.ypos + 20), 180, 14, _local6.bt);
angleBullet((_local6.xpos + 10), (_local6.ypos + 20), 180, 14, _local6.bt);
} else {
if (_local6.t == 19){
angleBullet2((_local6.xpos - 42), (_local6.ypos + 12), 180, 8, _local6.bt, 15, 7);
angleBullet2((_local6.xpos + 42), (_local6.ypos + 12), 180, 8, _local6.bt, 15, 7);
} else {
angleBullet(_local6.xpos, _local6.ypos, 180, 12, _local6.bt);
};
};
};
};
};
};
};
};
};
};
};
};
};
if (!finish){
_local1.sort();
_local52 = 0;
while (_local52 < _local1.length) {
mBullets.splice((_local1[_local52] - _local52), 1);
_local52++;
};
_local2.sort();
_local52 = 0;
while (_local52 < _local2.length) {
mMissiles.splice((_local2[_local52] - _local52), 1);
_local52++;
};
};
}
function frame1(){
my_menu = new ContextMenu();
my_menu.hideBuiltInItems();
qual = 1;
programmed = new ContextMenuItem("Programming");
programmed2 = new ContextMenuItem("Daniel Yaroslavski (Coolio-Niato)");
animated = new ContextMenuItem("Artwork");
animated2 = new ContextMenuItem("Berbece Nicu (Xelu)");
music = new ContextMenuItem("Music");
music2 = new ContextMenuItem("Selcuk Bor (MaestroRage)");
sponsor = new ContextMenuItem("Sponsor");
sponsor2 = new ContextMenuItem("ArmorGames");
copyright = new ContextMenuItem("(C) Copyright 2009");
copyright.enabled = false;
programmed.separatorBefore = true;
animated.separatorBefore = true;
music.separatorBefore = true;
sponsor.separatorBefore = true;
myLocalData = SharedObject.getLocal("minute");
qua = new ContextMenuItem("(Q) Quality");
qua.enabled = false;
qua.separatorBefore = true;
q1 = new ContextMenuItem("Low");
q2 = new ContextMenuItem("Medium");
q3 = new ContextMenuItem("High");
sponsor2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, openLink2);
q1.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, qC0);
q2.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, qC1);
q3.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, qC2);
my_menu.customItems.push(copyright, programmed, programmed2, animated, animated2, music, music2, sponsor, sponsor2, qua, q1, q2, q3);
contextMenu = my_menu;
stop();
CPMStarPoolID = 1052;
CPMStarSubPoolID = 39;
ad = AdLoader.LoadAd(CPMStarPoolID, CPMStarSubPoolID);
adBox.addChild(ad);
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, PL_LOADING);
playbtn.addEventListener(MouseEvent.CLICK, onIntroClick3);
}
function frame5(){
menuS = new Song2();
sc = menuS.play(0, 1000);
st = sc.soundTransform;
st.volume = 0;
sc.soundTransform = st;
achiwindow.clearbtn.addEventListener(MouseEvent.CLICK, onClear);
achiwindow.closebtn.addEventListener(MouseEvent.CLICK, onCloseW);
openbtn.addEventListener(MouseEvent.CLICK, onOpenW);
achiwindow.visible = false;
achisU = new Array();
achisT = myLocalData.data.achisT;
if (achisT == undefined){
achisT = new Array(false, false, false, false, false);
};
achisMc = new Array(achiwindow.achi1, achiwindow.achi2, achiwindow.achi3, achiwindow.achi4, achiwindow.achi5);
stage.addEventListener(MouseEvent.MOUSE_DOWN, mdown);
stage.addEventListener(MouseEvent.MOUSE_UP, mup);
clicked = false;
cdown = false;
stop();
stage.addEventListener(Event.ENTER_FRAME, enterframe2);
}
function frame6(){
mainS = new Song();
sc2 = mainS.play(0, 0);
st2 = sc2.soundTransform;
st2.volume = 0;
sc2.soundTransform = st2;
stage.quality = "Medium";
white = new White();
white.visible = false;
stage.addChild(white);
deadship = 0;
finish = false;
ftyp = 0;
doorsT = true;
laser1 = new LaserMini();
laser2 = new LaserMini();
laser1.scaleX = (laser1.scaleY = 0.65);
laser1.rotation = -17;
laser2.scaleX = (laser2.scaleY = 0.65);
laser2.rotation = 17;
stage.addChild(laser1);
stage.addChild(laser2);
laser1.visible = false;
laser2.visible = false;
pauseM = new pauseMc();
pauseM.visible = false;
inter = new Interface();
cF = 0;
clock = new clockMc();
timer = (-1 / 2);
drawingL = stage.stageHeight;
drawing = new MovieClip();
stage.addChild(drawing);
explosions = new Array();
pulse = 0;
deg = 0;
startW = 0;
dec = 0.1;
lcolor = 0;
ldraw = false;
laser = false;
spawnTimer = 0;
level = 0;
backspd = 2;
sdx = 30;
sdy = 40;
levelPatterns = new Array();
level1p = new Array();
startP = 0;
startP = 160;
level1p.push(startP, 13, 2, 100, 0, (startP + 20), 14, 3, 50, 0, (startP + 20), 14, 3, 300, 0);
startP = (startP + 120);
level1p.push(startP, 2, 16, 30, 0, (startP + 5), 2, 16, 30, 0, (startP + 10), 2, 16, 30, 0, (startP + 15), 2, 16, 30, 0, (startP + 20), 2, 16, 30, 0);
startP = (startP + 90);
level1p.push(startP, 17, 9, -15, 110, startP, 17, 10, (stage.stageWidth + 15), 110, (startP + 7), 17, 9, -15, 110, (startP + 7), 17, 10, (stage.stageWidth + 15), 110, (startP + 14), 17, 9, -15, 110, (startP + 14), 17, 10, (stage.stageWidth + 15), 110, (startP + 21), 17, 9, -15, 110, (startP + 21), 17, 10, (stage.stageWidth + 15), 110);
startP = (startP + 100);
level1p.push(startP, 10, 6, -15, 110, startP, 10, 21, (stage.stageWidth + 15), 110, (startP + 10), 10, 6, -15, 70, (startP + 10), 10, 21, (stage.stageWidth + 15), 70, (startP + 20), 10, 6, -15, 30, (startP + 20), 10, 21, (stage.stageWidth + 15), 30);
startP = (startP + 40);
level1p.push(startP, 2, 25, 150, -20, (startP + 25), 2, 25, 350, -20, (startP + 50), 2, 25, 225, -20);
startP = (startP + 70);
level1p.push(startP, 12, 5, 300, -10, (startP + 8), 12, 5, 300, -10, (startP + 16), 12, 5, 300, -10, (startP + 24), 12, 5, 300, -10);
startP = (startP + 50);
level1p.push(startP, 13, 19, 60, (stage.stageHeight + 35));
startP = (startP + 40);
level1p.push(startP, 17, 8, (stage.stageWidth + 10), 200, (startP + 9), 17, 8, (stage.stageWidth + 10), 240);
startP = (startP + 40);
level1p.push(startP, 13, 19, 340, (stage.stageHeight + 35));
startP = (startP + 100);
level1p.push(startP, 2, 11, (stage.stageWidth + 10), 0, (startP + 8), 2, 11, (stage.stageWidth + 10), 60, (startP + 8), 2, 11, (stage.stageWidth + 10), -30, (startP + 15), 2, 11, (stage.stageWidth + 40), 110);
startP = (startP + 40);
level1p.push(startP, 14, 3, 150, -20, (startP + 25), 14, 3, 380, -20, (startP + 50), 14, 3, 220, -20);
startP = (startP + 70);
level1p.push(startP, 12, 10, 300, 0, startP, 12, 10, 200, 0);
startP = (startP - 70);
level1p.push((startP + 75), 14, 3, 150, -20, (startP + 100), 14, 3, 380, -20);
startP = (startP + 160);
level1p.push(startP, 10, 14, 10, -10, (startP + 20), 10, 14, 25, -10);
startP = (startP + 40);
level1p.push(startP, 17, 18, 50, -10, (startP + 4), 17, 18, 50, -10, (startP + 8), 17, 18, 50, -10, (startP + 12), 17, 18, 50, -10, (startP + 16), 17, 18, 50, -10, (startP + 20), 17, 18, 50, -10, (startP + 24), 17, 18, 50, -10);
startP = (startP + 40);
level1p.push(startP, 18, 13, 110, -30, startP, 18, 13, 320, -30, (startP + 35), 18, 13, 40, -30, (startP + 35), 18, 13, 390, -30);
startP = (startP + 230);
level1p.push(startP, 17, 7, -10, 270, (startP + 9), 17, 7, -10, 340);
startP = (startP + 15);
level1p.push(startP, 2, 4, 360, 0, (startP + 7), 2, 4, 360, 0, (startP + 14), 2, 4, 360, 0, (startP + 21), 2, 4, 360, 0);
startP = (startP + 60);
level1p.push(startP, 10, 15, 100, 0, (startP + 5), 10, 15, 100, 0, (startP + 10), 10, 15, 100, 0, (startP + 15), 10, 15, 100, 0, (startP + 20), 10, 15, 100, 0, (startP + 25), 10, 15, 100, 0, (startP + 30), 10, 15, 100, 0, (startP + 35), 10, 15, 100, 0, (startP + 40), 10, 15, 100, 0);
startP = (startP + 150);
level1p.push(startP, 15, 20, (stage.stageWidth / 2), -200, startP, 16, 20, ((stage.stageWidth / 2) - 125), -78, startP, 16, 20, ((stage.stageWidth / 2) + 128), -78);
levelPatterns.push(level1p);
level2p = new Array();
startP = 20;
level2p.push(startP, 20, 1, 330, 0, (startP + 70), 20, 1, 120, 0);
startP = 110;
level2p.push(startP, 2, 12, 30, 0, (startP + 7), 2, 12, 60, 0, (startP + 12), 2, 12, 10, 30);
startP = 195;
level2p.push(startP, 12, 5, 70, -10, (startP + 8), 12, 5, 70, -10, (startP + 16), 12, 5, 70, -10, (startP + 24), 12, 5, 70, -10);
startP = 265;
level2p.push(startP, 20, 1, 280, 0);
startP = 330;
level2p.push(startP, 11, 27, 370, 0, (startP + 5), 11, 27, 370, 0, (startP + 10), 11, 27, 370, 0, (startP + 15), 11, 27, 370, 0, (startP + 20), 11, 27, 370, 0, (startP + 25), 11, 27, 370, 0);
levelPatterns.push(level2p);
level3p = new Array();
startP = 0;
startP = (startP + 60);
level3p.push(startP, 36, 30, 60, -10);
startP = (startP + 180);
level3p.push(startP, 2, 33, 380, -10, (startP + 4), 2, 33, 380, -10, (startP + 8), 2, 33, 380, -10, (startP + 12), 2, 33, 380, -10, (startP + 16), 2, 33, 380, -10, (startP + 20), 2, 33, 380, -10, (startP + 24), 2, 33, 380, -10);
startP = (startP + 70);
level3p.push(startP, 12, 8, 430, 240, (startP + 4), 12, 8, 430, 160, (startP + 10), 12, 8, 430, 200);
startP = (startP + 45);
level3p.push(startP, 11, 12, 130, -10, (startP + 3), 11, 12, 80, -10, (startP + 6), 11, 12, 30, -10, (startP + 9), 11, 12, -30, -10);
startP = (startP + 50);
level3p.push(startP, 3, 26, -10, 300, (startP + 30), 4, 26, -10, 100, (startP + 50), 3, 26, -10, 150, (startP + 70), 4, 26, (stage.stageWidth + 10), 100, (startP + 90), 3, 26, (stage.stageWidth + 10), 150, (startP + 110), 3, 26, -10, 300, (startP + 120), 4, 26, -10, 100, (startP + 150), 4, 26, (stage.stageWidth + 10), 300, (startP + 170), 3, 26, -10, 100);
startP = (startP + 180);
level3p.push(startP, 3, 26, -10, 270, (startP + 30), 4, 26, -10, 150, (startP + 50), 3, 26, -10, 50, (startP + 60), 4, 26, (stage.stageWidth + 10), 200, (startP + 70), 3, 26, (stage.stageWidth + 10), 250);
startP = (startP + 200);
level3p.push(startP, 17, 9, -15, 110, startP, 17, 10, (stage.stageWidth + 15), 110, (startP + 7), 17, 9, -15, 110, (startP + 7), 17, 10, (stage.stageWidth + 15), 110, (startP + 14), 17, 9, -15, 110, (startP + 14), 17, 10, (stage.stageWidth + 15), 110, (startP + 21), 17, 9, -15, 110, (startP + 21), 17, 10, (stage.stageWidth + 15), 110);
startP = (startP + 80);
level3p.push(startP, 36, 31, 60, (stage.stageHeight + 10), startP, 36, 32, (stage.stageWidth - 60), (stage.stageHeight + 10));
startP = (startP + 180);
level3p.push(startP, 2, 25, 150, -20, (startP + 10), 2, 25, 340, -20, (startP + 20), 2, 25, 105, -20, (startP + 30), 2, 25, 340, -20, (startP + 40), 2, 25, 105, -20, (startP + 50), 2, 25, 320, -20);
startP = (startP + 80);
level3p.push(startP, 11, 11, 270, -10, (startP + 3), 11, 11, 320, -10, (startP + 6), 11, 11, 370, -10, (startP + 9), 11, 11, 420, -10);
startP = (startP + 60);
level3p.push(startP, 19, 34, 225, -10);
startP = (startP + 130);
level3p.push(startP, 17, 15, 100, 0, (startP + 5), 17, 15, 100, 0, (startP + 10), 17, 15, 100, 0, (startP + 15), 17, 15, 100, 0, (startP + 20), 17, 15, 100, 0, (startP + 25), 17, 15, 100, 0, (startP + 30), 17, 15, 100, 0, (startP + 35), 17, 15, 100, 0, (startP + 40), 17, 15, 100, 0);
startP = (startP + 100);
level3p.push(startP, 2, 35, 390, 0, (startP + 5), 2, 35, 390, 0, (startP + 10), 2, 35, 390, 0, (startP + 15), 2, 35, 390, 0, (startP + 20), 2, 35, 390, 0, (startP + 25), 2, 35, 390, 0, (startP + 30), 2, 35, 390, 0, (startP + 35), 2, 35, 390, 0, (startP + 40), 2, 35, 390, 0, (startP + 45), 2, 35, 390, 0, (startP + 50), 2, 35, 390, 0, (startP + 55), 2, 35, 390, 0, (startP + 60), 2, 35, 390, 0);
startP = (startP + 61);
level3p.push(startP, 12, 5, 70, -10, (startP + 8), 12, 5, 70, -10, (startP + 16), 12, 5, 70, -10, (startP + 24), 12, 5, 70, -10);
startP = (startP + 25);
level3p.push(startP, 12, 5, 320, -10, (startP + 8), 12, 5, 320, -10, (startP + 16), 12, 5, 320, -10, (startP + 24), 12, 5, 320, -10);
startP = (startP + 40);
level3p.push(startP, 17, 15, 100, 0, (startP + 5), 17, 15, 100, 0, (startP + 10), 17, 15, 100, 0, (startP + 15), 17, 15, 100, 0, (startP + 20), 17, 15, 100, 0, (startP + 25), 17, 15, 100, 0, (startP + 30), 17, 15, 100, 0, (startP + 35), 17, 15, 100, 0, (startP + 40), 17, 15, 100, 0);
levelPatterns.push(level3p);
level4p = new Array();
startP = 10;
startx = 150;
starty = 200;
level4p.push(startP, 23, 29, (200 + startx), (-100 - starty), startP, 24, 20, ((200 - 172) + startx), -90, startP, 25, 20, ((200 + 172) + startx), -90, startP, 22, 28, (200 + 172), -90, startP, 22, 28, (200 + 172), -90, startP, 22, 28, (200 + 172), -90, startP, 22, 28, (200 + 172), -90, startP, 27, 20, (200 + 172), -90, startP, 28, 20, (200 + 172), -90, startP, 29, 28, (200 + 172), -90, startP, 30, 28, (200 + 172), -90, startP, 26, 20, (200 + 172), -90, startP, 31, 20, (200 + 172), -90);
levelPatterns.push(level4p);
finalBoss = new Array();
shipPatterns = new Array();
shipPatterns.push(new Array(1, 1, 2, 5));
shipPatterns.push(new Array(1, 1, 5, 5));
shipPatterns.push(new Array(1, 1, 4, 2, -90, 2, 2, 180, 2, 5));
shipPatterns.push(new Array(1, 1, 3, 3, 7, 4, 300, 3, 5));
shipPatterns.push(new Array(1, 1, 12, 2, 90, 5, 2, -180, 5, 5));
shipPatterns.push(new Array(0, 1, 10, 2, 90, 90, 2, -180, 22, 3, 5, 2, 180, 22, 3, 5, 2, -180, 22, 3, 5, 2, 180, 22, 3, 5, 2, -180, 22, 3, 5, 5));
shipPatterns.push(new Array(0, 1, 16, 2, -90, 90, 3, 5, 1, 3, 3, 5, 2, 90, 30, 3, 5, 1, 20, 5));
shipPatterns.push(new Array(1, 2, -90, 90, 1, 12, 5));
shipPatterns.push(new Array(1, 2, 90, 90, 1, 12, 5));
shipPatterns.push(new Array(1, 2, -90, 90, 1, 12, 2, 180, 5, 5));
shipPatterns.push(new Array(1, 2, 90, 90, 1, 12, 2, -180, 5, 5));
shipPatterns.push(new Array(1, 2, 40, 40, 1, 14, 5));
shipPatterns.push(new Array(1, 2, -40, 40, 1, 14, 5));
shipPatterns.push(new Array(1, 1, 0, 5));
shipPatterns.push(new Array(1, 1, 15, 2, -140, 12, 1, 13, 4, 100, 7, 5));
shipPatterns.push(new Array(1, 1, 15, 3, 7, 2, -179, 7, 2, -179, 7, 1, 18, 2, -40, 5, 5));
shipPatterns.push(new Array(1, 1, 18, 3, 10, 1, 10, 2, -180, 10, 1, 18, 3, 10, 1, 10, 2, 180, 10, 1, 18, 3, 10, 1, 10, 2, -180, 10, 1, 18, 1, 10, 5));
shipPatterns.push(new Array(1, 1, 18, 3, 10, 1, 10, 2, 180, 10, 1, 18, 5));
shipPatterns.push(new Array(1, 1, 18, 3, 5, 1, 15, 2, -130, 15, 1, 18, 3, 10, 1, 15, 2, 180, 15, 1, 18, 3, 10, 1, 15, 2, -150, 15, 1, 18, 5));
shipPatterns.push(new Array(1, 1, (2 + backspd), 2, -180, 180, 3, 90, 1, 0, 5));
shipPatterns.push(new Array(0, 1, (2.5 + backspd), 3, 48, 1, 0, 2, 90, 90, 1, 1, 3, 20, 2, 180, 180, 3, 43, 2, 180, 180, 3, 20, 1, 0, 3, 20, 6, 18, 5));
shipPatterns.push(new Array(0, 1, 16, 2, 90, 90, 3, 5, 1, 3, 3, 5, 2, -90, 30, 3, 5, 1, 20, 5));
shipPatterns.push(new Array(1, 2, -90, 90, 1, 3, 3, 45, 1, 0, 5));
shipPatterns.push(new Array(1, 2, -90, 90, 1, 3, 3, 45, 1, 0, 5));
shipPatterns.push(new Array(1, 1, 10, 3, 2, 1, 5, 3, 1, 1, 0, 4, 20, 15, 1, 22, 5));
shipPatterns.push(new Array(1, 1, 20, 4, 1, 100, 3, 5, 4, 1, 100, 5));
shipPatterns.push(new Array(1, 5));
shipPatterns.push(new Array(0, 2, -360, 360, 1, 15, 3, 7, 2, 179, 7, 2, 179, 7, 1, 18, 2, 40, 5, 5));
shipPatterns.push(new Array(1, 4, 1000000, 4, 5));
shipPatterns.push(new Array(0, 1, (2.5 + backspd), 3, 90, 1, 0, 2, 90, 90, 1, 1, 3, 20, 2, 180, 180, 3, 43, 2, 180, 180, 3, 20, 1, 0, 3, 20, 6, 18, 5));
shipPatterns.push(new Array(1, 1, 20, 3, 30, 2, -90, 90, 3, 8, 2, -90, 90, 3, 40, 2, -90, 90, 3, 3, 2, -90, 90, 3, 40, 2, -90, 90, 3, 8, 2, -90, 90, 5));
shipPatterns.push(new Array(1, 2, 180, 180, 1, 20, 3, 30, 2, 90, 90, 3, 7, 2, 90, 90, 3, 40, 2, 90, 90, 3, 3, 2, 90, 90, 3, 40, 2, 90, 90, 3, 8, 2, 90, 90, 5));
shipPatterns.push(new Array(1, 2, 180, 180, 1, 20, 3, 30, 2, -90, 90, 3, 7, 2, -90, 90, 3, 40, 2, -90, 90, 3, 3, 2, -90, 90, 3, 40, 2, -90, 90, 3, 8, 2, -90, 90, 5));
shipPatterns.push(new Array(1, 1, 15, 3, 15, 1, 12, 2, 130, 10, 1, 15, 3, 8, 1, 12, 2, -180, 10, 1, 15, 5));
shipPatterns.push(new Array(0, 1, 17, 3, 10, 1, 0, 2, 90, 90, 1, 5, 3, 20, 2, 180, 180, 3, 43, 2, 180, 180, 3, 20, 1, 0, 3, 20, 2, -90, 90, 1, 18, 5));
shipPatterns.push(new Array(1, 1, 18, 3, 10, 1, 10, 2, 180, 10, 1, 18, 3, 10, 1, 10, 2, -180, 10, 1, 18, 3, 10, 1, 10, 2, 180, 10, 1, 18, 1, 10, 5));
lvlup = new Array(0, 50000, 300000, 1200000, 2750000, 3250000, 4200000, 10000000000);
lives = new Array(10, 10);
lvl = new Array(1, 1);
hold = 0;
scale = 0.1;
mscale = 0.5;
scale = mscale;
sWidth = stage.stageWidth;
sHeight = stage.stageHeight;
scoreBitmap = new BitmapData((sWidth * mscale), (sHeight * mscale), true, 0xFFFFFF);
bulletsBitmap = new BitmapData((sWidth * mscale), (sHeight * mscale), true, 0xFFFFFF);
effectsBitmap = new BitmapData((sWidth * mscale), (sHeight * mscale), true, 0xFFFFFF);
shipsBitmap = new BitmapData((sWidth * mscale), (sHeight * mscale), true, 0xFFFFFF);
groundBitmap = new BitmapData((sWidth * mscale), (sHeight * mscale), true, 0xFFFFFF);
resetBitmaps();
b1 = new Bitmap(bulletsBitmap);
b2 = new Bitmap(effectsBitmap);
b3 = new Bitmap(shipsBitmap);
b4 = new Bitmap(groundBitmap);
b5 = new Bitmap(scoreBitmap);
bitmapHolder3 = new MovieClip();
bitmapHolder2 = new MovieClip();
bitmapHolder = new MovieClip();
bitmapHolder.addChild(b4);
bitmapHolder.addChild(b3);
bitmapHolder.addChild(b2);
bitmapHolder.addChild(b1);
bitmapHolder.addChild(b5);
stage.addChild(bitmapHolder3);
stage.addChild(bitmapHolder2);
stage.addChild(bitmapHolder);
stage.addChild(clock);
stage.addChild(inter);
clouds2 = new Clouds3();
clouds2.x = -5;
clouds2.y = -2925;
stage.addChild(clouds2);
stage.setChildIndex(clouds2, (stage.numChildren - 1));
stage.addChild(pauseM);
qShow = new qS();
qShow.gotoAndStop(1);
stage.addChild(qShow);
stage.setChildIndex(doors, (stage.numChildren - 1));
qShow.y = (qShow.y + 30);
pauseM.gotoAndStop(1);
bitmapHolder.scaleX = (1 / scale);
bitmapHolder.scaleY = (1 / scale);
bitmapHolder3.scaleX = (1 / scale);
bitmapHolder3.scaleY = (1 / scale);
ship1 = createShip(142, 500, 1);
ship2 = createShip(303, 500, 1);
ships = new Array(ship1);
pboost = 1;
wings = new Array();
dMov = 13;
sn = 0;
score1 = 0;
score2 = 0;
mGrid = new Array();
eGrid = new Array();
resetBulletGrids();
mBullets = new Array();
eBullets = new Array();
mMissiles = new Array();
eMissiles = new Array();
gridSize = 30;
enemiesArr = new Array();
tanksArr = new Array();
fire = new Array();
fire2 = new Array();
dWait = new Array(0, 0);
lvlups = new Array();
tmplvlup = new LvlUp();
stage.addChild(tmplvlup);
lvlups.push(tmplvlup);
tmplvlup = new LvlUp();
stage.addChild(tmplvlup);
lvlups.push(tmplvlup);
pi = (180 / Math.PI);
rad = (Math.PI / 180);
bulletPatterns = new Array();
ground.gotoAndStop(1);
qPress = false;
scoreH1 = score1;
scoreH2 = score2;
scoreS1 = 0;
scoreS2 = 0;
percent1 = 0;
percent2 = 0;
congrats = new Array(5, "HORRIBLE", 10, "ABYSMAL", 15, "LAUGHABLE", 20, "VERY POOR", 23, "PATHETIC", 27, "POOR", 30, "BELOW DECENT", 35, "DECENT", 39, "AVERAGE", 43, "GOOD", 47, "GREAT", 52, "FANTASTIC", 57, "OUTSTANDING", 62, "AMAZING", 66, "CRAZY GOOD", 71, "CRAZY GREAT", 75, "CRAZY AMAZING", 79, "INSANE", 83, "SUPERB", 85, "SUPERSTAR", 88, "CRAZY INSANE", 92, "SUPER INSANE", 94, "INSANE SKILL", 95, "SKY HAWK", 96, "SKY EAGLE", 97, "SKY MASTER", 98, "SPACE PRO", 99, "SPACE MASTER", 100000, "SPACE INVADER");
c1 = 0;
c2 = 0;
bestScore = 6000000;
pPress = false;
finishR = false;
winner = 0;
winner1 = 0;
stage.addEventListener(Event.ENTER_FRAME, enterframe);
keys = new Array(0x0100);
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressF);
stage.addEventListener(KeyboardEvent.KEY_UP, unPressF);
}
public function unPressF(_arg1){
var _local2:uint;
_local2 = _arg1.keyCode;
keys[_local2] = false;
}
public function pressF(_arg1){
var _local2:uint;
_local2 = _arg1.keyCode;
keys[_local2] = true;
}
public function qC0(_arg1:ContextMenuEvent):void{
qual = 0;
}
public function qC2(_arg1:ContextMenuEvent):void{
qual = 2;
}
public function qC1(_arg1:ContextMenuEvent):void{
qual = 1;
}
function frame4(){
stop();
stage.addEventListener(Event.ENTER_FRAME, enterframe4);
skipbtn.addEventListener(MouseEvent.CLICK, onSkip);
warmor = 0;
}
public function onOpenW(_arg1:MouseEvent):void{
achiwindow.visible = true;
}
public function moveMainChars(){
var _local1:*;
var _local2:*;
if ((score1 * 10) > lvlup[lvl[0]]){
var _local3 = lvl;
var _local4:int;
var _local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
lvlups[0].lvl.gotoAndPlay(2);
};
if ((score2 * 10) > lvlup[lvl[1]]){
_local3 = lvl;
_local4 = 1;
_local5 = (_local3[_local4] + 1);
_local3[_local4] = _local5;
lvlups[1].lvl.gotoAndPlay(2);
};
lvlups[0].x = ships[0].x;
lvlups[0].y = ships[0].y;
if (ships.length > 1){
lvlups[1].x = ships[1].x;
lvlups[1].y = ships[1].y;
};
if ((((level > 0)) || ((spawnTimer > 150)))){
if (ships.length > 1){
if (keys[65] == true){
ships[1].x = (ships[1].x - dMov);
if (shipDist(ships[0].x, ships[0].y, ships[1].x, ships[1].y) < 30){
ships[1].x = (ships[1].x + dMov);
};
} else {
if (keys[68] == true){
ships[1].x = (ships[1].x + dMov);
if (shipDist(ships[0].x, ships[0].y, ships[1].x, ships[1].y) < 30){
ships[1].x = (ships[1].x - dMov);
};
};
};
if (keys[87] == true){
ships[1].y = (ships[1].y - dMov);
if (shipDist(ships[0].x, ships[0].y, ships[1].x, ships[1].y) < 30){
ships[1].y = (ships[1].y + dMov);
};
} else {
if (keys[83] == true){
ships[1].y = (ships[1].y + dMov);
if (shipDist(ships[0].x, ships[0].y, ships[1].x, ships[1].y) < 30){
ships[1].y = (ships[1].y - dMov);
};
};
};
spawnBullets(ships[1], 2);
if (keys[37] == true){
ships[0].x = (ships[0].x - dMov);
if (shipDist(ships[0].x, ships[0].y, ships[1].x, ships[1].y) < 30){
ships[0].x = (ships[0].x + dMov);
};
} else {
if (keys[39] == true){
ships[0].x = (ships[0].x + dMov);
if (shipDist(ships[0].x, ships[0].y, ships[1].x, ships[1].y) < 30){
ships[0].x = (ships[0].x - dMov);
};
};
};
if (keys[38] == true){
ships[0].y = (ships[0].y - dMov);
if (shipDist(ships[0].x, ships[0].y, ships[1].x, ships[1].y) < 30){
ships[0].y = (ships[0].y + dMov);
};
} else {
if (keys[40] == true){
ships[0].y = (ships[0].y + dMov);
if (shipDist(ships[0].x, ships[0].y, ships[1].x, ships[1].y) < 30){
ships[0].y = (ships[0].y - dMov);
};
};
};
} else {
if (keys[37] == true){
ships[0].x = (ships[0].x - dMov);
} else {
if (keys[39] == true){
ships[0].x = (ships[0].x + dMov);
};
};
if (keys[38] == true){
ships[0].y = (ships[0].y - dMov);
} else {
if (keys[40] == true){
ships[0].y = (ships[0].y + dMov);
};
};
};
_local1 = 20;
_local2 = 0;
while (_local2 < ships.length) {
if (ships[_local2].x < _local1){
ships[_local2].x = _local1;
} else {
if (ships[_local2].x > (sWidth - _local1)){
ships[_local2].x = (sWidth - _local1);
};
};
if (ships[_local2].y < _local1){
ships[_local2].y = _local1;
} else {
if (ships[_local2].y > (sHeight - _local1)){
ships[_local2].y = (sHeight - _local1);
};
};
if (lives[_local2] > 0){
makeFire(ships[_local2].x, (ships[_local2].y + 25));
};
_local2++;
};
spawnBullets(ships[0], 1);
} else {
if (ships.length > 1){
makeFire(ships[1].x, (ships[1].y + 25));
};
makeFire(ships[0].x, (ships[0].y + 25));
ships[0].y--;
if (ships.length > 1){
ships[1].y--;
};
};
drawFire();
}
public function angle(_arg1, _arg2){
return (((Math.atan2(-(_arg1), _arg2) * pi) - 180));
}
public function resetBitmaps(){
resetBitmap(bulletsBitmap, 0.4);
resetBitmap(effectsBitmap, 0.4);
resetBitmap(shipsBitmap, 0.5);
resetBitmap(groundBitmap, 0.3);
resetBitmap(scoreBitmap, 0.9);
}
public function createGridArray(_arg1){
var _local2:*;
var _local3:*;
xSize = (Math.ceil((sWidth / gridSize)) + 10);
ySize = (Math.ceil((sHeight / gridSize)) + 10);
_local2 = 0;
while (_local2 <= ySize) {
_arg1[_local2] = new Array(xSize);
_local3 = 0;
while (_local3 <= xSize) {
_arg1[_local2][_local3] = new Array();
_local3++;
};
_local2++;
};
return (_arg1);
}
public function enterframe2(_arg1){
var ok:*;
var url:*;
var request:*;
var an:*;
var event = _arg1;
ok = true;
if (currentFrame == 5){
if (menu.currentFrame <= 32){
if (achiwindow.visible){
an = 1;
while (an <= 5) {
achisMc[(an - 1)].achi.gotoAndStop(an);
achisMc[(an - 1)].lockM.visible = true;
achisMc[(an - 1)].achiL.visible = false;
if (achisT[(an - 1)]){
achisMc[(an - 1)].lockM.visible = false;
achisMc[(an - 1)].achiL.visible = true;
};
an = (an + 1);
};
};
if (st.volume < 0.8){
st.volume = (st.volume + 0.05);
sc.soundTransform = st;
};
if (menu.btn1.hitarea.hitTestPoint(stage.mouseX, stage.mouseY, true)){
menu.btn1.gotoAndStop(2);
ok = false;
if (clicked){
menu.play();
};
} else {
menu.btn1.gotoAndStop(1);
};
if (((menu.btn2.hitarea.hitTestPoint(stage.mouseX, stage.mouseY, true)) && (ok))){
menu.btn2.gotoAndStop(2);
if (clicked){
url = "http://armorgames.com/category/shooting";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
};
} else {
menu.btn2.gotoAndStop(1);
};
if (((menu.btn3.hitarea.hitTestPoint(stage.mouseX, stage.mouseY, true)) && (ok))){
menu.btn3.gotoAndStop(2);
if (clicked){
url = "http://twitter.com/armorgames";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
};
} else {
menu.btn3.gotoAndStop(1);
};
} else {
if (menu.currentFrame == 35){
doors = new Doors();
doors.y = (doors.y - 15);
stage.addChild(doors);
} else {
if (menu.currentFrame > 35){
if (st.volume > 0){
st.volume = (st.volume - 0.08);
sc.soundTransform = st;
};
if (doors.currentFrame == 25){
st.volume = 0;
sc.soundTransform = st;
stage.removeEventListener(MouseEvent.MOUSE_DOWN, mdown);
stage.removeEventListener(MouseEvent.MOUSE_UP, mup);
nextFrame();
};
};
};
};
} else {
stage.removeEventListener(Event.ENTER_FRAME, enterframe2);
};
if (clicked){
clicked = false;
};
}
public function resetBulletGrids(){
createGridArray(mGrid);
createGridArray(eGrid);
}
public function makeFire(_arg1, _arg2){
var _local3:*;
_local3 = 0;
while (_local3 < 2) {
fire.push(15, 15674904, ((_arg1 + (Math.random() * 20)) - 10), ((_arg2 + (Math.random() * 20)) - 10));
fire2.push(15, 16030227, ((_arg1 + (Math.random() * 20)) - 10), ((_arg2 + (Math.random() * 20)) - 10));
_local3++;
};
}
public function enterframe4(_arg1){
if (currentFrame == 4){
warmor++;
if (warmor > 3){
if (armor.currentFrame == 1){
warmor = 0;
armor.play();
};
};
if (armor.currentFrame == 83){
armor.agbtn.addEventListener(MouseEvent.CLICK, onIntroClick2);
};
if (armor.currentFrame == 218){
if (coolio.currentFrame == 1){
coolio.play();
};
};
if (coolio.currentFrame == 140){
if (xelu.currentFrame == 1){
xelu.play();
};
};
if (xelu.currentFrame == 105){
stage.removeEventListener(Event.ENTER_FRAME, enterframe4);
nextFrame();
};
};
}
public function createShip(_arg1, _arg2, _arg3){
var _local4:*;
_local4 = new Object();
_local4.x = _arg1;
_local4.y = _arg2;
_local4.r = 0;
_local4.r2 = 0;
_local4.rTime = 2;
_local4.rTime2 = 5;
_local4.f = _arg3;
return (_local4);
}
public function openLink(_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest("http://coolio-niato.newgrounds.com"));
}
public function enterframe(_arg1){
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (winner > 0){
winner++;
if (winner > 20){
finish = true;
};
};
if (winner1 > 0){
winner1++;
if (winner1 > 50){
if (clouds.currentFrame == 1){
level++;
spawnTimer = 0;
cF = 2;
clouds.play();
};
};
};
if (finish){
if (ftyp == 0){
if (winner > 15){
ftyp = 2;
if (ships.length == 1){
unlockAchi(2);
} else {
if ((((lives[0] > 0)) && ((lives[1] > 0)))){
unlockAchi(3);
} else {
unlockAchi(2);
};
};
} else {
ftyp = 1;
unlockAchi(1);
};
finishMc = new GameOver();
stage.addChild(finishMc);
finishMc.finishS.gotoAndStop(ftyp);
};
stage.setChildIndex(finishMc, (stage.numChildren - 1));
if (!finishR){
if (finishMc.currentFrame == 75){
scoreH1 = (score1 * 10);
scoreH2 = (score2 * 10);
rankM = new RankM();
stage.addChild(rankM);
if (scoreH2 == 0){
rankM.ranks.gotoAndStop(1);
} else {
rankM.ranks.gotoAndStop(2);
};
finishR = true;
};
} else {
fulldist = (rankM.ranks.botline.y - rankM.ranks.topline.y);
stage.setChildIndex(rankM, (stage.numChildren - 1));
if (rankM.currentFrame == 30){
_local2 = ((scoreS1 - scoreH1) / 7);
if (_local2 > -1000){
_local2 = -1000;
};
if (_local2 < -15000){
_local2 = -15000;
};
_local3 = ((scoreS2 - scoreH2) / 7);
if (_local3 > -1000){
_local3 = -1000;
};
if (_local3 < -15000){
_local3 = -15000;
};
scoreS1 = (scoreS1 - _local2);
scoreS2 = (scoreS2 - _local3);
if (scoreS1 > scoreH1){
scoreS1 = scoreH1;
if (scoreS1 <= 1000){
unlockAchi(5);
};
};
if (scoreS2 > scoreH2){
scoreS2 = scoreH2;
if (ships.length > 1){
if (scoreS2 <= 1000){
unlockAchi(5);
};
};
};
percent1 = (scoreS1 / bestScore);
if (percent1 > 1){
percent1 = 1;
};
if (Math.floor((percent1 * 100)) > congrats[c1]){
ding.play();
c1 = (c1 + 2);
};
rankM.ranks.arr1.word.text = congrats[(c1 + 1)];
rankM.ranks.arr1.y = (rankM.ranks.botline.y - (fulldist * percent1));
if (rankM.ranks.arr1.y < (rankM.ranks.botline.y - fulldist)){
rankM.ranks.arr1.y = (rankM.ranks.botline.y - fulldist);
};
if (rankM.ranks.currentFrame == 2){
percent2 = (scoreS2 / bestScore);
if (percent2 > 1){
percent2 = 1;
};
if (Math.floor((percent2 * 100)) > congrats[c2]){
ding.play();
c2 = (c2 + 2);
};
rankM.ranks.arr2.word.text = congrats[(c2 + 1)];
rankM.ranks.arr2.y = (rankM.ranks.botline.y - (fulldist * percent2));
if (rankM.ranks.arr2.y < (rankM.ranks.botline.y - fulldist)){
rankM.ranks.arr2.y = (rankM.ranks.botline.y - fulldist);
};
};
scoreS1 = Math.ceil(scoreS1);
scoreS2 = Math.ceil(scoreS2);
if (scoreS1 >= bestScore){
unlockAchi(4);
};
if (scoreS2 >= bestScore){
unlockAchi(4);
};
rankM.ranks.scoreText1.text = scoreS1;
if (rankM.ranks.currentFrame == 2){
rankM.ranks.scoreText2.text = scoreS2;
};
};
if (percent1 > 1){
percent1 = 1;
};
if ((percent1 * 100) > congrats[c1]){
c1 = (c1 + 2);
};
rankM.ranks.arr1.word.text = congrats[(c1 + 1)];
rankM.ranks.arr1.y = (rankM.ranks.botline.y - (fulldist * percent1));
if (rankM.ranks.arr1.y < (rankM.ranks.botline.y - fulldist)){
rankM.ranks.arr1.y = (rankM.ranks.botline.y - fulldist);
};
if (st2.volume > 0.2){
st2.volume = (st2.volume - 0.01);
sc2.soundTransform = st2;
} else {
st2.volume = 0.2;
sc2.soundTransform = st2;
};
if (rankM.ranks.currentFrame == 2){
percent2 = (scoreS2 / bestScore);
if (percent2 > 1){
percent2 = 1;
};
if ((percent2 * 100) > congrats[c2]){
c2 = (c2 + 2);
};
rankM.ranks.arr2.word.text = congrats[(c2 + 1)];
rankM.ranks.arr2.y = (rankM.ranks.botline.y - (fulldist * percent2));
if (rankM.ranks.arr2.y < (rankM.ranks.botline.y - fulldist)){
rankM.ranks.arr2.y = (rankM.ranks.botline.y - fulldist);
};
};
scoreS1 = Math.ceil(scoreS1);
scoreS2 = Math.ceil(scoreS2);
rankM.ranks.scoreText1.text = scoreS1;
if (rankM.ranks.currentFrame == 2){
rankM.ranks.scoreText2.text = scoreS2;
};
if ((((scoreS1 == scoreH1)) && ((scoreS2 == scoreH2)))){
if (rankM.space.currentFrame == 1){
rankM.space.play();
};
};
if (rankM.space.currentFrame == 30){
if (keys[32] == true){
st2 = sc2.soundTransform;
st2.volume = 0;
sc2.soundTransform = st2;
stage.removeChild(rankM);
_local5 = 0;
while (_local5 < explosions.length) {
stage.removeChild(explosions[_local5]);
explosions.splice(_local5, 1);
--_local5;
_local5++;
};
_local5 = 0;
while (_local5 < achisU.length) {
stage.removeChild(achisU[_local5]);
achisU.splice(_local5, 1);
--_local5;
_local5++;
};
stage.removeChild(laser1);
stage.removeChild(laser2);
stage.removeChild(bitmapHolder3);
stage.removeChild(bitmapHolder2);
stage.removeChild(bitmapHolder);
stage.removeChild(clock);
stage.removeChild(inter);
stage.removeChild(clouds2);
stage.removeChild(pauseM);
stage.removeChild(qShow);
stage.removeChild(drawing);
stage.removeChild(white);
stage.removeChild(finishMc);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressF);
stage.removeEventListener(KeyboardEvent.KEY_UP, unPressF);
stage.removeEventListener(Event.ENTER_FRAME, enterframe);
gotoAndStop(4);
};
};
};
} else {
if (st2.volume < 1){
st2.volume = (st2.volume + 0.015);
sc2.soundTransform = st2;
};
if (ground.currentFrame == 1){
};
showLives();
if (keys[81] == true){
if (!qPress){
qPress = true;
qual++;
};
} else {
qPress = false;
};
if (qual > 2){
qual = 0;
};
if (qual == 0){
qShow.gotoAndStop(1);
mscale = 0.5;
} else {
if (qual == 1){
qShow.gotoAndStop(2);
mscale = 0.75;
} else {
if (qual == 2){
qShow.gotoAndStop(3);
mscale = 1;
};
};
};
if (pauseM.visible){
} else {
if (cF > 0){
cF++;
};
if (cF == 360){
clouds2.play();
};
if (clouds2.currentFrame == 18){
ground.nextFrame();
ground.y = 0;
level++;
spawnTimer = 0;
};
if (scale != mscale){
scale = mscale;
bitmapHolder.scaleX = (1 / scale);
bitmapHolder.scaleY = (1 / scale);
scoreBitmap = new BitmapData((sWidth * scale), (sHeight * scale), true, 0xFFFFFF);
bulletsBitmap = new BitmapData((sWidth * scale), (sHeight * scale), true, 0xFFFFFF);
effectsBitmap = new BitmapData((sWidth * scale), (sHeight * scale), true, 0xFFFFFF);
shipsBitmap = new BitmapData(sWidth, sHeight, true, 0xFFFFFF);
groundBitmap = new BitmapData((sWidth * scale), (sHeight * scale), true, 0xFFFFFF);
b1 = new Bitmap(bulletsBitmap);
b2 = new Bitmap(effectsBitmap);
b3 = new Bitmap(shipsBitmap);
b4 = new Bitmap(groundBitmap);
b5 = new Bitmap(scoreBitmap);
_local5 = 0;
while (_local5 < bitmapHolder.numChildren) {
bitmapHolder.removeChildAt(_local5);
--_local5;
_local5++;
};
bitmapHolder.addChild(b4);
bitmapHolder.addChild(b3);
bitmapHolder.addChild(b2);
bitmapHolder.addChild(b1);
bitmapHolder.addChild(b5);
};
resetBitmaps();
resetBulletGrids();
showTime();
if (clouds.currentFrame < 300){
ground.y = (ground.y + backspd);
} else {
ground.y = (ground.y + (backspd / 3));
};
drawing.graphics.clear();
m = clouds.transform.matrix;
m.scale(scale, scale);
groundBitmap.draw(clouds, m);
moveMainChars();
spawnEnemies();
processPatterns();
moveBullets();
if (!finish){
drawEnemies();
};
if (deadship == 1){
deadship++;
};
screenShake();
m = drawing.transform.matrix;
m.scale(scale, scale);
shipsBitmap.draw(drawing, m);
drawing.graphics.clear();
if (laser){
laserF();
};
m = drawing.transform.matrix;
m.scale(scale, scale);
effectsBitmap.draw(drawing, m);
clock.x = 0;
m = clock.transform.matrix;
m.scale(scale, scale);
shipsBitmap.draw(clock, m);
clock.x = -10000;
ship.rotation = 0;
c = new ColorTransform();
c.color = 0;
c.alphaMultiplier = ((0.2 * (365 - clouds.currentFrame)) / 365);
if (ships.length > 1){
ship.gotoAndStop(9);
ship.x = ships[1].x;
ship.y = ships[1].y;
shadowM.x = (ship.x + sdx);
shadowM.y = (ship.y + sdy);
shadowM.rotation = ship.rotation;
shadowM.gotoAndStop(1);
m = ship.transform.matrix;
m.scale(scale, scale);
if (lives[1] > 0){
if ((((dWait[1] == 0)) || (((Math.round(((((dWait[1] * 1) / 3) * dWait[1]) / 100)) % 2) == 0)))){
shipsBitmap.draw(ship, m);
};
m = shadowM.transform.matrix;
m.scale(scale, scale);
if ((((level > 0)) || ((spawnTimer > 105)))){
if (level < 2){
groundBitmap.draw(shadowM, m, c);
};
};
};
};
if (keys[65] == true){
if (hold > -2){
hold--;
};
} else {
if (keys[68] == true){
if (hold < 2){
hold++;
};
} else {
hold = 0;
ship.gotoAndStop(1);
};
};
ship.gotoAndStop(1);
ship.x = ships[0].x;
ship.y = ships[0].y;
shadowM.x = (ship.x + sdx);
shadowM.y = (ship.y + sdy);
shadowM.rotation = ship.rotation;
m = ship.transform.matrix;
m.scale(scale, scale);
if (lives[0] > 0){
if ((((dWait[0] == 0)) || (((Math.round(((((dWait[0] * 1) / 3) * dWait[0]) / 100)) % 2) == 0)))){
shipsBitmap.draw(ship, m);
};
shadowM.gotoAndStop(1);
m = shadowM.transform.matrix;
m.scale(scale, scale);
if ((((level > 0)) || ((spawnTimer > 105)))){
if (level < 2){
groundBitmap.draw(shadowM, m, c);
};
};
};
bullet.x = -100;
shadowM.x = -1000000;
ship.x = -100;
turret.x = -100;
score1 = (Math.round((score1 / 10)) * 10);
score2 = (Math.round((score2 / 10)) * 10);
_local4 = displayNum(score1, counter);
counter.x = (6 + (_local4 * 12));
counter.y = 15;
m = counter.transform.matrix;
m.scale(scale, scale);
shipsBitmap.draw(counter, m);
if (ships.length > 1){
displayNum(score2, counter);
counter.x = (sWidth - 6);
counter.y = 15;
m = counter.transform.matrix;
m.scale(scale, scale);
shipsBitmap.draw(counter, m);
};
m = clouds2.transform.matrix;
m.scale(scale, scale);
bulletsBitmap.draw(clouds2, m);
};
if (!finish){
stage.setChildIndex(clouds2, (stage.numChildren - 1));
stage.setChildIndex(white, (stage.numChildren - 1));
stage.setChildIndex(pauseM, (stage.numChildren - 1));
};
if (!finish){
if (doorsT == true){
stage.setChildIndex(doors, (stage.numChildren - 1));
if (doors.currentFrame == 68){
stage.removeChild(doors);
doorsT = false;
};
};
};
};
_local5 = 0;
for (;_local5 < explosions.length;_local5++) {
if (explosions[_local5].currentFrame == 8){
stage.removeChild(explosions[_local5]);
explosions.splice(_local5, 1);
_local5--;
continue;
};
};
_local5 = 0;
while (_local5 < achisU.length) {
if (achisU[_local5].currentFrame == 80){
stage.removeChild(achisU[_local5]);
achisU.splice(_local5, 1);
_local5--;
} else {
stage.setChildIndex(achisU[_local5], (stage.numChildren - 1));
};
_local5++;
};
}
public function drawFire(){
var _local1:*;
var _local2:*;
_local2 = 0;
while (_local2 < fire.length) {
fire[_local2] = (fire[_local2] - 2);
_local1 = fire[_local2];
drawing.graphics.lineStyle(_local1, fire[(_local2 + 1)], 0.8);
drawing.graphics.moveTo(fire[(_local2 + 2)], fire[(_local2 + 3)]);
drawing.graphics.lineTo(fire[(_local2 + 2)], (fire[(_local2 + 3)] + 1));
if (_local1 < 6){
fire.splice(_local2, 4);
_local2 = (_local2 - 4);
} else {
fire[(_local2 + 2)] = (fire[(_local2 + 2)] + ((Math.random() * 3) - 1.5));
fire[(_local2 + 3)] = (fire[(_local2 + 3)] + (backspd + 9));
};
_local2 = (_local2 + 4);
};
_local2 = 0;
while (_local2 < fire2.length) {
fire2[_local2] = (fire2[_local2] - 2);
_local1 = fire2[_local2];
drawing.graphics.lineStyle(_local1, fire2[(_local2 + 1)], 0.8);
drawing.graphics.moveTo(fire2[(_local2 + 2)], fire2[(_local2 + 3)]);
drawing.graphics.lineTo(fire2[(_local2 + 2)], (fire2[(_local2 + 3)] + 1));
if (_local1 < 6){
fire2.splice(_local2, 4);
_local2 = (_local2 - 4);
} else {
fire2[(_local2 + 2)] = (fire2[(_local2 + 2)] + ((Math.random() * 3) - 1.5));
fire2[(_local2 + 3)] = (fire2[(_local2 + 3)] + (backspd + 9));
};
_local2 = (_local2 + 4);
};
}
public function onIntroClick2(_arg1:MouseEvent):void{
var url:String;
var request:URLRequest;
var evt = _arg1;
url = "http://armorgames.com/";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
}
public function PL_LOADING(_arg1:ProgressEvent):void{
var pcent:Number;
var onIntroClick:Function;
var event = _arg1;
onIntroClick = function (_arg1:MouseEvent):void{
var url:String;
var request:URLRequest;
var evt = _arg1;
url = "http://armorgames.com/";
request = new URLRequest(url);
try {
navigateToURL(request, "_blank");
} catch(e:Error) {
trace("Error occurred!");
};
};
pcent = ((event.bytesLoaded / event.bytesTotal) * 100);
armorbtn.addEventListener(MouseEvent.CLICK, onIntroClick);
loading.visible = true;
playbtn.visible = false;
lbar.scaleX = Math.ceil((pcent / 100));
if (pcent == 100){
playbtn.visible = true;
loading.visible = false;
};
}
public function onIntroClick3(_arg1:MouseEvent):void{
this.removeChild(this["adBox"]);
play();
}
public function screenShake(){
if (sn > 3){
sn = 0;
} else {
if (sn != 0){
sn++;
bitmapHolder.x = ((Math.random() * 10) - 5);
bitmapHolder.y = ((Math.random() * 10) - 5);
} else {
bitmapHolder.x = 0;
bitmapHolder.y = 0;
};
};
}
public function shipDist(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
var _local6:*;
_local5 = (_arg1 - _arg3);
_local6 = (_arg2 - _arg4);
return (Math.sqrt(((_local5 * _local5) + (_local6 * _local6))));
}
public function unlockAchi(_arg1){
var _local2:*;
if (!achisT[(_arg1 - 1)]){
_local2 = new Unlock();
_local2.x = 238;
_local2.y = 501;
stage.addChild(_local2);
achisU.push(_local2);
achisT[(_arg1 - 1)] = true;
_local2.achi.achi.achi.gotoAndStop(_arg1);
_local2.achi.achi.lockM.visible = false;
_local2.achi.achi.achiL.visible = false;
myLocalData.data.achisT = achisT;
myLocalData.flush();
};
}
public function spawnEnemies(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
spawnTimer++;
while (true) {
if (levelPatterns[level][0] == spawnTimer){
_local1 = levelPatterns[level][1];
_local2 = levelPatterns[level][2];
_local3 = levelPatterns[level][3];
_local4 = levelPatterns[level][4];
createEnemy(_local3, _local4, _local1, _local2, 90, 0);
levelPatterns[level].splice(0, 5);
} else {
break;
};
};
}
public function processPatterns(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local1 = 0;
while (_local1 < bulletPatterns.length) {
if (bulletPatterns[_local1][0][0] == spawnTimer){
_local2 = bulletPatterns[_local1][0][1];
_local3 = bulletPatterns[_local1][0][2];
_local4 = bulletPatterns[_local1][0][3];
_local5 = bulletPatterns[_local1][0][4];
_local6 = bulletPatterns[_local1][0][5];
angleBullet(_local2, _local3, _local4, _local5, _local6);
bulletPatterns[_local1].splice(0, 1);
};
if (bulletPatterns[_local1].length == 0){
bulletPatterns.splice(_local1, 1);
};
_local1++;
};
}
public function mdown(_arg1){
clicked = false;
if (!cdown){
clicked = true;
};
cdown = true;
}
public function bulletSpiral(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8){
var _local9:*;
var _local10:*;
var _local11:*;
_local9 = new Array();
_local10 = (360 / _arg4);
if (_arg8 == 1){
_local11 = 0;
while (_local11 < _arg4) {
_local9.push(new Array((_arg1 + (_local11 * 2)), _arg2, _arg3, ((_local10 * _local11) + _arg7), _arg5, _arg6));
_local11++;
};
} else {
_local11 = 0;
while (_local11 < _arg4) {
_local9.push(new Array((_arg1 + (_local11 * 2)), _arg2, _arg3, ((_local10 * (_arg4 - _local11)) + _arg7), _arg5, _arg6));
_local11++;
};
};
bulletPatterns.push(_local9);
}
public function moveBullets(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
_local3 = 0;
while (_local3 < mMissiles.length) {
_local4 = mMissiles[_local3][4];
_local5 = mMissiles[_local3][5];
if (((!((_local5 == undefined))) && ((_local5.l > 0)))){
_local8 = 12;
_local9 = _local5.xpos;
_local10 = _local5.ypos;
_local11 = (mMissiles[_local3][0] - _local9);
_local12 = (mMissiles[_local3][1] - _local10);
_local13 = (-(Math.atan2(_local11, _local12)) / rad);
if (Math.abs((_local4 - _local13)) > Math.abs(((_local4 - _local13) - 360))){
_local13 = (_local13 + 360);
};
if (_local13 > _local4){
_local4 = (_local4 + _local8);
} else {
if (_local13 < _local4){
_local4 = (_local4 - _local8);
};
};
if (Math.abs((_local13 - _local4)) < _local8){
_local4 = _local13;
};
mMissiles[_local3][4] = _local4;
} else {
mMissiles[_local3][5] = enemyTarget();
};
_local6 = (-(Math.cos(((_local4 + 90) * rad))) * mMissiles[_local3][2]);
_local7 = (-(Math.sin(((_local4 + 90) * rad))) * mMissiles[_local3][2]);
mMissiles[_local3][0] = (mMissiles[_local3][0] + _local6);
mMissiles[_local3][1] = (mMissiles[_local3][1] + _local7);
_local1 = (Math.round((mMissiles[_local3][0] / gridSize)) + 5);
_local2 = (Math.round((mMissiles[_local3][1] / gridSize)) + 5);
if ((((((((_local2 < 4)) || ((_local1 < 3)))) || ((_local1 > (xSize - 4))))) || ((_local2 > (ySize - 4))))){
mMissiles.splice(_local3, 1);
_local3--;
} else {
mGrid[_local2][_local1].push(2, _local3);
bullet.x = mMissiles[_local3][0];
bullet.y = mMissiles[_local3][1];
bullet.rotation = (_local4 + 180);
bullet.gotoAndStop(mMissiles[_local3][3]);
m = bullet.transform.matrix;
m.scale(scale, scale);
bulletsBitmap.draw(bullet, m);
};
_local3++;
};
_local3 = 0;
while (_local3 < mBullets.length) {
mBullets[_local3][0] = (mBullets[_local3][0] + mBullets[_local3][2]);
mBullets[_local3][1] = (mBullets[_local3][1] + mBullets[_local3][3]);
_local1 = (Math.round((mBullets[_local3][0] / gridSize)) + 5);
_local2 = (Math.round((mBullets[_local3][1] / gridSize)) + 5);
if ((((((((_local2 < 3)) || ((_local1 < 2)))) || ((_local1 > (xSize - 2))))) || ((_local2 > (ySize - 2))))){
mBullets.splice(_local3, 1);
_local3--;
} else {
mGrid[_local2][_local1].push(1, _local3);
bullet.x = mBullets[_local3][0];
bullet.y = mBullets[_local3][1];
bullet.rotation = mBullets[_local3][5];
bullet.gotoAndStop(mBullets[_local3][4]);
m = bullet.transform.matrix;
m.scale(scale, scale);
bulletsBitmap.draw(bullet, m);
};
_local3++;
};
_local3 = 0;
while (_local3 < eBullets.length) {
eBullets[_local3][0] = (eBullets[_local3][0] + eBullets[_local3][2]);
eBullets[_local3][1] = (eBullets[_local3][1] + eBullets[_local3][3]);
if (eBullets[_local3].length == 9){
var _local19 = eBullets[_local3];
var _local20 = 7;
var _local21 = (_local19[_local20] + 1);
_local19[_local20] = _local21;
//unresolved if
bulletsCircle(eBullets[_local3][0], eBullets[_local3][1], 8, eBullets[_local3][8], (Math.random() * 90), eBullets[_local3][4]);
eBullets.splice(_local3, 1);
_local3--;
} else {
if ((((eBullets[_local3][0] < 0)) || ((eBullets[_local3][0] > sWidth)))){
//unresolved if
eBullets.splice(_local3, 1);
_local3--;
} else {
bullet.x = eBullets[_local3][0];
bullet.y = eBullets[_local3][1];
_local14 = false;
_local15 = 0;
while (_local15 < ships.length) {
if (!_local14){
_local16 = (ships[_local15].x - bullet.x);
_local17 = (ships[_local15].y - bullet.y);
_local18 = Math.sqrt(((_local16 * _local16) + (_local17 * _local17)));
if (_local18 < 14){
c = new ColorTransform();
c.color = 0xFF0000;
c.alphaMultiplier = 0.6;
ship.rotation = 0;
ship.x = ships[_local15].x;
ship.y = ships[_local15].y;
ship.gotoAndStop(ships[_local15].f);
m = ship.transform.matrix;
m.scale(scale, scale);
if (dWait[_local15] == 0){
effectsBitmap.draw(ship, m, c);
};
c.alphaMultiplier = 0.6;
m = ground.transform.matrix;
m.scale(scale, scale);
if (dWait[_local15] == 0){
scoreBitmap.draw(ground, m, c);
eBullets.splice(_local3, 1);
_local14 = true;
_local19 = lives;
_local20 = _local15;
_local21 = (_local19[_local20] - 1);
_local19[_local20] = _local21;
_local19 = dWait;
_local20 = _local15;
_local21 = (_local19[_local20] + 1);
_local19[_local20] = _local21;
};
};
};
_local15++;
};
if (!_local14){
bullet.rotation = eBullets[_local3][5];
bullet.gotoAndStop(eBullets[_local3][4]);
m = bullet.transform.matrix;
m.scale(scale, scale);
bulletsBitmap.draw(bullet, m);
};
};
};
_local3++;
};
}
public function laserF(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
if (!ldraw){
_local4 = 0;
while (_local4 < ships.length) {
_local5 = (ships[_local4].x - startbx);
_local6 = (ships[_local4].y - startby);
_local7 = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
if (_local7 < (14 + ((startW * 2) / 3))){
c = new ColorTransform();
c.color = 0xFF0000;
c.alphaMultiplier = 0.6;
ship.rotation = 0;
ship.x = ships[_local4].x;
ship.y = ships[_local4].y;
ship.gotoAndStop(ships[_local4].f);
m = ship.transform.matrix;
m.scale(scale, scale);
if (dWait[_local4] == 0){
effectsBitmap.draw(ship, m, c);
};
c.alphaMultiplier = 0.6;
m = ground.transform.matrix;
m.scale(scale, scale);
if (dWait[_local4] == 0){
scoreBitmap.draw(ground, m, c);
var _local12 = lives;
var _local13 = _local4;
var _local14 = (_local12[_local13] - 1);
_local12[_local13] = _local14;
_local12 = dWait;
_local13 = _local4;
_local14 = (_local12[_local13] + 1);
_local12[_local13] = _local14;
};
};
_local4++;
};
startW = (startW + 0.5);
drawing.graphics.lineStyle(((startW * 1.5) + pulse), 0xFFFFFF, 1);
drawing.graphics.moveTo(startbx, startby);
drawing.graphics.lineTo(startbx, (startby + 2));
drawing.graphics.lineStyle(((startW * 1.3) + pulse), 0xFF0000, 1);
drawing.graphics.moveTo(startbx, startby);
drawing.graphics.lineTo(startbx, (startby + 2));
drawing.graphics.lineStyle(((startW * 0.8) + pulse), 0xFFFFFF, 1);
drawing.graphics.moveTo(startbx, startby);
drawing.graphics.lineTo(startbx, (startby + 2));
_local1 = 0;
while (_local1 < 20) {
drawing.graphics.lineStyle(((((Math.random() * 10) + 5) * startW) / 30), 0xFFFFFF, 0.3);
_local2 = ((Math.random() * 40) - 20);
_local3 = ((Math.random() * 40) - 20);
drawing.graphics.moveTo((startbx + _local2), (startby + _local3));
drawing.graphics.lineTo((startbx + _local2), ((startby + 2) + _local3));
_local1++;
};
if (startW > 35){
startW = 45;
ldraw = true;
};
} else {
_local4 = 0;
while (_local4 < ships.length) {
_local5 = (ships[_local4].x - startbx);
_local6 = (ships[_local4].y - startby);
_local7 = Math.sqrt(((_local5 * _local5) + (_local6 * _local6)));
if (_local7 < (14 + ((startW * 2) / 3))){
c = new ColorTransform();
c.color = 0xFF0000;
c.alphaMultiplier = 0.6;
ship.rotation = 0;
ship.x = ships[_local4].x;
ship.y = ships[_local4].y;
ship.gotoAndStop(ships[_local4].f);
m = ship.transform.matrix;
m.scale(scale, scale);
if (dWait[_local4] == 0){
effectsBitmap.draw(ship, m, c);
};
c.alphaMultiplier = 0.6;
m = ground.transform.matrix;
m.scale(scale, scale);
if (dWait[_local4] == 0){
scoreBitmap.draw(ground, m, c);
_local12 = lives;
_local13 = _local4;
_local14 = (_local12[_local13] - 1);
_local12[_local13] = _local14;
_local12 = dWait;
_local13 = _local4;
_local14 = (_local12[_local13] + 1);
_local12[_local13] = _local14;
};
} else {
if (Math.abs(_local5) < (14 + (startW / 2))){
c = new ColorTransform();
c.color = 0xFF0000;
c.alphaMultiplier = 0.6;
ship.rotation = 0;
ship.x = ships[_local4].x;
ship.y = ships[_local4].y;
ship.gotoAndStop(ships[_local4].f);
m = ship.transform.matrix;
m.scale(scale, scale);
if (dWait[_local4] == 0){
effectsBitmap.draw(ship, m, c);
};
c.alphaMultiplier = 0.6;
m = ground.transform.matrix;
m.scale(scale, scale);
if (dWait[_local4] == 0){
scoreBitmap.draw(ground, m, c);
_local12 = lives;
_local13 = _local4;
_local14 = (_local12[_local13] - 1);
_local12[_local13] = _local14;
_local12 = dWait;
_local13 = _local4;
_local14 = (_local12[_local13] + 1);
_local12[_local13] = _local14;
};
};
};
_local4++;
};
drawing.graphics.lineStyle(((startW * 1.4) + pulse), 0xFFFFFF, 1);
drawing.graphics.moveTo(startbx, startby);
drawing.graphics.lineTo(startbx, (startby + 2));
startW = (startW - dec);
dec = (dec * 1.07);
_local8 = 6;
pulse = (Math.random() * 3);
deg = (deg + 31);
lcolor++;
if (lcolor > 10){
lcolor = 0;
};
_local9 = (Math.sin(((deg * Math.PI) / 180)) * 8);
_local10 = _local9;
_local11 = 0;
while (_local11 < _local8) {
_local10 = (_local10 * -1);
drawing.graphics.lineStyle((startW + pulse), 0xFFFFFF, 1);
drawing.graphics.moveTo(startbx, (startby + ((drawingL / _local8) * _local11)));
drawing.graphics.curveTo((startbx + ((_local10 * _local11) / _local8)), (startby + ((drawingL / _local8) * (_local11 + (1 / 2)))), startbx, (startby + ((drawingL / _local8) * (_local11 + 1))));
_local11++;
};
drawing.graphics.lineStyle(((startW * 1.2) + pulse), 0xFF0000, 1);
drawing.graphics.moveTo(startbx, startby);
drawing.graphics.lineTo(startbx, (startby + 2));
_local10 = _local9;
_local11 = 0;
while (_local11 < _local8) {
_local10 = (_local10 * -1);
if (lcolor > 5){
drawing.graphics.lineStyle(((startW * 8) / 9), 0xFF0000, 1);
} else {
drawing.graphics.lineStyle(((startW * 8) / 9), 16729156, 1);
};
drawing.graphics.moveTo(startbx, (startby + ((drawingL / _local8) * _local11)));
drawing.graphics.curveTo((startbx + ((_local10 * _local11) / _local8)), (startby + ((drawingL / _local8) * (_local11 + (1 / 2)))), startbx, (startby + ((drawingL / _local8) * (_local11 + 1))));
_local11++;
};
drawing.graphics.lineStyle(((startW * 0.8) + pulse), 0xFFFFFF, 1);
drawing.graphics.moveTo(startbx, startby);
drawing.graphics.lineTo(startbx, (startby + 2));
_local10 = _local9;
_local11 = 0;
while (_local11 < _local8) {
_local10 = (_local10 * -1);
drawing.graphics.lineStyle(((startW * 1) / 3), 0xFFFFFF, 1);
drawing.graphics.moveTo(startbx, (startby + ((drawingL / _local8) * _local11)));
drawing.graphics.curveTo((startbx + ((_local10 * _local11) / _local8)), (startby + ((drawingL / _local8) * (_local11 + (1 / 2)))), startbx, (startby + ((drawingL / _local8) * (_local11 + 1))));
_local11++;
};
_local1 = 0;
while (_local1 < 20) {
drawing.graphics.lineStyle(((((Math.random() * 10) + 5) * startW) / 40), 0xFFFFFF, 0.3);
_local2 = ((Math.random() * 50) - 25);
_local3 = ((Math.random() * 50) - 25);
drawing.graphics.moveTo((startbx + _local2), (startby + _local3));
drawing.graphics.lineTo((startbx + _local2), ((startby + 1) + _local3));
_local1++;
};
_local1 = 0;
while (_local1 < 100) {
drawing.graphics.lineStyle(((((Math.random() * 10) + 5) * startW) / 60), 0xFFFFFF, 0.3);
_local2 = ((Math.random() * 30) - 15);
_local3 = (Math.random() * drawingL);
drawing.graphics.moveTo((startbx + _local2), (startby + _local3));
drawing.graphics.lineTo((startbx + _local2), ((startby + 1) + _local3));
_local1++;
};
if (startW <= 0){
startW = 0;
laser = false;
};
};
}
public function angleBullet2(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7){
var _local8:*;
var _local9:*;
_local8 = (-(Math.cos((_arg3 * rad))) * _arg4);
_local9 = (Math.sin((_arg3 * rad)) * _arg4);
eBullets.push(new Array(_arg1, _arg2, _local9, _local8, _arg5, _arg3, _arg6, 0, _arg7));
}
public function enemyTarget(){
var _local1:*;
if (enemiesArr.length > 0){
_local1 = (Math.ceil((Math.random() * enemiesArr.length)) - 1);
if (enemiesArr[_local1].touchable){
return (enemiesArr[_local1]);
};
return (undefined);
//unresolved jump
};
if (tanksArr.length > 0){
_local1 = (Math.ceil((Math.random() * tanksArr.length)) - 1);
return (tanksArr[_local1]);
};
return (undefined);
}
public function openLink2(_arg1:ContextMenuEvent):void{
navigateToURL(new URLRequest("http://www.armorgames.com"));
}
public function resetBitmap(_arg1, _arg2){
c = new ColorTransform();
c.alphaMultiplier = _arg2;
_arg1.colorTransform(_arg1.rect, c);
}
public function displayNum(_arg1, _arg2){
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local3 = (_arg1 * 10);
_local4 = 11;
_local5 = 0;
while (_local3 > 0) {
_local4--;
_local6 = (_local3 % 10);
_local3 = (_local3 / 10);
_local3 = Math.floor(_local3);
if (_local6 != 0){
_arg2[("n" + _local4)].gotoAndStop(_local6);
} else {
_arg2[("n" + _local4)].gotoAndStop(10);
};
};
_local5 = (11 - _local4);
while (_local4 > 1) {
_local4--;
_arg2[("n" + _local4)].gotoAndStop(11);
};
return (_local5);
}
public function showTime(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
timer = (-2 + (sc2.position / 1000));
if (timer > 0){
_local1 = ((5 * 60) - timer);
_local2 = Math.floor((_local1 / 60));
_local1 = (_local1 - (_local2 * 60));
_local3 = Math.floor((_local1 % 60));
if ((((((_local2 == 0)) && ((_local3 == 0)))) && ((level == 3)))){
finish = true;
ftyp = 0;
};
if ((((level == 2)) && ((spawnTimer >= 1670)))){
level++;
spawnTimer = 0;
};
_local1 = (_local1 - _local3);
_local4 = Math.floor((_local1 * 100));
if (_local4 < 10){
_local4 = ("0" + _local4);
};
if (_local3 < 10){
_local3 = ("0" + _local3);
};
if ((((_local2 == 0)) && ((_local3 < 10)))){
white.visible = true;
white.alpha = (1 - ((_local3 / 10) + (_local4 / 1000)));
};
if (!finish){
clock.clock.text = ((((_local2 + ":") + _local3) + ":") + _local4);
} else {
clock.clock.text = "0:00:00";
};
} else {
clock.clock.text = "5:00:00";
};
}
public function addExplosion(_arg1, _arg2, _arg3, _arg4){
var _local5:*;
_local5 = new Explosion();
_local5.scaleX = _arg4;
_local5.scaleY = _arg4;
_local5.x = ((_arg1 + (((Math.random() * _arg3) * 2) / 3)) - ((_arg3 * 1) / 3));
_local5.y = ((_arg2 + (((Math.random() * _arg3) * 1) / 3)) - ((_arg3 * 1) / 6));
stage.addChild(_local5);
explosions.push(_local5);
}
public function onClear(_arg1:MouseEvent):void{
achisT = new Array(false, false, false, false, false);
myLocalData.data.achisT = achisT;
myLocalData.flush();
}
public function spawnBullets(_arg1, _arg2){
if (lives[(_arg2 - 1)] > 0){
_arg1.r++;
_arg1.r2++;
if (_arg1.r2 > _arg1.rTime2){
if (lvl[(_arg2 - 1)] > 1){
mMissiles.push(new Array((_arg1.x - 10), (_arg1.y - 3), 20, 3, -90, enemyTarget(), _arg2));
mMissiles.push(new Array((_arg1.x + 10), (_arg1.y - 3), 20, 3, 90, enemyTarget(), _arg2));
};
if (lvl[(_arg2 - 1)] > 5){
mMissiles.push(new Array((_arg1.x - 10), (_arg1.y - 3), 20, 3, -70, enemyTarget(), _arg2));
mMissiles.push(new Array((_arg1.x + 10), (_arg1.y - 3), 20, 3, 70, enemyTarget(), _arg2));
};
_arg1.r2 = 0;
};
if (_arg1.r > _arg1.rTime){
if (lvl[(_arg2 - 1)] != 4){
if (lvl[(_arg2 - 1)] > 2){
mBullets.push(new Array(_arg1.x, (_arg1.y - 6), 0, -23, 1, angle(0, -23), _arg2));
};
mBullets.push(new Array((_arg1.x - 7), (_arg1.y - 6), 0, -22, 1, angle(0, -22), _arg2));
mBullets.push(new Array((_arg1.x + 7), (_arg1.y - 6), 0, -22, 1, angle(0, -22), _arg2));
if (lvl[(_arg2 - 1)] > 4){
mBullets.push(new Array((_arg1.x - 14), (_arg1.y - 6), 0, -21, 1, angle(0, -21), _arg2));
mBullets.push(new Array((_arg1.x + 14), (_arg1.y - 6), 0, -21, 1, angle(0, -21), _arg2));
};
} else {
mBullets.push(new Array((_arg1.x - 9), (_arg1.y - 6), 0, -22, 1, angle(0, -22), _arg2));
mBullets.push(new Array((_arg1.x + 9), (_arg1.y - 6), 0, -22, 1, angle(0, -22), _arg2));
mBullets.push(new Array((_arg1.x - 3), (_arg1.y - 6), 0, -23, 1, angle(0, -22), _arg2));
mBullets.push(new Array((_arg1.x + 3), (_arg1.y - 6), 0, -23, 1, angle(0, -22), _arg2));
};
if (lvl[(_arg2 - 1)] > 6){
mBullets.push(new Array(_arg1.x, (_arg1.y - 6), -4, -18, 1, angle(-4, -18)));
mBullets.push(new Array(_arg1.x, (_arg1.y - 6), 4, -18, 1, angle(4, -18)));
};
_arg1.r = 0;
};
};
}
public function angleBullet(_arg1, _arg2, _arg3, _arg4, _arg5){
var _local6:*;
var _local7:*;
_local6 = (-(Math.cos((_arg3 * rad))) * _arg4);
_local7 = (Math.sin((_arg3 * rad)) * _arg4);
eBullets.push(new Array(_arg1, _arg2, _local7, _local6, _arg5, _arg3));
}
public function drawScore(_arg1, _arg2, _arg3){
var _local4:*;
_local4 = displayNum(_arg1, counter);
counter.x = (_arg2 + (_local4 * 6));
counter.y = _arg3;
m = counter.transform.matrix;
m.scale(scale, scale);
scoreBitmap.draw(counter, m);
}
public function mup(_arg1){
clicked = false;
cdown = false;
}
public function bulletsCircle(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
var _local7:*;
var _local8:*;
screenShake();
_local7 = (360 / _arg4);
_local8 = 0;
while (_local8 < _arg4) {
angleBullet(_arg1, _arg2, ((_local7 * _local8) + _arg5), _arg3, _arg6);
_local8++;
};
}
public function createEnemy(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6){
var _local7:Object;
_local7 = new Object();
_local7.xpos = _arg1;
_local7.ypos = _arg2;
_local7.spd = _arg6;
_local7.rot = _arg5;
_local7.nRot = _arg5;
_local7.nrot = 0;
_local7.nroti = 0;
_local7.t = _arg3;
_local7.p1 = 0;
_local7.p2 = 0;
_local7.timer = 0;
_local7.twait = 0;
_local7.movTyp = 0;
_local7.turret = 0;
_local7.shootC = 0;
_local7.fr = 0;
_local7.fr2 = 0;
_local7.fr3 = new Array();
_local7.touchable = true;
if (_local7.t == 2){
_local7.rad = 22;
_local7.l = 5;
_local7.score = 750;
_local7.shootChance = 0;
} else {
if ((((_local7.t >= 3)) && ((_local7.t <= 9)))){
if ((((_local7.t == 3)) || ((_local7.t == 4)))){
_local7.rad = 40;
_local7.l = 17;
_local7.score = 900;
if (_local7.xpos < 0){
_local7.rot = (((Math.random() * 130) + 30) - 90);
} else {
_local7.rot = (((Math.random() * 130) + 30) + 90);
};
_local7.nrot = (Math.random() * 360);
_local7.spd = ((Math.random() * 5) + 2);
_local7.nroti = ((Math.random() * 10) - 5);
} else {
if (_local7.t == 8){
_local7.rad = 25;
_local7.l = 6;
_local7.score = 450;
_local7.nrot = (Math.random() * 360);
_local7.spd = (Math.random() * 10);
_local7.nroti = ((Math.random() * 10) - 5);
} else {
_local7.rad = 10;
_local7.l = 3;
_local7.score = 100;
_local7.nrot = (Math.random() * 360);
_local7.nroti = ((Math.random() * 10) - 5);
_local7.shootChance = 0;
};
};
} else {
if (_local7.t == 10){
_local7.rad = 25;
_local7.l = 10;
_local7.score = 1000;
} else {
if (_local7.t == 11){
_local7.rad = 28;
_local7.l = 18;
_local7.score = 1300;
_local7.bt = 5;
_local7.fr3 = new Array(130, -1);
} else {
if (_local7.t == 35){
_local7.rad = 30;
_local7.l = 22;
_local7.score = 1500;
} else {
if (_local7.t == 12){
_local7.rad = 23;
_local7.l = 17;
_local7.score = 1600;
_local7.fr3 = new Array((20 + (Math.random() * 50)), -1);
_local7.bt = 6;
} else {
if (_local7.t == 13){
_local7.rad = 30;
_local7.trot = 90;
_local7.l = 22;
_local7.score = 1500;
_local7.turret = 1;
_local7.bt = 4;
} else {
if (_local7.t == 14){
_local7.rad = 24;
_local7.trot = 90;
_local7.l = 12;
_local7.score = 500;
_local7.turret = 3;
_local7.bt = 4;
} else {
if (_local7.t == 18){
_local7.rad = 28;
_local7.trot = 90;
_local7.l = 42;
_local7.score = 1800;
_local7.turret = 2;
_local7.bt = 7;
} else {
if (_local7.t == 17){
_local7.rad = 22;
_local7.l = 8;
_local7.score = 1050;
} else {
if (_local7.t == 15){
_local7.rad = 210;
_local7.l = 1150;
_local7.score = 25000;
_local7.bt = 2;
_local7.fr3 = new Array(100, 400, 430, -1);
} else {
if (_local7.t == 16){
_local7.rad = 55;
_local7.l = 130;
_local7.score = 3000;
_local7.trot = 90;
_local7.turret = 4;
_local7.bt = 5;
_local7.fr3 = new Array(5, 10, 15, 20, 25, 30, 250, -1);
} else {
if (_local7.t == 36){
_local7.rad = 80;
_local7.l = 74;
_local7.score = 6000;
_local7.bt = 4;
} else {
if (_local7.t == 19){
_local7.rad = 70;
_local7.l = 185;
_local7.score = 4000;
_local7.bt = 4;
_local7.fr3 = new Array(50, -1);
} else {
if (_local7.t == 20){
_local7.rad = 50;
_local7.l = 68;
_local7.score = 2700;
_local7.bt = 2;
_local7.trot = 90;
_local7.turret = 6;
_local7.hrot = 0;
_local7.fr3 = new Array(20, 23, 26, 29, -1);
} else {
if (_local7.t == 23){
_local7.moving = 0;
finalBoss.push(_local7);
_local7.rad = 66;
_local7.l = 360;
_local7.score = 75000;
_local7.touchable = false;
} else {
if (_local7.t == 24){
finalBoss.push(_local7);
_local7.timeV = 0;
_local7.rad = 150;
_local7.l = 225;
_local7.score = 5000;
_local7.touchable = false;
_local7.nrot = 110;
_local7.spd = 0;
} else {
if (_local7.t == 25){
finalBoss.push(_local7);
_local7.timeV = 0;
_local7.rad = 150;
_local7.l = 225;
_local7.score = 5000;
_local7.touchable = false;
_local7.nrot = 260;
_local7.spd = 0;
} else {
if (_local7.t == 22){
finalBoss.push(_local7);
_local7.bt = 5;
_local7.timeV = 0;
_local7.rad = 50;
_local7.l = 225;
_local7.score = 4500;
_local7.touchable = true;
_local7.spd = 0;
_local7.fr3 = new Array(5, 10, 15, 20, 25, 170, -1);
} else {
if (_local7.t == 27){
finalBoss.push(_local7);
_local7.ltime = 1;
_local7.nrot = 180;
_local7.w = 113;
_local7.h = 14;
_local7.timeV = 0;
_local7.rad = 45;
_local7.l = 310;
_local7.score = 7000;
_local7.touchable = true;
_local7.spd = 0;
} else {
if (_local7.t == 28){
finalBoss.push(_local7);
_local7.ltime = 1;
_local7.nrot = 180;
_local7.w = 113;
_local7.h = 14;
_local7.timeV = 0;
_local7.rad = 45;
_local7.l = 310;
_local7.score = 7000;
_local7.touchable = true;
_local7.spd = 0;
} else {
if (_local7.t == 26){
_local7.touchable = false;
finalBoss.push(_local7);
_local7.bt = 2;
_local7.nrot = 0;
_local7.timeV = 0;
_local7.rad = 50;
_local7.l = 750;
_local7.score = 25000;
_local7.spd = 0;
_local7.fr3 = new Array(5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 200, 207, 214, 221, 375, -1);
} else {
if ((((_local7.t == 29)) || ((_local7.t == 30)))){
finalBoss.push(_local7);
_local7.bt = 4;
_local7.nrot = 0;
_local7.timeV = 0;
_local7.rad = 50;
_local7.l = 620;
_local7.score = 10000;
_local7.touchable = false;
_local7.spd = 0;
_local7.fr3 = new Array(115, 130, 145, 160, 350, -1);
} else {
if (_local7.t == 31){
finalBoss.push(_local7);
_local7.nrot = 0;
_local7.timeV = 0;
_local7.rad = 50;
_local7.l = 275;
_local7.score = 10000;
_local7.touchable = false;
_local7.spd = 0;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
_local7.startl = _local7.l;
if (pboost == 2){
_local7.l = (_local7.l * 1.7);
};
_local7.score = (_local7.score * pboost);
_local7.p = _arg4;
if (ships.length > 1){
_local7.ts = Math.round(Math.random());
if (lives[_local7.ts] <= 0){
if (_local7.ts == 1){
_local7.ts = 0;
} else {
_local7.ts = 1;
};
};
} else {
_local7.ts = 0;
};
_local7.l = Math.round(_local7.l);
_local7.currF = false;
if (shipPatterns[_local7.p][0] == 1){
_local7.rf = true;
} else {
_local7.rf = 0;
};
_local7.curr = 1;
if (_local7.t == 13){
_local7.fr3 = new Array(90, 120, 150, -1);
tanksArr.push(_local7);
} else {
if (_local7.t == 14){
_local7.fr3 = new Array(30, -1);
tanksArr.push(_local7);
} else {
if (_local7.t == 18){
_local7.fr3 = new Array(60, 80, -1);
tanksArr.push(_local7);
} else {
enemiesArr.push(_local7);
};
};
};
}
}
}//package SX5MSEU2_fla
Section 21
//menuzoomincopy_26 (SX5MSEU2_fla.menuzoomincopy_26)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class menuzoomincopy_26 extends MovieClip {
public var btn3:MovieClip;
public var btn2:MovieClip;
public var btn1:MovieClip;
public function menuzoomincopy_26(){
addFrameScript(31, frame32, 65, frame66);
}
function frame32(){
stop();
}
function frame66(){
stop();
}
}
}//package SX5MSEU2_fla
Section 22
//moregamesbtn_32 (SX5MSEU2_fla.moregamesbtn_32)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class moregamesbtn_32 extends MovieClip {
public var hitarea:MovieClip;
}
}//package SX5MSEU2_fla
Section 23
//pumpname_40 (SX5MSEU2_fla.pumpname_40)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class pumpname_40 extends MovieClip {
public function pumpname_40(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
}
}
}//package SX5MSEU2_fla
Section 24
//ranksmc_124 (SX5MSEU2_fla.ranksmc_124)
package SX5MSEU2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class ranksmc_124 extends MovieClip {
public var scoreText1:TextField;
public var scoreText2:TextField;
public var botline:MovieClip;
public var topline:MovieClip;
public var arr2:MovieClip;
public var arr1:MovieClip;
}
}//package SX5MSEU2_fla
Section 25
//scorecounter_71 (SX5MSEU2_fla.scorecounter_71)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class scorecounter_71 extends MovieClip {
public var n10:MovieClip;
public var n1:MovieClip;
public var n2:MovieClip;
public var n5:MovieClip;
public var n8:MovieClip;
public var n7:MovieClip;
public var n4:MovieClip;
public var n6:MovieClip;
public var n9:MovieClip;
public var n3:MovieClip;
}
}//package SX5MSEU2_fla
Section 26
//space_128 (SX5MSEU2_fla.space_128)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class space_128 extends MovieClip {
public function space_128(){
addFrameScript(0, frame1, 29, frame30);
}
function frame1(){
stop();
}
function frame30(){
stop();
}
}
}//package SX5MSEU2_fla
Section 27
//startbtn_28 (SX5MSEU2_fla.startbtn_28)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class startbtn_28 extends MovieClip {
public var hitarea:MovieClip;
}
}//package SX5MSEU2_fla
Section 28
//transition_77 (SX5MSEU2_fla.transition_77)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class transition_77 extends MovieClip {
public var s2:MovieClip;
public var clouds:MovieClip;
public function transition_77(){
addFrameScript(0, frame1, 839, frame840);
}
function frame840(){
stop();
}
function frame1(){
stop();
}
}
}//package SX5MSEU2_fla
Section 29
//xelu_14 (SX5MSEU2_fla.xelu_14)
package SX5MSEU2_fla {
import flash.display.*;
public dynamic class xelu_14 extends MovieClip {
public function xelu_14(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SX5MSEU2_fla
Section 30
//clockMc (clockMc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class clockMc extends MovieClip {
public var clock:TextField;
}
}//package
Section 31
//Clouds3 (Clouds3)
package {
import flash.display.*;
public dynamic class Clouds3 extends MovieClip {
public function Clouds3(){
addFrameScript(0, frame1, 35, frame36);
}
function frame1(){
stop();
}
function frame36(){
stop();
}
}
}//package
Section 32
//Doors (Doors)
package {
import flash.display.*;
public dynamic class Doors extends MovieClip {
public function Doors(){
addFrameScript(67, frame68);
}
function frame68(){
stop();
}
}
}//package
Section 33
//Explosion (Explosion)
package {
import flash.display.*;
public dynamic class Explosion extends MovieClip {
}
}//package
Section 34
//GameOver (GameOver)
package {
import flash.display.*;
public dynamic class GameOver extends MovieClip {
public var finishS:MovieClip;
public function GameOver(){
addFrameScript(74, frame75);
}
function frame75(){
stop();
}
}
}//package
Section 35
//Interface (Interface)
package {
import flash.display.*;
public dynamic class Interface extends MovieClip {
public var lives2:MovieClip;
public var lives1:MovieClip;
}
}//package
Section 36
//LaserMini (LaserMini)
package {
import flash.display.*;
public dynamic class LaserMini extends MovieClip {
}
}//package
Section 37
//LvlUp (LvlUp)
package {
import flash.display.*;
public dynamic class LvlUp extends MovieClip {
public var lvl:MovieClip;
}
}//package
Section 38
//pauseMc (pauseMc)
package {
import flash.display.*;
public dynamic class pauseMc extends MovieClip {
public function pauseMc(){
addFrameScript(22, frame23);
}
function frame23(){
stop();
}
}
}//package
Section 39
//qS (qS)
package {
import flash.display.*;
public dynamic class qS extends MovieClip {
}
}//package
Section 40
//RankM (RankM)
package {
import flash.display.*;
public dynamic class RankM extends MovieClip {
public var space:MovieClip;
public var ranks:MovieClip;
public function RankM(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package
Section 41
//Song (Song)
package {
import flash.media.*;
public dynamic class Song extends Sound {
}
}//package
Section 42
//Song2 (Song2)
package {
import flash.media.*;
public dynamic class Song2 extends Sound {
}
}//package
Section 43
//Unlock (Unlock)
package {
import flash.display.*;
public dynamic class Unlock extends MovieClip {
public var achi:MovieClip;
public function Unlock(){
addFrameScript(79, frame80);
}
function frame80(){
stop();
}
}
}//package
Section 44
//White (White)
package {
import flash.display.*;
public dynamic class White extends MovieClip {
}
}//package