Section 1
//alt_intro_holder_137 (EarthOnslaught3_fla.alt_intro_holder_137)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class alt_intro_holder_137 extends MovieClip {
public var par;
public function alt_intro_holder_137(){
addFrameScript(184, frame185);
}
function frame185(){
stop();
par = this.parent;
par.nextFrame();
}
}
}//package EarthOnslaught3_fla
Section 2
//badantentara_95 (EarthOnslaught3_fla.badantentara_95)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class badantentara_95 extends MovieClip {
public function badantentara_95(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 3
//bar1_222 (EarthOnslaught3_fla.bar1_222)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.geom.*;
public dynamic class bar1_222 extends MovieClip {
public var blinkCount;
public function bar1_222(){
addFrameScript(0, frame1);
}
public function blink():void{
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blinkCount = 3;
}
public function unblink():void{
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
function frame1(){
stop();
blinkCount = 0;
}
}
}//package EarthOnslaught3_fla
Section 4
//bar3_232 (EarthOnslaught3_fla.bar3_232)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.geom.*;
public dynamic class bar3_232 extends MovieClip {
public var blinkCount;
public function bar3_232(){
addFrameScript(0, frame1);
}
public function blink():void{
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blinkCount = 3;
}
public function unblink():void{
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
function frame1(){
stop();
blinkCount = 0;
}
}
}//package EarthOnslaught3_fla
Section 5
//Bgbelakang_181 (EarthOnslaught3_fla.Bgbelakang_181)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class Bgbelakang_181 extends MovieClip {
public function Bgbelakang_181(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 6
//Bgdepan_188 (EarthOnslaught3_fla.Bgdepan_188)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class Bgdepan_188 extends MovieClip {
public function Bgdepan_188(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 7
//Bgmid_186 (EarthOnslaught3_fla.Bgmid_186)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class Bgmid_186 extends MovieClip {
public function Bgmid_186(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 8
//bodymb1_99 (EarthOnslaught3_fla.bodymb1_99)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class bodymb1_99 extends MovieClip {
public function bodymb1_99(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 9
//bodymb2clip_104 (EarthOnslaught3_fla.bodymb2clip_104)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class bodymb2clip_104 extends MovieClip {
public function bodymb2clip_104(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 10
//bodymb3_109 (EarthOnslaught3_fla.bodymb3_109)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class bodymb3_109 extends MovieClip {
public function bodymb3_109(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 11
//BtnPause_272 (EarthOnslaught3_fla.BtnPause_272)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class BtnPause_272 extends MovieClip {
public function BtnPause_272(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 12
//Conf1_193 (EarthOnslaught3_fla.Conf1_193)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Conf1_193 extends MovieClip {
public var par;
public function Conf1_193(){
addFrameScript(99, frame100);
}
function frame100(){
stop();
par = this.parent;
par.okayNext = true;
}
}
}//package EarthOnslaught3_fla
Section 13
//Conf2_195 (EarthOnslaught3_fla.Conf2_195)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Conf2_195 extends MovieClip {
public var par;
public function Conf2_195(){
addFrameScript(74, frame75);
}
function frame75(){
stop();
par = this.parent;
par.okayNext = true;
}
}
}//package EarthOnslaught3_fla
Section 14
//Conf3_196 (EarthOnslaught3_fla.Conf3_196)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Conf3_196 extends MovieClip {
public var par;
public function Conf3_196(){
addFrameScript(49, frame50);
}
function frame50(){
stop();
par = this.parent;
par.okayNext = true;
}
}
}//package EarthOnslaught3_fla
Section 15
//Conf4_197 (EarthOnslaught3_fla.Conf4_197)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Conf4_197 extends MovieClip {
public var par;
public function Conf4_197(){
addFrameScript(124, frame125);
}
function frame125(){
stop();
par = this.parent;
par.okayNext = true;
}
}
}//package EarthOnslaught3_fla
Section 16
//Conf5_198 (EarthOnslaught3_fla.Conf5_198)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Conf5_198 extends MovieClip {
public var par;
public function Conf5_198(){
addFrameScript(149, frame150);
}
function frame150(){
stop();
par = this.parent;
par.okayNext = true;
}
}
}//package EarthOnslaught3_fla
Section 17
//ContainerBulet_211 (EarthOnslaught3_fla.ContainerBulet_211)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.filters.*;
public dynamic class ContainerBulet_211 extends MovieClip {
public var drawed:Boolean;
public var glow_alpha:Number;
public var filter_glow:GlowFilter;
public var glow_color:Number;
public var buletDraw:Sprite;
public var glow_blurX:Number;
public var glow_quality:Number;
public var glow_blurY:Number;
public var glow_strength:Number;
public var lightningColor;
public function ContainerBulet_211(){
addFrameScript(0, frame1);
}
public function drawBulet(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
buletDraw.graphics.lineStyle(1, 12098148, 1, true);
buletDraw.graphics.moveTo(_arg1, _arg2);
buletDraw.graphics.lineTo(_arg3, _arg4);
drawed = true;
}
function frame1(){
stop();
buletDraw = new Sprite();
drawed = false;
this.addChild(buletDraw);
lightningColor = "0xCCCCCC";
glow_color = lightningColor;
glow_alpha = 0.6;
glow_blurX = 5;
glow_blurY = 5;
glow_strength = 2;
glow_quality = 3;
filter_glow = new GlowFilter(glow_color, glow_alpha, glow_blurX, glow_blurY, glow_strength, glow_quality);
}
public function drawBulet2(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
switch (_arg5){
case 1:
buletDraw.graphics.lineStyle(1, 0xFFFFFF, 1, true);
break;
case 2:
buletDraw.graphics.lineStyle(1, 13434726, 1, true);
break;
case 3:
buletDraw.graphics.lineStyle(1, 0xFFFF, 1, true);
break;
};
buletDraw.graphics.moveTo(_arg1, _arg2);
buletDraw.graphics.lineTo(_arg3, _arg4);
drawed = true;
}
public function drawBuletE(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
buletDraw.graphics.lineStyle(1, 3766721, 1, true);
buletDraw.graphics.moveTo(_arg1, _arg2);
buletDraw.graphics.lineTo(_arg3, _arg4);
drawed = true;
}
public function drawLaser(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
switch (_arg5){
case 1:
buletDraw.graphics.lineStyle(4, 0xFFFFFF, 0.7, true);
break;
case 2:
buletDraw.graphics.lineStyle(4, 16724838, 0.7, true);
break;
case 3:
buletDraw.graphics.lineStyle(4, 0xFF0000, 0.7, true);
break;
};
buletDraw.graphics.moveTo(_arg1, _arg2);
buletDraw.graphics.lineTo(_arg3, _arg4);
drawed = true;
}
}
}//package EarthOnslaught3_fla
Section 18
//ContainerLighting_210 (EarthOnslaught3_fla.ContainerLighting_210)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class ContainerLighting_210 extends MovieClip {
public var xtarget:Number;
public var lightningWidth:Number;
public var count:Number;
public var buletDraw:Sprite;
public var ytarget:Number;
public var ystart:Number;
public var Level:Number;
public var sparkNumber:Number;
public var lightningColorE;
public var sparkSize:Number;
public var lightningFrequency:Number;
public var lightningBranches:Number;
public var lightningColorT;
public var lightningColorW;
public var lightningAlpha:Number;
public var xstart:Number;
public var sparkDistance:Number;
public var lightningOffset:Number;
public function ContainerLighting_210(){
addFrameScript(0, frame1);
}
public function electric(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number=1):void{
xstart = _arg1;
ystart = _arg2;
xtarget = _arg3;
ytarget = _arg4;
Level = _arg6;
if (_arg5 == 1){
this.addEventListener(Event.ENTER_FRAME, elec);
};
if (_arg5 == 2){
this.addEventListener(Event.ENTER_FRAME, elecW);
};
if (_arg5 == 3){
this.addEventListener(Event.ENTER_FRAME, elecE);
};
buletDraw.graphics.lineTo(xtarget, ytarget);
addSparkles(xtarget, ytarget, sparkNumber, sparkDistance, sparkSize);
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function elecW(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:*;
var _local9:*;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
buletDraw.graphics.clear();
buletDraw.graphics.lineStyle(lightningWidth, lightningColorW, lightningAlpha, true);
_local2 = (xstart - xtarget);
_local3 = (ystart - ytarget);
_local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
_local5 = (_local4 / lightningFrequency);
_local6 = Math.atan2((ystart - ytarget), (xstart - xtarget));
_local7 = (_local4 / _local5);
_local8 = 0;
while (_local8 < lightningBranches) {
buletDraw.graphics.moveTo(xstart, ystart);
_local9 = 1;
while (_local9 < (_local5 + 1)) {
_local10 = (_local7 * _local9);
_local11 = randRange(0, lightningOffset);
_local12 = ((xstart - (Math.cos(_local6) * _local10)) + (Math.cos((_local6 + 1.55)) * _local11));
_local13 = ((ystart - (Math.sin(_local6) * _local10)) + (Math.sin((_local6 + 1.55)) * _local11));
buletDraw.graphics.lineTo(_local12, _local13);
_local9++;
};
_local8++;
};
if (count > 0){
count--;
} else {
count = 3;
buletDraw.graphics.clear();
this.removeEventListener(Event.ENTER_FRAME, elecW);
};
}
public function elecE(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:*;
var _local9:*;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
buletDraw.graphics.clear();
buletDraw.graphics.lineStyle(lightningWidth, lightningColorE, lightningAlpha, true);
_local2 = (xstart - xtarget);
_local3 = (ystart - ytarget);
_local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
_local5 = (_local4 / lightningFrequency);
_local6 = Math.atan2((ystart - ytarget), (xstart - xtarget));
_local7 = (_local4 / _local5);
_local8 = 0;
while (_local8 < lightningBranches) {
buletDraw.graphics.moveTo(xstart, ystart);
_local9 = 1;
while (_local9 < (_local5 + 1)) {
_local10 = (_local7 * _local9);
_local11 = randRange(0, lightningOffset);
_local12 = ((xstart - (Math.cos(_local6) * _local10)) + (Math.cos((_local6 + 1.55)) * _local11));
_local13 = ((ystart - (Math.sin(_local6) * _local10)) + (Math.sin((_local6 + 1.55)) * _local11));
buletDraw.graphics.lineTo(_local12, _local13);
_local9++;
};
_local8++;
};
if (count > 0){
count--;
} else {
count = 3;
buletDraw.graphics.clear();
this.removeEventListener(Event.ENTER_FRAME, elecE);
};
}
public function elec(_arg1:Event):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:*;
var _local9:*;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
buletDraw.graphics.clear();
buletDraw.graphics.lineStyle(lightningWidth, lightningColorT, lightningAlpha, true);
_local2 = (xstart - xtarget);
_local3 = (ystart - ytarget);
_local4 = Math.sqrt(((_local2 * _local2) + (_local3 * _local3)));
_local5 = (_local4 / lightningFrequency);
_local6 = Math.atan2((ystart - ytarget), (xstart - xtarget));
_local7 = (_local4 / _local5);
_local8 = 0;
while (_local8 < (lightningBranches * Level)) {
buletDraw.graphics.moveTo(xstart, ystart);
_local9 = 1;
while (_local9 < (_local5 + 1)) {
_local10 = (_local7 * _local9);
_local11 = randRange(0, lightningOffset);
_local12 = ((xstart - (Math.cos(_local6) * _local10)) + (Math.cos((_local6 + 1.55)) * _local11));
_local13 = ((ystart - (Math.sin(_local6) * _local10)) + (Math.sin((_local6 + 1.55)) * _local11));
buletDraw.graphics.lineTo(_local12, _local13);
_local9++;
};
_local8++;
};
if (count > 0){
count--;
} else {
count = 3;
buletDraw.graphics.clear();
this.removeEventListener(Event.ENTER_FRAME, elec);
};
}
function frame1(){
stop();
buletDraw = new Sprite();
this.addChild(buletDraw);
lightningWidth = 1;
lightningColorE = "0x5C98EF";
lightningColorT = "0xFF4FFF";
lightningColorW = "0xB89A64";
lightningAlpha = 0.8;
lightningOffset = 8;
lightningFrequency = 15;
lightningBranches = 2;
xstart = 0;
ystart = 0;
xtarget = 0;
ytarget = 0;
count = 3;
sparkNumber = 5;
sparkDistance = 10;
sparkSize = 1;
}
public function addSparkles(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):void{
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
_local6 = 0;
while (_local6 < (_arg3 * Level)) {
_local7 = new spark();
_local8 = new spark2();
addChild(_local7);
addChild(_local8);
_local7.x = (_arg1 + randRange(((_arg4 / 2) * -1), (_arg4 / 2)));
_local7.y = (_arg2 + randRange(((_arg4 / 2) * -1), (_arg4 / 2)));
_local8.x = (_arg1 + randRange(((_arg4 / 2) * -1), (_arg4 / 2)));
_local8.y = (_arg2 + randRange(((_arg4 / 2) * -1), (_arg4 / 2)));
_local9 = randRange((_arg5 / 4), _arg5);
_local7.scaleX = _local9;
_local7.scaleY = _local9;
_local9 = randRange((_arg5 / 4), _arg5);
_local8.scaleX = _local9;
_local8.scaleY = _local9;
_local8.rotation = randRange(-180, 180);
_local7.alpha = lightningAlpha;
_local8.alpha = lightningAlpha;
_local6++;
};
}
}
}//package EarthOnslaught3_fla
Section 19
//CreditBg_157 (EarthOnslaught3_fla.CreditBg_157)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class CreditBg_157 extends MovieClip {
public var tutup:SimpleButton;
}
}//package EarthOnslaught3_fla
Section 20
//CreditMC_156 (EarthOnslaught3_fla.CreditMC_156)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class CreditMC_156 extends MovieClip {
public var bga:MovieClip;
public function CreditMC_156(){
addFrameScript(0, frame1, 19, frame20);
}
public function clickOK(_arg1:MouseEvent):void{
play();
}
function frame1(){
stop();
}
function frame20(){
stop();
bga.tutup.addEventListener(MouseEvent.CLICK, clickOK);
}
}
}//package EarthOnslaught3_fla
Section 21
//CreditText_159 (EarthOnslaught3_fla.CreditText_159)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class CreditText_159 extends MovieClip {
public var mb2:SimpleButton;
public var logo:SimpleButton;
public function CreditText_159(){
addFrameScript(0, frame1);
}
function frame1(){
logo.addEventListener(MouseEvent.CLICK, clickMore);
mb2.addEventListener(MouseEvent.CLICK, clickAB2);
}
public function clickAB2(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2, "_blank");
}
public function clickMore(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
}
}//package EarthOnslaught3_fla
Section 22
//Cursor_161 (EarthOnslaught3_fla.Cursor_161)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class Cursor_161 extends MovieClip {
public function Cursor_161(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 23
//earth2_151 (EarthOnslaught3_fla.earth2_151)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class earth2_151 extends MovieClip {
public function earth2_151(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 24
//Ending_235 (EarthOnslaught3_fla.Ending_235)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Ending_235 extends MovieClip {
public var panel:MovieClip;
public var pare;
public var loader:URLLoader;
public var btnback:SimpleButton;
public var requestku:URLRequest;
public var baris4:MovieClip;
public var baris1:MovieClip;
public var baris3:MovieClip;
public var baris5:MovieClip;
public var baris9:MovieClip;
public var baris8:MovieClip;
public var baris10:MovieClip;
public var baris2:MovieClip;
public var baris6:MovieClip;
public var baris7:MovieClip;
public var par;
public var btnmore:SimpleButton;
public function Ending_235(){
addFrameScript(174, frame175, 175, frame176, 181, frame182);
}
public function cleartxt(_arg1:MouseEvent){
_arg1.target.text = "";
_arg1.target.removeEventListener(MouseEvent.CLICK, cleartxt);
}
public function btnBACK(_arg1:MouseEvent):void{
gotoAndStop("end");
}
function frame182(){
stop();
par = this.parent.parent.parent;
par.gotoAndStop("main");
}
public function submitScore(_arg1:MouseEvent):void{
var variables:URLVariables;
var e = _arg1;
variables = new URLVariables();
variables.kode_game = "EO";
variables.name = panel.nama.text;
variables.flash = 1;
variables.score = pare.SCORE;
requestku = new URLRequest();
requestku.url = "http://www.smallfarmstudio.com/latihan/new_score2.php";
requestku.method = URLRequestMethod.POST;
requestku.data = variables;
try {
URLRequestMethodExample();
} catch(e:Error) {
};
}
function frame176(){
stop();
showWorldScore();
}
public function btnMore(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
public function completeHandler(_arg1:Event):void{
play();
}
public function URLRequestMethodExample():void{
var _local1:String;
loader = new URLLoader();
_local1 = URLLoaderDataFormat.VARIABLES;
loader.dataFormat = _local1;
loader.load(requestku);
loader.addEventListener(Event.COMPLETE, completeHandler);
}
public function showWorldScore():void{
var _local1:*;
var _local2:*;
var _local3:Number;
_local1 = 1;
while (_local1 <= 10) {
_local2 = getChildByName(("baris" + _local1));
if (loader.data[("name" + _local1)] != null){
_local2.visible = true;
_local3 = (int(loader.data.awal) + _local1);
_local2.no.text = _local3;
_local2.nama.text = loader.data[("name" + _local1)];
_local2.score.text = loader.data[("score" + _local1)];
if (loader.data.rank == _local3){
_local2.no.textColor = 0xFFFFFF;
_local2.nama.textColor = 0xFFFFFF;
_local2.score.textColor = 0xFFFFFF;
} else {
_local2.no.textColor = 16691969;
_local2.nama.textColor = 16691969;
_local2.score.textColor = 16691969;
};
} else {
_local2.visible = false;
};
_local1++;
};
}
function frame175(){
stop();
btnmore.addEventListener(MouseEvent.CLICK, btnMore);
btnback.addEventListener(MouseEvent.CLICK, btnBACK);
pare = this.parent;
requestku = new URLRequest();
loader = new URLLoader();
panel.score.text = pare.SCORE;
panel.nama.addEventListener(MouseEvent.CLICK, cleartxt, false, 0, true);
panel.btnsub.addEventListener(MouseEvent.CLICK, submitScore, false, 0, true);
}
}
}//package EarthOnslaught3_fla
Section 25
//FadeOut_298 (EarthOnslaught3_fla.FadeOut_298)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class FadeOut_298 extends MovieClip {
public var par;
public function FadeOut_298(){
addFrameScript(24, frame25);
}
function frame25(){
stop();
par = this.parent;
par.play();
}
}
}//package EarthOnslaught3_fla
Section 26
//fill_264 (EarthOnslaught3_fla.fill_264)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class fill_264 extends MovieClip {
public function fill_264(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 27
//Game_179 (EarthOnslaught3_fla.Game_179)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class Game_179 extends MovieClip {
public var tutor:MovieClip;
public var tips:MovieClip;
public var levelS:MovieClip;
public var main:MovieClip;
public var mainf:MovieClip;
public var pauseLay:MovieClip;
public function Game_179(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 28
//GameOverMC_302 (EarthOnslaught3_fla.GameOverMC_302)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class GameOverMC_302 extends MovieClip {
public var par;
public function GameOverMC_302(){
addFrameScript(149, frame150);
}
function frame150(){
stop();
par = this.parent;
par.gotoAndStop("main");
}
}
}//package EarthOnslaught3_fla
Section 29
//GateCloseOpen_199 (EarthOnslaught3_fla.GateCloseOpen_199)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class GateCloseOpen_199 extends MovieClip {
public var ss:Sound;
public var par;
public var Target:Number;
public function GateCloseOpen_199(){
addFrameScript(0, frame1, 1, frame2, 18, frame19, 32, frame33);
}
function frame1(){
stop();
par = this.parent;
}
function frame19(){
par.gotoAndStop(Target);
}
function frame2(){
ss = new GateClose2S();
ss.play(0.2, 1, new SoundTransform(par.parent.parent.efekSound));
}
function frame33(){
if (Target == 2){
par.parent.levelS.Target = par.levelKe;
par.parent.levelS.play();
};
}
}
}//package EarthOnslaught3_fla
Section 30
//GateMovieOpen_297 (EarthOnslaught3_fla.GateMovieOpen_297)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class GateMovieOpen_297 extends MovieClip {
public var a4:MovieClip;
public var levelS:MovieClip;
public var par;
public var a2:MovieClip;
public var a3:MovieClip;
public var a1:MovieClip;
public function GateMovieOpen_297(){
addFrameScript(0, frame1, 20, frame21, 69, frame70, 165, frame166);
}
public function doHit(_arg1:MovieClip, _arg2:Number, _arg3:Number):void{
var _local4:MovieClip;
var _local5:*;
var _local6:*;
_local5 = 0;
while (_local5 < 4) {
switch (randRange(1, 3)){
case 1:
_local4 = new Scrap1();
break;
case 2:
_local4 = new Scrap2();
break;
case 3:
_local4 = new Scrap3();
break;
};
addChild(_local4);
_local4.x = (_arg2 + randRange(-10, 10));
_local4.y = (_arg3 + randRange(-10, 10));
_local4.rotation = randRange(-180, 180);
_local6 = ((Math.random() * 0.5) + 0.5);
_local4.scaleX = _local6;
_local4.scaleY = _local6;
_local4.speed = ((Math.random() * 0.08) + 0.03);
_local4.yspeed = randRange(-5, -2);
_local4.xspeed = randRange(-3, 3);
_local4.addEventListener(Event.ENTER_FRAME, partHitGone);
_local5++;
};
}
function frame70(){
doHit(a1, a1.x, a1.y);
doHit(a2, a2.x, a2.y);
doHit(a3, a3.x, a3.y);
doHit(a4, a4.x, a4.y);
}
function frame166(){
stop();
par = this.parent;
if (par.main.confa != null){
par.main.confa.nextFrame();
};
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function partHitGone(_arg1:Event):void{
var _local2:*;
_local2 = _arg1.currentTarget;
_local2.x = (_local2.x + _local2.xspeed);
_local2.y = (_local2.y + _local2.yspeed);
_local2.yspeed = (_local2.yspeed + 0.8);
_local2.alpha = (_local2.alpha - (_local2.speed / 4));
_local2.rotation = _local2.speed;
if (_local2.alpha <= 0){
_local2.removeEventListener(Event.ENTER_FRAME, partHitGone);
_local2.parent.removeChild(_local2);
};
}
function frame1(){
stop();
}
function frame21(){
doHit(a1, a1.x, a1.y);
doHit(a2, a2.x, a2.y);
doHit(a3, a3.x, a3.y);
doHit(a4, a4.x, a4.y);
}
}
}//package EarthOnslaught3_fla
Section 31
//hallicopterrotate_84 (EarthOnslaught3_fla.hallicopterrotate_84)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class hallicopterrotate_84 extends MovieClip {
public var par;
public function hallicopterrotate_84(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
par = this.parent;
par.flip();
}
}
}//package EarthOnslaught3_fla
Section 32
//HiScore_240 (EarthOnslaught3_fla.HiScore_240)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HiScore_240 extends MovieClip {
public var btnsub:SimpleButton;
public var nama:TextField;
public var score:TextField;
}
}//package EarthOnslaught3_fla
Section 33
//HiscoreText_242 (EarthOnslaught3_fla.HiscoreText_242)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class HiscoreText_242 extends MovieClip {
public var nama:TextField;
public var score:TextField;
public var no:TextField;
}
}//package EarthOnslaught3_fla
Section 34
//KeteranganLock_267 (EarthOnslaught3_fla.KeteranganLock_267)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class KeteranganLock_267 extends MovieClip {
public function KeteranganLock_267(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 35
//KeteranganMoney_259 (EarthOnslaught3_fla.KeteranganMoney_259)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class KeteranganMoney_259 extends MovieClip {
public function KeteranganMoney_259(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 36
//KeteranganPower_261 (EarthOnslaught3_fla.KeteranganPower_261)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class KeteranganPower_261 extends MovieClip {
public function KeteranganPower_261(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 37
//KeteranganUnit_269 (EarthOnslaught3_fla.KeteranganUnit_269)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class KeteranganUnit_269 extends MovieClip {
public function KeteranganUnit_269(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 38
//lampumarkas_190 (EarthOnslaught3_fla.lampumarkas_190)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class lampumarkas_190 extends MovieClip {
public var lampu:MovieClip;
}
}//package EarthOnslaught3_fla
Section 39
//LampuMarkas2_191 (EarthOnslaught3_fla.LampuMarkas2_191)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class LampuMarkas2_191 extends MovieClip {
public function LampuMarkas2_191(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 40
//LevelStart_299 (EarthOnslaught3_fla.LevelStart_299)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class LevelStart_299 extends MovieClip {
public var ini:MovieClip;
public var Target:Number;
public function LevelStart_299(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
ini.Nomer.text = String((Target + 1));
}
}
}//package EarthOnslaught3_fla
Section 41
//LevelStartComponent_300 (EarthOnslaught3_fla.LevelStartComponent_300)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class LevelStartComponent_300 extends MovieClip {
public var Nomer:TextField;
}
}//package EarthOnslaught3_fla
Section 42
//Main_180 (EarthOnslaught3_fla.Main_180)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Main_180 extends MovieClip {
public const COSTLAND2:Array;
public const COSTLAND3:Array;
public const COSTLAND4:Array;
public const EXPCOSTSURPLUSBASE:Array;
public const TIMEAIR2:Number = 20;
public const TIMEAIR3:Number = 40;
public const TIMEAIR1:Number = 10;
public const TIMEAIR4:Number = 60;
public const TIMELAND4:Number = 35;
public const TIMELAND1:Number = 5;
public const TIMELAND2:Number = 15;
public const EXPCOSTACRO2:Array;
public const EXPCOSTACRO3:Array;
public const EXPCOSTACRO4:Array;
public const EXPCOSTACRO1:Array;
public const TIMELAND3:Number = 25;
public const ES1:Number = 2;
public const ES2:Number = 5;
public const waveTIME:Number = 100;
public const ES3:Number = 6;
public const COSTAIR4:Array;
public const ES4:Number = 9;
public const COSTAIR2:Array;
public const COSTAIR3:Array;
public const key1:Number = 49;
public const key2:Number = 50;
public const key3:Number = 51;
public const key4:Number = 52;
public const key5:Number = 53;
public const key6:Number = 54;
public const key8:Number = 56;
public const COSTAIR1:Array;
public const keyF:Number = 70;
public const keyG:Number = 71;
public const keyA:Number = 65;
public const keyI:Number = 73;
public const keyE:Number = 69;
public const keyH:Number = 72;
public const keyP:Number = 80;
public const keyQ:Number = 81;
public const keyU:Number = 85;
public const keyV:Number = 86;
public const keyX:Number = 88;
public const keyR:Number = 82;
public const keyD:Number = 68;
public const keyW:Number = 87;
public const keyY:Number = 89;
public const keyZ:Number = 90;
public const keyS:Number = 83;
public const key7:Number = 55;
public const keyT:Number = 84;
public const keyM:Number = 77;
public const keyC:Number = 67;
public const priceTex:Number = 3;
public const EXPCOSTMAXUNIT:Array;
public const EXPCOSTCHARGEBASE:Array;
public const COSTACRO1:Array;
public const COSTACRO2:Array;
public const COSTACRO3:Array;
public const EXPCOSTAIR1:Array;
public const COSTACRO4:Array;
public const EXPCOSTAIR2:Array;
public const EXPCOSTLAND1:Array;
public const EXPCOSTLAND2:Array;
public const EXPCOSTLAND3:Array;
public const EXPCOSTLAND4:Array;
public const EXPCOSTAIR4:Array;
public const EXPCOSTAIR3:Array;
public const EXPCOSTWEAPON1:Array;
public const EXPCOSTWEAPON4:Array;
public const EXPCOSTWEAPON2:Array;
public const EXPCOSTWEAPON3:Array;
public const EA2:Number = 3;
public const EA5:Number = 8;
public const EA1:Number = 1;
public const EA3:Number = 4;
public const EA4:Number = 7;
public const keyf1:Number = 112;
public const keyf2:Number = 113;
public const TIMEACRO2:Number = 20;
public const TIMEACRO4:Number = 60;
public const TIMEACRO1:Number = 10;
public const TIMEACRO3:Number = 40;
public const EXPCOSTHPBASE:Array;
public const COSTLAND1:Array;
public var levelDW7:Number;
public var levelDW3:Number;
public var enemySp:MovieClip;
public var levelDW8:Number;
public var levelKe:Number;
public var levelDW9:Number;
public var downLevel:Number;
public var dKeyIsDown:Boolean;
public var efekSound:Sound;
public var cel:MovieClip;
public var mouseScrollIsUp:Boolean;
public var buletB:Array;
public var vKeyIsDown:Boolean;
public var landspot2:MovieClip;
public var landspot3:MovieClip;
public var landspot4:MovieClip;
public var hpboss:MovieClip;
public var trainingUnitAcro:Number;
public var key2IsDown:Boolean;
public var levelRW1:Number;
public var levelRW2:Number;
public var levelRW3:Number;
public var levelRW4:Number;
public var levelRW5:Number;
public var levelRW7:Number;
public var levelRW8:Number;
public var trainingUnitLand:Number;
public var levelRW9:Number;
public var par;
public var levelRW6:Number;
public var Money:Number;
public var levelRW10:Number;
public var levelRW11:Number;
public var ceft:MovieClip;
public var wingmanA:MovieClip;
public var wingmanL:MovieClip;
public var keyPressed:uint;
public var levelHE1:Number;
public var levelHE3:Number;
public var levelHE4:Number;
public var levelHE5:Number;
public var levelHE6:Number;
public var levelHE7:Number;
public var levelHE8:Number;
public var zKeyIsDown:Boolean;
public var aKeyIsDown:Boolean;
public var levelHE9:Number;
public var levelHE2:Number;
public var levelRW12:Number;
public var bulet:Array;
public var levelHW11:Number;
public var sKeyIsDown:Boolean;
public var levelHW10:Number;
public var levelmaxUnit:Number;
public var myTimer:Timer;
public var tmp:Array;
public var trainingTimeAir:Number;
public var levelHW12:Number;
public var celE:MovieClip;
public var key1IsDown:Boolean;
public var levelC:MovieClip;
public var celT:MovieClip;
public var celW:MovieClip;
public var eKeyIsDown:Boolean;
public var trainingTimeLand:Number;
public var landspot:MovieClip;
public var levelWeapon1:Number;
public var levelWeapon2:Number;
public var levelWeapon3:Number;
public var wKeyIsDown:Boolean;
public var rightKeyIsDown:Boolean;
public var wingman:Array;
public var trainingTimeAcro:Number;
public var levelWeapon4:Number;
public var delay:Number;
public var waveCount:Number;
public var lampu:MovieClip;
public var downKeyIsDown:Boolean;
public var Unit:Number;
public var confa:MovieClip;
public var spaceKeyIsDown:Boolean;
public var levelDE1:Number;
public var levelDE3:Number;
public var levelDE4:Number;
public var levelDE8:Number;
public var levelDE9:Number;
public var GateOpen:MovieClip;
public var levelDE6:Number;
public var modeUnit:Number;
public var levelDE7:Number;
public var levelDE2:Number;
public var levelDE5:Number;
public var unitKe:Number;
public var clikke:Number;
public var Exp:Number;
public var trainingMax:Number;
public var waveKe:Number;
public var ship:Ship;
public var levelReload:Number;
public var mid:MovieClip;
public var pauseGameB:Boolean;
public var levelRE2:Number;
public var levelRE4:Number;
public var levelRE5:Number;
public var levelRE6:Number;
public var levelRE7:Number;
public var levelRE1:Number;
public var levelRE9:Number;
public var levelRE3:Number;
public var fKeyIsDown:Boolean;
public var levelRE8:Number;
public var SCORE:Number;
public var quaked:Boolean;
public var xKeyIsDown:Boolean;
public var bgback:MovieClip;
public var qKeyIsDown:Boolean;
public var incrementalCost:Number;
public var trainingTime:Number;
public var player:Player;
public var mid2:MovieClip;
public var plat3:Array;
public var plat2:Array;
public var plat4:Array;
public var wave:Array;
public var trainingUnitAir:Number;
public var levelHW2:Number;
public var levelHW3:Number;
public var key4IsDown:Boolean;
public var levelHW5:Number;
public var levelHW7:Number;
public var levelHW9:Number;
public var levelHW8:Number;
public var levelHW1:Number;
public var levelHW4:Number;
public var levelHW6:Number;
public var quakeMode:Number;
public var cKeyIsDown:Boolean;
public var levelHealth:Number;
public var buletTower:Array;
public var pauseGame:Boolean;
public var plat:Array;
public var buletBE:Array;
public var hpship:MovieClip;
public var bgdepan:MovieClip;
public var mouseScrollIsDown:Boolean;
public var boss:Boss;
public var levelDW10:Number;
public var levelDW11:Number;
public var btnskipconf:SimpleButton;
public var level:Array;
public var leftClikIsDown:Boolean;
public var levelDW12:Number;
public var waveTimeMod:Number;
public var gKeyIsDown:Boolean;
public var key3IsDown:Boolean;
public var enemy:Array;
public var buletEnemy:Array;
public var upKeyIsDown:Boolean;
public var rKeyIsDown:Boolean;
public var bossTime:Boolean;
public var leftKeyIsDown:Boolean;
public var levelPower:Number;
public var cbl:MovieClip;
public var levelDW1:Number;
public var levelDW2:Number;
public var levelDW4:Number;
public var levelDW5:Number;
public var levelDW6:Number;
public function Main_180(){
COSTAIR1 = new Array(0, (10 * priceTex), (16 * priceTex), (26 * priceTex));
COSTAIR2 = new Array(0, (15 * priceTex), (24 * priceTex), (39 * priceTex));
COSTAIR3 = new Array(0, (20 * priceTex), (32 * priceTex), (51 * priceTex));
COSTAIR4 = new Array(0, (25 * priceTex), (40 * priceTex), (64 * priceTex));
COSTLAND1 = new Array(0, (12 * priceTex), (19 * priceTex), (30 * priceTex));
COSTLAND2 = new Array(0, (18 * priceTex), (29 * priceTex), (46 * priceTex));
COSTLAND3 = new Array(0, (24 * priceTex), (38 * priceTex), (61 * priceTex));
COSTLAND4 = new Array(0, (30 * priceTex), (48 * priceTex), (77 * priceTex));
COSTACRO1 = new Array(0, (16 * priceTex), (26 * priceTex), (40 * priceTex));
COSTACRO2 = new Array(0, (24 * priceTex), (39 * priceTex), (62 * priceTex));
COSTACRO3 = new Array(0, (32 * priceTex), (51 * priceTex), (82 * priceTex));
COSTACRO4 = new Array(0, 1000, 1500, 2000);
EXPCOSTAIR1 = new Array(100, 200, 300);
EXPCOSTAIR2 = new Array(150, 250, 350);
EXPCOSTAIR3 = new Array(200, 300, 400);
EXPCOSTAIR4 = new Array(250, 350, 450);
EXPCOSTLAND1 = new Array(100, 200, 300);
EXPCOSTLAND2 = new Array(150, 250, 350);
EXPCOSTLAND3 = new Array(200, 300, 400);
EXPCOSTLAND4 = new Array(250, 350, 450);
EXPCOSTACRO1 = new Array(150, 250, 350);
EXPCOSTACRO2 = new Array(200, 300, 400);
EXPCOSTACRO3 = new Array(250, 350, 450);
EXPCOSTACRO4 = new Array(300, 400, 500);
EXPCOSTWEAPON1 = new Array(50, 200, 350);
EXPCOSTWEAPON2 = new Array(100, 250, 400);
EXPCOSTWEAPON3 = new Array(150, 300, 450);
EXPCOSTWEAPON4 = new Array(150, 450, 750);
EXPCOSTHPBASE = new Array(150, 450, 900);
EXPCOSTCHARGEBASE = new Array(150, 450, 900);
EXPCOSTSURPLUSBASE = new Array(150, 450, 900);
EXPCOSTMAXUNIT = new Array(500, 1000, 1500);
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5);
}
public function getMoneyHeal():Number{
var _local1:Number;
_local1 = ((100 - Math.round((player.getPersenHealth() * 100))) * 10);
return (_local1);
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function doTrail(_arg1:MovieClip, _arg2:Number, _arg3:Number):void{
var _local4:MovieClip;
var _local5:*;
_local4 = new Asap();
ceft.addChild(_local4);
_local4.x = (_arg2 + randRange(-3, 3));
_local4.y = (_arg3 + randRange(-3, 3));
_local4.rotation = randRange(-180, 180);
_local5 = ((Math.random() * 0.5) + 0.5);
_local4.scaleX = _local5;
_local4.scaleY = _local5;
_local4.speed = ((Math.random() * 0.05) + 0.03);
_local4.addEventListener(Event.ENTER_FRAME, partGone);
}
public function timerHandler(_arg1:TimerEvent):void{
goToGate(3);
myTimer.stop();
}
function frame1(){
levelKe = 0;
waveKe = 0;
waveCount = 10;
waveTimeMod = 1;
unitKe = 0;
level = new Array();
bossTime = false;
wave = new Array();
tmp = new Array(ES1, ES1, ES1, ES1, ES1, new Array(ES1, EA1), new Array(ES1, EA1), new Array(ES1, EA1), new Array(ES1, EA1), new Array(ES1, EA1));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(ES1, ES1, ES1, ES1, ES1, new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(ES1, ES1, ES1, ES1, ES1, new Array(ES1, EA2, EA2), new Array(ES1, EA2, EA2), new Array(ES1, EA2, EA2), new Array(ES1, EA2, EA2), new Array(ES1, EA2, EA2));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(ES2, ES2, ES2, ES2, ES2, new Array(ES2, EA1, EA1), new Array(ES2, EA1, EA1), new Array(ES2, EA1, EA1), new Array(ES2, EA1, EA1), new Array(ES2, EA1, EA1));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(ES2, ES2, ES2, ES2, ES2, new Array(ES2, EA1, EA1), new Array(ES2, EA1, EA1), new Array(ES2, EA1, EA1), new Array(ES2, EA1, EA1), new Array(ES2, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(ES1, ES2, ES1, ES2, ES1, new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES2, EA2, EA2), new Array(ES2, EA2, EA2), new Array(ES2, EA2, EA2), new Array(ES2, EA2, EA2), new Array(ES2, EA2, EA2));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(ES1, ES2, ES1, ES2, ES1, new Array(ES2, EA2, EA2), new Array(ES2, EA1, EA2), new Array(ES1, EA1, EA2), new Array(ES1, EA2, EA2), new Array(ES1, EA1, EA1), new Array(ES2, EA3, EA3), new Array(ES1, EA3, EA3), new Array(ES2, EA3, EA3), new Array(ES1, EA3, EA3), new Array(ES2, EA3, EA3));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES1, EA1, EA1), new Array(ES2, EA2, EA2), new Array(ES2, EA2, EA2), new Array(ES2, EA2, EA2), new Array(ES2, EA2, EA2), new Array(ES2, EA2, EA2));
wave.push(tmp);
tmp = new Array(new Array(ES3, EA3, EA3), new Array(ES3, EA3, EA3), new Array(ES3, EA3, EA3), new Array(ES3, EA3, EA3), new Array(ES3, EA3, EA3));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES1, EA1, EA1), new Array(ES1, EA2, EA2), new Array(ES1, EA3, EA3), new Array(ES1, EA1, EA1), new Array(ES1, EA2, EA2), new Array(ES2, EA3, EA3), new Array(ES2, EA1, EA1), new Array(ES2, EA2, EA2), new Array(ES2, EA3, EA3), new Array(ES2, EA1, EA1));
wave.push(tmp);
tmp = new Array(new Array(ES3, EA2, EA2), new Array(ES3, EA3, EA3), new Array(ES3, EA1, EA1), new Array(ES3, EA2, EA2), new Array(ES3, EA3, EA3));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES1, EA1, EA1, ES1), new Array(ES2, EA1, EA1, ES2), new Array(ES3, EA1, EA1, ES3), new Array(ES1, EA1, EA1, ES1), new Array(ES2, EA1, EA1, ES2), new Array(ES3, EA2, EA2, ES3), new Array(ES1, EA2, EA2, ES1), new Array(ES2, EA2, EA2, ES2), new Array(ES3, EA2, EA2, ES3), new Array(ES1, EA2, EA2, ES1, EA2, EA2, EA2, EA2));
wave.push(tmp);
tmp = new Array(new Array(ES2, EA3, EA3, ES2), new Array(ES3, EA3, EA3, ES3), new Array(ES1, EA3, EA3, ES1), new Array(ES2, EA3, EA3, ES2), new Array(ES3, EA3, EA3, ES3));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES1, ES2, EA2, EA2), new Array(ES2, ES2, EA3, EA3), new Array(ES3, ES3, EA3, EA3), new Array(ES2, ES2, EA2, EA2), new Array(ES1, ES2, EA1, EA1), new Array(ES1, EA1, EA1, ES1), new Array(ES2, EA2, EA2, ES2), new Array(ES3, EA3, EA3, ES3), new Array(ES3, EA4, EA4, ES3), new Array(ES3, EA4, EA4, ES3, EA4, EA4));
wave.push(tmp);
tmp = new Array(new Array(ES1, EA4, EA4, ES1), new Array(ES2, EA4, EA4, ES2), new Array(ES3, EA4, EA4, ES3), new Array(ES1, EA4, EA4, ES1), new Array(ES2, EA4, EA4, ES2), new Array(ES3, EA4, EA4, ES3), new Array(ES1, EA1, EA1, ES1), new Array(ES2, EA2, EA2, ES2), new Array(ES3, EA3, EA3, ES3), new Array(ES1, EA4, EA4, ES1, EA4, EA4));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES3, ES3, EA2, EA2), new Array(ES3, ES3, EA2, EA2), new Array(ES3, ES3, EA3, EA3), new Array(ES3, ES3, EA3, EA3), new Array(ES3, ES3, EA4, EA4), new Array(ES2, EA1, EA1, EA2), new Array(ES2, EA2, EA2, ES2), new Array(ES2, EA3, EA3, ES2), new Array(ES2, EA4, EA4, ES2), new Array(ES2, EA4, EA4, ES2));
wave.push(tmp);
tmp = new Array(new Array(ES1, ES1, EA4, EA4), new Array(ES1, EA4, EA4, ES1), new Array(ES1, EA4, EA4, ES1), new Array(ES1, EA4, EA4, ES1), new Array(ES1, EA4, EA4, ES1), new Array(ES3, EA4, EA4, ES3), new Array(ES3, EA1, EA1, ES3), new Array(ES3, EA2, EA2, ES3), new Array(ES3, EA3, EA3, ES3), new Array(ES3, EA4, EA4, ES3));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES2, ES2, EA2, EA2), new Array(ES2, ES2, EA2, EA2), new Array(ES2, ES2, EA2, EA2), new Array(ES2, ES2, EA3, EA3), new Array(ES2, ES2, EA3, EA3), new Array(ES1, EA4, EA4, ES1), new Array(ES2, EA3, EA3, ES2), new Array(ES3, EA2, EA2, ES3), new Array(ES2, EA1, EA1, ES2), new Array(ES1, EA4, EA4, ES1));
wave.push(tmp);
tmp = new Array(new Array(ES3, EA1, EA1, ES3), new Array(ES2, EA2, EA2, ES2), new Array(ES1, EA3, EA3, ES1), new Array(ES2, EA4, EA4, ES2), new Array(ES3, EA3, EA3, ES3), new Array(ES2, EA2, EA2, ES2), new Array(ES1, EA1, EA1, ES1), new Array(ES2, EA2, EA2, ES2), new Array(ES3, EA3, EA3, ES3), new Array(ES2, EA4, EA4, ES2));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES1, EA1, EA1, ES1), new Array(ES1, EA1, EA1, ES1), new Array(ES1, EA1, EA1, ES1), new Array(ES1, EA1, EA1, ES1), new Array(ES1, EA1, EA1, ES1), new Array(ES2, EA2, EA2, ES2), new Array(ES2, EA2, EA2, ES2), new Array(ES2, EA2, EA2, ES2), new Array(ES2, EA2, EA2, ES2), new Array(ES2, EA2, EA2, ES2));
wave.push(tmp);
tmp = new Array(new Array(ES3, EA3, EA3, ES3), new Array(ES3, EA3, EA3, ES3), new Array(ES3, EA3, EA3, ES3), new Array(ES3, EA3, EA3, ES3), new Array(ES3, EA3, EA3, ES3), new Array(ES3, EA4, EA4, ES3), new Array(ES2, EA4, EA4, ES2), new Array(ES1, EA4, EA4, ES1), new Array(ES2, EA4, EA4, ES2), new Array(ES3, EA4, EA4, EA4, EA4, ES3));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES1, EA1, EA1, ES1), new Array(ES1, EA2, EA2, ES1), new Array(ES2, EA2, EA2, ES2), new Array(ES2, EA3, EA3, ES2), new Array(ES3, EA3, EA3, ES3), new Array(ES3, EA4, EA4, ES3), new Array(ES2, EA4, EA4, ES2), new Array(ES2, EA3, EA3, ES2), new Array(ES1, EA3, EA3, ES1), new Array(ES1, EA2, EA2, ES1));
wave.push(tmp);
tmp = new Array(new Array(ES2, EA2, EA2, ES2), new Array(ES2, EA1, EA1, ES2), new Array(ES3, EA1, EA1, ES3), new Array(ES3, EA2, EA2, ES3), new Array(ES2, EA2, EA2, ES2), new Array(ES2, EA3, EA3, ES2), new Array(ES1, EA3, EA3, ES1), new Array(ES1, EA4, EA4, ES1), new Array(ES2, EA4, EA4, ES2), new Array(ES2, EA3, EA3, ES2, EA3, EA3, ES2));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES1, EA1, EA1, ES1), new Array(ES1, EA2, EA2, ES1), new Array(ES1, EA3, EA3, ES1), new Array(ES1, EA4, EA4, ES1), new Array(ES1, ES1, EA1, EA1, ES1), new Array(ES2, EA1, EA1, ES2), new Array(ES2, EA2, EA2, ES2), new Array(ES2, EA3, EA3, ES2), new Array(ES2, EA4, EA4, ES2), new Array(ES2, ES2, EA2, EA2, ES2));
wave.push(tmp);
tmp = new Array(new Array(ES3, EA1, EA1, ES3), new Array(ES3, EA2, EA2, ES3), new Array(ES3, EA2, EA2, ES3), new Array(ES3, EA4, EA4, ES3), new Array(ES3, ES3, EA3, EA3, ES3), new Array(ES3, EA1, EA1, ES3), new Array(ES4, EA2, EA2, ES4), new Array(ES3, EA3, EA3, ES3), new Array(ES3, EA4, EA4, ES3), new Array(ES3, ES4, EA4, EA4, ES3, EA4, EA4, ES3));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES1, ES1, EA4, EA4), new Array(ES1, ES2, ES1, ES2), new Array(ES1, ES3, EA3, EA3), new Array(ES1, EA4, EA4, ES3), new Array(ES1, ES2, ES3, EA4, EA4), new Array(ES2, ES2, EA4, EA4), new Array(ES2, ES2, EA3, EA3), new Array(ES2, ES3, EA3, EA3), new Array(ES2, EA4, EA4, ES3), new Array(ES1, ES2, ES3, ES3, ES3));
wave.push(tmp);
tmp = new Array(new Array(ES3, ES3, EA5, EA5), new Array(ES3, ES2, ES3, ES2), new Array(ES3, ES2, EA4, EA4), new Array(ES3, EA4, EA4, ES3), new Array(ES1, ES2, ES3, EA4, EA4), new Array(ES4, ES2, EA4, EA4), new Array(ES3, ES2, EA3, EA3), new Array(ES4, ES3, EA3, EA3), new Array(ES3, EA4, EA4, ES3), new Array(ES4, ES2, EA3, EA3, EA4, EA4, ES3, ES3));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES3, ES3, EA3, EA3), new Array(ES3, ES2, EA3, EA3), new Array(ES1, ES3, EA3, EA3), new Array(ES3, EA5, EA5, EA3, EA3), new Array(ES3, ES2, ES3, EA4, EA4), new Array(ES3, ES1, EA3, EA4), new Array(ES4, ES2, EA3, EA4, ES2), new Array(ES3, ES3, EA3, EA3), new Array(ES3, EA5, EA5, ES2, ES2), new Array(ES4, ES2, ES3, EA3, EA3, ES3));
wave.push(tmp);
tmp = new Array(new Array(ES3, ES1, EA4, EA4), new Array(ES3, ES3, EA4, EA4), new Array(ES3, ES2, EA4, EA4), new Array(ES3, EA5, EA5, EA4, EA4), new Array(ES3, ES2, ES3, EA4, EA4), new Array(ES3, ES3, EA3, EA4), new Array(ES4, ES2, EA3, EA4, ES2), new Array(ES3, ES3, EA4, EA4), new Array(ES3, EA5, EA5, ES3, ES3), new Array(ES4, ES2, EA3, EA3, ES3, ES3, EA4, EA4));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES3, ES3, ES3, ES3, EA4, EA4), new Array(ES1, ES2, EA3, EA3, EA4), new Array(ES3, ES3, EA3, EA3, EA4), new Array(ES2, EA3, EA3, ES2, EA5), new Array(ES4, ES2, ES1, EA3, EA3), new Array(ES1, ES1, EA4, EA4), new Array(ES3, ES2, EA3, ES3, EA4, EA4), new Array(ES3, ES3, EA3, EA3), new Array(ES2, EA4, EA4, ES2), new Array(ES1, ES2, ES3, EA4, EA4, ES4));
wave.push(tmp);
tmp = new Array(new Array(ES3, ES3, ES3, ES3, EA5, EA5), new Array(ES1, ES2, EA3, EA3, EA4), new Array(ES3, ES4, EA3, EA3, EA4), new Array(ES3, EA4, EA4, ES3, EA5), new Array(ES4, ES2, ES1, EA3, EA3), new Array(ES1, ES1, EA4, EA4), new Array(ES3, ES2, EA3, ES3, EA4, EA4), new Array(ES3, ES3, EA3, EA3), new Array(ES4, EA4, EA4, EA4, EA4), new Array(ES4, ES2, EA3, EA3, EA4, EA4, ES3, EA4, EA4, ES3));
wave.push(tmp);
level.push(wave);
wave = new Array();
tmp = new Array(new Array(ES4, ES1, EA5, EA5, ES1, EA5), new Array(ES1, ES2, EA5, EA5, ES3), new Array(ES4, ES3, EA5, EA5, EA5, EA5), new Array(ES1, EA4, EA4, EA5, EA5, EA4, ES2), new Array(ES1, ES2, ES3, EA5, EA5, ES2), new Array(ES2, ES4, EA5, EA5, ES2), new Array(ES2, ES2, EA5, EA5, ES3, EA5), new Array(ES2, ES3, EA5, EA5, ES3), new Array(ES2, EA4, EA4, EA5, EA5, ES2, ES3), new Array(ES4, ES2, ES3, EA5, EA5, ES3, ES3, ES3, EA5));
wave.push(tmp);
tmp = new Array(new Array(ES4, ES1, EA5, EA5, ES1, EA5), new Array(ES3, ES2, EA5, EA5, ES3), new Array(ES4, ES2, EA5, EA5, EA5, EA5), new Array(ES3, EA4, EA4, EA5, EA5, EA4, ES3), new Array(ES1, ES2, ES3, EA5, EA5, ES3), new Array(ES4, ES1, EA5, EA5, ES3), new Array(ES4, ES2, EA5, EA5, EA4, EA4), new Array(ES3, ES3, EA5, EA5, EA5, EA5), new Array(ES4, EA4, EA4, EA5, EA5, ES2, ES2, ES2), new Array(ES4, ES4, EA3, EA3, EA5, EA5, ES3, ES3, ES3, ES3, ES3));
wave.push(tmp);
level.push(wave);
mouseScrollIsUp = false;
mouseScrollIsDown = false;
incrementalCost = 0.1;
levelHE1 = 1;
levelHE2 = 1;
levelHE3 = 1;
levelHE4 = 1;
levelHE5 = 1;
levelHE6 = 1;
levelHE7 = 1;
levelHE8 = 1;
levelHE9 = 1;
levelDE1 = 1;
levelDE2 = 1;
levelDE3 = 1;
levelDE4 = 1;
levelDE5 = 1;
levelDE6 = 1;
levelDE7 = 1;
levelDE8 = 1;
levelDE9 = 1;
levelRE1 = 1;
levelRE2 = 1;
levelRE3 = 1;
levelRE4 = 1;
levelRE5 = 1;
levelRE6 = 1;
levelRE7 = 1;
levelRE8 = 1;
levelRE9 = 1;
levelHW1 = 0;
levelHW2 = 0;
levelHW3 = 0;
levelHW4 = 0;
levelHW5 = 0;
levelHW6 = 0;
levelHW7 = 0;
levelHW8 = 0;
levelHW9 = 0;
levelHW10 = 0;
levelHW11 = 0;
levelHW12 = 0;
levelDW1 = 1;
levelDW2 = 1;
levelDW3 = 1;
levelDW4 = 1;
levelDW5 = 1;
levelDW6 = 1;
levelDW7 = 1;
levelDW8 = 1;
levelDW9 = 1;
levelDW10 = 1;
levelDW11 = 1;
levelDW12 = 1;
levelRW1 = 1;
levelRW2 = 1;
levelRW3 = 1;
levelRW4 = 1;
levelRW5 = 1;
levelRW6 = 1;
levelRW7 = 1;
levelRW8 = 1;
levelRW9 = 1;
levelRW10 = 1;
levelRW11 = 1;
levelRW12 = 1;
Money = 50;
Exp = 100;
levelWeapon1 = 1;
levelWeapon2 = 0;
levelWeapon3 = 0;
levelWeapon4 = 0;
levelPower = 1;
levelReload = 1;
levelHealth = 1;
modeUnit = 0;
levelmaxUnit = 0;
trainingTimeAir = 0;
trainingTimeAcro = 0;
trainingTimeLand = 0;
trainingUnitAir = 0;
trainingUnitAcro = 0;
trainingUnitLand = 0;
trainingTime = 1;
trainingMax = 1;
par = this.parent;
par.parent.xHair.gotoAndStop(1);
if (par.parent.cont == false){
stop();
} else {
levelHW1 = par.parent.so.data.levelHW1;
levelHW2 = par.parent.so.data.levelHW2;
levelHW3 = par.parent.so.data.levelHW3;
levelHW4 = par.parent.so.data.levelHW4;
levelHW5 = par.parent.so.data.levelHW5;
levelHW6 = par.parent.so.data.levelHW6;
levelHW7 = par.parent.so.data.levelHW7;
levelHW8 = par.parent.so.data.levelHW8;
levelHW9 = par.parent.so.data.levelHW9;
levelHW10 = par.parent.so.data.levelHW10;
levelHW11 = par.parent.so.data.levelHW11;
levelHW12 = par.parent.so.data.levelHW12;
Money = par.parent.so.data.Money;
Exp = par.parent.so.data.Exp;
levelWeapon1 = par.parent.so.data.levelWeapon1;
levelWeapon2 = par.parent.so.data.levelWeapon2;
levelWeapon3 = par.parent.so.data.levelWeapon3;
levelWeapon4 = par.parent.so.data.levelWeapon4;
levelPower = par.parent.so.data.levelPower;
levelReload = par.parent.so.data.levelReload;
levelHealth = par.parent.so.data.levelHealth;
levelmaxUnit = par.parent.so.data.levelmaxUnit;
levelKe = par.parent.so.data.levelKe;
SCORE = par.parent.so.data.SCORE;
gotoAndStop(3);
};
downLevel = 0.5;
delay = 3;
pauseGame = false;
levelC.visible = false;
myTimer = new Timer(2000);
myTimer.addEventListener("timer", timerHandler);
quakeMode = 1;
btnskipconf.addEventListener(MouseEvent.CLICK, skipC);
clikke = 1;
}
function frame5(){
stop();
par.parent.xHair.gotoAndStop(1);
stage.quality = "MEDIUM";
}
public function releaseKeyBoss(_arg1:KeyboardEvent):void{
var _local2:uint;
_local2 = _arg1.keyCode;
switch (_local2){
case keyP:
if (par.pauseLay.currentFrame == 6){
pauseGameB = false;
par.pauseLay.play();
};
if (par.pauseLay.currentFrame == 1){
pauseGameB = true;
par.pauseLay.play();
};
break;
case keyM:
if (par.parent.efekSound == 1){
par.parent.efekSound = 0;
} else {
par.parent.efekSound = 1;
};
par.parent.soundChannelMain.soundTransform = new SoundTransform(par.parent.efekSound);
break;
};
}
function frame4(){
pauseGameB = false;
par.parent.xHair.gotoAndStop(3);
stage.quality = "LOW";
hpboss.gotoAndStop(Math.round((50 - (boss.getPersenHealth() * 50))));
hpship.gotoAndStop(Math.round((50 - (ship.getPersenHealth() * 50))));
levelC.visible = false;
}
public function deinitializeGameBoss():void{
leftClikIsDown = false;
stage.removeEventListener(KeyboardEvent.KEY_UP, releaseKeyBoss);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, pressMouseBoss);
stage.removeEventListener(MouseEvent.MOUSE_UP, releaseMouseBoss);
removeEventListener(Event.ENTER_FRAME, loopMainBoss);
}
function frame3(){
stop();
par.mainf.visible = false;
levelC.visible = false;
par.parent.xHair.gotoAndStop(1);
}
function frame2(){
stop();
initializeGame();
if (levelKe == 0){
par.tips.visible = true;
par.tips.gotoAndPlay(2);
} else {
par.tips.visible = false;
};
par.parent.xHair.gotoAndStop(2);
}
public function pressMouseBoss(_arg1:Event):void{
leftClikIsDown = true;
}
public function addMoney(_arg1:Number):void{
Money = (Money + Math.round(_arg1));
}
public function quakeNormal():void{
switch (quakeMode){
case 1:
x = (x - 4);
y = (y - 4);
break;
case 2:
x = (x + 4);
y = (y - 4);
break;
case 3:
x = (x - 4);
y = (y + 4);
break;
case 4:
x = (x + 4);
y = (y + 4);
break;
};
}
public function spawnEnemy(_arg1:Number):void{
var _local2:MovieClip;
var _local3:*;
switch (_arg1){
case 1:
_local2 = new Enemy();
addChild(_local2);
_local2.setLevelH(levelHE1);
_local2.setLevelR(levelRE1);
_local2.setLevelD(levelDE1);
_local2.x = enemySp.x;
_local2.y = (enemySp.y + randRange(-50, 50));
break;
case 2:
_local2 = new Enemy2();
addChild(_local2);
_local2.setLevelH(levelHE2);
_local2.setLevelR(levelRE2);
_local2.setLevelD(levelDE2);
_local2.x = (enemySp.x + randRange(-20, 20));
_local2.y = randRange(50, 250);
break;
case 3:
_local2 = new Enemy3();
addChild(_local2);
_local2.setLevelH(levelHE3);
_local2.setLevelR(levelRE3);
_local2.setLevelD(levelDE3);
_local2.x = (enemySp.x + randRange(-20, 20));
_local2.y = randRange(50, 250);
break;
case 4:
_local2 = new Enemy4();
addChild(_local2);
_local2.setLevelH(levelHE4);
_local2.setLevelR(levelRE4);
_local2.setLevelD(levelDE4);
_local2.x = enemySp.x;
_local2.y = (enemySp.y + randRange(-50, 50));
break;
case 5:
_local2 = new Enemy5();
addChild(_local2);
_local2.setLevelH(levelHE5);
_local2.setLevelR(levelRE5);
_local2.setLevelD(levelDE5);
_local2.x = (enemySp.x + randRange(-20, 20));
_local2.y = randRange(50, 250);
break;
case 6:
_local2 = new Enemy6();
addChild(_local2);
_local2.setLevelH(levelHE6);
_local2.setLevelR(levelRE6);
_local2.setLevelD(levelDE6);
_local2.x = (enemySp.x + randRange(-20, 20));
_local2.y = randRange(50, 250);
break;
case 7:
_local2 = new Enemy7();
addChild(_local2);
_local2.setLevelH(levelHE7);
_local2.setLevelR(levelRE7);
_local2.setLevelD(levelDE7);
_local2.x = enemySp.x;
_local2.y = (enemySp.y + randRange(-50, 50));
break;
case 8:
_local2 = new Enemy8();
addChild(_local2);
_local2.setLevelH(levelHE8);
_local2.setLevelR(levelRE8);
_local2.setLevelD(levelDE8);
_local2.x = enemySp.x;
_local2.y = (enemySp.y + randRange(-50, 50));
break;
case 9:
_local2 = new Enemy9();
addChild(_local2);
_local2.setLevelH(levelHE9);
_local2.setLevelR(levelRE9);
_local2.setLevelD(levelDE9);
_local2.x = (enemySp.x + randRange(-20, 20));
_local2.y = randRange(50, 250);
break;
};
_local3 = new BarHpE();
_local3.Target = _local2;
addChild(_local3);
_local3 = new Arrow();
_local3.Target = _local2;
_local3.x = -100;
_local3.y = 100;
par.addChild(_local3);
_local3 = new miniE();
_local3.x = -500;
_local3.y = -500;
_local3.Target = _local2;
par.mainf.minimap.addChild(_local3);
_local2.changeTargetWingman();
}
public function releaseMouse(_arg1:Event):void{
leftClikIsDown = false;
}
public function quake():void{
if (y == 0){
quakeMode = randRange(1, 4);
quaked = true;
switch (quakeMode){
case 1:
x = (x - 4);
y = (y - 4);
break;
case 2:
x = (x + 4);
y = (y - 4);
break;
case 3:
x = (x - 4);
y = (y + 4);
break;
case 4:
x = (x + 4);
y = (y + 4);
break;
};
};
}
public function releaseKey(_arg1:KeyboardEvent):void{
var _local2:uint;
_local2 = _arg1.keyCode;
switch (_local2){
case Keyboard.RIGHT:
rightKeyIsDown = false;
break;
case Keyboard.LEFT:
leftKeyIsDown = false;
break;
case Keyboard.UP:
upKeyIsDown = false;
break;
case Keyboard.DOWN:
downKeyIsDown = false;
break;
case keyA:
aKeyIsDown = false;
break;
case keyD:
dKeyIsDown = false;
break;
case keyQ:
modeUnit = 1;
trainingUnit(1);
qKeyIsDown = false;
break;
case keyE:
modeUnit = 1;
trainingUnit(3);
eKeyIsDown = false;
break;
case keyW:
modeUnit = 1;
trainingUnit(2);
wKeyIsDown = false;
break;
case keyR:
modeUnit = 1;
trainingUnit(4);
rKeyIsDown = false;
break;
case keyT:
modeUnit = 2;
trainingUnit(1);
break;
case keyY:
modeUnit = 2;
trainingUnit(2);
break;
case keyU:
modeUnit = 2;
trainingUnit(3);
break;
case keyI:
modeUnit = 2;
trainingUnit(4);
break;
case keyG:
gKeyIsDown = false;
break;
case key1:
key1IsDown = false;
break;
case key2:
key2IsDown = false;
break;
case key3:
key3IsDown = false;
break;
case key4:
key4IsDown = false;
break;
case key6:
modeUnit = 3;
trainingUnit(2);
break;
case key5:
modeUnit = 3;
trainingUnit(1);
break;
case key7:
modeUnit = 3;
trainingUnit(3);
break;
case key8:
modeUnit = 3;
trainingUnit(4);
break;
case keyf2:
break;
case keyH:
break;
case keyM:
if (par.parent.efekSound == 1){
par.parent.efekSound = 0;
par.mainf.sss.gotoAndStop(2);
} else {
par.parent.efekSound = 1;
par.mainf.sss.gotoAndStop(1);
};
par.parent.soundChannelMain.soundTransform = new SoundTransform(par.parent.efekSound);
break;
case keyP:
if (par.pauseLay.currentFrame == 6){
pauseGame = false;
par.pauseLay.play();
par.mainf.ppp.gotoAndStop(1);
};
if (par.pauseLay.currentFrame == 1){
pauseGame = true;
par.pauseLay.play();
par.mainf.ppp.gotoAndStop(2);
};
break;
case Keyboard.SPACE:
spaceKeyIsDown = false;
break;
};
}
public function costWingman(_arg1:MovieClip):Number{
if ((_arg1 is Wingman)){
return (COSTAIR1[levelHW1]);
};
if ((_arg1 is Wingman2)){
return (COSTAIR2[levelHW2]);
};
if ((_arg1 is Wingman3)){
return (COSTACRO2[levelHW3]);
};
if ((_arg1 is Wingman4)){
return (COSTAIR4[levelHW4]);
};
if ((_arg1 is Wingman5)){
return (COSTACRO3[levelHW5]);
};
if ((_arg1 is Wingman6)){
return (COSTACRO1[levelHW6]);
};
if ((_arg1 is Wingman7)){
return (COSTACRO4[levelHW7]);
};
if ((_arg1 is Wingman8)){
return (COSTAIR3[levelHW8]);
};
if ((_arg1 is WingmanLand)){
return (COSTLAND1[levelHW9]);
};
if ((_arg1 is WingmanLand2)){
return (COSTLAND2[levelHW10]);
};
if ((_arg1 is WingmanLand3)){
return (COSTLAND3[levelHW11]);
};
if ((_arg1 is WingmanLand4)){
return (COSTLAND4[levelHW12]);
};
return (0);
}
public function goToGate(_arg1:Number):void{
GateOpen.Target = _arg1;
par.mainf.visible = false;
GateOpen.play();
levelC.visible = false;
}
public function spawnWave():void{
var _local1:*;
if (waveKe >= level[levelKe].length){
if (enemy.length <= 0){
deinitializeGame();
levelKe++;
if (levelKe >= 10){
addEXP(150);
} else {
addEXP(50);
};
waveKe = 0;
unitKe = 0;
if (levelKe > level.length){
bossTime = true;
};
};
} else {
if (waveCount > 0){
waveCount--;
} else {
if ((level[levelKe][waveKe][unitKe] is Array)){
for (_local1 in level[levelKe][waveKe][unitKe]) {
spawnEnemy(level[levelKe][waveKe][unitKe][_local1]);
};
} else {
spawnEnemy(level[levelKe][waveKe][unitKe]);
};
waveCount = (waveTIME / waveTimeMod);
unitKe++;
if (unitKe >= level[levelKe][waveKe].length){
unitKe = 0;
waveKe++;
};
};
};
}
public function getWingman():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((((((((((((((((((((((((_local3 is Wingman)) || ((_local3 is Wingman2)))) || ((_local3 is Wingman3)))) || ((_local3 is Wingman4)))) || ((_local3 is Wingman5)))) || ((_local3 is Wingman6)))) || ((_local3 is Wingman7)))) || ((_local3 is Wingman8)))) || ((_local3 is WingmanLand)))) || ((_local3 is WingmanLand2)))) || ((_local3 is WingmanLand3)))) || ((_local3 is WingmanLand4)))){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
public function releaseMouseBoss(_arg1:Event):void{
leftClikIsDown = false;
}
public function trainingUnit(_arg1:Number):void{
if ((((trainingTime == 1)) && ((Unit < ((levelmaxUnit * 5) + 5))))){
if (modeUnit == 1){
if (trainingTimeAir == 0){
switch (_arg1){
case 1:
if ((((Money >= (COSTAIR1[levelHW1] + (COSTAIR1[levelHW1] * (incrementalCost * Unit))))) && ((levelHW1 > 0)))){
minMoney((COSTAIR1[levelHW1] + (COSTAIR1[levelHW1] * (incrementalCost * Unit))));
trainingUnitAir = 1;
trainingTimeAir = TIMEAIR1;
trainingMax = TIMEAIR1;
par.mainf.trainunit.pico.gotoAndStop("air1");
} else {
if (levelHW1 > 0){
if (par.mainf.ketmon.currentFrame == 1){
par.mainf.ketmon.play();
};
} else {
if (par.mainf.ketloc.currentFrame == 1){
par.mainf.ketloc.play();
};
};
};
break;
case 2:
if ((((Money >= (COSTAIR2[levelHW2] + (COSTAIR2[levelHW2] * (incrementalCost * Unit))))) && ((levelHW2 > 0)))){
minMoney((COSTAIR2[levelHW2] + (COSTAIR1[levelHW2] * (incrementalCost * Unit))));
trainingUnitAir = 2;
trainingTimeAir = TIMEAIR2;
trainingMax = TIMEAIR2;
par.mainf.trainunit.pico.gotoAndStop("air2");
} else {
if (levelHW2 > 0){
if (par.mainf.ketmon.currentFrame == 1){
par.mainf.ketmon.play();
};
} else {
if (par.mainf.ketloc.currentFrame == 1){
par.mainf.ketloc.play();
};
};
};
break;
case 3:
if ((((Money >= (COSTAIR3[levelHW8] + (COSTAIR3[levelHW8] * (incrementalCost * Unit))))) && ((levelHW8 > 0)))){
minMoney((COSTAIR3[levelHW8] + (COSTAIR3[levelHW8] * (incrementalCost * Unit))));
trainingUnitAir = 8;
trainingTimeAir = TIMEAIR3;
trainingMax = TIMEAIR3;
par.mainf.trainunit.pico.gotoAndStop("air3");
} else {
if (levelHW8 > 0){
if (par.mainf.ketmon.currentFrame == 1){
par.mainf.ketmon.play();
};
} else {
if (par.mainf.ketloc.currentFrame == 1){
par.mainf.ketloc.play();
};
};
};
break;
case 4:
if ((((Money >= (COSTAIR4[levelHW4] + (COSTAIR4[levelHW4] * (incrementalCost * Unit))))) && ((levelHW4 > 0)))){
minMoney((COSTAIR4[levelHW4] + (COSTAIR4[levelHW4] * (incrementalCost * Unit))));
trainingUnitAir = 4;
trainingTimeAir = TIMEAIR4;
trainingMax = TIMEAIR4;
par.mainf.trainunit.pico.gotoAndStop("air4");
} else {
if (levelHW4 > 0){
if (par.mainf.ketmon.currentFrame == 1){
par.mainf.ketmon.play();
};
} else {
if (par.mainf.ketloc.currentFrame == 1){
par.mainf.ketloc.play();
};
};
};
break;
};
};
};
if (modeUnit == 2){
if (trainingTimeAcro == 0){
switch (_arg1){
case 1:
if ((((Money >= (COSTACRO1[levelHW6] + (COSTACRO1[levelHW6] * (incrementalCost * Unit))))) && ((levelHW6 > 0)))){
minMoney((COSTACRO1[levelHW6] + (COSTACRO1[levelHW6] * (incrementalCost * Unit))));
trainingUnitAcro = 6;
trainingTimeAcro = TIMEACRO1;
trainingMax = TIMEACRO1;
par.mainf.trainunit.pico.gotoAndStop("acro1");
} else {
if (levelHW6 > 0){
if (par.mainf.ketmon.currentFrame == 1){
par.mainf.ketmon.play();
};
} else {
if (par.mainf.ketloc.currentFrame == 1){
par.mainf.ketloc.play();
};
};
};
break;
case 2:
if ((((Money >= (COSTACRO2[levelHW3] + (COSTACRO2[levelHW3] * (incrementalCost * Unit))))) && ((levelHW3 > 0)))){
minMoney((COSTACRO2[levelHW3] + (COSTACRO2[levelHW3] * (incrementalCost * Unit))));
trainingUnitAcro = 3;
trainingTimeAcro = TIMEACRO2;
trainingMax = TIMEACRO2;
par.mainf.trainunit.pico.gotoAndStop("acro2");
} else {
if (levelHW3 > 0){
if (par.mainf.ketmon.currentFrame == 1){
par.mainf.ketmon.play();
};
} else {
if (par.mainf.ketloc.currentFrame == 1){
par.mainf.ketloc.play();
};
};
};
break;
case 3:
if ((((Money >= (COSTACRO3[levelHW5] + (COSTACRO3[levelHW5] * (incrementalCost * Unit))))) && ((levelHW5 > 0)))){
minMoney((COSTACRO3[levelHW5] + (COSTACRO3[levelHW5] * (incrementalCost * Unit))));
trainingUnitAcro = 5;
trainingTimeAcro = TIMEACRO3;
trainingMax = TIMEACRO3;
par.mainf.trainunit.pico.gotoAndStop("acro3");
} else {
if (levelHW5 > 0){
if (par.mainf.ketmon.currentFrame == 1){
par.mainf.ketmon.play();
};
} else {
if (par.mainf.ketloc.currentFrame == 1){
par.mainf.ketloc.play();
};
};
};
break;
case 4:
if ((((Money >= (COSTACRO4[levelHW7] + (COSTACRO4[levelHW7] * (incrementalCost * Unit))))) && ((levelHW7 > 0)))){
minMoney((COSTACRO4[levelHW7] + (COSTACRO4[levelHW7] * (incrementalCost * Unit))));
trainingUnitAcro = 7;
trainingTimeAcro = TIMEACRO4;
trainingMax = TIMEACRO4;
par.mainf.trainunit.pico.gotoAndStop("acro4");
} else {
if (levelHW7 > 0){
if (par.mainf.ketmon.currentFrame == 1){
par.mainf.ketmon.play();
};
} else {
if (par.mainf.ketloc.currentFrame == 1){
par.mainf.ketloc.play();
};
};
};
break;
};
};
};
if (modeUnit == 3){
if (trainingTimeLand == 0){
switch (_arg1){
case 1:
if ((((Money >= (COSTLAND1[levelHW9] + (COSTLAND1[levelHW9] * (incrementalCost * Unit))))) && ((levelHW9 > 0)))){
minMoney((COSTLAND1[levelHW9] + (COSTLAND1[levelHW9] * (incrementalCost * Unit))));
trainingUnitLand = 1;
trainingTimeLand = TIMELAND1;
trainingMax = TIMELAND1;
par.mainf.trainunit.pico.gotoAndStop("land1");
} else {
if (levelHW9 > 0){
if (par.mainf.ketmon.currentFrame == 1){
par.mainf.ketmon.play();
};
} else {
if (par.mainf.ketloc.currentFrame == 1){
par.mainf.ketloc.play();
};
};
};
break;
case 2:
if ((((Money >= (COSTLAND2[levelHW10] + (COSTLAND2[levelHW10] * (incrementalCost * Unit))))) && ((levelHW10 > 0)))){
minMoney((COSTLAND2[levelHW10] + (COSTLAND2[levelHW10] * (incrementalCost * Unit))));
trainingUnitLand = 2;
trainingTimeLand = TIMELAND2;
trainingMax = TIMELAND2;
par.mainf.trainunit.pico.gotoAndStop("land2");
} else {
if (levelHW10 > 0){
if (par.mainf.ketmon.currentFrame == 1){
par.mainf.ketmon.play();
};
} else {
if (par.mainf.ketloc.currentFrame == 1){
par.mainf.ketloc.play();
};
};
};
break;
case 3:
if ((((Money >= (COSTLAND3[levelHW11] + (COSTLAND3[levelHW11] * (incrementalCost * Unit))))) && ((levelHW11 > 0)))){
minMoney((COSTLAND3[levelHW11] + (COSTLAND3[levelHW11] * (incrementalCost * Unit))));
trainingUnitLand = 3;
trainingTimeLand = TIMELAND3;
trainingMax = TIMELAND3;
par.mainf.trainunit.pico.gotoAndStop("land3");
} else {
if (levelHW11 > 0){
if (par.mainf.ketmon.currentFrame == 1){
par.mainf.ketmon.play();
};
} else {
if (par.mainf.ketloc.currentFrame == 1){
par.mainf.ketloc.play();
};
};
};
break;
case 4:
if ((((Money >= (COSTLAND4[levelHW12] + (COSTLAND4[levelHW12] * (incrementalCost * Unit))))) && ((levelHW12 > 0)))){
minMoney((COSTLAND4[levelHW12] + (COSTLAND4[levelHW12] * (incrementalCost * Unit))));
trainingUnitLand = 4;
trainingTimeLand = TIMELAND4;
trainingMax = TIMELAND4;
par.mainf.trainunit.pico.gotoAndStop("land4");
} else {
if (levelHW2 > 0){
if (par.mainf.ketmon.currentFrame == 1){
par.mainf.ketmon.play();
};
} else {
if (par.mainf.ketloc.currentFrame == 1){
par.mainf.ketloc.play();
};
};
};
break;
};
};
};
} else {
if (Unit < ((levelmaxUnit * 5) + 5)){
} else {
if (par.mainf.ketuni.currentFrame == 1){
par.mainf.ketuni.play();
};
};
};
}
public function spawnWingmanLand(_arg1:Number):void{
var _local2:MovieClip;
var _local3:DisplayObject;
var _local4:Number;
var _local5:*;
switch (_arg1){
case 1:
_local3 = getChildByName("landspot4");
_local4 = getChildIndex(_local3);
_local2 = new WingmanLand();
addChildAt(_local2, _local4);
_local2.setPlat(plat4);
_local2.setLevelH(levelHW9);
_local2.setLevelR(levelHW9);
_local2.setLevelD(levelHW9);
break;
case 2:
_local3 = getChildByName("landspot3");
_local4 = getChildIndex(_local3);
_local2 = new WingmanLand2();
addChildAt(_local2, _local4);
_local2.setPlat(plat3);
_local2.setLevelH(levelHW10);
_local2.setLevelR(levelHW10);
_local2.setLevelD(levelHW10);
break;
case 3:
_local3 = getChildByName("landspot2");
_local4 = getChildIndex(_local3);
_local2 = new WingmanLand3();
addChildAt(_local2, _local4);
_local2.setPlat(plat2);
_local2.setLevelH(levelHW11);
_local2.setLevelR(levelHW11);
_local2.setLevelD(levelHW11);
break;
case 4:
_local3 = getChildByName("landspot");
_local4 = getChildIndex(_local3);
_local2 = new WingmanLand4();
addChildAt(_local2, _local4);
_local2.setPlat(plat);
_local2.setLevelH(levelHW12);
_local2.setLevelR(levelHW12);
_local2.setLevelD(levelHW12);
break;
};
_local2.x = wingmanL.x;
_local2.y = wingmanL.y;
_local5 = new BarHp();
_local5.Target = _local2;
addChild(_local5);
_local5 = new ArrowW();
_local5.Target = _local2;
_local5.x = -100;
_local5.y = -100;
par.addChild(_local5);
_local5 = new miniW();
_local5.Target = _local2;
_local5.x = -500;
_local5.y = -500;
par.mainf.minimap.addChild(_local5);
efekSound = new UnitTrainS();
efekSound.play(0, 1, new SoundTransform(1));
}
public function spawnWingman(_arg1:Number):void{
var _local2:MovieClip;
var _local3:*;
switch (_arg1){
case 1:
_local2 = new Wingman();
addChild(_local2);
_local2.setLevelH((levelHW1 * downLevel));
_local2.setLevelR((levelHW1 * downLevel));
_local2.setLevelD((levelHW1 * downLevel));
_local2.x = wingmanA.x;
_local2.y = (wingmanA.y + randRange(-50, 50));
break;
case 2:
_local2 = new Wingman2();
addChild(_local2);
_local2.setLevelH((levelHW2 * downLevel));
_local2.setLevelR((levelHW2 * downLevel));
_local2.setLevelD((levelHW2 * downLevel));
_local2.x = wingmanA.x;
_local2.y = (wingmanA.y + randRange(-50, 50));
break;
case 3:
_local2 = new Wingman3();
addChild(_local2);
_local2.setLevelH((levelHW3 * downLevel));
_local2.setLevelR((levelHW3 * downLevel));
_local2.setLevelD((levelHW3 * downLevel));
_local2.x = -10;
_local2.y = randRange(50, 250);
break;
case 4:
_local2 = new Wingman4();
addChild(_local2);
_local2.setLevelH((levelHW4 * downLevel));
_local2.setLevelR((levelHW4 * downLevel));
_local2.setLevelD((levelHW4 * downLevel));
_local2.x = wingmanA.x;
_local2.y = (wingmanA.y + randRange(-50, 50));
break;
case 5:
_local2 = new Wingman5();
addChild(_local2);
_local2.setLevelH((levelHW5 * downLevel));
_local2.setLevelR((levelHW5 * downLevel));
_local2.setLevelD((levelHW5 * downLevel));
_local2.x = -10;
_local2.y = randRange(50, 250);
break;
case 6:
_local2 = new Wingman6();
addChild(_local2);
_local2.setLevelH((levelHW6 * downLevel));
_local2.setLevelR((levelHW6 * downLevel));
_local2.setLevelD((levelHW6 * downLevel));
_local2.x = -10;
_local2.y = randRange(50, 250);
break;
case 7:
_local2 = new Wingman7();
addChild(_local2);
_local2.setLevelH(levelHW7);
_local2.setLevelR(levelHW7);
_local2.setLevelD(levelHW7);
_local2.x = -10;
_local2.y = randRange(50, 250);
break;
case 8:
_local2 = new Wingman8();
addChild(_local2);
_local2.setLevelH((levelHW8 * downLevel));
_local2.setLevelR((levelHW8 * downLevel));
_local2.setLevelD((levelHW8 * downLevel));
_local2.x = wingmanA.x;
_local2.y = (wingmanA.y + randRange(-50, 50));
break;
};
_local2.changeTargetAir();
_local3 = new BarHp();
_local3.Target = _local2;
addChild(_local3);
_local3 = new ArrowW();
_local3.Target = _local2;
_local3.x = -100;
_local3.y = -100;
par.addChild(_local3);
_local3 = new miniW();
_local3.Target = _local2;
_local3.x = -500;
_local3.y = -500;
par.mainf.minimap.addChild(_local3);
efekSound = new UnitTrainS();
efekSound.play(0, 1, new SoundTransform(1));
}
public function addEXP(_arg1:Number):void{
Exp = (Exp + _arg1);
}
public function getEnemy():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((((((((((((((((((_local3 is Enemy)) || ((_local3 is Enemy2)))) || ((_local3 is Enemy3)))) || ((_local3 is Enemy4)))) || ((_local3 is Enemy5)))) || ((_local3 is Enemy6)))) || ((_local3 is Enemy7)))) || ((_local3 is Enemy8)))) || ((_local3 is Enemy9)))){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
public function minMoney(_arg1:Number):void{
Money = (Money - Math.round(_arg1));
}
public function getBuletBoss():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((_local3 is Peluru)){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
public function pressMouse(_arg1:Event):void{
var _local2:Boolean;
_local2 = true;
if (par.parent.xHair.hitTestObject(par.mainf.menu1)){
_local2 = false;
};
if (par.parent.xHair.hitTestObject(par.mainf.menu2)){
_local2 = false;
};
if (par.parent.xHair.hitTestObject(par.mainf.menu3)){
_local2 = false;
};
if (_local2){
leftClikIsDown = true;
};
}
public function deLoopMain(_arg1:Event):void{
if (delay > 0){
if (cbl.drawed){
delay--;
};
} else {
delay = 3;
cbl.drawed = true;
cbl.buletDraw.graphics.clear();
};
if (y != 0){
quakeNormal();
};
if (x < 0){
scLeft();
} else {
x = 0;
removeEventListener(Event.ENTER_FRAME, deLoopMain);
refundWingman();
levelC.visible = true;
myTimer.start();
};
}
public function initializeGameBoss():void{
var _local1:*;
saveGame();
par.parent.soundChannelMain.stop();
_local1 = new BossThemeS();
par.parent.soundChannelMain = _local1.play(0, 9999, new SoundTransform(par.parent.efekSound));
leftClikIsDown = false;
ship.setLevelH(levelPower);
ship.setLevelR(levelReload);
ship.setLevelP(levelHealth);
stage.addEventListener(KeyboardEvent.KEY_UP, releaseKeyBoss);
stage.addEventListener(MouseEvent.MOUSE_DOWN, pressMouseBoss);
stage.addEventListener(MouseEvent.MOUSE_UP, releaseMouseBoss);
addEventListener(Event.ENTER_FRAME, loopMainBoss);
}
public function scRight():void{
if (this.x > -360){
this.x = (this.x - 10);
mid.x = (mid.x + 3);
mid2.x = (mid2.x + 3);
bgback.x = (bgback.x + 10);
par.mainf.minimap.bar.x = (par.mainf.minimap.bar.x + 2);
};
}
public function getBuletBossE():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((((((((((((((((_local3 is PeluruE)) || ((_local3 is RoketBoss)))) || ((_local3 is Roket)))) || ((_local3 is PeluruE2)))) || ((_local3 is PeluruE3)))) || ((_local3 is PeluruE4)))) || ((_local3 is PeluruE5)))) || ((_local3 is PeluruE10)))){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
public function deinitializeGame():void{
rightKeyIsDown = false;
leftKeyIsDown = false;
upKeyIsDown = false;
downKeyIsDown = false;
wKeyIsDown = false;
qKeyIsDown = false;
eKeyIsDown = false;
fKeyIsDown = false;
aKeyIsDown = false;
sKeyIsDown = false;
dKeyIsDown = false;
zKeyIsDown = false;
xKeyIsDown = false;
cKeyIsDown = false;
vKeyIsDown = false;
leftClikIsDown = false;
spaceKeyIsDown = false;
stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.removeEventListener(KeyboardEvent.KEY_UP, releaseKey);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, pressMouse);
stage.removeEventListener(MouseEvent.MOUSE_UP, releaseMouse);
stage.removeEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheelEvent);
removeEventListener(Event.ENTER_FRAME, LoopMain);
if (player.getPersenHealth() > 0){
addEventListener(Event.ENTER_FRAME, deLoopMain);
};
par = this.parent;
levelC.visible = false;
}
public function minEXP(_arg1:Number):void{
Exp = (Exp - _arg1);
}
public function scLeft():void{
if (this.x < 0){
this.x = (this.x + 10);
mid.x = (mid.x - 3);
mid2.x = (mid2.x - 3);
bgback.x = (bgback.x - 10);
par.mainf.minimap.bar.x = (par.mainf.minimap.bar.x - 2);
};
}
public function onMouseWheelEvent(_arg1:MouseEvent):void{
if (_arg1.delta > 0){
mouseScrollIsUp = true;
} else {
mouseScrollIsDown = true;
};
}
public function deloopMainBoss(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
if (x > -320){
x = (x - 10);
} else {
removeEventListener(Event.ENTER_FRAME, deloopMainBoss);
x = 0;
gotoAndStop("ending");
_local2 = getBuletBoss();
_local3 = getBuletBossE();
for (_local4 in _local2) {
removeChild(_local2[_local4]);
};
for (_local4 in _local3) {
removeChild(_local3[_local4]);
};
};
}
public function skipC(_arg1:MouseEvent):void{
if (clikke == 1){
confa.gotoAndStop("last");
clikke++;
} else {
par.tutor.gotoAndStop("last");
clikke++;
};
}
public function levelingUpEnenmy(_arg1:Number):void{
if (_arg1 >= 0){
levelHE2 = 1;
levelRE2 = 1;
levelDE2 = 1;
levelHE1 = 1;
levelRE1 = 1;
levelDE1 = 1;
levelHE3 = 1;
levelRE3 = 1;
levelDE3 = 1;
levelHE5 = 1;
levelRE5 = 1;
levelDE5 = 1;
levelHE6 = 1;
levelRE6 = 1;
levelDE6 = 1;
levelHE4 = 1;
levelRE4 = 1;
levelDE4 = 1;
levelHE7 = 1;
levelRE7 = 1;
levelDE7 = 1;
levelHE8 = 1;
levelRE8 = 1;
levelDE8 = 1;
levelHE9 = 1;
levelRE9 = 1;
levelDE9 = 1;
};
if (_arg1 >= 2){
};
if (_arg1 >= 3){
levelHE2 = 1.5;
};
if (_arg1 >= 4){
};
if (_arg1 >= 5){
};
if (_arg1 >= 6){
levelHE2 = 2;
levelRE2 = 2;
levelDE2 = 2;
levelHE1 = 2;
levelRE1 = 2;
levelDE1 = 2;
levelHE3 = 2;
levelRE3 = 2;
levelDE3 = 2;
levelHE5 = 2;
levelRE5 = 2;
levelDE5 = 2;
levelHE6 = 2;
levelRE6 = 2;
levelDE6 = 2;
levelHE4 = 2;
levelRE4 = 2;
levelDE4 = 2;
levelHE7 = 2;
levelRE7 = 2;
levelDE7 = 2;
levelHE8 = 2;
levelRE8 = 2;
levelDE8 = 2;
levelHE9 = 2;
levelRE9 = 2;
levelDE9 = 2;
};
if (_arg1 >= 7){
};
if (_arg1 >= 8){
};
if (_arg1 >= 9){
};
if (_arg1 >= 10){
};
if (_arg1 >= 11){
};
if (_arg1 >= 12){
};
if (_arg1 >= 13){
levelHE2 = 3;
levelRE2 = 3;
levelDE2 = 3;
levelHE1 = 3;
levelRE1 = 3;
levelDE1 = 3;
levelHE3 = 3;
levelRE3 = 3;
levelDE3 = 3;
levelHE5 = 3;
levelRE5 = 3;
levelDE5 = 3;
levelHE6 = 3;
levelRE6 = 3;
levelDE6 = 3;
levelHE4 = 3;
levelRE4 = 3;
levelDE4 = 3;
levelHE7 = 3;
levelRE7 = 3;
levelDE7 = 3;
levelHE8 = 3;
levelRE8 = 3;
levelDE8 = 3;
levelHE9 = 3;
levelRE9 = 3;
levelDE9 = 3;
};
if (_arg1 >= 14){
};
if (_arg1 >= 15){
};
if (_arg1 >= 16){
};
}
public function LoopMain(_arg1:Event):void{
var _local2:Array;
var _local3:*;
var _local4:*;
if (pauseGame == false){
if (dKeyIsDown){
scRight();
};
if (aKeyIsDown){
scLeft();
};
levelC.visible = false;
if (GateOpen.currentFrame == 1){
par.mainf.visible = true;
};
if (par.mainf.barhp.blinkCount > 0){
par.mainf.barhp.blinkCount--;
} else {
par.mainf.barhp.unblink();
};
if (delay > 0){
if (cbl.drawed){
delay--;
};
} else {
delay = 3;
cbl.drawed = true;
cbl.buletDraw.graphics.clear();
};
bulet = new Array();
buletEnemy = new Array();
buletTower = new Array();
enemy = new Array();
wingman = new Array();
bulet = getBulet();
buletEnemy = getBuletEnemy();
buletTower = getBuletTower();
enemy = getEnemy();
wingman = getWingman();
Unit = wingman.length;
_local2 = new Array();
_local2.push((COSTAIR1[levelHW1] + (COSTAIR1[levelHW1] * (incrementalCost * Unit))));
_local2.push((COSTAIR2[levelHW2] + (COSTAIR2[levelHW2] * (incrementalCost * Unit))));
_local2.push((COSTAIR3[levelHW8] + (COSTAIR3[levelHW8] * (incrementalCost * Unit))));
_local2.push((COSTAIR4[levelHW4] + (COSTAIR4[levelHW4] * (incrementalCost * Unit))));
_local2.push((COSTACRO1[levelHW6] + (COSTACRO1[levelHW6] * (incrementalCost * Unit))));
_local2.push((COSTACRO2[levelHW3] + (COSTACRO2[levelHW3] * (incrementalCost * Unit))));
_local2.push((COSTACRO3[levelHW5] + (COSTACRO3[levelHW5] * (incrementalCost * Unit))));
_local2.push((COSTACRO4[levelHW7] + (COSTACRO4[levelHW7] * (incrementalCost * Unit))));
_local2.push((COSTLAND1[levelHW9] + (COSTLAND1[levelHW9] * (incrementalCost * Unit))));
_local2.push((COSTLAND2[levelHW10] + (COSTLAND2[levelHW10] * (incrementalCost * Unit))));
_local2.push((COSTLAND3[levelHW11] + (COSTLAND3[levelHW11] * (incrementalCost * Unit))));
_local2.push((COSTLAND4[levelHW12] + (COSTLAND4[levelHW12] * (incrementalCost * Unit))));
par.mainf.resetCost(_local2);
par.mainf.ast.text = String(Money);
par.mainf.leveltext.text = String((levelKe + 1));
par.mainf.barpw.width = (player.getPower() * 86);
par.mainf.barhp.gotoAndStop(Math.round((50 - (player.getPersenHealth() * 50))));
par.mainf.unitnum.text = ((String(Unit) + "/") + String(((levelmaxUnit * 5) + 5)));
par.mainf.setWeapon(player.getWeaponType());
if (par.parent.efekSound == 1){
par.mainf.sss.gotoAndStop(1);
} else {
par.mainf.sss.gotoAndStop(2);
};
if (player.getPersenHealth() > 0.3){
par.mainf.danger.visible = false;
} else {
par.mainf.danger.visible = true;
};
par.mainf.trainunit.filo.gotoAndStop((Math.round((((trainingMax - trainingTime) / trainingMax) * 25)) - 25));
if (par.mainf.trainunit.filo.currentFrame == 1){
par.mainf.trainunit.visible = false;
} else {
par.mainf.trainunit.visible = true;
};
for (_local3 in buletTower) {
switch (randRange(1, 4)){
case 1:
buletTower[_local3].moveBullet(enemy, plat);
break;
case 2:
buletTower[_local3].moveBullet(enemy, plat2);
break;
case 3:
buletTower[_local3].moveBullet(enemy, plat3);
break;
case 4:
buletTower[_local3].moveBullet(enemy, plat4);
break;
};
};
for (_local3 in bulet) {
bulet[_local3].moveBullet(enemy);
};
for (_local3 in buletEnemy) {
buletEnemy[_local3].moveBullet(wingman, plat);
};
for (_local3 in enemy) {
enemy[_local3].moveEnemy();
};
for (_local3 in wingman) {
wingman[_local3].moveWingman();
};
player.movePlayer();
if (y != 0){
if (quaked){
quakeDouble();
} else {
quakeNormal();
};
};
if (trainingTimeAir > 0){
trainingTimeAir--;
trainingTime--;
} else {
if (trainingUnitAir > 0){
spawnWingman(trainingUnitAir);
trainingUnitAir = 0;
trainingTime = 1;
trainingMax = 1;
};
};
if (trainingTimeAcro > 0){
trainingTimeAcro--;
trainingTime--;
} else {
if (trainingUnitAcro > 0){
spawnWingman(trainingUnitAcro);
trainingUnitAcro = 0;
trainingTime = 1;
trainingMax = 1;
};
};
if (trainingTimeLand > 0){
trainingTimeLand--;
trainingTime--;
} else {
if (trainingUnitLand > 0){
spawnWingmanLand(trainingUnitLand);
trainingUnitLand = 0;
trainingTime = 1;
trainingMax = 1;
};
};
spawnWave();
if (player.getPersenHealth() <= 0){
deinitializeGame();
par.parent.gotoAndStop("gameover");
};
};
}
public function refundWingman():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local1 = getWingman();
for (_local2 in _local1) {
addMoney(Math.round((costWingman(_local1[_local2]) / 2)));
_local1[_local2].setHealth(0);
removeChild(_local1[_local2]);
};
_local3 = getBuletEnemy();
_local4 = getBulet();
_local5 = getBuletTower();
for (_local2 in _local3) {
removeChild(_local3[_local2]);
};
for (_local2 in _local4) {
removeChild(_local4[_local2]);
};
for (_local2 in _local5) {
removeChild(_local5[_local2]);
};
SCORE = ((Money * 10) + (player.getPersenHealth() * 1000));
}
public function getBuletTower():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((((((((((_local3 is PeluruTower)) || ((_local3 is PeluruElec)))) || ((_local3 is PeluruElec2)))) || ((_local3 is PeluruLaser)))) || ((_local3 is PeluruNew)))){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
public function blinkBar():void{
par.mainf.barhp.blink();
}
public function getBulet():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((((((_local3 is Peluru)) || ((_local3 is Roket)))) || ((_local3 is RoketB)))){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
public function saveGame():void{
par.parent.so.data.levelHW1 = levelHW1;
par.parent.so.data.levelHW2 = levelHW2;
par.parent.so.data.levelHW3 = levelHW3;
par.parent.so.data.levelHW4 = levelHW4;
par.parent.so.data.levelHW5 = levelHW5;
par.parent.so.data.levelHW6 = levelHW6;
par.parent.so.data.levelHW7 = levelHW7;
par.parent.so.data.levelHW8 = levelHW8;
par.parent.so.data.levelHW9 = levelHW9;
par.parent.so.data.levelHW10 = levelHW10;
par.parent.so.data.levelHW11 = levelHW11;
par.parent.so.data.levelHW12 = levelHW12;
par.parent.so.data.Money = Money;
par.parent.so.data.Exp = Exp;
par.parent.so.data.levelWeapon1 = levelWeapon1;
par.parent.so.data.levelWeapon2 = levelWeapon2;
par.parent.so.data.levelWeapon3 = levelWeapon3;
par.parent.so.data.levelWeapon4 = levelWeapon4;
par.parent.so.data.levelPower = levelPower;
par.parent.so.data.levelReload = levelReload;
par.parent.so.data.levelHealth = levelHealth;
par.parent.so.data.levelmaxUnit = levelmaxUnit;
par.parent.so.data.levelKe = levelKe;
par.parent.so.data.SCORE = SCORE;
par.parent.so.flush();
}
public function pressKey(_arg1:KeyboardEvent):void{
keyPressed = _arg1.keyCode;
switch (keyPressed){
case Keyboard.RIGHT:
rightKeyIsDown = true;
break;
case Keyboard.LEFT:
leftKeyIsDown = true;
break;
case Keyboard.UP:
upKeyIsDown = true;
break;
case Keyboard.DOWN:
downKeyIsDown = true;
break;
case keyQ:
qKeyIsDown = true;
break;
case keyE:
eKeyIsDown = true;
break;
case keyW:
wKeyIsDown = true;
break;
case keyR:
rKeyIsDown = true;
break;
case keyA:
aKeyIsDown = true;
break;
case keyS:
sKeyIsDown = true;
break;
case keyD:
dKeyIsDown = true;
break;
case keyF:
fKeyIsDown = true;
break;
case keyG:
gKeyIsDown = true;
break;
case key1:
key1IsDown = true;
break;
case key2:
key2IsDown = true;
break;
case key3:
key3IsDown = true;
break;
case key4:
key4IsDown = true;
break;
case keyX:
xKeyIsDown = true;
break;
case keyZ:
zKeyIsDown = true;
break;
case keyC:
cKeyIsDown = true;
break;
case keyV:
vKeyIsDown = true;
break;
case Keyboard.SPACE:
spaceKeyIsDown = true;
break;
};
}
public function doHit(_arg1:MovieClip, _arg2:Number, _arg3:Number):void{
var _local4:MovieClip;
var _local5:*;
var _local6:*;
_local5 = 0;
while (_local5 < 3) {
switch (randRange(1, 3)){
case 1:
_local4 = new Scrap1();
break;
case 2:
_local4 = new Scrap2();
break;
case 3:
_local4 = new Scrap3();
break;
};
ceft.addChild(_local4);
_local4.x = (_arg2 + randRange(-3, 3));
_local4.y = (_arg3 + randRange(-3, 3));
_local4.rotation = randRange(-180, 180);
_local6 = ((Math.random() * 0.5) + 0.5);
_local4.scaleX = _local6;
_local4.scaleY = _local6;
_local4.speed = ((Math.random() * 0.08) + 0.03);
_local4.yspeed = randRange(-5, -2);
_local4.xspeed = randRange(-3, 3);
_local4.addEventListener(Event.ENTER_FRAME, partHitGone);
_local5++;
};
}
public function partGone(_arg1:Event):void{
var _local2:*;
_local2 = _arg1.currentTarget;
_local2.scaleX = (_local2.scaleX + _local2.speed);
_local2.scaleY = (_local2.scaleY + _local2.speed);
_local2.alpha = (_local2.alpha - _local2.speed);
_local2.rotation = _local2.speed;
if (_local2.alpha <= 0){
_local2.removeEventListener(Event.ENTER_FRAME, partGone);
_local2.parent.removeChild(_local2);
};
}
public function partHitGone(_arg1:Event):void{
var _local2:*;
_local2 = _arg1.currentTarget;
_local2.x = (_local2.x + _local2.xspeed);
_local2.y = (_local2.y + _local2.yspeed);
_local2.yspeed = (_local2.yspeed + 0.8);
_local2.alpha = (_local2.alpha - _local2.speed);
_local2.rotation = _local2.speed;
if (_local2.alpha <= 0){
_local2.removeEventListener(Event.ENTER_FRAME, partHitGone);
_local2.parent.removeChild(_local2);
};
}
public function payToFullHealth():Boolean{
var _local1:Number;
_local1 = ((100 - Math.round((player.getPersenHealth() * 100))) * 10);
if (Money >= _local1){
Money = (Money - _local1);
player.resetStat();
return (true);
};
return (false);
}
public function getBuletEnemy():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((_local3 is Bom)){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
public function loopMainBoss(_arg1:Event):void{
var _local2:Array;
var _local3:*;
if (pauseGameB == false){
ship.movePlayer();
boss.moveEnemy();
buletB = new Array();
buletB = getBuletBoss();
_local2 = new Array();
_local2.push(boss);
for (_local3 in buletB) {
buletB[_local3].moveBullet(_local2);
};
buletBE = new Array();
buletBE = getBuletBossE();
_local2 = new Array();
_local2.push(ship);
for (_local3 in buletBE) {
buletBE[_local3].moveBullet(_local2);
};
if (ship.body.hitTestObject(boss.body)){
ship.damage(500);
};
if (ship.getHealth() <= 0){
removeEventListener(Event.ENTER_FRAME, loopMainBoss);
par.parent.gotoAndStop("gameover");
} else {
hpboss.gotoAndStop(Math.round((50 - (boss.getPersenHealth() * 50))));
hpship.gotoAndStop(Math.round((50 - (ship.getPersenHealth() * 50))));
};
if (boss.getHealth() <= 0){
addEventListener(Event.ENTER_FRAME, deloopMainBoss);
removeEventListener(Event.ENTER_FRAME, loopMainBoss);
buletB = new Array();
buletB = getBuletBoss();
buletBE = new Array();
buletBE = getBuletBossE();
for (_local3 in buletB) {
removeChild(buletB[_local3]);
};
for (_local3 in buletBE) {
removeChild(buletBE[_local3]);
};
};
};
}
public function initializeGame():void{
var _local1:*;
var _local2:Array;
rightKeyIsDown = false;
leftKeyIsDown = false;
upKeyIsDown = false;
downKeyIsDown = false;
wKeyIsDown = false;
qKeyIsDown = false;
eKeyIsDown = false;
fKeyIsDown = false;
aKeyIsDown = false;
sKeyIsDown = false;
dKeyIsDown = false;
zKeyIsDown = false;
xKeyIsDown = false;
cKeyIsDown = false;
vKeyIsDown = false;
leftClikIsDown = false;
spaceKeyIsDown = false;
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP, releaseKey);
stage.addEventListener(MouseEvent.MOUSE_DOWN, pressMouse);
stage.addEventListener(MouseEvent.MOUSE_UP, releaseMouse);
stage.addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheelEvent);
addEventListener(Event.ENTER_FRAME, LoopMain);
enemy = new Array();
wingman = new Array();
enemy = getEnemy();
wingman = getWingman();
plat = new Array();
plat2 = new Array();
plat3 = new Array();
plat4 = new Array();
plat = getPlat(1);
plat2 = getPlat(2);
plat3 = getPlat(3);
plat4 = getPlat(4);
for (_local1 in enemy) {
enemy[_local1].changeTargetWingman();
};
for (_local1 in wingman) {
if ((((((((wingman[_local1] is WingmanLand)) || ((wingman[_local1] is WingmanLand2)))) || ((wingman[_local1] is WingmanLand3)))) || ((wingman[_local1] is WingmanLand4)))){
if ((wingman[_local1] is WingmanLand)){
wingman[_local1].setPlat(plat);
};
if ((wingman[_local1] is WingmanLand2)){
wingman[_local1].setPlat(plat2);
};
if ((wingman[_local1] is WingmanLand3)){
wingman[_local1].setPlat(plat3);
};
if ((wingman[_local1] is WingmanLand4)){
wingman[_local1].setPlat(plat4);
};
} else {
wingman[_local1].changeTargetAir();
};
};
par = this.parent;
player.setLevelH(levelHealth);
player.setLevelR(levelPower);
player.setLevelRL(levelReload);
player.setLevelD1(levelWeapon1);
player.setLevelD2(levelWeapon2);
player.setLevelD3(levelWeapon3);
player.setLevelD4(levelWeapon4);
levelingUpEnenmy(levelKe);
_local2 = new Array(COSTAIR1[levelHW1], COSTAIR2[levelHW2], COSTAIR3[levelHW8], COSTAIR4[levelHW4], COSTACRO1[levelHW6], COSTACRO2[levelHW3], COSTACRO3[levelHW5], COSTACRO4[levelHW7], COSTLAND1[levelHW9], COSTLAND2[levelHW10], COSTLAND3[levelHW11], COSTLAND4[levelHW12], levelWeapon2, levelWeapon3, levelWeapon4);
par.mainf.setCost(_local2);
if (levelKe >= 10){
bgback.gotoAndStop(2);
mid2.gotoAndStop(2);
mid.gotoAndStop(2);
player.gotoAndStop(2);
} else {
bgback.gotoAndStop(1);
mid2.gotoAndStop(1);
mid.gotoAndStop(1);
player.gotoAndStop(1);
};
if (levelPower >= 3){
bgdepan.gotoAndStop(2);
lampu.lampu.gotoAndStop(2);
} else {
bgdepan.gotoAndStop(1);
lampu.lampu.gotoAndStop(1);
};
}
public function noPower():void{
if (par.mainf.ketpow.currentFrame == 1){
par.mainf.ketpow.play();
};
}
public function getPlat(_arg1:Number):Array{
var _local2:Array;
var _local3:*;
var _local4:*;
_local2 = new Array();
_local3 = 0;
while (_local3 < this.numChildren) {
_local4 = this.getChildAt(_local3);
if (_arg1 == 1){
if ((_local4 is Platform)){
_local2.push(_local4);
};
};
if (_arg1 == 2){
if ((_local4 is Platform2)){
_local2.push(_local4);
};
};
if (_arg1 == 3){
if ((_local4 is Platform3)){
_local2.push(_local4);
};
};
if (_arg1 == 4){
if ((_local4 is Platform4)){
_local2.push(_local4);
};
};
_local3++;
};
return (_local2);
}
public function quakeDouble():void{
quaked = false;
switch (quakeMode){
case 1:
x = (x + 8);
y = (y + 8);
break;
case 2:
x = (x - 8);
y = (y + 8);
break;
case 3:
x = (x + 8);
y = (y - 8);
break;
case 4:
x = (x - 8);
y = (y - 8);
break;
};
}
}
}//package EarthOnslaught3_fla
Section 43
//MainFront_243 (EarthOnslaught3_fla.MainFront_243)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MainFront_243 extends MovieClip {
public var sss:MovieClip;
public var danger:MovieClip;
public var barhp:MovieClip;
public var ketuni:MovieClip;
public var ppp:MovieClip;
public var ketmon:MovieClip;
public var ast:TextField;
public var w1:MovieClip;
public var w2:MovieClip;
public var w4:MovieClip;
public var par;
public var w3:MovieClip;
public var ketloc:MovieClip;
public var leveltext:TextField;
public var menu2:MovieClip;
public var menu1:MovieClip;
public var menu3:MovieClip;
public var countDownUp:Number;
public var downUp:Boolean;
public var loc1:MovieClip;
public var loc3:MovieClip;
public var loc5:MovieClip;
public var loc6:MovieClip;
public var loc7:MovieClip;
public var loc9:MovieClip;
public var loc4:MovieClip;
public var loc8:MovieClip;
public var loc2:MovieClip;
public var barpw:MovieClip;
public var loc10:MovieClip;
public var loc12:MovieClip;
public var loc11:MovieClip;
public var unitnum:TextField;
public var trainunit:MovieClip;
public var minimap:MovieClip;
public var ketpow:MovieClip;
public var locw2:MovieClip;
public var locw3:MovieClip;
public var locw4:MovieClip;
public function MainFront_243(){
addFrameScript(0, frame1);
}
function frame1(){
par = this.parent;
countDownUp = 15;
danger.visible = false;
menu2.btn1.addEventListener(MouseEvent.CLICK, clickBtnUnitAir);
menu2.btn2.addEventListener(MouseEvent.CLICK, clickBtnUnitAir);
menu2.btn3.addEventListener(MouseEvent.CLICK, clickBtnUnitAir);
menu2.btn4.addEventListener(MouseEvent.CLICK, clickBtnUnitAir);
menu1.btn1.addEventListener(MouseEvent.CLICK, clickBtnUnitAcro);
menu1.btn2.addEventListener(MouseEvent.CLICK, clickBtnUnitAcro);
menu1.btn3.addEventListener(MouseEvent.CLICK, clickBtnUnitAcro);
menu1.btn4.addEventListener(MouseEvent.CLICK, clickBtnUnitAcro);
menu3.btn1.addEventListener(MouseEvent.CLICK, clickBtnUnitLand);
menu3.btn2.addEventListener(MouseEvent.CLICK, clickBtnUnitLand);
menu3.btn3.addEventListener(MouseEvent.CLICK, clickBtnUnitLand);
menu3.btn4.addEventListener(MouseEvent.CLICK, clickBtnUnitLand);
sss.addEventListener(MouseEvent.CLICK, btnSpeak);
ppp.addEventListener(MouseEvent.CLICK, btnPau);
}
public function btnPau(_arg1:MouseEvent):void{
if (par.pauseLay.currentFrame == 6){
par.main.pauseGame = false;
par.pauseLay.play();
};
if (par.pauseLay.currentFrame == 1){
par.mainpauseGame = true;
par.pauseLay.play();
};
}
public function clickBtnUnitAir(_arg1:MouseEvent):void{
var _local2:String;
var _local3:Number;
downUp = !(downUp);
par.main.modeUnit = 1;
_local2 = _arg1.currentTarget.name;
_local3 = int(_local2.substr(3, (_local2.length - 3)));
par.main.trainingUnit(_local3);
}
public function btnSpeak(_arg1:MouseEvent):void{
if (par.parent.efekSound == 1){
par.parent.efekSound = 0;
sss.gotoAndStop(2);
} else {
par.parent.efekSound = 1;
sss.gotoAndStop(1);
};
par.parent.soundChannelMain.soundTransform = new SoundTransform(par.parent.efekSound);
}
public function setWeapon(_arg1:Number):void{
w1.visible = false;
w2.visible = false;
w3.visible = false;
w4.visible = false;
switch (_arg1){
case 1:
w1.visible = true;
break;
case 2:
w2.visible = true;
break;
case 3:
w3.visible = true;
break;
case 4:
w4.visible = true;
break;
};
}
public function setCost(_arg1:Array):void{
loc1.visible = true;
loc2.visible = true;
loc3.visible = true;
loc4.visible = true;
loc5.visible = true;
loc6.visible = true;
loc7.visible = true;
loc8.visible = true;
loc9.visible = true;
loc10.visible = true;
loc11.visible = true;
loc12.visible = true;
locw2.visible = true;
locw3.visible = true;
locw4.visible = true;
menu2.cost1.text = String(_arg1[0]);
menu2.cost2.text = String(_arg1[1]);
menu2.cost3.text = String(_arg1[2]);
menu2.cost4.text = String(_arg1[3]);
menu1.cost1.text = String(_arg1[4]);
menu1.cost2.text = String(_arg1[5]);
menu1.cost3.text = String(_arg1[6]);
menu1.cost4.text = String(_arg1[7]);
menu3.cost1.text = String(_arg1[8]);
menu3.cost2.text = String(_arg1[9]);
menu3.cost3.text = String(_arg1[10]);
menu3.cost4.text = String(_arg1[11]);
trace(_arg1);
if (_arg1[0] > 0){
loc5.visible = false;
};
if (_arg1[1] > 0){
loc6.visible = false;
};
if (_arg1[2] > 0){
loc7.visible = false;
};
if (_arg1[3] > 0){
loc8.visible = false;
};
if (_arg1[4] > 0){
loc1.visible = false;
};
if (_arg1[5] > 0){
loc2.visible = false;
};
if (_arg1[6] > 0){
loc3.visible = false;
};
if (_arg1[7] > 0){
loc4.visible = false;
};
if (_arg1[8] > 0){
loc9.visible = false;
};
if (_arg1[9] > 0){
loc10.visible = false;
};
if (_arg1[10] > 0){
loc11.visible = false;
};
if (_arg1[11] > 0){
loc12.visible = false;
};
if (_arg1[12] > 0){
locw2.visible = false;
};
if (_arg1[13] > 0){
locw3.visible = false;
};
if (_arg1[14] > 0){
locw4.visible = false;
};
}
public function clickBtnUnitAcro(_arg1:MouseEvent):void{
var _local2:String;
var _local3:Number;
downUp = !(downUp);
par.main.modeUnit = 2;
_local2 = _arg1.currentTarget.name;
_local3 = int(_local2.substr(3, (_local2.length - 3)));
par.main.trainingUnit(_local3);
}
public function clickBtnUnitLand(_arg1:MouseEvent):void{
var _local2:String;
var _local3:Number;
downUp = !(downUp);
par.main.modeUnit = 3;
_local2 = _arg1.currentTarget.name;
_local3 = int(_local2.substr(3, (_local2.length - 3)));
par.main.trainingUnit(_local3);
}
public function resetCost(_arg1:Array):void{
menu2.cost1.text = String(Math.round(_arg1[0]));
menu2.cost2.text = String(Math.round(_arg1[1]));
menu2.cost3.text = String(Math.round(_arg1[2]));
menu2.cost4.text = String(Math.round(_arg1[3]));
menu1.cost1.text = String(Math.round(_arg1[4]));
menu1.cost2.text = String(Math.round(_arg1[5]));
menu1.cost3.text = String(Math.round(_arg1[6]));
menu1.cost4.text = String(Math.round(_arg1[7]));
menu3.cost1.text = String(Math.round(_arg1[8]));
menu3.cost2.text = String(Math.round(_arg1[9]));
menu3.cost3.text = String(Math.round(_arg1[10]));
menu3.cost4.text = String(Math.round(_arg1[11]));
}
}
}//package EarthOnslaught3_fla
Section 44
//MainMenu_145 (EarthOnslaught3_fla.MainMenu_145)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class MainMenu_145 extends MovieClip {
public var btncredit:SimpleButton;
public var copyrig:MovieClip;
public var btnplay:SimpleButton;
public var btncon:SimpleButton;
public var logoab2:SimpleButton;
}
}//package EarthOnslaught3_fla
Section 45
//MainTimeline (EarthOnslaught3_fla.MainTimeline)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var loader:URLLoader;
public var sound:Sound;
public var cont:Boolean;
public var bgmSound:Number;
public var efekSound:Number;
public var persen:TextField;
public var so:SharedObject;
public var picWea:Boolean;
public var variables:URLVariables;
public var loader_mc:MovieClip;
public var btnab:SimpleButton;
public var customContextMenu:ContextMenu;
public var cpd:MovieClip;
public var cpc:MovieClip;
public var xHair:MovieClip;
public var mv:MovieClip;
public var mm:MovieClip;
public var picIte:Boolean;
public var request:URLRequest;
public var resHos:Boolean;
public var btnsm:SimpleButton;
public var soundChannelMain:SoundChannel;
public var temp;
public var btnskip:SimpleButton;
public var credit:MovieClip;
public function MainTimeline(){
addFrameScript(0, frame1, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
public function clickMore23(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2, "_blank");
}
public function clikfarm(_arg1:ContextMenuEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
public function btnSplash(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
public function skipMov(_arg1:MouseEvent):void{
mv.mv.stop();
mv.fade.play();
soundChannelMain.stop();
}
public function onProgress(_arg1:ProgressEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.target.bytesLoaded;
_local3 = _arg1.target.bytesTotal;
_local4 = (_local2 / _local3);
persen.text = (String(Math.round((_local4 * 100))) + "%");
loader_mc.width = (_local4 * 290);
}
public function onComplete(_arg1:Event):void{
gotoAndPlay("splash");
}
public function mouseLeaveHandler(_arg1:Event):void{
xHair.visible = false;
}
public function clickMore2ab2(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2, "_blank");
}
function frame3(){
stop();
btnab.addEventListener(MouseEvent.CLICK, clickMore23);
}
function frame6(){
stop();
btnskip.addEventListener(MouseEvent.CLICK, skipMov);
soundChannelMain.stop();
sound = new IntroS();
soundChannelMain = sound.play(0, 9999, new SoundTransform(efekSound));
}
function frame7(){
stop();
soundChannelMain.stop();
sound = new IngameS();
soundChannelMain = sound.play(0, 9999, new SoundTransform(efekSound));
}
public function btnCredit(_arg1:MouseEvent):void{
if (credit.currentFrame == 1){
credit.play();
};
}
function frame4(){
stop();
btnsm.addEventListener(MouseEvent.CLICK, btnSplash);
}
function frame1(){
stop();
stage.scaleMode = StageScaleMode.NO_SCALE;
customContextMenu = new ContextMenu();
customContextMenu.hideBuiltInItems();
temp = new ContextMenuItem("Small Farm Studio");
temp.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, clikfarm);
customContextMenu.customItems.push(temp);
contextMenu = customContextMenu;
resHos = false;
picIte = false;
picWea = false;
stage.showDefaultContextMenu = false;
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
cpc.addEventListener(MouseEvent.CLICK, btnCPC);
if (loaderInfo.url.substring(0, 4) != "file"){
Security.allowDomain("*");
Security.loadPolicyFile("http://track.g-bot.net/crossdomain.xml");
variables = new URLVariables();
variables.id = "earthonslaught";
variables.ui = loaderInfo.url;
request = new URLRequest("http://track.g-bot.net/track.php");
request.method = "POST";
request.data = variables;
loader = new URLLoader();
loader.load(request);
};
cpd.addEventListener(MouseEvent.CLICK, clickMore2ab);
}
function frame8(){
soundChannelMain.stop();
sound = new GameOverS();
soundChannelMain = sound.play(0, 10, new SoundTransform(efekSound));
}
public function moveCursor(_arg1:MouseEvent):void{
xHair.visible = true;
xHair.x = mouseX;
xHair.y = mouseY;
}
function frame5(){
Mouse.hide();
addEventListener(MouseEvent.MOUSE_MOVE, moveCursor);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
xHair.gotoAndStop(1);
stop();
stage.quality = "MEDIUM";
efekSound = 1;
bgmSound = 1;
cont = false;
if (soundChannelMain != null){
soundChannelMain.stop();
};
sound = new MainMenuS();
soundChannelMain = sound.play(0, 999, new SoundTransform(efekSound));
mm.btnplay.addEventListener(MouseEvent.CLICK, btnPlay);
mm.btncon.addEventListener(MouseEvent.CLICK, btnCon);
mm.btncredit.addEventListener(MouseEvent.CLICK, btnCredit);
mm.logoab2.addEventListener(MouseEvent.CLICK, clickMore2ab2);
mm.copyrig.addEventListener(MouseEvent.CLICK, btnMoreR);
so = SharedObject.getLocal("eo");
}
public function btnCPC(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
public function btnCon(_arg1:MouseEvent):void{
if (so.data.levelKe >= 0){
gotoAndStop("game");
cont = true;
};
}
public function btnPlay(_arg1:MouseEvent):void{
nextFrame();
}
public function clickMore2ab(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2, "_blank");
}
public function btnMoreR(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
}
}//package EarthOnslaught3_fla
Section 46
//mb2_103 (EarthOnslaught3_fla.mb2_103)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class mb2_103 extends MovieClip {
public var leg:MovieClip;
public var arm:MovieClip;
public var bd:MovieClip;
}
}//package EarthOnslaught3_fla
Section 47
//mb3_108 (EarthOnslaught3_fla.mb3_108)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class mb3_108 extends MovieClip {
public var leg:MovieClip;
public var arm:MovieClip;
public var bd:MovieClip;
}
}//package EarthOnslaught3_fla
Section 48
//Menu1_247 (EarthOnslaught3_fla.Menu1_247)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Menu1_247 extends MovieClip {
public var cost1:TextField;
public var cost2:TextField;
public var cost3:TextField;
public var cost4:TextField;
public var btn3:MovieClip;
public var btn2:MovieClip;
public var btn4:MovieClip;
public var btn1:MovieClip;
}
}//package EarthOnslaught3_fla
Section 49
//Menu2_248 (EarthOnslaught3_fla.Menu2_248)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Menu2_248 extends MovieClip {
public var cost1:TextField;
public var cost2:TextField;
public var cost3:TextField;
public var cost4:TextField;
public var btn3:MovieClip;
public var btn2:MovieClip;
public var btn4:MovieClip;
public var btn1:MovieClip;
}
}//package EarthOnslaught3_fla
Section 50
//Menu3_249 (EarthOnslaught3_fla.Menu3_249)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Menu3_249 extends MovieClip {
public var cost1:TextField;
public var cost2:TextField;
public var cost3:TextField;
public var cost4:TextField;
public var btn3:MovieClip;
public var btn2:MovieClip;
public var btn4:MovieClip;
public var btn1:MovieClip;
}
}//package EarthOnslaught3_fla
Section 51
//meriamneoshoot_202 (EarthOnslaught3_fla.meriamneoshoot_202)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class meriamneoshoot_202 extends MovieClip {
public var fire:MovieClip;
}
}//package EarthOnslaught3_fla
Section 52
//meriamshoot_203 (EarthOnslaught3_fla.meriamshoot_203)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class meriamshoot_203 extends MovieClip {
public var fire:MovieClip;
public function meriamshoot_203(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 53
//miniradar_257 (EarthOnslaught3_fla.miniradar_257)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class miniradar_257 extends MovieClip {
public var bar:MovieClip;
}
}//package EarthOnslaught3_fla
Section 54
//mobil1_98 (EarthOnslaught3_fla.mobil1_98)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class mobil1_98 extends MovieClip {
public var leg:MovieClip;
public var arm:MovieClip;
public var bd:MovieClip;
}
}//package EarthOnslaught3_fla
Section 55
//Movie1_164 (EarthOnslaught3_fla.Movie1_164)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Movie1_164 extends MovieClip {
public var par;
public function Movie1_164(){
addFrameScript(69, frame70);
}
function frame70(){
stop();
par = this.parent;
par.nextFrame();
}
}
}//package EarthOnslaught3_fla
Section 56
//Movie2_174 (EarthOnslaught3_fla.Movie2_174)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Movie2_174 extends MovieClip {
public var par;
public function Movie2_174(){
addFrameScript(81, frame82);
}
function frame82(){
stop();
par = this.parent;
par.nextFrame();
}
}
}//package EarthOnslaught3_fla
Section 57
//Movie3_176 (EarthOnslaught3_fla.Movie3_176)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Movie3_176 extends MovieClip {
public var par;
public function Movie3_176(){
addFrameScript(71, frame72);
}
function frame72(){
stop();
par = this.parent;
par.nextFrame();
}
}
}//package EarthOnslaught3_fla
Section 58
//Movie4_177 (EarthOnslaught3_fla.Movie4_177)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Movie4_177 extends MovieClip {
public var par;
public function Movie4_177(){
addFrameScript(74, frame75);
}
function frame75(){
stop();
par = this.parent;
par.fade.play();
}
}
}//package EarthOnslaught3_fla
Section 59
//Movie5_173 (EarthOnslaught3_fla.Movie5_173)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Movie5_173 extends MovieClip {
public var par;
public function Movie5_173(){
addFrameScript(0, frame1, 24, frame25);
}
function frame1(){
stop();
}
function frame25(){
stop();
par = this.parent;
par.parent.nextFrame();
}
}
}//package EarthOnslaught3_fla
Section 60
//OpeningConf_192 (EarthOnslaught3_fla.OpeningConf_192)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class OpeningConf_192 extends MovieClip {
public var okayNext:Boolean;
public var par;
public function OpeningConf_192(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7);
}
public function releaseMouseA(_arg1:Event):void{
if (okayNext){
nextFrame();
};
}
function frame3(){
stop();
okayNext = false;
}
function frame6(){
stop();
okayNext = false;
}
function frame7(){
stop();
par = this.parent;
stage.removeEventListener(MouseEvent.MOUSE_UP, releaseMouseA);
par.parent.tutor.nextFrame();
}
function frame1(){
stop();
}
function frame4(){
stop();
okayNext = false;
}
function frame5(){
stop();
okayNext = false;
}
function frame2(){
stop();
okayNext = false;
stage.addEventListener(MouseEvent.MOUSE_UP, releaseMouseA);
}
}
}//package EarthOnslaught3_fla
Section 61
//OpeningMovie_163 (EarthOnslaught3_fla.OpeningMovie_163)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class OpeningMovie_163 extends MovieClip {
public var fade:MovieClip;
public var mv:MovieClip;
public function OpeningMovie_163(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 62
//PanelUtama_212 (EarthOnslaught3_fla.PanelUtama_212)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class PanelUtama_212 extends MovieClip {
public var pb:TextField;
public var a3:TextField;
public var moneycheat:SimpleButton;
public var ba:SimpleButton;
public var hpac2:TextField;
public var hpac3:TextField;
public var hpac4:TextField;
public var hpl4:TextField;
public var ac4:TextField;
public var ac2:TextField;
public var ac3:TextField;
public var barhp:MovieClip;
public var hpl2:TextField;
public var cb:TextField;
public var efekSound:Sound;
public var ket:MovieClip;
public var btnReset:SimpleButton;
public var btnhh:SimpleButton;
public var hpl3:TextField;
public var hpac1:TextField;
public var hpl1:TextField;
public var ac1:TextField;
public var btnac1:SimpleButton;
public var btnac2:SimpleButton;
public var btnac3:SimpleButton;
public var btnac4:SimpleButton;
public var dmgac1:TextField;
public var dmgac4:TextField;
public var dmgac2:TextField;
public var w2:TextField;
public var w4:TextField;
public var w1:TextField;
public var btnl1:SimpleButton;
public var w3:TextField;
public var expind:TextField;
public var btnl4:SimpleButton;
public var dmgac3:TextField;
public var par;
public var btnl2:SimpleButton;
public var dmgl1:TextField;
public var dmgl2:TextField;
public var dmgl3:TextField;
public var dmgl4:TextField;
public var btnl3:SimpleButton;
public var expcheat:SimpleButton;
public var hpa2:TextField;
public var hpa1:TextField;
public var hb:TextField;
public var btnmu:SimpleButton;
public var logoab2:SimpleButton;
public var hpa3:TextField;
public var hpa4:TextField;
public var ketC:MovieClip;
public var ketH:MovieClip;
public var ketM:MovieClip;
public var ketW:MovieClip;
public var l1:TextField;
public var l3:TextField;
public var btna1:SimpleButton;
public var btna2:SimpleButton;
public var btna3:SimpleButton;
public var btna4:SimpleButton;
public var monind:TextField;
public var l2:TextField;
public var l4:TextField;
public var ketP:MovieClip;
public var ketU:MovieClip;
public var dmga1:TextField;
public var dmga2:TextField;
public var dmga3:TextField;
public var dmga4:TextField;
public var btnc:SimpleButton;
public var btnh:SimpleButton;
public var mu:TextField;
public var btnp:SimpleButton;
public var levelcheat:SimpleButton;
public var a2:TextField;
public var btnw2:SimpleButton;
public var btnw3:SimpleButton;
public var btnw4:SimpleButton;
public var a4:TextField;
public var btnw1:SimpleButton;
public var a1:TextField;
public function PanelUtama_212(){
addFrameScript(0, frame1);
}
public function addLevelLand2(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTLAND2[par.levelHW10]){
par.Exp = (par.Exp - par.EXPCOSTLAND2[par.levelHW10]);
par.levelHW10++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function addLevelLand4(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTLAND4[par.levelHW12]){
par.Exp = (par.Exp - par.EXPCOSTLAND4[par.levelHW12]);
par.levelHW12++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function moneyCHEAT(_arg1:MouseEvent):void{
par.Money = (par.Money + 1000);
reDraw();
}
public function addLevelLand3(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTLAND3[par.levelHW11]){
par.Exp = (par.Exp - par.EXPCOSTLAND3[par.levelHW11]);
par.levelHW11++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function reDraw():void{
var _local1:*;
_local1 = 0;
if (par.player != null){
_local1 = par.player.getPersenHealth();
};
barhp.gotoAndStop(Math.round((50 - (_local1 * 50))));
expind.text = String(par.Exp);
monind.text = String(par.Money);
a1.text = String(par.levelHW1);
a2.text = String(par.levelHW2);
ac2.text = String(par.levelHW3);
a4.text = String(par.levelHW4);
ac3.text = String(par.levelHW5);
ac1.text = String(par.levelHW6);
ac4.text = String(par.levelHW7);
a3.text = String(par.levelHW8);
l1.text = String(par.levelHW9);
l2.text = String(par.levelHW10);
l3.text = String(par.levelHW11);
l4.text = String(par.levelHW12);
w1.text = String(par.levelWeapon1);
w2.text = String(par.levelWeapon2);
w3.text = String(par.levelWeapon3);
w4.text = String(par.levelWeapon4);
hb.text = String(par.levelHealth);
pb.text = String(par.levelPower);
cb.text = String(par.levelReload);
mu.text = String(((par.levelmaxUnit * 5) + 5));
hpa1.text = String(Math.round((((Wingman.MAXHEALTH * par.levelHW1) * par.downLevel) * 100)));
dmga1.text = String(Math.round((((Wingman.WEAPONDAMAGE * par.levelHW1) * par.downLevel) * 100)));
a1.text = String(par.levelHW1);
hpa2.text = String(Math.round((((Wingman2.MAXHEALTH * par.levelHW2) * par.downLevel) * 100)));
dmga2.text = String(Math.round((((Wingman2.WEAPONDAMAGE * par.levelHW2) * par.downLevel) * 100)));
a2.text = String(par.levelHW2);
hpa3.text = String(Math.round((((Wingman8.MAXHEALTH * par.levelHW8) * par.downLevel) * 100)));
dmga3.text = String(Math.round((((Wingman8.WEAPONDAMAGE * par.levelHW8) * par.downLevel) * 100)));
a3.text = String(par.levelHW8);
hpa4.text = String(Math.round((((Wingman4.MAXHEALTH * par.levelHW4) * par.downLevel) * 100)));
dmga4.text = String(Math.round((((Wingman4.WEAPONDAMAGE * par.levelHW4) * par.downLevel) * 100)));
a4.text = String(par.levelHW4);
hpac1.text = String(Math.round((((Wingman6.MAXHEALTH * par.levelHW6) * par.downLevel) * 100)));
dmgac1.text = String(Math.round((((Wingman6.WEAPONDAMAGE * par.levelHW6) * par.downLevel) * 100)));
ac1.text = String(par.levelHW6);
hpac2.text = String(Math.round((((Wingman3.MAXHEALTH * par.levelHW3) * par.downLevel) * 100)));
dmgac2.text = String(Math.round((((Wingman3.WEAPONDAMAGE * par.levelHW3) * par.downLevel) * 100)));
ac2.text = String(par.levelHW3);
hpac3.text = String(Math.round((((Wingman5.MAXHEALTH * par.levelHW5) * par.downLevel) * 100)));
dmgac3.text = String(Math.round((((Wingman5.WEAPONDAMAGE * par.levelHW5) * par.downLevel) * 100)));
ac3.text = String(par.levelHW5);
hpac4.text = String(Math.round(((Wingman7.MAXHEALTH * par.levelHW7) * 100)));
dmgac4.text = String(Math.round(((Wingman7.WEAPONDAMAGE * par.levelHW7) * 100)));
ac4.text = String(par.levelHW7);
hpl1.text = String(Math.round((((WingmanLand.MAXHEALTH * par.levelHW9) * par.downLevel) * 100)));
dmgl1.text = String(Math.round((((WingmanLand.WEAPONDAMAGE * par.levelHW9) * par.downLevel) * 100)));
l1.text = String(par.levelHW9);
hpl2.text = String(Math.round((((WingmanLand2.MAXHEALTH * par.levelHW10) * par.downLevel) * 100)));
dmgl2.text = String(Math.round((((WingmanLand2.WEAPONDAMAGE * par.levelHW10) * par.downLevel) * 100)));
l2.text = String(par.levelHW10);
hpl3.text = String(Math.round((((WingmanLand3.MAXHEALTH * par.levelHW11) * par.downLevel) * 100)));
dmgl3.text = String(Math.round((((WingmanLand3.WEAPONDAMAGE * par.levelHW11) * par.downLevel) * 100)));
l3.text = String(par.levelHW11);
hpl4.text = String(Math.round((((WingmanLand4.MAXHEALTH * par.levelHW12) * par.downLevel) * 100)));
dmgl4.text = String(Math.round((((WingmanLand4.WEAPONDAMAGE * par.levelHW12) * par.downLevel) * 100)));
l4.text = String(par.levelHW12);
w1.text = String(par.levelWeapon1);
w2.text = String(par.levelWeapon2);
w3.text = String(par.levelWeapon3);
w4.text = String(par.levelWeapon4);
hb.text = String(par.levelHealth);
pb.text = String(par.levelPower);
cb.text = String(par.levelReload);
}
public function addLevelLand1(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTLAND1[par.levelHW9]){
par.Exp = (par.Exp - par.EXPCOSTLAND1[par.levelHW9]);
par.levelHW9++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function rollHeal(_arg1:MouseEvent):void{
ketM.nominal.text = String(par.getMoneyHeal());
ketM.visible = true;
ketM.x = 273;
}
public function mouse1(_arg1:MouseEvent):void{
ket.visible = false;
ket.gotoAndStop(1);
ket.x = -100;
}
public function addLevelAir4(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTAIR4[par.levelHW4]){
par.Exp = (par.Exp - par.EXPCOSTAIR4[par.levelHW4]);
par.levelHW4++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function mouse3(_arg1:MouseEvent):void{
ketW.visible = false;
ketW.gotoAndStop(1);
ketW.x = -100;
}
public function mouse5(_arg1:MouseEvent):void{
ketP.visible = false;
ketP.gotoAndStop(1);
ketP.x = -100;
pb.text = String(par.levelPower);
pb.textColor = 0xFFFFFF;
}
public function addLevelAir1(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTAIR1[par.levelHW1]){
par.Exp = (par.Exp - par.EXPCOSTAIR1[par.levelHW1]);
par.levelHW1++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function mouse7(_arg1:MouseEvent):void{
ketU.visible = false;
ketU.gotoAndStop(1);
ketU.x = -100;
}
public function addLevelAir3(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTAIR3[par.levelHW8]){
par.Exp = (par.Exp - par.EXPCOSTAIR3[par.levelHW8]);
par.levelHW8++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function mouse2(_arg1:MouseEvent):void{
ketM.x = -100;
ketM.visible = false;
}
public function mouse6(_arg1:MouseEvent):void{
ketC.visible = false;
ketC.gotoAndStop(1);
ketC.x = -100;
cb.text = String(par.levelReload);
cb.textColor = 0xFFFFFF;
}
public function addLevelAir2(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTAIR2[par.levelHW2]){
par.Exp = (par.Exp - par.EXPCOSTAIR2[par.levelHW2]);
par.levelHW2++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function rollAir1(_arg1:MouseEvent):void{
if (par.levelHW1 < 3){
ket.nominal.text = String(par.EXPCOSTAIR1[par.levelHW1]);
hpa1.text = String(Math.round((((Wingman.MAXHEALTH * (par.levelHW1 + 1)) * par.downLevel) * 100)));
dmga1.text = String(Math.round((((Wingman.WEAPONDAMAGE * (par.levelHW1 + 1)) * par.downLevel) * 100)));
hpa1.textColor = 16691969;
dmga1.textColor = 16691969;
a1.text = String((par.levelHW1 + 1));
a1.textColor = 16691969;
ket.x = 533;
ket.visible = true;
ket.short.text = "Q";
ket.air.visible = true;
ket.land.visible = false;
} else {
ket.visible = true;
ket.x = 533;
ket.gotoAndStop(2);
ket.short.text = "Q";
};
}
public function rollAir2(_arg1:MouseEvent):void{
if (par.levelHW2 < 3){
ket.nominal.text = String(par.EXPCOSTAIR2[par.levelHW2]);
hpa2.text = String(Math.round((((Wingman2.MAXHEALTH * (par.levelHW2 + 1)) * par.downLevel) * 100)));
dmga2.text = String(Math.round((((Wingman2.WEAPONDAMAGE * (par.levelHW2 + 1)) * par.downLevel) * 100)));
hpa2.textColor = 16691969;
dmga2.textColor = 16691969;
a2.text = String((par.levelHW2 + 1));
a2.textColor = 16691969;
ket.x = 533;
ket.visible = true;
ket.short.text = "W";
ket.air.visible = true;
ket.land.visible = false;
} else {
ket.visible = true;
ket.x = 533;
ket.gotoAndStop(2);
ket.short.text = "W";
};
}
public function rollAir3(_arg1:MouseEvent):void{
if (par.levelHW8 < 3){
ket.nominal.text = String(par.EXPCOSTAIR3[par.levelHW8]);
hpa3.text = String(Math.round((((Wingman8.MAXHEALTH * (par.levelHW8 + 1)) * par.downLevel) * 100)));
dmga3.text = String(Math.round((((Wingman8.WEAPONDAMAGE * (par.levelHW8 + 1)) * par.downLevel) * 100)));
hpa3.textColor = 16691969;
dmga3.textColor = 16691969;
a3.text = String((par.levelHW8 + 1));
a3.textColor = 16691969;
ket.x = 533;
ket.visible = true;
ket.short.text = "E";
ket.air.visible = true;
ket.land.visible = false;
} else {
ket.visible = true;
ket.x = 533;
ket.gotoAndStop(2);
ket.short.text = "E";
};
}
public function rollWeapon2(_arg1:MouseEvent):void{
if (par.levelWeapon2 < 3){
ketW.nominal.text = String(par.EXPCOSTWEAPON2[par.levelWeapon2]);
ketW.dmg.text = String(((par.levelWeapon2 * Player.WEAPONDAMAGE) * 300));
ketW.dmgUp.text = String((((par.levelWeapon2 + 1) * Player.WEAPONDAMAGE) * 300));
ketW.x = 323;
ketW.visible = true;
ketW.short.text = "2";
ketW.nama.text = "Electric Shot";
w2.text = String((par.levelWeapon2 + 1));
w2.textColor = 16691969;
} else {
ketW.visible = true;
ketW.x = 323;
ketW.gotoAndStop(2);
ketW.short.text = "2";
};
}
public function rollWeapon4(_arg1:MouseEvent):void{
if (par.levelWeapon4 < 3){
ketW.nominal.text = String(par.EXPCOSTWEAPON4[par.levelWeapon4]);
ketW.dmg.text = String(((par.levelWeapon4 * Player.WEAPONDAMAGE) * 100));
ketW.dmgUp.text = String((((par.levelWeapon4 + 1) * Player.WEAPONDAMAGE) * 100));
ketW.x = 323;
ketW.visible = true;
ketW.short.text = "4";
ketW.nama.text = "Spread Shot";
w4.text = String((par.levelWeapon4 + 1));
w4.textColor = 16691969;
} else {
ketW.visible = true;
ketW.x = 323;
ketW.gotoAndStop(2);
ketW.short.text = "4";
};
}
function frame1(){
ket.visible = false;
ketM.visible = false;
par = this.parent;
logoab2.addEventListener(MouseEvent.CLICK, clickMore2ab2);
reDraw();
btna1.addEventListener(MouseEvent.ROLL_OUT, mouse1);
btna2.addEventListener(MouseEvent.ROLL_OUT, mouse1);
btna3.addEventListener(MouseEvent.ROLL_OUT, mouse1);
btna4.addEventListener(MouseEvent.ROLL_OUT, mouse1);
btnac1.addEventListener(MouseEvent.ROLL_OUT, mouse1);
btnac2.addEventListener(MouseEvent.ROLL_OUT, mouse1);
btnac3.addEventListener(MouseEvent.ROLL_OUT, mouse1);
btnac4.addEventListener(MouseEvent.ROLL_OUT, mouse1);
btnl1.addEventListener(MouseEvent.ROLL_OUT, mouse1);
btnl2.addEventListener(MouseEvent.ROLL_OUT, mouse1);
btnl3.addEventListener(MouseEvent.ROLL_OUT, mouse1);
btnl4.addEventListener(MouseEvent.ROLL_OUT, mouse1);
btnw1.addEventListener(MouseEvent.ROLL_OUT, mouse3);
btnw2.addEventListener(MouseEvent.ROLL_OUT, mouse3);
btnw3.addEventListener(MouseEvent.ROLL_OUT, mouse3);
btnw4.addEventListener(MouseEvent.ROLL_OUT, mouse3);
btnmu.addEventListener(MouseEvent.ROLL_OUT, mouse7);
btna1.addEventListener(MouseEvent.CLICK, addLevelAir1);
btna1.addEventListener(MouseEvent.ROLL_OVER, rollAir1);
btna1.addEventListener(MouseEvent.ROLL_OUT, rollOAir1);
btna2.addEventListener(MouseEvent.CLICK, addLevelAir2);
btna2.addEventListener(MouseEvent.ROLL_OVER, rollAir2);
btna2.addEventListener(MouseEvent.ROLL_OUT, rollOAir2);
btna3.addEventListener(MouseEvent.CLICK, addLevelAir3);
btna3.addEventListener(MouseEvent.ROLL_OVER, rollAir3);
btna3.addEventListener(MouseEvent.ROLL_OUT, rollOAir3);
btna4.addEventListener(MouseEvent.CLICK, addLevelAir4);
btna4.addEventListener(MouseEvent.ROLL_OVER, rollAir4);
btna4.addEventListener(MouseEvent.ROLL_OUT, rollOAir4);
btnac1.addEventListener(MouseEvent.CLICK, addLevelAcro1);
btnac1.addEventListener(MouseEvent.ROLL_OVER, rollAcro1);
btnac1.addEventListener(MouseEvent.ROLL_OUT, rollOAcro1);
btnac2.addEventListener(MouseEvent.CLICK, addLevelAcro2);
btnac2.addEventListener(MouseEvent.ROLL_OVER, rollAcro2);
btnac2.addEventListener(MouseEvent.ROLL_OUT, rollOAcro2);
btnac3.addEventListener(MouseEvent.CLICK, addLevelAcro3);
btnac3.addEventListener(MouseEvent.ROLL_OVER, rollAcro3);
btnac3.addEventListener(MouseEvent.ROLL_OUT, rollOAcro3);
btnac4.addEventListener(MouseEvent.CLICK, addLevelAcro4);
btnac4.addEventListener(MouseEvent.ROLL_OVER, rollAcro4);
btnac4.addEventListener(MouseEvent.ROLL_OUT, rollOAcro4);
btnl1.addEventListener(MouseEvent.CLICK, addLevelLand1);
btnl1.addEventListener(MouseEvent.ROLL_OVER, rollLand1);
btnl1.addEventListener(MouseEvent.ROLL_OUT, rollOLand1);
btnl2.addEventListener(MouseEvent.CLICK, addLevelLand2);
btnl2.addEventListener(MouseEvent.ROLL_OVER, rollLand2);
btnl2.addEventListener(MouseEvent.ROLL_OUT, rollOLand2);
btnl3.addEventListener(MouseEvent.CLICK, addLevelLand3);
btnl3.addEventListener(MouseEvent.ROLL_OVER, rollLand3);
btnl3.addEventListener(MouseEvent.ROLL_OUT, rollOLand3);
btnl4.addEventListener(MouseEvent.CLICK, addLevelLand4);
btnl4.addEventListener(MouseEvent.ROLL_OVER, rollLand4);
btnl4.addEventListener(MouseEvent.ROLL_OUT, rollOLand4);
btnw1.addEventListener(MouseEvent.CLICK, addLevelWeapon1);
btnw1.addEventListener(MouseEvent.ROLL_OVER, rollWeapon1);
btnw1.addEventListener(MouseEvent.ROLL_OUT, rollOWeapon1);
btnw2.addEventListener(MouseEvent.CLICK, addLevelWeapon2);
btnw2.addEventListener(MouseEvent.ROLL_OVER, rollWeapon2);
btnw2.addEventListener(MouseEvent.ROLL_OUT, rollOWeapon2);
btnw3.addEventListener(MouseEvent.CLICK, addLevelWeapon3);
btnw3.addEventListener(MouseEvent.ROLL_OVER, rollWeapon3);
btnw3.addEventListener(MouseEvent.ROLL_OUT, rollOWeapon3);
btnw4.addEventListener(MouseEvent.CLICK, addLevelWeapon4);
btnw4.addEventListener(MouseEvent.ROLL_OVER, rollWeapon4);
btnw4.addEventListener(MouseEvent.ROLL_OUT, rollOWeapon4);
btnh.addEventListener(MouseEvent.CLICK, addLevelHealth);
btnh.addEventListener(MouseEvent.ROLL_OVER, rollHealth);
btnh.addEventListener(MouseEvent.ROLL_OUT, outHealth);
btnp.addEventListener(MouseEvent.CLICK, addLevelPower);
btnp.addEventListener(MouseEvent.ROLL_OVER, rollPower);
btnp.addEventListener(MouseEvent.ROLL_OUT, mouse5);
btnc.addEventListener(MouseEvent.CLICK, addLevelCharge);
btnc.addEventListener(MouseEvent.ROLL_OVER, rollCharge);
btnc.addEventListener(MouseEvent.ROLL_OUT, mouse6);
btnmu.addEventListener(MouseEvent.CLICK, addLevelMU);
btnmu.addEventListener(MouseEvent.ROLL_OVER, rollMax);
btnhh.addEventListener(MouseEvent.CLICK, healHP);
btnhh.addEventListener(MouseEvent.ROLL_OVER, rollHeal);
btnhh.addEventListener(MouseEvent.ROLL_OUT, mouse2);
ba.addEventListener(MouseEvent.CLICK, backGame);
btnReset.addEventListener(MouseEvent.CLICK, resetSkill);
expcheat.addEventListener(MouseEvent.CLICK, expCHEAT);
levelcheat.addEventListener(MouseEvent.CLICK, levelCHEAT);
moneycheat.addEventListener(MouseEvent.CLICK, moneyCHEAT);
}
public function addLevelMU(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTMAXUNIT[par.levelmaxUnit]){
par.Exp = (par.Exp - par.EXPCOSTMAXUNIT[par.levelmaxUnit]);
par.levelmaxUnit++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function rollWeapon1(_arg1:MouseEvent):void{
if (par.levelWeapon1 < 3){
ketW.nominal.text = String(par.EXPCOSTWEAPON1[par.levelWeapon1]);
ketW.dmg.text = String(((par.levelWeapon1 * Player.WEAPONDAMAGE) * 100));
ketW.dmgUp.text = String((((par.levelWeapon1 + 1) * Player.WEAPONDAMAGE) * 100));
ketW.x = 323;
ketW.visible = true;
ketW.short.text = "1";
ketW.nama.text = "Single Shot";
w1.text = String((par.levelWeapon1 + 1));
w1.textColor = 16691969;
} else {
ketW.visible = true;
ketW.x = 323;
ketW.gotoAndStop(2);
ketW.short.text = "1";
};
}
public function rollWeapon3(_arg1:MouseEvent):void{
if (par.levelWeapon3 < 3){
ketW.nominal.text = String(par.EXPCOSTWEAPON3[par.levelWeapon3]);
ketW.dmg.text = String(((par.levelWeapon3 * Player.WEAPONDAMAGE) * 25));
ketW.dmgUp.text = String((((par.levelWeapon3 + 1) * Player.WEAPONDAMAGE) * 25));
ketW.x = 323;
ketW.visible = true;
ketW.short.text = "3";
ketW.nama.text = "Rapid Shot";
w3.text = String((par.levelWeapon3 + 1));
w3.textColor = 16691969;
} else {
ketW.visible = true;
ketW.x = 323;
ketW.gotoAndStop(2);
ketW.short.text = "3";
};
}
public function rollAir4(_arg1:MouseEvent):void{
if (par.levelHW4 < 3){
ket.nominal.text = String(par.EXPCOSTAIR4[par.levelHW4]);
hpa4.text = String(Math.round((((Wingman4.MAXHEALTH * (par.levelHW4 + 1)) * par.downLevel) * 100)));
dmga4.text = String(Math.round((((Wingman4.WEAPONDAMAGE * (par.levelHW4 + 1)) * par.downLevel) * 100)));
hpa4.textColor = 16691969;
dmga4.textColor = 16691969;
a4.text = String((par.levelHW4 + 1));
a4.textColor = 16691969;
ket.x = 533;
ket.visible = true;
ket.short.text = "R";
ket.air.visible = true;
ket.land.visible = false;
} else {
ket.visible = true;
ket.x = 533;
ket.gotoAndStop(2);
ket.short.text = "R";
};
}
public function addLevelAcro1(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTACRO1[par.levelHW6]){
par.Exp = (par.Exp - par.EXPCOSTACRO1[par.levelHW6]);
par.levelHW6++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function resetSkill(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = par.levelHW1;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTAIR1[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelHW2;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTAIR2[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelHW8;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTAIR3[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelHW4;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTAIR4[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelHW6;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTACRO1[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelHW3;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTACRO2[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelHW5;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTACRO3[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelHW7;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTACRO4[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelHW9;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTLAND1[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelHW10;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTLAND2[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelHW11;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTLAND3[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelHW12;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTLAND4[(_local2 - 1)]);
_local2--;
};
par.levelHW1 = 0;
par.levelHW2 = 0;
par.levelHW3 = 0;
par.levelHW4 = 0;
par.levelHW5 = 0;
par.levelHW6 = 0;
par.levelHW7 = 0;
par.levelHW8 = 0;
par.levelHW9 = 0;
par.levelHW10 = 0;
par.levelHW11 = 0;
par.levelHW12 = 0;
_local2 = par.levelWeapon2;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTWEAPON2[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelWeapon3;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTWEAPON3[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelWeapon4;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTWEAPON4[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelWeapon1;
while (_local2 > 1) {
par.Exp = (par.Exp + par.EXPCOSTWEAPON1[(_local2 - 1)]);
_local2--;
};
par.levelWeapon2 = 0;
par.levelWeapon3 = 0;
par.levelWeapon4 = 0;
par.levelWeapon1 = 1;
_local2 = par.levelmaxUnit;
while (_local2 > 0) {
par.Exp = (par.Exp + par.EXPCOSTMAXUNIT[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelPower;
while (_local2 > 1) {
par.Exp = (par.Exp + par.EXPCOSTCHARGEBASE[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelReload;
while (_local2 > 1) {
par.Exp = (par.Exp + par.EXPCOSTSURPLUSBASE[(_local2 - 1)]);
_local2--;
};
_local2 = par.levelHealth;
while (_local2 > 1) {
par.Exp = (par.Exp + par.EXPCOSTHPBASE[(_local2 - 1)]);
_local2--;
};
par.levelmaxUnit = 0;
par.levelPower = 1;
par.levelReload = 1;
par.levelHealth = 1;
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(1));
reDraw();
}
public function rollOAir2(_arg1:MouseEvent):void{
hpa2.text = String(Math.round((((Wingman2.MAXHEALTH * par.levelHW2) * par.downLevel) * 100)));
dmga2.text = String(Math.round((((Wingman2.WEAPONDAMAGE * par.levelHW2) * par.downLevel) * 100)));
hpa2.textColor = 0xFFFFFF;
dmga2.textColor = 0xFFFFFF;
a2.text = String(par.levelHW2);
a2.textColor = 0xFFFFFF;
}
public function rollOAir3(_arg1:MouseEvent):void{
hpa3.text = String(Math.round((((Wingman8.MAXHEALTH * par.levelHW8) * par.downLevel) * 100)));
dmga3.text = String(Math.round((((Wingman8.WEAPONDAMAGE * par.levelHW8) * par.downLevel) * 100)));
hpa3.textColor = 0xFFFFFF;
dmga3.textColor = 0xFFFFFF;
a3.text = String(par.levelHW8);
a3.textColor = 0xFFFFFF;
}
public function addLevelWeapon3(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTWEAPON3[par.levelWeapon3]){
par.Exp = (par.Exp - par.EXPCOSTWEAPON3[par.levelWeapon3]);
par.levelWeapon3++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function addLevelWeapon4(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTWEAPON4[par.levelWeapon4]){
par.Exp = (par.Exp - par.EXPCOSTWEAPON4[par.levelWeapon4]);
par.levelWeapon4++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function rollPower(_arg1:MouseEvent):void{
if (par.levelPower < 3){
ketP.nominal.text = String(par.EXPCOSTCHARGEBASE[par.levelPower]);
ketP.power.text = String((par.levelPower * Player.MAXPOWER));
ketP.powerup.text = String(((par.levelPower + 1) * Player.MAXPOWER));
ketP.turr.visible = false;
if (par.levelPower == 2){
ketP.turr.visible = true;
};
pb.text = String((par.levelPower + 1));
pb.textColor = 16691969;
ketP.x = 323;
ketP.visible = true;
} else {
ketP.visible = true;
ketP.x = 323;
ketP.gotoAndStop(2);
};
}
public function rollOAir1(_arg1:MouseEvent):void{
hpa1.text = String(Math.round((((Wingman.MAXHEALTH * par.levelHW1) * par.downLevel) * 100)));
dmga1.text = String(Math.round((((Wingman.WEAPONDAMAGE * par.levelHW1) * par.downLevel) * 100)));
hpa1.textColor = 0xFFFFFF;
dmga1.textColor = 0xFFFFFF;
a1.text = String(par.levelHW1);
a1.textColor = 0xFFFFFF;
}
public function rollOAir4(_arg1:MouseEvent):void{
hpa4.text = String(Math.round((((Wingman4.MAXHEALTH * par.levelHW4) * par.downLevel) * 100)));
dmga4.text = String(Math.round((((Wingman4.WEAPONDAMAGE * par.levelHW4) * par.downLevel) * 100)));
hpa4.textColor = 0xFFFFFF;
dmga4.textColor = 0xFFFFFF;
a4.text = String(par.levelHW4);
a4.textColor = 0xFFFFFF;
}
public function addLevelWeapon2(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTWEAPON2[par.levelWeapon2]){
par.Exp = (par.Exp - par.EXPCOSTWEAPON2[par.levelWeapon2]);
par.levelWeapon2++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function addLevelAcro3(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTACRO3[par.levelHW5]){
par.Exp = (par.Exp - par.EXPCOSTACRO3[par.levelHW5]);
par.levelHW5++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function expCHEAT(_arg1:MouseEvent):void{
par.Exp = (par.Exp + 100);
reDraw();
}
public function addLevelAcro4(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTACRO4[par.levelHW7]){
par.Exp = (par.Exp - par.EXPCOSTACRO4[par.levelHW7]);
par.levelHW7++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function healHP(_arg1:MouseEvent):void{
if (par.payToFullHealth()){
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function addLevelWeapon1(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTWEAPON1[par.levelWeapon1]){
par.Exp = (par.Exp - par.EXPCOSTWEAPON1[par.levelWeapon1]);
par.levelWeapon1++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function addLevelAcro2(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTACRO2[par.levelHW3]){
par.Exp = (par.Exp - par.EXPCOSTACRO2[par.levelHW3]);
par.levelHW3++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function rollLand2(_arg1:MouseEvent):void{
if (par.levelHW10 < 3){
ket.nominal.text = String(par.EXPCOSTLAND2[par.levelHW10]);
hpl2.text = String(Math.round((((WingmanLand2.MAXHEALTH * (par.levelHW10 + 1)) * par.downLevel) * 100)));
dmgl2.text = String(Math.round((((WingmanLand2.WEAPONDAMAGE * (par.levelHW10 + 1)) * par.downLevel) * 100)));
hpl2.textColor = 16691969;
dmgl2.textColor = 16691969;
l2.text = String((par.levelHW10 + 1));
l2.textColor = 16691969;
ket.x = 533;
ket.visible = true;
ket.short.text = "6";
ket.land.visible = true;
ket.air.visible = false;
} else {
ket.visible = true;
ket.x = 533;
ket.gotoAndStop(2);
ket.short.text = "6";
};
}
public function rollLand4(_arg1:MouseEvent):void{
if (par.levelHW12 < 3){
ket.nominal.text = String(par.EXPCOSTLAND4[par.levelHW12]);
hpl4.text = String(Math.round((((WingmanLand4.MAXHEALTH * (par.levelHW12 + 1)) * par.downLevel) * 100)));
dmgl4.text = String(Math.round((((WingmanLand4.WEAPONDAMAGE * (par.levelHW12 + 1)) * par.downLevel) * 100)));
hpl4.textColor = 16691969;
dmgl4.textColor = 16691969;
l4.text = String((par.levelHW12 + 1));
l4.textColor = 16691969;
ket.x = 533;
ket.visible = true;
ket.short.text = "8";
ket.land.visible = true;
ket.air.visible = false;
} else {
ket.visible = true;
ket.x = 533;
ket.gotoAndStop(2);
ket.short.text = "8";
};
}
public function rollLand3(_arg1:MouseEvent):void{
if (par.levelHW11 < 3){
ket.nominal.text = String(par.EXPCOSTLAND3[par.levelHW11]);
hpl3.text = String(Math.round((((WingmanLand3.MAXHEALTH * (par.levelHW11 + 1)) * par.downLevel) * 100)));
dmgl3.text = String(Math.round((((WingmanLand3.WEAPONDAMAGE * (par.levelHW11 + 1)) * par.downLevel) * 100)));
hpl3.textColor = 16691969;
dmgl3.textColor = 16691969;
l3.text = String((par.levelHW11 + 1));
l3.textColor = 16691969;
ket.x = 533;
ket.visible = true;
ket.short.text = "7";
ket.land.visible = true;
ket.air.visible = false;
} else {
ket.visible = true;
ket.x = 533;
ket.gotoAndStop(2);
ket.short.text = "7";
};
}
public function rollHealth(_arg1:MouseEvent):void{
if (par.levelHealth < 3){
ketH.nominal.text = String(par.EXPCOSTHPBASE[par.levelHealth]);
ketH.armor.text = String((par.levelHealth * Player.MAXHEALTH));
ketH.armorup.text = String(((par.levelHealth + 1) * Player.MAXHEALTH));
hb.text = String((par.levelHealth + 1));
hb.textColor = 16691969;
ketH.x = 323;
ketH.visible = true;
} else {
ketH.visible = true;
ketH.x = 323;
ketH.gotoAndStop(2);
};
}
public function clickMore2ab2(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2, "_blank");
}
public function rollOLand1(_arg1:MouseEvent):void{
hpl1.text = String(Math.round((((WingmanLand.MAXHEALTH * par.levelHW9) * par.downLevel) * 100)));
dmgl1.text = String(Math.round((((WingmanLand.WEAPONDAMAGE * par.levelHW9) * par.downLevel) * 100)));
hpl1.textColor = 0xFFFFFF;
dmgl1.textColor = 0xFFFFFF;
l1.text = String(par.levelHW9);
l1.textColor = 0xFFFFFF;
}
public function rollLand1(_arg1:MouseEvent):void{
if (par.levelHW9 < 3){
ket.nominal.text = String(par.EXPCOSTLAND1[par.levelHW9]);
hpl1.text = String(Math.round((((WingmanLand.MAXHEALTH * (par.levelHW9 + 1)) * par.downLevel) * 100)));
dmgl1.text = String(Math.round((((WingmanLand.WEAPONDAMAGE * (par.levelHW9 + 1)) * par.downLevel) * 100)));
hpl1.textColor = 16691969;
dmgl1.textColor = 16691969;
l1.text = String((par.levelHW9 + 1));
l1.textColor = 16691969;
ket.x = 533;
ket.visible = true;
ket.short.text = "5";
ket.land.visible = true;
ket.air.visible = false;
} else {
ket.visible = true;
ket.x = 533;
ket.gotoAndStop(2);
ket.short.text = "5";
};
}
public function outHealth(_arg1:MouseEvent):void{
ketH.visible = false;
ketH.gotoAndStop(1);
ketH.x = -100;
hb.text = String(par.levelHealth);
hb.textColor = 0xFFFFFF;
}
public function rollOLand2(_arg1:MouseEvent):void{
hpl2.text = String(Math.round((((WingmanLand2.MAXHEALTH * par.levelHW10) * par.downLevel) * 100)));
dmgl2.text = String(Math.round((((WingmanLand2.WEAPONDAMAGE * par.levelHW10) * par.downLevel) * 100)));
hpl2.textColor = 0xFFFFFF;
dmgl2.textColor = 0xFFFFFF;
l2.text = String(par.levelHW10);
l2.textColor = 0xFFFFFF;
}
public function rollOLand3(_arg1:MouseEvent):void{
hpl3.text = String(Math.round((((WingmanLand3.MAXHEALTH * par.levelHW11) * par.downLevel) * 100)));
dmgl3.text = String(Math.round((((WingmanLand3.WEAPONDAMAGE * par.levelHW11) * par.downLevel) * 100)));
hpl3.textColor = 0xFFFFFF;
dmgl3.textColor = 0xFFFFFF;
l3.text = String(par.levelHW11);
l3.textColor = 0xFFFFFF;
}
public function addLevelPower(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTCHARGEBASE[par.levelPower]){
par.Exp = (par.Exp - par.EXPCOSTCHARGEBASE[par.levelPower]);
par.levelPower++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function rollOLand4(_arg1:MouseEvent):void{
hpl4.text = String(Math.round((((WingmanLand4.MAXHEALTH * par.levelHW12) * par.downLevel) * 100)));
dmgl4.text = String(Math.round((((WingmanLand4.WEAPONDAMAGE * par.levelHW12) * par.downLevel) * 100)));
hpl4.textColor = 0xFFFFFF;
dmgl4.textColor = 0xFFFFFF;
l4.text = String(par.levelHW12);
l4.textColor = 0xFFFFFF;
}
public function rollCharge(_arg1:MouseEvent):void{
if (par.levelReload < 3){
ketC.nominal.text = String(par.EXPCOSTSURPLUSBASE[par.levelReload]);
ketC.charge.text = String(((par.levelReload * 5) + 5));
ketC.chargeup.text = String((((par.levelReload + 1) * 5) + 5));
cb.text = String((par.levelReload + 1));
cb.textColor = 16691969;
ketC.x = 323;
ketC.visible = true;
} else {
ketC.visible = true;
ketC.x = 323;
ketC.gotoAndStop(2);
};
}
public function addLevelHealth(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTHPBASE[par.levelHealth]){
par.Exp = (par.Exp - par.EXPCOSTHPBASE[par.levelHealth]);
par.levelHealth++;
par.player.setLevelH(par.levelHealth);
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function backGame(_arg1:MouseEvent):void{
if (par.levelKe > 19){
par.bossTime = true;
};
if (par.bossTime == false){
par.goToGate(2);
} else {
par.goToGate(4);
};
par.saveGame();
}
public function rollMax(_arg1:MouseEvent):void{
if (par.levelmaxUnit < 3){
ketU.nominal.text = String(par.EXPCOSTMAXUNIT[par.levelmaxUnit]);
ketU.unit.text = String(((par.levelmaxUnit * 5) + 5));
ketU.unitup.text = String((((par.levelmaxUnit + 1) * 5) + 5));
ketU.x = 323;
ketU.visible = true;
} else {
ketU.visible = true;
ketU.x = 323;
ketU.gotoAndStop(2);
};
}
public function levelCHEAT(_arg1:MouseEvent):void{
par.levelKe++;
}
public function rollAcro1(_arg1:MouseEvent):void{
if (par.levelHW6 < 3){
ket.nominal.text = String(par.EXPCOSTACRO1[par.levelHW6]);
hpac1.text = String(Math.round((((Wingman6.MAXHEALTH * (par.levelHW6 + 1)) * par.downLevel) * 100)));
dmgac1.text = String(Math.round((((Wingman6.WEAPONDAMAGE * (par.levelHW6 + 1)) * par.downLevel) * 100)));
hpac1.textColor = 16691969;
dmgac1.textColor = 16691969;
ac1.text = String((par.levelHW6 + 1));
ac1.textColor = 16691969;
ket.x = 533;
ket.visible = true;
ket.short.text = "T";
ket.air.visible = true;
ket.land.visible = false;
} else {
ket.visible = true;
ket.x = 533;
ket.gotoAndStop(2);
ket.short.text = "T";
};
}
public function rollAcro2(_arg1:MouseEvent):void{
if (par.levelHW3 < 3){
ket.nominal.text = String(par.EXPCOSTACRO2[par.levelHW3]);
hpac2.text = String(Math.round((((Wingman3.MAXHEALTH * (par.levelHW3 + 1)) * par.downLevel) * 100)));
dmgac2.text = String(Math.round((((Wingman3.WEAPONDAMAGE * (par.levelHW3 + 1)) * par.downLevel) * 100)));
hpac2.textColor = 16691969;
dmgac2.textColor = 16691969;
ac2.text = String((par.levelHW3 + 1));
ac2.textColor = 16691969;
ket.x = 533;
ket.visible = true;
ket.short.text = "Y";
ket.air.visible = true;
ket.land.visible = false;
} else {
ket.visible = true;
ket.x = 533;
ket.gotoAndStop(2);
ket.short.text = "Y";
};
}
public function rollAcro3(_arg1:MouseEvent):void{
if (par.levelHW5 < 3){
ket.nominal.text = String(par.EXPCOSTACRO3[par.levelHW5]);
hpac3.text = String(Math.round((((Wingman5.MAXHEALTH * (par.levelHW5 + 1)) * par.downLevel) * 100)));
dmgac3.text = String(Math.round((((Wingman5.WEAPONDAMAGE * (par.levelHW5 + 1)) * par.downLevel) * 100)));
hpac3.textColor = 16691969;
dmgac3.textColor = 16691969;
ac3.text = String((par.levelHW5 + 1));
ac3.textColor = 16691969;
ket.x = 533;
ket.visible = true;
ket.short.text = "U";
ket.air.visible = true;
ket.land.visible = false;
} else {
ket.visible = true;
ket.x = 533;
ket.gotoAndStop(2);
ket.short.text = "U";
};
}
public function rollOWeapon1(_arg1:MouseEvent):void{
w1.text = String(par.levelWeapon1);
w1.textColor = 0xFFFFFF;
}
public function rollOWeapon3(_arg1:MouseEvent):void{
w3.text = String(par.levelWeapon3);
w3.textColor = 0xFFFFFF;
}
public function rollOWeapon4(_arg1:MouseEvent):void{
w4.text = String(par.levelWeapon4);
w4.textColor = 0xFFFFFF;
}
public function rollAcro4(_arg1:MouseEvent):void{
if (par.levelHW7 < 3){
ket.nominal.text = String(par.EXPCOSTACRO4[par.levelHW7]);
hpac4.text = String(Math.round(((Wingman7.MAXHEALTH * (par.levelHW7 + 1)) * 100)));
dmgac4.text = String(Math.round(((Wingman7.WEAPONDAMAGE * (par.levelHW7 + 1)) * 100)));
hpac4.textColor = 16691969;
dmgac4.textColor = 16691969;
ac4.text = String((par.levelHW7 + 1));
ac4.textColor = 16691969;
ket.x = 533;
ket.visible = true;
ket.short.text = "I";
ket.air.visible = true;
ket.land.visible = false;
} else {
ket.visible = true;
ket.x = 533;
ket.gotoAndStop(2);
ket.short.text = "I";
};
}
public function rollOWeapon2(_arg1:MouseEvent):void{
w2.text = String(par.levelWeapon2);
w2.textColor = 0xFFFFFF;
}
public function rollOAcro2(_arg1:MouseEvent):void{
hpac2.text = String(Math.round((((Wingman3.MAXHEALTH * par.levelHW3) * par.downLevel) * 100)));
dmgac2.text = String(Math.round((((Wingman3.WEAPONDAMAGE * par.levelHW3) * par.downLevel) * 100)));
hpac2.textColor = 0xFFFFFF;
dmgac2.textColor = 0xFFFFFF;
ac2.text = String(par.levelHW3);
ac2.textColor = 0xFFFFFF;
}
public function rollOAcro4(_arg1:MouseEvent):void{
hpac4.text = String(Math.round(((Wingman7.MAXHEALTH * par.levelHW7) * 100)));
dmgac4.text = String(Math.round(((Wingman7.WEAPONDAMAGE * par.levelHW7) * 100)));
hpac4.textColor = 0xFFFFFF;
dmgac4.textColor = 0xFFFFFF;
ac4.text = String(par.levelHW7);
ac4.textColor = 0xFFFFFF;
}
public function rollOAcro1(_arg1:MouseEvent):void{
hpac1.text = String(Math.round((((Wingman6.MAXHEALTH * par.levelHW6) * par.downLevel) * 100)));
dmgac1.text = String(Math.round((((Wingman6.WEAPONDAMAGE * par.levelHW6) * par.downLevel) * 100)));
hpac1.textColor = 0xFFFFFF;
dmgac1.textColor = 0xFFFFFF;
ac1.text = String(par.levelHW6);
ac1.textColor = 0xFFFFFF;
}
public function rollOAcro3(_arg1:MouseEvent):void{
hpac3.text = String(Math.round((((Wingman5.MAXHEALTH * par.levelHW5) * par.downLevel) * 100)));
dmgac3.text = String(Math.round((((Wingman5.WEAPONDAMAGE * par.levelHW5) * par.downLevel) * 100)));
hpac3.textColor = 0xFFFFFF;
dmgac3.textColor = 0xFFFFFF;
ac3.text = String(par.levelHW5);
ac3.textColor = 0xFFFFFF;
}
public function addLevelCharge(_arg1:MouseEvent):void{
if (par.Exp >= par.EXPCOSTSURPLUSBASE[par.levelReload]){
par.Exp = (par.Exp - par.EXPCOSTSURPLUSBASE[par.levelReload]);
par.levelReload++;
reDraw();
efekSound = new ButtonOkS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
} else {
efekSound = new ButtonNoS();
efekSound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package EarthOnslaught3_fla
Section 63
//Pause_291 (EarthOnslaught3_fla.Pause_291)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Pause_291 extends MovieClip {
public var btnback:SimpleButton;
public var par;
public var btnmore:SimpleButton;
public function Pause_291(){
addFrameScript(0, frame1, 5, frame6, 9, frame10);
}
function frame10(){
if (par.parent.efekSound != 0){
par.parent.soundChannelMain.soundTransform = new SoundTransform(par.parent.efekSound);
};
par.parent.xHair.gotoAndStop(2);
}
public function btnBack(_arg1:MouseEvent):void{
if (par.main.bossTime == false){
par.main.deinitializeGame();
} else {
par.main.deinitializeGameBoss();
};
par.parent.gotoAndStop("main");
}
function frame1(){
stop();
}
function frame6(){
par = this.parent;
btnback.addEventListener(MouseEvent.CLICK, btnBack);
btnmore.addEventListener(MouseEvent.CLICK, btnMore);
if (par.parent.efekSound == 1){
par.parent.soundChannelMain.soundTransform = new SoundTransform(0.3);
};
par.parent.xHair.gotoAndStop(1);
par.parent.xHair.visible = true;
stop();
}
public function btnMore(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
}
}//package EarthOnslaught3_fla
Section 64
//peawatlakon8_69 (EarthOnslaught3_fla.peawatlakon8_69)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class peawatlakon8_69 extends MovieClip {
public function peawatlakon8_69(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 65
//peawatlakon8down_70 (EarthOnslaught3_fla.peawatlakon8down_70)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class peawatlakon8down_70 extends MovieClip {
public function peawatlakon8down_70(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 66
//peawatlakon8up_71 (EarthOnslaught3_fla.peawatlakon8up_71)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class peawatlakon8up_71 extends MovieClip {
public function peawatlakon8up_71(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 67
//pesawat5rotate_74 (EarthOnslaught3_fla.pesawat5rotate_74)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class pesawat5rotate_74 extends MovieClip {
public var par;
public function pesawat5rotate_74(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
par = this.parent;
par.flip();
}
}
}//package EarthOnslaught3_fla
Section 68
//pesawatlakon1_80 (EarthOnslaught3_fla.pesawatlakon1_80)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakon1_80 extends MovieClip {
public function pesawatlakon1_80(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 69
//pesawatlakon1rotate_81 (EarthOnslaught3_fla.pesawatlakon1rotate_81)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class pesawatlakon1rotate_81 extends MovieClip {
public var par;
public function pesawatlakon1rotate_81(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
par = this.parent;
par.flip();
}
}
}//package EarthOnslaught3_fla
Section 70
//pesawatlakon2_114 (EarthOnslaught3_fla.pesawatlakon2_114)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakon2_114 extends MovieClip {
public function pesawatlakon2_114(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 71
//pesawatlakon2_76 (EarthOnslaught3_fla.pesawatlakon2_76)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakon2_76 extends MovieClip {
public function pesawatlakon2_76(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 72
//pesawatlakon2down_115 (EarthOnslaught3_fla.pesawatlakon2down_115)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakon2down_115 extends MovieClip {
public function pesawatlakon2down_115(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 73
//pesawatlakon2down_77 (EarthOnslaught3_fla.pesawatlakon2down_77)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakon2down_77 extends MovieClip {
public function pesawatlakon2down_77(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 74
//pesawatlakon2up_116 (EarthOnslaught3_fla.pesawatlakon2up_116)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakon2up_116 extends MovieClip {
public function pesawatlakon2up_116(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 75
//pesawatlakon2up_78 (EarthOnslaught3_fla.pesawatlakon2up_78)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakon2up_78 extends MovieClip {
public function pesawatlakon2up_78(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 76
//pesawatlakon7_65 (EarthOnslaught3_fla.pesawatlakon7_65)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakon7_65 extends MovieClip {
public function pesawatlakon7_65(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 77
//pesawatlakon7down_66 (EarthOnslaught3_fla.pesawatlakon7down_66)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakon7down_66 extends MovieClip {
public function pesawatlakon7down_66(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 78
//pesawatlakon7up_67 (EarthOnslaught3_fla.pesawatlakon7up_67)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakon7up_67 extends MovieClip {
public function pesawatlakon7up_67(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 79
//pesawatlakon9down_90 (EarthOnslaught3_fla.pesawatlakon9down_90)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakon9down_90 extends MovieClip {
public function pesawatlakon9down_90(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 80
//pesawatlakon9up_91 (EarthOnslaught3_fla.pesawatlakon9up_91)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakon9up_91 extends MovieClip {
public function pesawatlakon9up_91(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 81
//pesawatlakonbesar10_86 (EarthOnslaught3_fla.pesawatlakonbesar10_86)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatlakonbesar10_86 extends MovieClip {
public function pesawatlakonbesar10_86(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 82
//pesawatlakonbesar10rotate_87 (EarthOnslaught3_fla.pesawatlakonbesar10rotate_87)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class pesawatlakonbesar10rotate_87 extends MovieClip {
public var par;
public function pesawatlakonbesar10rotate_87(){
addFrameScript(15, frame16);
}
function frame16(){
stop();
par = this.parent;
par.flip();
}
}
}//package EarthOnslaught3_fla
Section 83
//pesawatmusuh1_32 (EarthOnslaught3_fla.pesawatmusuh1_32)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh1_32 extends MovieClip {
public function pesawatmusuh1_32(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 84
//pesawatmusuh3_36 (EarthOnslaught3_fla.pesawatmusuh3_36)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh3_36 extends MovieClip {
public function pesawatmusuh3_36(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 85
//pesawatmusuh3down_37 (EarthOnslaught3_fla.pesawatmusuh3down_37)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh3down_37 extends MovieClip {
public function pesawatmusuh3down_37(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 86
//pesawatmusuh3up_38 (EarthOnslaught3_fla.pesawatmusuh3up_38)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh3up_38 extends MovieClip {
public function pesawatmusuh3up_38(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 87
//pesawatmusuh4_26 (EarthOnslaught3_fla.pesawatmusuh4_26)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh4_26 extends MovieClip {
public function pesawatmusuh4_26(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 88
//pesawatmusuh4down_27 (EarthOnslaught3_fla.pesawatmusuh4down_27)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh4down_27 extends MovieClip {
public function pesawatmusuh4down_27(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 89
//pesawatmusuh4up_28 (EarthOnslaught3_fla.pesawatmusuh4up_28)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh4up_28 extends MovieClip {
public function pesawatmusuh4up_28(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 90
//pesawatmusuh5_20 (EarthOnslaught3_fla.pesawatmusuh5_20)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh5_20 extends MovieClip {
public function pesawatmusuh5_20(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 91
//pesawatmusuh5down_21 (EarthOnslaught3_fla.pesawatmusuh5down_21)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh5down_21 extends MovieClip {
public function pesawatmusuh5down_21(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 92
//pesawatmusuh5up_22 (EarthOnslaught3_fla.pesawatmusuh5up_22)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh5up_22 extends MovieClip {
public function pesawatmusuh5up_22(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 93
//pesawatmusuh6down_41 (EarthOnslaught3_fla.pesawatmusuh6down_41)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh6down_41 extends MovieClip {
public function pesawatmusuh6down_41(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 94
//pesawatmusuh6up_42 (EarthOnslaught3_fla.pesawatmusuh6up_42)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh6up_42 extends MovieClip {
public function pesawatmusuh6up_42(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 95
//pesawatmusuh7_24 (EarthOnslaught3_fla.pesawatmusuh7_24)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh7_24 extends MovieClip {
public function pesawatmusuh7_24(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 96
//pesawatmusuh8_30 (EarthOnslaught3_fla.pesawatmusuh8_30)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class pesawatmusuh8_30 extends MovieClip {
public function pesawatmusuh8_30(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 97
//PicUnit_265 (EarthOnslaught3_fla.PicUnit_265)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class PicUnit_265 extends MovieClip {
public var leg:MovieClip;
public var tipe:Number;
public var arm:MovieClip;
public var bd:MovieClip;
public var pic:MovieClip;
public var body:MovieClip;
public function PicUnit_265(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
pic.gotoAndStop(tipe);
}
}
}//package EarthOnslaught3_fla
Section 98
//PicWeapon_266 (EarthOnslaught3_fla.PicWeapon_266)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class PicWeapon_266 extends MovieClip {
public function PicWeapon_266(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 99
//potonganlangitdepan_183 (EarthOnslaught3_fla.potonganlangitdepan_183)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class potonganlangitdepan_183 extends MovieClip {
public function potonganlangitdepan_183(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 100
//ringboom_146 (EarthOnslaught3_fla.ringboom_146)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class ringboom_146 extends MovieClip {
public var par;
public function ringboom_146(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 4, frame5, 5, frame6, 7, frame8, 8, frame9, 10, frame11, 11, frame12, 14, frame15);
}
function frame12(){
par.x = (par.x - 4);
par.y = (par.y + 4);
}
function frame3(){
par.x = (par.x - 4);
par.y = (par.y - 4);
}
function frame6(){
par.x = (par.x + 4);
par.y = (par.y - 4);
}
function frame1(){
par = this.parent;
}
function frame5(){
par.x = (par.x - 4);
par.y = (par.y + 4);
}
function frame8(){
par.x = (par.x - 4);
par.y = (par.y - 4);
}
function frame9(){
par.x = (par.x + 4);
par.y = (par.y + 4);
}
function frame2(){
par.x = (par.x + 4);
par.y = (par.y + 4);
}
function frame15(){
stop();
}
function frame11(){
par.x = (par.x + 4);
par.y = (par.y - 4);
}
}
}//package EarthOnslaught3_fla
Section 101
//ringboom2_8 (EarthOnslaught3_fla.ringboom2_8)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class ringboom2_8 extends MovieClip {
public function ringboom2_8(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 102
//SoundPre_63 (EarthOnslaught3_fla.SoundPre_63)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class SoundPre_63 extends MovieClip {
public function SoundPre_63(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 103
//SpeakerMC_271 (EarthOnslaught3_fla.SpeakerMC_271)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class SpeakerMC_271 extends MovieClip {
public function SpeakerMC_271(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 104
//Splash1_140 (EarthOnslaught3_fla.Splash1_140)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Splash1_140 extends MovieClip {
public var par;
public var logo:SimpleButton;
public function Splash1_140(){
addFrameScript(99, frame100);
}
function frame100(){
stop();
par = this.parent;
par.nextFrame();
}
}
}//package EarthOnslaught3_fla
Section 105
//tangantentara_96 (EarthOnslaught3_fla.tangantentara_96)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class tangantentara_96 extends MovieClip {
public function tangantentara_96(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 106
//tembakmb1_100 (EarthOnslaught3_fla.tembakmb1_100)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class tembakmb1_100 extends MovieClip {
public function tembakmb1_100(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 107
//tembakmb2_105 (EarthOnslaught3_fla.tembakmb2_105)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class tembakmb2_105 extends MovieClip {
public function tembakmb2_105(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 108
//tembakmb3_110 (EarthOnslaught3_fla.tembakmb3_110)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class tembakmb3_110 extends MovieClip {
public function tembakmb3_110(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 109
//TentaraTembak_94 (EarthOnslaught3_fla.TentaraTembak_94)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class TentaraTembak_94 extends MovieClip {
public var arm:MovieClip;
public var bd:MovieClip;
}
}//package EarthOnslaught3_fla
Section 110
//TextBoss_233 (EarthOnslaught3_fla.TextBoss_233)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class TextBoss_233 extends MovieClip {
public var par;
public function TextBoss_233(){
addFrameScript(82, frame83);
}
function frame83(){
stop();
par = this.parent;
par.initializeGameBoss();
}
}
}//package EarthOnslaught3_fla
Section 111
//Tips_294 (EarthOnslaught3_fla.Tips_294)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class Tips_294 extends MovieClip {
public function Tips_294(){
addFrameScript(0, frame1, 0xFF, frame256);
}
function frame1(){
stop();
}
function frame256(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 112
//Train_263 (EarthOnslaught3_fla.Train_263)
package EarthOnslaught3_fla {
import flash.display.*;
public dynamic class Train_263 extends MovieClip {
public var pico:MovieClip;
public var filo:MovieClip;
}
}//package EarthOnslaught3_fla
Section 113
//Tutorial_274 (EarthOnslaught3_fla.Tutorial_274)
package EarthOnslaught3_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Tutorial_274 extends MovieClip {
public var par;
public function Tutorial_274(){
addFrameScript(0, frame1, 1, frame2, 17, frame18);
}
public function releaseMouseA(_arg1:Event):void{
nextFrame();
}
function frame18(){
stop();
par = this.parent;
stage.removeEventListener(MouseEvent.MOUSE_UP, releaseMouseA);
par.main.goToGate(3);
}
function frame1(){
stop();
}
function frame2(){
stage.addEventListener(MouseEvent.MOUSE_UP, releaseMouseA);
}
}
}//package EarthOnslaught3_fla
Section 114
//UpgradeKeterangan_225 (EarthOnslaught3_fla.UpgradeKeterangan_225)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UpgradeKeterangan_225 extends MovieClip {
public var nominal:TextField;
public var land:TextField;
public var air:TextField;
public var short:TextField;
public function UpgradeKeterangan_225(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 115
//UpgradeKeteranganCharge_230 (EarthOnslaught3_fla.UpgradeKeteranganCharge_230)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UpgradeKeteranganCharge_230 extends MovieClip {
public var nominal:TextField;
public var chargeup:TextField;
public var charge:TextField;
public function UpgradeKeteranganCharge_230(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 116
//UpgradeKeteranganDarah_223 (EarthOnslaught3_fla.UpgradeKeteranganDarah_223)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UpgradeKeteranganDarah_223 extends MovieClip {
public var nominal:TextField;
}
}//package EarthOnslaught3_fla
Section 117
//UpgradeKeteranganHealth_228 (EarthOnslaught3_fla.UpgradeKeteranganHealth_228)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UpgradeKeteranganHealth_228 extends MovieClip {
public var nominal:TextField;
public var armorup:TextField;
public var armor:TextField;
public function UpgradeKeteranganHealth_228(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 118
//UpgradeKeteranganPower_229 (EarthOnslaught3_fla.UpgradeKeteranganPower_229)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UpgradeKeteranganPower_229 extends MovieClip {
public var power:TextField;
public var nominal:TextField;
public var turr:TextField;
public var powerup:TextField;
public function UpgradeKeteranganPower_229(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 119
//UpgradeKeteranganUnit_231 (EarthOnslaught3_fla.UpgradeKeteranganUnit_231)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UpgradeKeteranganUnit_231 extends MovieClip {
public var nominal:TextField;
public var unitup:TextField;
public var unit:TextField;
public function UpgradeKeteranganUnit_231(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 120
//UpgradeKeteranganWeapon_227 (EarthOnslaught3_fla.UpgradeKeteranganWeapon_227)
package EarthOnslaught3_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UpgradeKeteranganWeapon_227 extends MovieClip {
public var dmg:TextField;
public var nominal:TextField;
public var dmgUp:TextField;
public var short:TextField;
public var nama:TextField;
public function UpgradeKeteranganWeapon_227(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package EarthOnslaught3_fla
Section 121
//Arrow (Arrow)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Arrow extends MovieClip {
public var par;
public var Target;
public function Arrow(){
addFrameScript(0, frame1);
}
function frame1(){
par = this.parent;
addEventListener(Event.ENTER_FRAME, Folow);
}
public function Folow(_arg1:Event):void{
var _local2:*;
if (Target != null){
if (Target.health > 0){
if (!Target.hitTestObject(par.mainf)){
visible = true;
_local2 = new Point(Target.x, Target.y);
_local2 = Target.parent.localToGlobal(_local2);
if (_local2.x > 640){
scaleX = -1;
x = 640;
y = Target.y;
} else {
if (_local2.x < 0){
scaleX = 1;
x = 0;
y = Target.y;
} else {
if (y < _local2.y){
x = Target.x;
y = 0;
} else {
if (y > _local2.y){
x = Target.x;
y = 480;
};
};
};
};
} else {
visible = false;
};
} else {
removeEventListener(Event.ENTER_FRAME, Folow);
par.removeChild(this);
};
};
}
}
}//package
Section 122
//ArrowW (ArrowW)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class ArrowW extends MovieClip {
public var par;
public var Target;
public function ArrowW(){
addFrameScript(0, frame1);
}
function frame1(){
par = this.parent;
addEventListener(Event.ENTER_FRAME, Folow);
}
public function Folow(_arg1:Event):void{
var _local2:*;
if (Target != null){
if (Target.health > 0){
if (!Target.hitTestObject(par.mainf)){
visible = true;
_local2 = new Point(Target.x, Target.y);
_local2 = Target.parent.localToGlobal(_local2);
if (_local2.x > 640){
scaleX = -1;
x = 640;
y = Target.y;
} else {
if (_local2.x < 0){
scaleX = 1;
x = 0;
y = Target.y;
} else {
if (y < _local2.y){
x = Target.x;
y = 0;
} else {
if (y > _local2.y){
x = Target.x;
y = 480;
};
};
};
};
} else {
visible = false;
};
} else {
removeEventListener(Event.ENTER_FRAME, Folow);
par.removeChild(this);
};
};
}
}
}//package
Section 123
//Asap (Asap)
package {
import flash.display.*;
public dynamic class Asap extends MovieClip {
}
}//package
Section 124
//BarHp (BarHp)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class BarHp extends MovieClip {
public var hp:MovieClip;
public var par;
public var Target;
public function BarHp(){
addFrameScript(0, frame1);
}
function frame1(){
par = this.parent;
addEventListener(Event.ENTER_FRAME, Folow);
}
public function Folow(_arg1:Event):void{
if (Target != null){
if (Target.health > 0){
x = Target.x;
y = Target.y;
hp.width = ((Target.health / (Target.getMaxHealth() * Target.LevelH)) * 30);
} else {
removeEventListener(Event.ENTER_FRAME, Folow);
par.removeChild(this);
};
};
}
}
}//package
Section 125
//BarHpE (BarHpE)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class BarHpE extends MovieClip {
public var hp:MovieClip;
public var par;
public var Target;
public function BarHpE(){
addFrameScript(0, frame1);
}
function frame1(){
par = this.parent;
addEventListener(Event.ENTER_FRAME, Folow);
}
public function Folow(_arg1:Event):void{
if (Target != null){
if (Target.health > 0){
x = Target.x;
y = Target.y;
hp.width = ((Target.health / (Target.MAXHEALTH * Target.LevelH)) * 30);
} else {
removeEventListener(Event.ENTER_FRAME, Folow);
par.removeChild(this);
};
};
}
}
}//package
Section 126
//BasehitS (BasehitS)
package {
import flash.media.*;
public dynamic class BasehitS extends Sound {
}
}//package
Section 127
//Blast1 (Blast1)
package {
import flash.display.*;
public dynamic class Blast1 extends MovieClip {
public function Blast1(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 128
//Blast2 (Blast2)
package {
import flash.display.*;
public dynamic class Blast2 extends MovieClip {
public function Blast2(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 129
//BlastRoket (BlastRoket)
package {
import flash.display.*;
public dynamic class BlastRoket extends MovieClip {
public function BlastRoket(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 130
//Bom (Bom)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
public class Bom extends MovieClip {
var sound:Sound;
var ySpeed:Number;
public var speed:Number;
public var yStart:Number;
var damage:Number;
var tx:Number;
var target;
var ty:Number;
var par;
var xSpeed:Number;
var thisBullet:MovieClip;
public var xStart:Number;
var lifeTime:Number;
public function Bom(_arg1:Number, _arg2:Number):void{
speed = 2;
x = _arg1;
y = _arg2;
xStart = _arg1;
yStart = _arg2;
this.addEventListener(Event.ADDED, initialize);
lifeTime = 50;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
function initialize(_arg1:Event):void{
thisBullet = MovieClip(this.parent.getChildByName(this.name));
par = this.parent;
}
public function moveBullet(_arg1:Array, _arg2:Array):void{
var _local3:Boolean;
var _local4:*;
_local3 = false;
if (lifeTime < 0){
delBulet();
return;
};
_local3 = true;
if (_local3){
speed = (speed + 1);
if (speed > 20){
speed = 20;
};
lifeTime--;
y = (y + speed);
for (_local4 in _arg1) {
if (this.hitTestObject(_arg1[_local4].body)){
_arg1[_local4].damage(damage);
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
this.delBulet();
return;
};
};
for (_local4 in _arg2) {
if (this.hitTestObject(_arg2[_local4])){
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
this.delBulet();
return;
};
};
};
}
function delBulet():void{
var _local1:*;
var _local2:*;
_local1 = new BlastRoket();
_local1.x = x;
_local1.y = y;
_local2 = this.parent;
_local2.addChild(_local1);
this.removeEventListener(Event.ADDED, initialize);
this.parent.removeChild(thisBullet);
}
public function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 131
//Boss (Boss)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Boss extends MovieClip {
const MAXSPEED = 3;
const MAXHEALTH:Number = 10000;
const MAXBeha:Number = 12;
var sudutFire3:Number;// = 180
var blinkCount:Number;// = 2
var sebarga:Boolean;// = false
var sound:Sound;
var countBeha:Number;
public var fire:MovieClip;
var sudutFire:Number;// = 180
var efekSound:Sound;
var speed:Number;
public var health:Number;
var blink:Boolean;// = true
var dsudut:Number;// = 2
var canFireCount:Number;// = 0
var jenisWeapon:String;
var turunNaik:Number;// = 20
var par;
var numTurun:Number;// = 0.25
public var body:MovieClip;
var behaviour:Number;// = 1
var ammo:Number;// = 3
var sudutFire2:Number;// = 180
var sudutFire4:Number;// = 180
public function Boss():void{
canFireCount = 0;
behaviour = 1;
sudutFire = 180;
sudutFire2 = 180;
sudutFire3 = 180;
sudutFire4 = 180;
dsudut = 2;
blink = true;
blinkCount = 2;
ammo = 3;
sebarga = false;
turunNaik = 20;
numTurun = 0.25;
super();
health = MAXHEALTH;
speed = MAXSPEED;
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((((Math.random() * _arg2) - _arg1) + 1)) + _arg1);
return (_local3);
}
function fireWeapon(){
var _local1:MovieClip;
var _local2:Number;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:Number;
var _local9:Number;
_local3 = new Point(fire.x, fire.y);
_local3 = this.localToGlobal(_local3);
_local3 = par.globalToLocal(_local3);
_local4 = (par.ship.x - _local3.x);
_local5 = (par.ship.y - _local3.y);
_local6 = Math.atan2(_local5, _local4);
_local7 = ((_local6 * 180) / Math.PI);
switch (behaviour){
case 11:
canFireCount = 1;
_local2 = 0;
while (_local2 < 16) {
_local1 = new PeluruE(_local3.x, _local3.y, (sudutFire + (_local2 * 22.5)));
_local1.setDamage(10);
par.addChild(_local1);
_local2++;
};
sudutFire = (sudutFire + 1);
break;
case 12:
canFireCount = 1;
_local2 = 0;
while (_local2 < 16) {
_local1 = new PeluruE(_local3.x, _local3.y, (sudutFire + (_local2 * 22.5)));
_local1.setDamage(10);
par.addChild(_local1);
_local2++;
};
sudutFire = (sudutFire - 1);
break;
case 7:
canFireCount = 30;
_local8 = randRange(150, 590);
_local9 = randRange(50, 430);
_local4 = (_local8 - _local3.x);
_local5 = (_local9 - _local3.y);
_local6 = Math.atan2(_local5, _local4);
_local7 = ((_local6 * 180) / Math.PI);
_local1 = new PeluruE5(_local3.x, _local3.y, _local7);
_local1.setDamage(100);
par.addChild(_local1);
break;
case 6:
canFireCount = 2;
_local1 = new PeluruE3(_local3.x, _local3.y, sudutFire);
_local1.setDamage(10);
par.addChild(_local1);
_local1 = new PeluruE3(_local3.x, _local3.y, sudutFire2);
_local1.setDamage(10);
par.addChild(_local1);
sudutFire = (sudutFire + dsudut);
sudutFire2 = (sudutFire2 - dsudut);
if ((((sudutFire < 120)) || ((sudutFire > 240)))){
dsudut = (dsudut * -1);
};
break;
case 8:
canFireCount = 10;
_local2 = 0;
while (_local2 < 180) {
if ((((_local2 < sudutFire)) || ((_local2 > (sudutFire + 5))))){
_local1 = new PeluruE2((_local3.x + 150), _local3.y, (_local2 + 90), 4);
_local1.setDamage(10);
par.addChild(_local1);
};
_local2 = (_local2 + 3);
};
sudutFire = (sudutFire + dsudut);
if ((((sudutFire < 75)) || ((sudutFire > 105)))){
dsudut = (dsudut * -1);
};
break;
case 3:
canFireCount = 5;
_local2 = 0;
while (_local2 < 6) {
_local1 = new PeluruE2(_local3.x, _local3.y, (sudutFire + (_local2 * 2)));
_local1.setDamage(10);
par.addChild(_local1);
_local2++;
};
sudutFire = (sudutFire + (dsudut * 4));
if ((((sudutFire < 148)) || ((sudutFire > 210)))){
dsudut = (dsudut * -1);
};
break;
case 2:
canFireCount = 3;
if (ammo < 0){
canFireCount = 40;
sebarga = true;
ammo = 3;
};
_local4 = (par.ship.x - _local3.x);
_local5 = (par.ship.y - _local3.y);
_local6 = Math.atan2(_local5, _local4);
_local7 = ((_local6 * 180) / Math.PI);
ammo--;
_local1 = new PeluruE3(_local3.x, _local3.y, _local7);
_local1.setDamage(10);
par.addChild(_local1);
_local1 = new PeluruE2(_local3.x, _local3.y, (_local7 + 10));
_local1.setDamage(10);
par.addChild(_local1);
_local1 = new PeluruE2(_local3.x, _local3.y, (_local7 - 10));
_local1.setDamage(10);
par.addChild(_local1);
break;
case 5:
canFireCount = 3;
_local1 = new RoketBoss(x, randRange(30, 450), 180);
_local1.setDamage(30);
par.addChild(_local1);
break;
case 4:
canFireCount = 30;
_local1 = new Roket(_local3.x, _local3.y, par.ship);
_local1.setDamage(10);
par.addChild(_local1);
break;
case 9:
canFireCount = 0;
_local1 = new PeluruE4(_local3.x, _local3.y, sudutFire);
_local1.setDamage(10);
par.addChild(_local1);
sudutFire = (sudutFire + 7);
_local1 = new PeluruE4(_local3.x, _local3.y, sudutFire2);
_local1.setDamage(10);
par.addChild(_local1);
sudutFire2 = (sudutFire2 + 7);
break;
case 10:
canFireCount = 10;
_local2 = 0;
while (_local2 < 32) {
_local1 = new PeluruE10(_local3.x, _local3.y, (sudutFire + (_local2 * 11.25)));
_local1.setDamage(10);
par.addChild(_local1);
_local2++;
};
sudutFire = (sudutFire + 3);
break;
};
}
public function moveEnemy():void{
par = this.parent;
if (health > 0){
if (turunNaik > 0){
turunNaik--;
} else {
turunNaik = 20;
numTurun = (numTurun * -1);
};
y = (y + numTurun);
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
switch (behaviour){
case 1:
x = (x - speed);
if (x < 700){
changeBehaviour();
};
break;
case 2:
countBeha--;
if (countBeha < 0){
changeBehaviour();
};
break;
case 3:
countBeha--;
if (countBeha < 0){
changeBehaviour();
};
break;
case 4:
countBeha--;
if (countBeha < 0){
changeBehaviour();
};
break;
case 5:
countBeha--;
if (countBeha < 0){
changeBehaviour();
};
break;
case 6:
countBeha--;
if (countBeha < 0){
changeBehaviour();
};
break;
case 7:
countBeha--;
if (countBeha < 0){
changeBehaviour();
};
break;
case 8:
countBeha--;
if (countBeha < 0){
changeBehaviour();
};
break;
case 9:
countBeha--;
if (countBeha < 0){
changeBehaviour();
};
break;
case 10:
countBeha--;
if (countBeha < 0){
changeBehaviour();
};
break;
case 11:
countBeha--;
if (countBeha < 0){
changeBehaviour();
};
break;
case 12:
countBeha--;
if (countBeha < 0){
changeBehaviour();
};
break;
};
if (canFireCount <= 0){
fireWeapon();
} else {
canFireCount--;
};
} else {
deleteEnemy();
};
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function getHealth():Number{
return (health);
}
public function deleteEnemy():void{
par.removeChild(this);
}
public function getPersenHealth():Number{
return ((health / MAXHEALTH));
}
function changeBehaviour():void{
behaviour = (behaviour + 1);
if (behaviour > MAXBeha){
behaviour = 2;
};
switch (behaviour){
case 11:
sudutFire = 180;
sudutFire2 = 0;
countBeha = 100;
break;
case 12:
sudutFire = 180;
countBeha = 100;
break;
case 7:
countBeha = 190;
case 6:
dsudut = 2;
sudutFire = 180;
sudutFire2 = 180;
countBeha = 300;
break;
case 8:
dsudut = 5;
sudutFire = 90;
countBeha = 200;
break;
case 3:
dsudut = 2;
sudutFire = 180;
countBeha = 200;
break;
case 2:
countBeha = 250;
ammo = 3;
sebarga = true;
break;
case 5:
countBeha = 150;
break;
case 4:
countBeha = 90;
break;
case 9:
sudutFire = 180;
sudutFire2 = 0;
sudutFire3 = 90;
sudutFire4 = 270;
countBeha = 150;
break;
case 10:
sudutFire = 180;
countBeha = 200;
break;
};
}
}
}//package
Section 132
//BossThemeS (BossThemeS)
package {
import flash.media.*;
public dynamic class BossThemeS extends Sound {
}
}//package
Section 133
//ButtonNoS (ButtonNoS)
package {
import flash.media.*;
public dynamic class ButtonNoS extends Sound {
}
}//package
Section 134
//ButtonOkS (ButtonOkS)
package {
import flash.media.*;
public dynamic class ButtonOkS extends Sound {
}
}//package
Section 135
//doorcloseS (doorcloseS)
package {
import flash.media.*;
public dynamic class doorcloseS extends Sound {
}
}//package
Section 136
//EfekGround (EfekGround)
package {
import flash.display.*;
public dynamic class EfekGround extends MovieClip {
public function EfekGround(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 137
//EfekHit2 (EfekHit2)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class EfekHit2 extends MovieClip {
public var par;
public function EfekHit2(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
par = this.parent;
par.removeChild(this);
}
}
}//package
Section 138
//EfekHit3 (EfekHit3)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class EfekHit3 extends MovieClip {
public var par;
public function EfekHit3(){
addFrameScript(3, frame4);
}
function frame4(){
stop();
par = this.parent;
par.removeChild(this);
}
}
}//package
Section 139
//Enemy (Enemy)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Enemy extends MovieClip {
const SPEED:Number = 5;
const SPEEDROT:Number = 5;
public const MAXHEALTH:Number = 5;
const BOUNTY:Number = 10;
const RANK11:Number = 2;
const RANK12:Number = 1;
const RANK10:Number = 3;
const RANK1:Number = 6;
const RANK3:Number = 9;
const RANK5:Number = 20;
const RANK7:Number = 10;
const RANK4:Number = 8;
const RANK2:Number = 7;
const RELOAD:Number = 5;
const RANK8:Number = 5;
const RANK9:Number = 4;
const RANK6:Number = 15;
const CANFIRE:Number = 10;
const EXP:Number = 5;
var counterPart:Number;// = 2
public var perimeter:MovieClip;
public var fire:MovieClip;
public var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var WEAPONDAMAGE;// = 1
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var speedR:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var ySpeed:Number;
var targetSudut:Number;
public var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var target;
var cekSudut:Number;// = 0
var reload:Number;// = 5
public var body:MovieClip;
var doneReload:Boolean;// = false
var behaviorCount:Number;// = 0
var canFireWeapon:Boolean;// = true
var pla;
var targetLoc:Number;
public function Enemy():void{
canFireWeapon = true;
canFireCount = 0;
WEAPONDAMAGE = 1;
isDead = false;
behaviorCount = 0;
cekSudut = 0;
LevelH = 1;
LevelR = 1;
LevelD = 1;
reload = RELOAD;
doneReload = false;
targetLoc = randRange(1, 4);
counterPart = 2;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
speed = SPEED;
speedR = SPEEDROT;
health = MAXHEALTH;
scaleY = -1;
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function moveEnemy():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
par.doTrail(par, x, y);
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (!isNaN(targetSudut)){
cekRot(targetSudut);
};
if (rotation == targetSudut){
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
} else {
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speedR);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speedR);
};
x = (x + xSpeed);
y = (y + ySpeed);
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (LandWingman(pla)){
if (Math.abs((targetSudut - rotation)) <= (speed * 2)){
fireWeapon();
};
} else {
if (perimeter.hitTestObject(pla.body)){
fireWeapon();
};
};
if (doneReload == false){
if (cekSudut <= 0){
if (pla == par.player){
_local1 = (pla.TargetX(targetLoc) - x);
_local2 = (pla.TargetY(targetLoc) - y);
} else {
_local1 = (pla.x - x);
_local2 = (pla.y - y);
};
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
targetSudut = _local4;
cekSudut = 5;
} else {
cekSudut--;
};
if (y > 300){
targetSudut = -90;
};
if (y < -10){
targetSudut = 90;
};
if (behaviorCount > 0){
behaviorCount--;
} else {
if (pla == par.player){
behaviorCount = 20;
changeTargetWingman();
};
};
if ((((x > 750)) || ((x < 0)))){
if (behaviorCount <= 0){
behaviorCount = 20;
changeTargetPlayer();
};
};
if (pla.getHealth() <= 0){
changeTargetWingman();
};
} else {
reload++;
changeTargetWingman();
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
doneReload = false;
};
};
if (reload <= 0){
doneReload = true;
targetSudut = -(targetSudut);
};
} else {
bountyReward();
_local5 = new Blast1();
_local5.x = x;
_local5.y = y;
par.addChild(_local5);
par.quake();
deleteEnemy();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function frame3(){
stop();
}
function seekTargetPlayer():MovieClip{
targetLoc = randRange(1, 4);
return (par.player);
}
function frame1(){
stop();
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
function frame2(){
stop();
}
public function deleteEnemy():void{
par.removeChild(this);
}
public function changeTargetWingman():void{
var _local1:Array;
var _local2:*;
var _local3:*;
par = this.parent;
_local1 = new Array();
_local1 = par.getWingman();
for (_local3 in _local1) {
if (_local2 == null){
_local2 = _local1[_local3];
} else {
if (rankWingman(_local2) < rankWingman(_local1[_local3])){
_local2 = _local1[_local3];
} else {
if (_local2.getPersenHealth() > _local1[_local3].getPersenHealth()){
_local2 = _local1[_local3];
};
};
};
};
if (_local2 == null){
_local2 = seekTargetPlayer();
};
pla = _local2;
cekSudut = 0;
}
function cekRot(_arg1:Number):void{
var _local2:Boolean;
if ((((((((_arg1 < 170)) && ((rotation < 170)))) && ((_arg1 > -170)))) && ((rotation > -170)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 < -135)) && ((rotation < -135)))) && ((_arg1 > -180)))) && ((rotation > -180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 > 135)) && ((rotation > 135)))) && ((_arg1 < 180)))) && ((rotation < 180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((_arg1 > 135)) && ((rotation < -135)))){
_local2 = false;
} else {
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
};
};
};
};
if (_local2){
rotation = (rotation + (speedR * 2));
if (currentFrame != 2){
gotoAndStop("down");
};
} else {
rotation = (rotation - (speedR * 2));
if (currentFrame != 3){
gotoAndStop("up");
};
};
if (Math.abs((_arg1 - rotation)) <= (speed * 2)){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
if (x > 960){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
}
function LandWingman(_arg1):Boolean{
if ((((((((_arg1 is WingmanLand)) || ((_arg1 is WingmanLand2)))) || ((_arg1 is WingmanLand3)))) || ((_arg1 is WingmanLand4)))){
return (true);
};
return (false);
}
public function getHealth():Number{
return (health);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function changeTargetPlayer():void{
pla = seekTargetPlayer();
cekSudut = 0;
}
function rankWingman(_arg1:MovieClip):Number{
if ((_arg1 is Wingman)){
return (RANK1);
};
if ((_arg1 is Wingman2)){
return (RANK2);
};
if ((_arg1 is Wingman3)){
return (RANK3);
};
if ((_arg1 is Wingman4)){
return (RANK4);
};
if ((_arg1 is Wingman5)){
return (RANK5);
};
if ((_arg1 is Wingman6)){
return (RANK6);
};
if ((_arg1 is Wingman7)){
return (RANK7);
};
if ((_arg1 is Wingman8)){
return (RANK8);
};
if ((_arg1 is WingmanLand)){
return (RANK9);
};
if ((_arg1 is WingmanLand2)){
return (RANK10);
};
if ((_arg1 is WingmanLand3)){
return (RANK11);
};
if ((_arg1 is WingmanLand4)){
return (RANK12);
};
return (0);
}
function bountyReward():void{
var _local1:*;
_local1 = this.parent;
_local1.addMoney((BOUNTY * LevelH));
_local1.addEXP(EXP);
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new KelipE();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
canFireCount = CANFIRE;
if ((pla is Player)){
_local4 = (pla.fire.x + randRange(-10, 10));
_local5 = (pla.fire.y + randRange(-10, 10));
par.cbl.drawBuletE(_local2.x, _local2.y, _local4, _local5);
_local3 = new EfekGround();
_local3.x = _local4;
_local3.y = _local5;
par.addChild(_local3);
_local6 = new EfekHit2();
_local6.x = _local4;
_local6.y = _local5;
par.addChild(_local6);
} else {
par.cbl.drawBuletE(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
_local6 = new EfekHit2();
_local6.x = pla.x;
_local6.y = pla.y;
par.addChild(_local6);
};
pla.damage((WEAPONDAMAGE * LevelD));
sound = new EnemyFireS();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 140
//Enemy2 (Enemy2)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Enemy2 extends MovieClip {
const SPEED:Number = 5;
public const MAXHEALTH:Number = 8;
const BOUNTY:Number = 8;
const RANK11:Number = 20;
const RANK12:Number = 10;
const RANK10:Number = 15;
const RANK1:Number = 5;
const RANK3:Number = 7;
const RANK5:Number = 4;
const RANK7:Number = 1;
const RANK4:Number = 8;
const RANK6:Number = 3;
const RANK2:Number = 4;
const RELOAD:Number = 10;
const RANK8:Number = 2;
const RANK9:Number = 9;
const CANFIRE:Number = 15;
const EXP:Number = 10;
var counterPart:Number;// = 2
public var perimeter:MovieClip;
public var fire:MovieClip;
var pitStop:Number;
public var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var WEAPONDAMAGE;// = 1.5
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var Range:Number;// = 200
var ySpeed:Number;
public var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var reload:Number;// = 10
public var body:MovieClip;
var doneReload:Boolean;// = false
var upDown:Number;// = 5
var canFireWeapon:Boolean;// = true
var pla;
public function Enemy2():void{
canFireWeapon = true;
canFireCount = 0;
WEAPONDAMAGE = 1.5;
isDead = false;
LevelR = 1;
LevelD = 1;
LevelH = 1;
reload = RELOAD;
doneReload = false;
Range = 200;
upDown = 5;
counterPart = 2;
blink = true;
blinkCount = 2;
super();
speed = SPEED;
ySpeed = (speed * 0.25);
health = MAXHEALTH;
scaleX = -1;
pitStop = randRange(200, ((200 + Range) - 50));
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function moveEnemy():void{
var _local1:Boolean;
var _local2:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
_local1 = true;
if (x <= pitStop){
speed = 0;
_local1 = false;
};
if (_local1){
x = (x - speed);
} else {
y = (y + ySpeed);
if (upDown > 0){
upDown--;
} else {
upDown = 20;
ySpeed = (ySpeed * -1);
};
};
if (doneReload == false){
if (speed == 0){
fireWeapon();
};
} else {
reload++;
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (reload <= 0){
doneReload = true;
};
} else {
bountyReward();
_local2 = new Blast1();
_local2.x = x;
_local2.y = y;
par.addChild(_local2);
par.quake();
deleteEnemy();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
public function deleteEnemy():void{
par.removeChild(this);
}
public function changeTargetWingman():void{
par = this.parent;
pla = par.player;
}
function LandWingman(_arg1):Boolean{
if ((((((((_arg1 is WingmanLand)) || ((_arg1 is WingmanLand2)))) || ((_arg1 is WingmanLand3)))) || ((_arg1 is WingmanLand4)))){
return (true);
};
return (false);
}
public function getHealth():Number{
return (health);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function changeTargetPlayer():void{
pla = par.player;
}
function rankWingman(_arg1:MovieClip):Number{
if ((_arg1 is Wingman)){
return (RANK1);
};
if ((_arg1 is Wingman2)){
return (RANK2);
};
if ((_arg1 is Wingman3)){
return (RANK3);
};
if ((_arg1 is Wingman4)){
return (RANK4);
};
if ((_arg1 is Wingman5)){
return (RANK5);
};
if ((_arg1 is Wingman6)){
return (RANK6);
};
if ((_arg1 is Wingman7)){
return (RANK7);
};
if ((_arg1 is Wingman8)){
return (RANK8);
};
if ((_arg1 is WingmanLand)){
return (RANK9);
};
if ((_arg1 is WingmanLand2)){
return (RANK10);
};
if ((_arg1 is WingmanLand3)){
return (RANK11);
};
if ((_arg1 is WingmanLand4)){
return (RANK12);
};
return (0);
}
function bountyReward():void{
var _local1:*;
_local1 = this.parent;
_local1.addMoney((BOUNTY * LevelH));
_local1.addEXP(EXP);
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new KelipE();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
canFireCount = CANFIRE;
pic.play();
if ((pla is Player)){
_local4 = (pla.fire.x + randRange(-10, 10));
_local5 = (pla.fire.y + randRange(-10, 10));
par.cbl.drawBuletE(_local2.x, _local2.y, _local4, _local5);
_local3 = new EfekGround();
_local3.x = _local4;
_local3.y = _local5;
par.addChild(_local3);
_local6 = new EfekHit2();
_local6.x = _local4;
_local6.y = _local5;
par.addChild(_local6);
} else {
par.cbl.drawBuletE(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
_local6 = new EfekHit2();
_local6.x = pla.x;
_local6.y = pla.y;
par.addChild(_local6);
};
pla.damage((WEAPONDAMAGE * LevelD));
sound = new EnemyFire2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 141
//Enemy3 (Enemy3)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Enemy3 extends MovieClip {
const SPEED:Number = 7;
public const MAXHEALTH:Number = 10;
const BOUNTY:Number = 8;
const EXP:Number = 10;
var blinkCount:Number;// = 2
var counterPart:Number;// = 2
public var perimeter:MovieClip;
var sound:Sound;
var Range:Number;// = 200
public var fire:MovieClip;
var pitStop:Number;
var speed:Number;
public var health:Number;
var ySpeed:Number;
var LevelR:Number;// = 1
public var LevelH:Number;// = 1
public var pic:MovieClip;
var LevelD:Number;// = 1
var WEAPONDAMAGE;// = 50
var par;
public var body:MovieClip;
var xSpeed:Number;
var blink:Boolean;// = true
var isDead:Boolean;// = false
var pla;
public function Enemy3():void{
WEAPONDAMAGE = 50;
isDead = false;
LevelR = 1;
LevelD = 1;
LevelH = 1;
Range = 200;
counterPart = 2;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
speed = SPEED;
health = MAXHEALTH;
scaleX = -1;
pitStop = randRange(200, ((200 + Range) - 50));
}
function LandWingman(_arg1):Boolean{
if ((((((((_arg1 is WingmanLand)) || ((_arg1 is WingmanLand2)))) || ((_arg1 is WingmanLand3)))) || ((_arg1 is WingmanLand4)))){
return (true);
};
return (false);
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
public function getHealth():Number{
return (health);
}
public function moveEnemy():void{
var _local1:Boolean;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:Number;
var _local7:Number;
var _local8:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
_local1 = true;
if (x <= pitStop){
_local1 = false;
};
if (_local1){
x = (x - speed);
} else {
_local2 = (pla.fire.x - x);
_local3 = (pla.fire.y - y);
_local4 = Math.atan2(_local3, _local2);
_local5 = ((_local4 * 180) / Math.PI);
rotation = (_local5 + 180);
_local6 = (Math.cos(((_local5 * Math.PI) / 180)) * speed);
_local7 = (Math.sin(((_local5 * Math.PI) / 180)) * speed);
x = (x + _local6);
y = (y + _local7);
if (body.hitTestObject(pla.fire)){
pla.damage((WEAPONDAMAGE * LevelD));
health = 0;
deleteEnemy();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
_local8 = new Blast1();
_local8.x = x;
_local8.y = y;
par.addChild(_local8);
par.quake();
};
};
} else {
bountyReward();
_local8 = new Blast1();
_local8.x = x;
_local8.y = y;
par.addChild(_local8);
par.quake();
deleteEnemy();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
function frame1(){
stop();
}
function frame3(){
stop();
}
public function deleteEnemy():void{
par.removeChild(this);
}
public function changeTargetPlayer():void{
pla = par.player;
}
function frame2(){
stop();
}
function bountyReward():void{
var _local1:*;
_local1 = this.parent;
_local1.addMoney((BOUNTY * LevelH));
_local1.addEXP(EXP);
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
public function changeTargetWingman():void{
par = this.parent;
pla = par.player;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
}
}//package
Section 142
//Enemy4 (Enemy4)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Enemy4 extends MovieClip {
const SPEED:Number = 6;
const SPEEDROT:Number = 5;
public const MAXHEALTH:Number = 10;
const BOUNTY:Number = 10;
const RANK11:Number = 3;
const RANK12:Number = 2;
const RANK10:Number = 5;
const RANK1:Number = 10;
const RANK3:Number = 6;
const RANK5:Number = 1;
const RANK7:Number = 7;
const RANK4:Number = 20;
const RANK2:Number = 15;
const RELOAD:Number = 10;
const RANK8:Number = 9;
const RANK9:Number = 8;
const RANK6:Number = 4;
const CANFIRE:Number = 8;
const EXP:Number = 10;
var counterPart:Number;// = 2
public var perimeter:MovieClip;
public var fire:MovieClip;
public var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var WEAPONDAMAGE;// = 1.5
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var speedR:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var ySpeed:Number;
var targetSudut:Number;
public var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var target;
var cekSudut:Number;// = 0
var reload:Number;// = 10
public var body:MovieClip;
var doneReload:Boolean;// = false
var behaviorCount:Number;// = 0
var canFireWeapon:Boolean;// = true
var pla;
var targetLoc:Number;
public function Enemy4():void{
canFireWeapon = true;
canFireCount = 0;
WEAPONDAMAGE = 1.5;
isDead = false;
behaviorCount = 0;
cekSudut = 0;
LevelH = 1;
LevelR = 1;
LevelD = 1;
reload = RELOAD;
doneReload = false;
targetLoc = randRange(1, 4);
counterPart = 2;
blink = true;
blinkCount = 2;
super();
speed = SPEED;
speedR = SPEEDROT;
health = MAXHEALTH;
scaleY = -1;
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function moveEnemy():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
par.doTrail(par, x, y);
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (!isNaN(targetSudut)){
cekRot(targetSudut);
};
if (rotation == targetSudut){
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
} else {
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speedR);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speedR);
};
x = (x + xSpeed);
y = (y + ySpeed);
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (LandWingman(pla)){
if (Math.abs((targetSudut - rotation)) <= (speed * 2)){
fireWeapon();
};
} else {
if (perimeter.hitTestObject(pla.body)){
fireWeapon();
};
};
if (doneReload == false){
if (cekSudut <= 0){
if (pla == par.player){
_local1 = (pla.TargetX(targetLoc) - x);
_local2 = (pla.TargetY(targetLoc) - y);
} else {
_local1 = (pla.x - x);
_local2 = (pla.y - y);
};
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
targetSudut = _local4;
cekSudut = 5;
} else {
cekSudut--;
};
if (y > 300){
targetSudut = -90;
};
if (y < -10){
targetSudut = 90;
};
if (behaviorCount > 0){
behaviorCount--;
} else {
if (pla == par.player){
behaviorCount = 20;
changeTargetWingman();
};
};
if ((((x > 750)) || ((x < 0)))){
if (behaviorCount <= 0){
behaviorCount = 20;
changeTargetPlayer();
};
};
if (pla.getHealth() <= 0){
changeTargetWingman();
};
} else {
reload++;
changeTargetWingman();
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
doneReload = false;
};
};
if (reload <= 0){
doneReload = true;
targetSudut = -(targetSudut);
};
} else {
bountyReward();
_local5 = new Blast1();
_local5.x = x;
_local5.y = y;
par.addChild(_local5);
par.quake();
deleteEnemy();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function seekTargetPlayer():MovieClip{
targetLoc = randRange(1, 4);
return (par.player);
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
public function deleteEnemy():void{
par.removeChild(this);
}
public function changeTargetWingman():void{
var _local1:Array;
var _local2:*;
var _local3:*;
par = this.parent;
_local1 = new Array();
_local1 = par.getWingman();
for (_local3 in _local1) {
if (_local2 == null){
_local2 = _local1[_local3];
} else {
if (rankWingman(_local2) < rankWingman(_local1[_local3])){
_local2 = _local1[_local3];
} else {
if (_local2.getPersenHealth() > _local1[_local3].getPersenHealth()){
_local2 = _local1[_local3];
};
};
};
};
if (_local2 == null){
_local2 = par.player;
};
pla = _local2;
cekSudut = 0;
}
function cekRot(_arg1:Number):void{
var _local2:Boolean;
if ((((((((_arg1 < 170)) && ((rotation < 170)))) && ((_arg1 > -170)))) && ((rotation > -170)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 < -135)) && ((rotation < -135)))) && ((_arg1 > -180)))) && ((rotation > -180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 > 135)) && ((rotation > 135)))) && ((_arg1 < 180)))) && ((rotation < 180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((_arg1 > 135)) && ((rotation < -135)))){
_local2 = false;
} else {
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
};
};
};
};
if (_local2){
rotation = (rotation + (speedR * 2));
} else {
rotation = (rotation - (speedR * 2));
};
if (Math.abs((_arg1 - rotation)) <= (speed * 2)){
rotation = targetSudut;
};
if (x > 960){
rotation = targetSudut;
};
}
function LandWingman(_arg1):Boolean{
if ((((((((_arg1 is WingmanLand)) || ((_arg1 is WingmanLand2)))) || ((_arg1 is WingmanLand3)))) || ((_arg1 is WingmanLand4)))){
return (true);
};
return (false);
}
public function getHealth():Number{
return (health);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function changeTargetPlayer():void{
pla = seekTargetPlayer();
cekSudut = 0;
}
function rankWingman(_arg1:MovieClip):Number{
if ((_arg1 is Wingman)){
return (RANK1);
};
if ((_arg1 is Wingman2)){
return (RANK2);
};
if ((_arg1 is Wingman3)){
return (RANK3);
};
if ((_arg1 is Wingman4)){
return (RANK4);
};
if ((_arg1 is Wingman5)){
return (RANK5);
};
if ((_arg1 is Wingman6)){
return (RANK6);
};
if ((_arg1 is Wingman7)){
return (RANK7);
};
if ((_arg1 is Wingman8)){
return (RANK8);
};
if ((_arg1 is WingmanLand)){
return (RANK9);
};
if ((_arg1 is WingmanLand2)){
return (RANK10);
};
if ((_arg1 is WingmanLand3)){
return (RANK11);
};
if ((_arg1 is WingmanLand4)){
return (RANK12);
};
return (0);
}
function bountyReward():void{
var _local1:*;
_local1 = this.parent;
_local1.addMoney((BOUNTY * LevelH));
_local1.addEXP(EXP);
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new KelipE();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
canFireCount = CANFIRE;
pic.play();
if ((pla is Player)){
_local4 = (pla.fire.x + randRange(-10, 10));
_local5 = (pla.fire.y + randRange(-10, 10));
par.cbl.drawBuletE(_local2.x, _local2.y, _local4, _local5);
_local3 = new EfekGround();
_local3.x = _local4;
_local3.y = _local5;
par.addChild(_local3);
_local6 = new EfekHit2();
_local6.x = _local4;
_local6.y = _local5;
par.addChild(_local6);
} else {
par.cbl.drawBuletE(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
_local6 = new EfekHit2();
_local6.x = pla.x;
_local6.y = pla.y;
par.addChild(_local6);
};
pla.damage((WEAPONDAMAGE * LevelD));
sound = new EnemyFireS();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 143
//Enemy5 (Enemy5)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Enemy5 extends MovieClip {
const SPEED:Number = 7;
public const MAXHEALTH:Number = 20;
const BOUNTY:Number = 12;
const RANK11:Number = 5;
const RANK12:Number = 2;
const RANK10:Number = 8;
const RANK1:Number = 3;
const RANK3:Number = 15;
const RANK5:Number = 9;
const RANK7:Number = 20;
const RANK4:Number = 6;
const RANK6:Number = 10;
const RANK2:Number = 4;
const RELOAD:Number = 10;
const RANK8:Number = 1;
const RANK9:Number = 7;
const CANFIRE:Number = 10;
const EXP:Number = 10;
var counterPart:Number;// = 2
public var perimeter:MovieClip;
public var fire:MovieClip;
var pitStop:Number;
public var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var WEAPONDAMAGE;// = 2
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var Range:Number;// = 200
var ySpeed:Number;
public var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var reload:Number;// = 10
public var body:MovieClip;
var doneReload:Boolean;// = false
var upDown:Number;// = 5
var canFireWeapon:Boolean;// = true
var pla;
public function Enemy5():void{
canFireWeapon = true;
canFireCount = 0;
WEAPONDAMAGE = 2;
isDead = false;
LevelH = 1;
LevelR = 1;
LevelD = 1;
reload = RELOAD;
doneReload = false;
Range = 200;
upDown = 5;
counterPart = 2;
blink = true;
blinkCount = 2;
super();
speed = SPEED;
ySpeed = (speed * 0.25);
health = MAXHEALTH;
scaleX = -1;
pitStop = randRange(200, ((200 + Range) - 50));
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function moveEnemy():void{
var _local1:Boolean;
var _local2:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
_local1 = true;
if (x <= pitStop){
speed = 0;
_local1 = false;
};
if (_local1){
x = (x - speed);
} else {
y = (y + ySpeed);
if (upDown > 0){
upDown--;
} else {
upDown = 20;
ySpeed = (ySpeed * -1);
};
};
if (doneReload == false){
if (speed == 0){
fireWeapon();
};
} else {
reload++;
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (reload <= 0){
doneReload = true;
};
} else {
bountyReward();
_local2 = new Blast1();
_local2.x = x;
_local2.y = y;
par.addChild(_local2);
par.quake();
deleteEnemy();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
public function deleteEnemy():void{
par.removeChild(this);
}
public function changeTargetWingman():void{
par = this.parent;
pla = par.player;
}
function LandWingman(_arg1):Boolean{
if ((((((((_arg1 is WingmanLand)) || ((_arg1 is WingmanLand2)))) || ((_arg1 is WingmanLand3)))) || ((_arg1 is WingmanLand4)))){
return (true);
};
return (false);
}
public function getHealth():Number{
return (health);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function changeTargetPlayer():void{
pla = par.player;
}
function rankWingman(_arg1:MovieClip):Number{
if ((_arg1 is Wingman)){
return (RANK1);
};
if ((_arg1 is Wingman2)){
return (RANK2);
};
if ((_arg1 is Wingman3)){
return (RANK3);
};
if ((_arg1 is Wingman4)){
return (RANK4);
};
if ((_arg1 is Wingman5)){
return (RANK5);
};
if ((_arg1 is Wingman6)){
return (RANK6);
};
if ((_arg1 is Wingman7)){
return (RANK7);
};
if ((_arg1 is Wingman8)){
return (RANK8);
};
if ((_arg1 is WingmanLand)){
return (RANK9);
};
if ((_arg1 is WingmanLand2)){
return (RANK10);
};
if ((_arg1 is WingmanLand3)){
return (RANK11);
};
if ((_arg1 is WingmanLand4)){
return (RANK12);
};
return (0);
}
function bountyReward():void{
var _local1:*;
_local1 = this.parent;
_local1.addMoney((BOUNTY * LevelH));
_local1.addEXP(EXP);
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
canFireCount = CANFIRE;
pic.play();
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new KelipE();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
if ((pla is Player)){
_local4 = (pla.fire.x + randRange(-10, 10));
_local5 = (pla.fire.y + randRange(-10, 10));
par.cbl.drawBuletE(_local2.x, _local2.y, _local4, _local5);
_local3 = new EfekGround();
_local3.x = _local4;
_local3.y = _local5;
par.addChild(_local3);
_local6 = new EfekHit2();
_local6.x = _local4;
_local6.y = _local5;
par.addChild(_local6);
} else {
par.cbl.drawBuletE(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
_local6 = new EfekHit2();
_local6.x = pla.x;
_local6.y = pla.y;
par.addChild(_local6);
};
pla.damage((WEAPONDAMAGE * LevelD));
sound = new EnemyFire2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 144
//Enemy6 (Enemy6)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Enemy6 extends MovieClip {
const SPEED:Number = 10;
public const MAXHEALTH:Number = 10;
const BOUNTY:Number = 16;
const RANK11:Number = 7;
const RANK12:Number = 6;
const RANK10:Number = 8;
const RANK1:Number = 15;
const RANK3:Number = 2;
const RANK5:Number = 3;
const RANK6:Number = 4;
const RANK7:Number = 1;
const RANK4:Number = 9;
const RANK2:Number = 10;
const RELOAD:Number = 5;
const RANK8:Number = 20;
const RANK9:Number = 5;
const CANFIRE:Number = 10;
const EXP:Number = 10;
var counterPart:Number;// = 2
public var perimeter:MovieClip;
public var fire:MovieClip;
var pitStop:Number;
public var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var WEAPONDAMAGE;// = 3
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var Range:Number;// = 250
var ySpeed:Number;
public var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
var reload:Number;// = 5
public var body:MovieClip;
var doneReload:Boolean;// = false
var upDown:Number;// = 5
var canFireWeapon:Boolean;// = true
var pla;
public function Enemy6():void{
canFireWeapon = true;
canFireCount = 0;
WEAPONDAMAGE = 3;
isDead = false;
LevelH = 1;
LevelR = 1;
LevelD = 1;
reload = RELOAD;
doneReload = false;
Range = 250;
upDown = 5;
counterPart = 2;
blink = true;
blinkCount = 2;
super();
speed = SPEED;
ySpeed = (speed * 0.25);
health = MAXHEALTH;
scaleX = -1;
pitStop = randRange(200, ((200 + Range) - 50));
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function moveEnemy():void{
var _local1:Boolean;
var _local2:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
_local1 = true;
if (x <= pitStop){
speed = 0;
_local1 = false;
};
if (_local1){
x = (x - speed);
} else {
y = (y + ySpeed);
if (upDown > 0){
upDown--;
} else {
upDown = 20;
ySpeed = (ySpeed * -1);
};
};
if (doneReload == false){
if (speed == 0){
fireWeapon();
};
} else {
reload++;
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (reload <= 0){
doneReload = true;
};
} else {
bountyReward();
_local2 = new Blast1();
_local2.x = x;
_local2.y = y;
par.addChild(_local2);
par.quake();
deleteEnemy();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
public function deleteEnemy():void{
par.removeChild(this);
}
public function changeTargetWingman():void{
par = this.parent;
pla = par.player;
}
function LandWingman(_arg1):Boolean{
if ((((((((_arg1 is WingmanLand)) || ((_arg1 is WingmanLand2)))) || ((_arg1 is WingmanLand3)))) || ((_arg1 is WingmanLand4)))){
return (true);
};
return (false);
}
public function getHealth():Number{
return (health);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function changeTargetPlayer():void{
pla = par.player;
}
function rankWingman(_arg1:MovieClip):Number{
if ((_arg1 is Wingman)){
return (RANK1);
};
if ((_arg1 is Wingman2)){
return (RANK2);
};
if ((_arg1 is Wingman3)){
return (RANK3);
};
if ((_arg1 is Wingman4)){
return (RANK4);
};
if ((_arg1 is Wingman5)){
return (RANK5);
};
if ((_arg1 is Wingman6)){
return (RANK6);
};
if ((_arg1 is Wingman7)){
return (RANK7);
};
if ((_arg1 is Wingman8)){
return (RANK8);
};
if ((_arg1 is WingmanLand)){
return (RANK9);
};
if ((_arg1 is WingmanLand2)){
return (RANK10);
};
if ((_arg1 is WingmanLand3)){
return (RANK11);
};
if ((_arg1 is WingmanLand4)){
return (RANK12);
};
return (0);
}
function bountyReward():void{
var _local1:*;
_local1 = this.parent;
_local1.addMoney((BOUNTY * LevelH));
_local1.addEXP(EXP);
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
canFireCount = CANFIRE;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new KelipE();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
if ((pla is Player)){
_local4 = (pla.fire.x + randRange(-10, 10));
_local5 = (pla.fire.y + randRange(-10, 10));
par.cbl.drawBuletE(_local2.x, _local2.y, _local4, _local5);
_local3 = new EfekGround();
_local3.x = _local4;
_local3.y = _local5;
par.addChild(_local3);
_local6 = new EfekHit2();
_local6.x = _local4;
_local6.y = _local5;
par.addChild(_local6);
} else {
par.cbl.drawBuletE(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
_local6 = new EfekHit2();
_local6.x = pla.x;
_local6.y = pla.y;
par.addChild(_local6);
};
pla.damage((WEAPONDAMAGE * LevelD));
sound = new EnemyFire2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 145
//Enemy7 (Enemy7)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Enemy7 extends MovieClip {
const SPEED:Number = 6;
const SPEEDROT:Number = 4;
public const MAXHEALTH:Number = 13;
const BOUNTY:Number = 50;
const RANK11:Number = 7;
const RANK12:Number = 15;
const RANK10:Number = 9;
const RANK1:Number = 1;
const RANK3:Number = 4;
const RANK5:Number = 8;
const RANK7:Number = 20;
const RANK4:Number = 10;
const RANK2:Number = 2;
const RELOAD:Number = 15;
const RANK8:Number = 3;
const RANK9:Number = 5;
const RANK6:Number = 6;
const CANFIRE:Number = 8;
const EXP:Number = 10;
var counterPart:Number;// = 2
public var perimeter:MovieClip;
public var fire:MovieClip;
public var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var WEAPONDAMAGE;// = 2
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var speedR:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var ySpeed:Number;
var targetSudut:Number;
public var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var target;
var cekSudut:Number;// = 0
var reload:Number;// = 15
public var body:MovieClip;
var doneReload:Boolean;// = false
var behaviorCount:Number;// = 0
var canFireWeapon:Boolean;// = true
var pla;
var targetLoc:Number;
public function Enemy7():void{
canFireWeapon = true;
canFireCount = 0;
WEAPONDAMAGE = 2;
isDead = false;
behaviorCount = 0;
cekSudut = 0;
LevelH = 1;
LevelR = 1;
LevelD = 1;
reload = RELOAD;
doneReload = false;
targetLoc = randRange(1, 4);
counterPart = 2;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
speed = SPEED;
speedR = SPEEDROT;
health = MAXHEALTH;
scaleY = -1;
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function moveEnemy():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
par.doTrail(par, x, y);
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (!isNaN(targetSudut)){
cekRot(targetSudut);
};
if (rotation == targetSudut){
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
} else {
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speedR);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speedR);
};
x = (x + xSpeed);
y = (y + ySpeed);
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (LandWingman(pla)){
if (Math.abs((targetSudut - rotation)) <= (speed * 2)){
fireWeapon();
};
} else {
if (perimeter.hitTestObject(pla.body)){
fireWeapon();
};
};
if (doneReload == false){
if (cekSudut <= 0){
if (pla == par.player){
_local1 = (pla.TargetX(targetLoc) - x);
_local2 = (pla.TargetY(targetLoc) - y);
} else {
_local1 = (pla.x - x);
_local2 = (pla.y - y);
};
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
targetSudut = _local4;
cekSudut = 5;
} else {
cekSudut--;
};
if (y > 300){
targetSudut = -90;
};
if (y < -10){
targetSudut = 90;
};
if (behaviorCount > 0){
behaviorCount--;
} else {
if (pla == par.player){
behaviorCount = 20;
changeTargetWingman();
};
};
if ((((x > 750)) || ((x < 0)))){
if (behaviorCount <= 0){
behaviorCount = 20;
changeTargetPlayer();
};
};
if (pla.getHealth() <= 0){
changeTargetWingman();
};
} else {
reload++;
changeTargetWingman();
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
doneReload = false;
};
};
if (reload <= 0){
doneReload = true;
targetSudut = -(targetSudut);
};
} else {
bountyReward();
_local5 = new Blast1();
_local5.x = x;
_local5.y = y;
par.addChild(_local5);
par.quake();
deleteEnemy();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function frame3(){
stop();
}
function seekTargetPlayer():MovieClip{
targetLoc = randRange(1, 4);
return (par.player);
}
function frame1(){
stop();
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
function frame2(){
stop();
}
public function deleteEnemy():void{
par.removeChild(this);
}
public function changeTargetWingman():void{
var _local1:Array;
var _local2:*;
var _local3:*;
par = this.parent;
_local1 = new Array();
_local1 = par.getWingman();
for (_local3 in _local1) {
if (_local2 == null){
_local2 = _local1[_local3];
} else {
if (rankWingman(_local2) < rankWingman(_local1[_local3])){
_local2 = _local1[_local3];
} else {
if (_local2.getPersenHealth() > _local1[_local3].getPersenHealth()){
_local2 = _local1[_local3];
};
};
};
};
if (_local2 == null){
_local2 = par.player;
};
pla = _local2;
cekSudut = 0;
}
function cekRot(_arg1:Number):void{
var _local2:Boolean;
if ((((((((_arg1 < 170)) && ((rotation < 170)))) && ((_arg1 > -170)))) && ((rotation > -170)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 < -135)) && ((rotation < -135)))) && ((_arg1 > -180)))) && ((rotation > -180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 > 135)) && ((rotation > 135)))) && ((_arg1 < 180)))) && ((rotation < 180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((_arg1 > 135)) && ((rotation < -135)))){
_local2 = false;
} else {
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
};
};
};
};
if (_local2){
rotation = (rotation + (speedR * 2));
if (currentFrame != 2){
gotoAndStop("down");
};
} else {
rotation = (rotation - (speedR * 2));
if (currentFrame != 3){
gotoAndStop("up");
};
};
if (Math.abs((_arg1 - rotation)) <= (speed * 2)){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
if (x > 960){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
}
function LandWingman(_arg1):Boolean{
if ((((((((_arg1 is WingmanLand)) || ((_arg1 is WingmanLand2)))) || ((_arg1 is WingmanLand3)))) || ((_arg1 is WingmanLand4)))){
return (true);
};
return (false);
}
public function getHealth():Number{
return (health);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function changeTargetPlayer():void{
pla = seekTargetPlayer();
cekSudut = 0;
}
function rankWingman(_arg1:MovieClip):Number{
if ((_arg1 is Wingman)){
return (RANK1);
};
if ((_arg1 is Wingman2)){
return (RANK2);
};
if ((_arg1 is Wingman3)){
return (RANK3);
};
if ((_arg1 is Wingman4)){
return (RANK4);
};
if ((_arg1 is Wingman5)){
return (RANK5);
};
if ((_arg1 is Wingman6)){
return (RANK6);
};
if ((_arg1 is Wingman7)){
return (RANK7);
};
if ((_arg1 is Wingman8)){
return (RANK8);
};
if ((_arg1 is WingmanLand)){
return (RANK9);
};
if ((_arg1 is WingmanLand2)){
return (RANK10);
};
if ((_arg1 is WingmanLand3)){
return (RANK11);
};
if ((_arg1 is WingmanLand4)){
return (RANK12);
};
return (0);
}
function bountyReward():void{
var _local1:*;
_local1 = this.parent;
_local1.addMoney((BOUNTY * LevelH));
_local1.addEXP(EXP);
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new KelipE();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
canFireCount = CANFIRE;
if ((pla is Player)){
_local4 = (pla.fire.x + randRange(-10, 10));
_local5 = (pla.fire.y + randRange(-10, 10));
par.celE.electric(_local2.x, _local2.y, _local4, _local5, 3);
_local3 = new EfekGround();
_local3.x = _local4;
_local3.y = _local5;
par.addChild(_local3);
_local6 = new EfekHit2();
_local6.x = _local4;
_local6.y = _local5;
par.addChild(_local6);
} else {
par.celE.electric(_local2.x, _local2.y, pla.x, pla.y, 3);
par.doHit(par, pla.x, pla.y);
_local6 = new EfekHit2();
_local6.x = pla.x;
_local6.y = pla.y;
par.addChild(_local6);
};
pla.damage((WEAPONDAMAGE * LevelD));
sound = new Tower2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 146
//Enemy8 (Enemy8)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Enemy8 extends MovieClip {
const SPEED:Number = 7;
const SPEEDROT:Number = 6;
public const MAXHEALTH:Number = 15;
const BOUNTY:Number = 50;
const RANK11:Number = 9;
const RANK12:Number = 8;
const RANK10:Number = 10;
const RANK1:Number = 2;
const RANK3:Number = 20;
const RANK5:Number = 15;
const RANK6:Number = 6;
const RANK7:Number = 5;
const RANK4:Number = 5;
const RANK2:Number = 1;
const RELOAD:Number = 20;
const RANK8:Number = 3;
const RANK9:Number = 7;
const CANFIRE:Number = 5;
const EXP:Number = 15;
var counterPart:Number;// = 2
public var perimeter:MovieClip;
public var fire:MovieClip;
public var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var WEAPONDAMAGE;// = 2.5
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var speedR:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var ySpeed:Number;
var targetSudut:Number;
public var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
var target;
var cekSudut:Number;// = 0
var reload:Number;// = 20
public var body:MovieClip;
var doneReload:Boolean;// = false
var behaviorCount:Number;// = 0
var canFireWeapon:Boolean;// = true
var pla;
var targetLoc:Number;
public function Enemy8():void{
canFireWeapon = true;
canFireCount = 0;
WEAPONDAMAGE = 2.5;
isDead = false;
behaviorCount = 0;
cekSudut = 0;
LevelD = 1;
LevelH = 1;
LevelR = 1;
reload = RELOAD;
doneReload = false;
targetLoc = randRange(1, 4);
counterPart = 2;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
speed = SPEED;
speedR = SPEEDROT;
health = MAXHEALTH;
scaleY = -1;
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function moveEnemy():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
par.doTrail(par, x, y);
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (!isNaN(targetSudut)){
cekRot(targetSudut);
};
if (rotation == targetSudut){
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
} else {
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speedR);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speedR);
};
x = (x + xSpeed);
y = (y + ySpeed);
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (LandWingman(pla)){
if (Math.abs((targetSudut - rotation)) <= (speed * 2)){
fireWeapon();
};
} else {
if (perimeter.hitTestObject(pla.body)){
fireWeapon();
};
};
if (doneReload == false){
if (cekSudut <= 0){
if (pla == par.player){
_local1 = (pla.TargetX(targetLoc) - x);
_local2 = (pla.TargetY(targetLoc) - y);
} else {
_local1 = (pla.x - x);
_local2 = (pla.y - y);
};
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
targetSudut = _local4;
cekSudut = 5;
} else {
cekSudut--;
};
if (y > 300){
targetSudut = -90;
};
if (y < -10){
targetSudut = 90;
};
if (behaviorCount > 0){
behaviorCount--;
} else {
if (pla == par.player){
behaviorCount = 20;
changeTargetWingman();
};
};
if ((((x > 750)) || ((x < 0)))){
if (behaviorCount <= 0){
behaviorCount = 20;
changeTargetPlayer();
};
};
if (pla.getHealth() <= 0){
changeTargetWingman();
};
} else {
reload++;
changeTargetWingman();
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
doneReload = false;
};
};
if (reload <= 0){
doneReload = true;
targetSudut = -(targetSudut);
};
} else {
bountyReward();
_local5 = new Blast1();
_local5.x = x;
_local5.y = y;
par.addChild(_local5);
par.quake();
deleteEnemy();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function frame3(){
stop();
}
function seekTargetPlayer():MovieClip{
targetLoc = randRange(1, 4);
return (par.player);
}
function frame1(){
stop();
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
function frame2(){
stop();
}
public function deleteEnemy():void{
par.removeChild(this);
}
public function changeTargetWingman():void{
var _local1:Array;
var _local2:*;
var _local3:*;
par = this.parent;
_local1 = new Array();
_local1 = par.getWingman();
for (_local3 in _local1) {
if (_local2 == null){
_local2 = _local1[_local3];
} else {
if (rankWingman(_local2) < rankWingman(_local1[_local3])){
_local2 = _local1[_local3];
} else {
if (_local2.getPersenHealth() > _local1[_local3].getPersenHealth()){
_local2 = _local1[_local3];
};
};
};
};
if (_local2 == null){
_local2 = par.player;
};
pla = _local2;
cekSudut = 0;
}
function cekRot(_arg1:Number):void{
var _local2:Boolean;
if ((((((((_arg1 < 170)) && ((rotation < 170)))) && ((_arg1 > -170)))) && ((rotation > -170)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 < -135)) && ((rotation < -135)))) && ((_arg1 > -180)))) && ((rotation > -180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 > 135)) && ((rotation > 135)))) && ((_arg1 < 180)))) && ((rotation < 180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((_arg1 > 135)) && ((rotation < -135)))){
_local2 = false;
} else {
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
};
};
};
};
if (_local2){
rotation = (rotation + (speedR * 2));
if (currentFrame != 2){
gotoAndStop("down");
};
} else {
rotation = (rotation - (speedR * 2));
if (currentFrame != 3){
gotoAndStop("up");
};
};
if (Math.abs((_arg1 - rotation)) <= (speed * 2)){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
if (x > 960){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
}
function LandWingman(_arg1):Boolean{
if ((((((((_arg1 is WingmanLand)) || ((_arg1 is WingmanLand2)))) || ((_arg1 is WingmanLand3)))) || ((_arg1 is WingmanLand4)))){
return (true);
};
return (false);
}
public function getHealth():Number{
return (health);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function changeTargetPlayer():void{
pla = seekTargetPlayer();
cekSudut = 0;
}
function rankWingman(_arg1:MovieClip):Number{
if ((_arg1 is Wingman)){
return (RANK1);
};
if ((_arg1 is Wingman2)){
return (RANK2);
};
if ((_arg1 is Wingman3)){
return (RANK3);
};
if ((_arg1 is Wingman4)){
return (RANK4);
};
if ((_arg1 is Wingman5)){
return (RANK5);
};
if ((_arg1 is Wingman6)){
return (RANK6);
};
if ((_arg1 is Wingman7)){
return (RANK7);
};
if ((_arg1 is Wingman8)){
return (RANK8);
};
if ((_arg1 is WingmanLand)){
return (RANK9);
};
if ((_arg1 is WingmanLand2)){
return (RANK10);
};
if ((_arg1 is WingmanLand3)){
return (RANK11);
};
if ((_arg1 is WingmanLand4)){
return (RANK12);
};
return (0);
}
function bountyReward():void{
var _local1:*;
_local1 = this.parent;
_local1.addMoney((BOUNTY * LevelH));
_local1.addEXP(EXP);
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new KelipE();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
canFireCount = CANFIRE;
if ((pla is Player)){
_local4 = (pla.fire.x + randRange(-10, 10));
_local5 = (pla.fire.y + randRange(-10, 10));
par.cbl.drawBuletE(_local2.x, _local2.y, _local4, _local5);
_local3 = new EfekGround();
_local3.x = _local4;
_local3.y = _local5;
par.addChild(_local3);
_local6 = new EfekHit2();
_local6.x = _local4;
_local6.y = _local5;
par.addChild(_local6);
} else {
par.cbl.drawBuletE(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
_local6 = new EfekHit2();
_local6.x = pla.x;
_local6.y = pla.y;
par.addChild(_local6);
};
pla.damage((WEAPONDAMAGE * LevelD));
sound = new EnemyFireS();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 147
//Enemy9 (Enemy9)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Enemy9 extends MovieClip {
const SPEED:Number = 1;
public const MAXHEALTH:Number = 200;
const BOUNTY:Number = 1000;
const RANK11:Number = 0;
const RANK12:Number = 0;
const RANK10:Number = 0;
const RANK1:Number = 6;
const RANK3:Number = 9;
const RANK5:Number = 20;
const RANK6:Number = 15;
const RANK7:Number = 10;
const RANK4:Number = 8;
const RANK2:Number = 7;
const RELOAD:Number = 15;
const RANK8:Number = 5;
const RANK9:Number = 0;
const CANFIRE:Number = 30;
const EXP:Number = 10;
var counterPart:Number;// = 2
public var fire:MovieClip;
var pitStop:Number;
public var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var WEAPONDAMAGE;// = 5
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var Range:Number;// = 250
var bomCount:Number;// = 10
var ySpeed:Number;
public var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
var reload:Number;// = 15
public var body:MovieClip;
var doneReload:Boolean;// = false
var upDown:Number;// = 5
var canFireWeapon:Boolean;// = true
var pla;
public function Enemy9():void{
canFireWeapon = true;
canFireCount = 0;
WEAPONDAMAGE = 5;
isDead = false;
LevelH = 1;
LevelR = 1;
LevelD = 1;
reload = RELOAD;
doneReload = false;
Range = 250;
upDown = 5;
counterPart = 2;
blink = true;
blinkCount = 2;
bomCount = 10;
super();
speed = SPEED;
ySpeed = (speed * 0.25);
health = MAXHEALTH;
scaleX = -1;
pitStop = randRange(200, ((100 + Range) - 50));
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function moveEnemy():void{
var _local1:Boolean;
var _local2:Array;
var _local3:*;
var _local4:Number;
var _local5:Number;
var _local6:*;
var _local7:*;
var _local8:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
};
if (bomCount > 0){
bomCount--;
} else {
bomCount = randRange(20, 50);
dropBom();
};
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
_local1 = true;
if (doneReload == false){
_local2 = new Array();
_local2 = par.getWingman();
_local4 = 9999999999;
_local5 = 0;
for (_local6 in _local2) {
_local7 = Math.round(Math.sqrt((Math.pow((x - _local2[_local6].x), 2) + Math.pow((y - _local2[_local6].y), 2))));
if (_local7 < _local4){
if (rankWingman(_local2[_local6]) != 0){
if (_local5 < rankWingman(_local2[_local6])){
_local4 = _local7;
_local3 = _local2[_local6];
_local5 = rankWingman(_local2[_local6]);
};
};
};
};
if (_local4 < Range){
pla = _local3;
fireWeapon();
_local1 = false;
};
if ((((_local2.length == 0)) && ((speed == 0)))){
pla = par.player;
fireWeapon();
};
} else {
reload++;
_local1 = false;
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (x <= pitStop){
speed = 0;
_local1 = false;
};
if (_local1){
x = (x - speed);
} else {
y = (y + ySpeed);
if (upDown > 0){
upDown--;
} else {
upDown = 20;
ySpeed = (ySpeed * -1);
};
};
if (reload <= 0){
doneReload = true;
};
} else {
bountyReward();
_local8 = new Blast2();
_local8.x = x;
_local8.y = y;
par.addChild(_local8);
par.quake();
deleteEnemy();
sound = new ExplodeS();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function dropBom():void{
var _local1:*;
var _local2:*;
var _local3:*;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new Bom(_local2.x, _local2.y);
_local3.setDamage(((WEAPONDAMAGE * LevelD) * 20));
par.addChild(_local3);
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
public function deleteEnemy():void{
par.removeChild(this);
}
public function changeTargetWingman():void{
par = this.parent;
pla = par.player;
}
function LandWingman(_arg1):Boolean{
if ((((((((_arg1 is WingmanLand)) || ((_arg1 is WingmanLand2)))) || ((_arg1 is WingmanLand3)))) || ((_arg1 is WingmanLand4)))){
return (true);
};
return (false);
}
public function getHealth():Number{
return (health);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function changeTargetPlayer():void{
pla = par.player;
}
function rankWingman(_arg1:MovieClip):Number{
if ((_arg1 is Wingman)){
return (RANK1);
};
if ((_arg1 is Wingman2)){
return (RANK2);
};
if ((_arg1 is Wingman3)){
return (RANK3);
};
if ((_arg1 is Wingman4)){
return (RANK4);
};
if ((_arg1 is Wingman5)){
return (RANK5);
};
if ((_arg1 is Wingman6)){
return (RANK6);
};
if ((_arg1 is Wingman7)){
return (RANK7);
};
if ((_arg1 is Wingman8)){
return (RANK8);
};
if ((_arg1 is WingmanLand)){
return (RANK9);
};
if ((_arg1 is WingmanLand2)){
return (RANK10);
};
if ((_arg1 is WingmanLand3)){
return (RANK11);
};
if ((_arg1 is WingmanLand4)){
return (RANK12);
};
return (0);
}
function bountyReward():void{
var _local1:*;
_local1 = this.parent;
_local1.addMoney(BOUNTY);
_local1.addEXP(EXP);
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
canFireCount = CANFIRE;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new KelipE();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
if ((pla is Player)){
_local4 = (pla.fire.x + randRange(-10, 10));
_local5 = (pla.fire.y + randRange(-10, 10));
par.cbl.drawBuletE(_local2.x, _local2.y, _local4, _local5);
_local3 = new EfekGround();
_local3.x = _local4;
_local3.y = _local5;
par.addChild(_local3);
_local6 = new EfekHit2();
_local6.x = _local4;
_local6.y = _local5;
par.addChild(_local6);
} else {
par.cbl.drawBuletE(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
_local6 = new EfekHit2();
_local6.x = pla.x;
_local6.y = pla.y;
par.addChild(_local6);
};
pla.damage((WEAPONDAMAGE * LevelD));
sound = new EnemyFire2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 148
//EnemyFire2S (EnemyFire2S)
package {
import flash.media.*;
public dynamic class EnemyFire2S extends Sound {
}
}//package
Section 149
//EnemyFire3S (EnemyFire3S)
package {
import flash.media.*;
public dynamic class EnemyFire3S extends Sound {
}
}//package
Section 150
//EnemyFire4S (EnemyFire4S)
package {
import flash.media.*;
public dynamic class EnemyFire4S extends Sound {
}
}//package
Section 151
//EnemyFire5S (EnemyFire5S)
package {
import flash.media.*;
public dynamic class EnemyFire5S extends Sound {
}
}//package
Section 152
//EnemyFire6S (EnemyFire6S)
package {
import flash.media.*;
public dynamic class EnemyFire6S extends Sound {
}
}//package
Section 153
//EnemyFire7S (EnemyFire7S)
package {
import flash.media.*;
public dynamic class EnemyFire7S extends Sound {
}
}//package
Section 154
//EnemyFireS (EnemyFireS)
package {
import flash.media.*;
public dynamic class EnemyFireS extends Sound {
}
}//package
Section 155
//Explode2S (Explode2S)
package {
import flash.media.*;
public dynamic class Explode2S extends Sound {
}
}//package
Section 156
//ExplodeS (ExplodeS)
package {
import flash.media.*;
public dynamic class ExplodeS extends Sound {
}
}//package
Section 157
//GameOverS (GameOverS)
package {
import flash.media.*;
public dynamic class GameOverS extends Sound {
}
}//package
Section 158
//GateClose2S (GateClose2S)
package {
import flash.media.*;
public dynamic class GateClose2S extends Sound {
}
}//package
Section 159
//GateCloseS (GateCloseS)
package {
import flash.media.*;
public dynamic class GateCloseS extends Sound {
}
}//package
Section 160
//IngameS (IngameS)
package {
import flash.media.*;
public dynamic class IngameS extends Sound {
}
}//package
Section 161
//IntroS (IntroS)
package {
import flash.media.*;
public dynamic class IntroS extends Sound {
}
}//package
Section 162
//Kelip (Kelip)
package {
import flash.display.*;
public dynamic class Kelip extends MovieClip {
public function Kelip(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 163
//KelipE (KelipE)
package {
import flash.display.*;
public dynamic class KelipE extends MovieClip {
public function KelipE(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 164
//MainMenuS (MainMenuS)
package {
import flash.media.*;
public dynamic class MainMenuS extends Sound {
}
}//package
Section 165
//miniE (miniE)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class miniE extends MovieClip {
public var par;
public var Target;
public function miniE(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
par = this.parent;
addEventListener(Event.ENTER_FRAME, Folow);
}
function frame20(){
gotoAndPlay(2);
}
public function Folow(_arg1:Event):void{
var _local2:*;
if (Target != null){
if (Target.health > 0){
_local2 = new Point(Target.x, Target.y);
_local2 = Target.parent.localToGlobal(_local2);
y = Math.round((Target.y / 5));
x = Math.round((Target.x / 5));
} else {
visible = false;
};
} else {
removeEventListener(Event.ENTER_FRAME, Folow);
par.removeChild(this);
};
}
}
}//package
Section 166
//miniW (miniW)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
import flash.net.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class miniW extends MovieClip {
public var par;
public var Target;
public function miniW(){
addFrameScript(0, frame1, 19, frame20);
}
function frame1(){
par = this.parent;
addEventListener(Event.ENTER_FRAME, Folow);
}
function frame20(){
gotoAndPlay(2);
}
public function Folow(_arg1:Event):void{
var _local2:*;
if (Target != null){
if (Target.health > 0){
_local2 = new Point(Target.x, Target.y);
_local2 = Target.parent.localToGlobal(_local2);
y = Math.round((Target.y / 5));
x = Math.round((Target.x / 5));
} else {
visible = false;
};
} else {
removeEventListener(Event.ENTER_FRAME, Folow);
par.removeChild(this);
};
}
}
}//package
Section 167
//Peluru (Peluru)
package {
import flash.events.*;
import flash.display.*;
public class Peluru extends MovieClip {
var ySpeed:Number;
public var speed:Number;
var damage:Number;
var tx:Number;
var ty:Number;
var xSpeed:Number;
var thisBullet:MovieClip;
var lifeTime:Number;
public function Peluru(_arg1:Number, _arg2:Number, _arg3:Number):void{
speed = 25;
x = _arg1;
y = _arg2;
rotation = _arg3;
this.addEventListener(Event.ADDED, initialize);
lifeTime = 40;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
function initialize(_arg1:Event):void{
thisBullet = MovieClip(this.parent.getChildByName(this.name));
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
}
public function moveBullet(_arg1:Array):void{
var _local2:*;
var _local3:*;
if (lifeTime > 0){
lifeTime--;
_local2 = this.parent;
for (_local3 in _arg1) {
if (this.hitTestObject(_arg1[_local3].body)){
_arg1[_local3].damage(damage);
deleteBullet();
return;
};
};
x = (x + xSpeed);
y = (y + ySpeed);
} else {
delBulet();
};
}
function delBulet():void{
this.removeEventListener(Event.ADDED, initialize);
this.parent.removeChild(thisBullet);
}
function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 168
//PeluruE (PeluruE)
package {
import flash.events.*;
import flash.display.*;
public class PeluruE extends MovieClip {
var ySpeed:Number;
public var speed:Number;
var damage:Number;
var tx:Number;
var ty:Number;
var xSpeed:Number;
var thisBullet:MovieClip;
var lifeTime:Number;
public function PeluruE(_arg1:Number, _arg2:Number, _arg3:Number):void{
speed = 20;
x = _arg1;
y = _arg2;
rotation = _arg3;
this.addEventListener(Event.ADDED, initialize);
lifeTime = 40;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
function initialize(_arg1:Event):void{
thisBullet = MovieClip(this.parent.getChildByName(this.name));
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
}
public function moveBullet(_arg1:Array):void{
var _local2:*;
var _local3:*;
if (lifeTime > 0){
lifeTime--;
_local2 = this.parent;
for (_local3 in _arg1) {
if (this.hitTestObject(_arg1[_local3].body)){
_arg1[_local3].damage(damage);
deleteBullet();
return;
};
};
x = (x + xSpeed);
y = (y + ySpeed);
} else {
delBulet();
};
}
function delBulet():void{
this.removeEventListener(Event.ADDED, initialize);
this.parent.removeChild(thisBullet);
}
function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 169
//PeluruE10 (PeluruE10)
package {
import flash.events.*;
import flash.display.*;
public class PeluruE10 extends MovieClip {
var ySpeed:Number;
public var speed:Number;
var damage:Number;
var dom:Boolean;// = false
var tx:Number;
var ty:Number;
var xSpeed:Number;
var lifeTime:Number;
public function PeluruE10(_arg1:Number, _arg2:Number, _arg3:Number):void{
dom = false;
super();
speed = 24;
x = _arg1;
y = _arg2;
rotation = _arg3;
lifeTime = 100;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
public function moveBullet(_arg1:Array):void{
var _local2:*;
var _local3:*;
if (lifeTime > 0){
lifeTime--;
if (speed < 25){
if (dom == false){
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
speed = (speed * 0.5);
if (speed < 1){
speed = 2;
rotation = (rotation * -1);
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
dom = true;
};
} else {
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
speed = (speed * 1.3);
if (speed > 15){
speed = 15;
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
};
};
};
_local2 = this.parent;
for (_local3 in _arg1) {
if (this.hitTestObject(_arg1[_local3].body)){
_arg1[_local3].damage(damage);
deleteBullet();
return;
};
};
x = (x + xSpeed);
y = (y + ySpeed);
} else {
delBulet();
};
}
function delBulet():void{
this.parent.removeChild(this);
}
function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 170
//PeluruE2 (PeluruE2)
package {
import flash.events.*;
import flash.display.*;
public class PeluruE2 extends MovieClip {
var maxSpeed:Number;
var ySpeed:Number;
public var speed:Number;
var damage:Number;
var tx:Number;
var ty:Number;
var xSpeed:Number;
var lifeTime:Number;
public function PeluruE2(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=10):void{
speed = _arg4;
x = _arg1;
y = _arg2;
rotation = _arg3;
lifeTime = 40;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
public function moveBullet(_arg1:Array):void{
var _local2:*;
var _local3:*;
if (lifeTime > 0){
lifeTime--;
if (speed < 25){
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
speed = (speed * 1.1);
if (speed > 25){
speed = 25;
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
};
};
_local2 = this.parent;
for (_local3 in _arg1) {
if (this.hitTestObject(_arg1[_local3].body)){
_arg1[_local3].damage(damage);
deleteBullet();
return;
};
};
x = (x + xSpeed);
y = (y + ySpeed);
} else {
delBulet();
};
}
function delBulet():void{
this.parent.removeChild(this);
}
function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 171
//PeluruE3 (PeluruE3)
package {
import flash.events.*;
import flash.display.*;
public class PeluruE3 extends MovieClip {
var ySpeed:Number;
public var speed:Number;
var damage:Number;
var tx:Number;
var ty:Number;
var xSpeed:Number;
var lifeTime:Number;
public function PeluruE3(_arg1:Number, _arg2:Number, _arg3:Number):void{
speed = 10;
x = _arg1;
y = _arg2;
rotation = _arg3;
lifeTime = 40;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
public function moveBullet(_arg1:Array):void{
var _local2:*;
var _local3:*;
if (lifeTime > 0){
lifeTime--;
if (speed < 25){
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
speed = (speed * 1.1);
if (speed > 25){
speed = 25;
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
};
};
_local2 = this.parent;
for (_local3 in _arg1) {
if (this.hitTestObject(_arg1[_local3].body)){
_arg1[_local3].damage(damage);
deleteBullet();
return;
};
};
x = (x + xSpeed);
y = (y + ySpeed);
} else {
delBulet();
};
}
function delBulet():void{
this.parent.removeChild(this);
}
function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 172
//PeluruE4 (PeluruE4)
package {
import flash.events.*;
import flash.display.*;
public class PeluruE4 extends MovieClip {
var ySpeed:Number;
public var speed:Number;
var damage:Number;
var tx:Number;
var ty:Number;
var xSpeed:Number;
var lifeTime:Number;
public function PeluruE4(_arg1:Number, _arg2:Number, _arg3:Number):void{
speed = 5;
x = _arg1;
y = _arg2;
rotation = _arg3;
this.addEventListener(Event.ADDED, initialize);
lifeTime = 200;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
public function moveBullet(_arg1:Array):void{
var _local2:*;
var _local3:*;
if (lifeTime > 0){
lifeTime--;
_local2 = this.parent;
for (_local3 in _arg1) {
if (this.hitTestObject(_arg1[_local3].body)){
_arg1[_local3].damage(damage);
deleteBullet();
return;
};
};
x = (x + xSpeed);
y = (y + ySpeed);
} else {
delBulet();
};
}
function initialize(_arg1:Event):void{
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
}
function delBulet():void{
this.removeEventListener(Event.ADDED, initialize);
this.parent.removeChild(this);
}
function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 173
//PeluruE5 (PeluruE5)
package {
import flash.events.*;
import flash.display.*;
public class PeluruE5 extends MovieClip {
var ySpeed:Number;
public var speed:Number;
var damage:Number;
var tx:Number;
var ty:Number;
var xSpeed:Number;
var lifeTime:Number;
public function PeluruE5(_arg1:Number, _arg2:Number, _arg3:Number):void{
speed = 15;
x = _arg1;
y = _arg2;
rotation = _arg3;
lifeTime = 10;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
public function moveBullet(_arg1:Array):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
_local2 = this.parent;
if (lifeTime > 0){
lifeTime--;
if (speed < 25){
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
speed = (speed * 1.1);
if (speed > 25){
speed = 25;
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
};
};
for (_local3 in _arg1) {
if (this.hitTestObject(_arg1[_local3].body)){
_arg1[_local3].damage(damage);
deleteBullet();
return;
};
};
x = (x + xSpeed);
y = (y + ySpeed);
} else {
_local4 = 0;
while (_local4 < 16) {
_local5 = new PeluruE2(x, y, (_local4 * 22.5), 20);
_local5.setDamage(10);
_local2.addChild(_local5);
_local4++;
};
delBulet();
};
}
function delBulet():void{
this.parent.removeChild(this);
}
function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 174
//PeluruE6 (PeluruE6)
package {
import flash.display.*;
public dynamic class PeluruE6 extends MovieClip {
}
}//package
Section 175
//PeluruElec (PeluruElec)
package {
import flash.events.*;
import flash.display.*;
public class PeluruElec extends MovieClip {
var ySpeed:Number;
public var speed:Number;
public var yStart:Number;
var Level:Number;
var damage:Number;
var tx:Number;
var ty:Number;
var xSpeed:Number;
var thisBullet:MovieClip;
public var xStart:Number;
var lifeTime:Number;
public function PeluruElec(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
speed = 20;
x = _arg1;
y = _arg2;
xStart = _arg1;
yStart = _arg2;
Level = _arg4;
rotation = _arg3;
this.addEventListener(Event.ADDED, initialize);
lifeTime = 55;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
function initialize(_arg1:Event):void{
thisBullet = MovieClip(this.parent.getChildByName(this.name));
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
alpha = 0;
}
public function moveBullet(_arg1:Array, _arg2:Array):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local3 = this.parent;
_local4 = 0;
while (_local4 < lifeTime) {
for (_local5 in _arg1) {
if (this.hitTestObject(_arg1[_local5].body)){
_arg1[_local5].damage(damage);
_local3.cel.electric(xStart, yStart, x, y, 1, Level);
_local3.doHit(_local3, x, y);
this.delBulet();
return;
};
};
for (_local5 in _arg2) {
if (this.hitTestObject(_arg2[_local5])){
_local6 = new EfekGround();
_local6.x = x;
_local6.y = y;
_local3.addChild(_local6);
this.delBulet();
_local3.cel.electric(xStart, yStart, x, y, 1, Level);
return;
};
};
x = (x + xSpeed);
y = (y + ySpeed);
_local4++;
};
_local3.cel.electric(xStart, yStart, x, y, 1, Level);
delBulet();
}
function delBulet():void{
this.removeEventListener(Event.ADDED, initialize);
this.parent.removeChild(thisBullet);
}
public function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 176
//PeluruElec2 (PeluruElec2)
package {
import flash.events.*;
import flash.display.*;
public class PeluruElec2 extends MovieClip {
var ySpeed:Number;
public var speed:Number;
public var yStart:Number;
var Level:Number;
var damage:Number;
var tx:Number;
var ty:Number;
var xSpeed:Number;
var thisBullet:MovieClip;
public var xStart:Number;
var lifeTime:Number;
public function PeluruElec2(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
speed = 20;
x = _arg1;
y = _arg2;
xStart = _arg1;
yStart = _arg2;
Level = _arg4;
rotation = _arg3;
this.addEventListener(Event.ADDED, initialize);
lifeTime = 55;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
function initialize(_arg1:Event):void{
thisBullet = MovieClip(this.parent.getChildByName(this.name));
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
alpha = 0;
}
public function moveBullet(_arg1:Array, _arg2:Array):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local3 = this.parent;
_local4 = 0;
while (_local4 < lifeTime) {
for (_local5 in _arg1) {
if (this.hitTestObject(_arg1[_local5].body)){
_arg1[_local5].damage(damage);
_local3.celT.electric(xStart, yStart, x, y, 1, Level);
_local3.doHit(_local3, x, y);
this.delBulet();
return;
};
};
for (_local5 in _arg2) {
if (this.hitTestObject(_arg2[_local5])){
_local6 = new EfekGround();
_local6.x = x;
_local6.y = y;
_local3.addChild(_local6);
this.delBulet();
_local3.celT.electric(xStart, yStart, x, y, 1, Level);
return;
};
};
x = (x + xSpeed);
y = (y + ySpeed);
_local4++;
};
_local3.celT.electric(xStart, yStart, x, y, 1, Level);
delBulet();
}
function delBulet():void{
this.removeEventListener(Event.ADDED, initialize);
this.parent.removeChild(thisBullet);
}
public function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 177
//PeluruLaser (PeluruLaser)
package {
import flash.events.*;
import flash.display.*;
public class PeluruLaser extends MovieClip {
var ySpeed:Number;
public var speed:Number;
public var yStart:Number;
var Level:Number;
var damage:Number;
var tx:Number;
var ty:Number;
var xSpeed:Number;
var thisBullet:MovieClip;
public var xStart:Number;
var lifeTime:Number;
public function PeluruLaser(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
speed = 20;
x = _arg1;
y = _arg2;
xStart = _arg1;
yStart = _arg2;
Level = _arg4;
rotation = _arg3;
this.addEventListener(Event.ADDED, initialize);
lifeTime = 55;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
function initialize(_arg1:Event):void{
thisBullet = MovieClip(this.parent.getChildByName(this.name));
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
alpha = 0;
}
public function moveBullet(_arg1:Array, _arg2:Array):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local3 = this.parent;
_local4 = 0;
while (_local4 < lifeTime) {
for (_local5 in _arg1) {
if (this.hitTestObject(_arg1[_local5].body)){
_arg1[_local5].damage(damage);
_local3.cbl.drawLaser(xStart, yStart, x, y, Level);
_local3.doHit(_local3, x, y);
_local6 = new EfekHit2();
_local6.x = x;
_local6.y = y;
_local3.addChild(_local6);
this.delBulet();
return;
};
};
for (_local5 in _arg2) {
if (this.hitTestObject(_arg2[_local5])){
_local7 = new EfekGround();
_local7.x = x;
_local7.y = y;
_local3.addChild(_local7);
_local6 = new EfekHit2();
_local6.x = x;
_local6.y = y;
_local3.addChild(_local6);
this.delBulet();
_local3.cbl.drawLaser(xStart, yStart, x, y, Level);
return;
};
};
x = (x + xSpeed);
y = (y + ySpeed);
_local4++;
};
_local3.cbl.drawLaser(xStart, yStart, x, y, Level);
_local6 = new EfekHit2();
_local6.x = x;
_local6.y = y;
_local3.addChild(_local6);
delBulet();
}
function delBulet():void{
this.removeEventListener(Event.ADDED, initialize);
this.parent.removeChild(thisBullet);
}
public function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 178
//PeluruNew (PeluruNew)
package {
import flash.events.*;
import flash.display.*;
public class PeluruNew extends MovieClip {
var ySpeed:Number;
public var speed:Number;
var damage:Number;
var tx:Number;
var ty:Number;
public var body:MovieClip;
var xSpeed:Number;
var thisBullet:MovieClip;
var lifeTime:Number;
public function PeluruNew(_arg1:Number, _arg2:Number, _arg3:Number):void{
speed = 80;
x = _arg1;
y = _arg2;
rotation = _arg3;
this.addEventListener(Event.ADDED, initialize);
lifeTime = 40;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
function initialize(_arg1:Event):void{
thisBullet = MovieClip(this.parent.getChildByName(this.name));
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
}
public function moveBullet(_arg1:Array, _arg2:Array):void{
var _local3:*;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:*;
if (lifeTime > 0){
lifeTime--;
if (lifeTime == 38){
addChild(new PeluruNewB());
};
_local3 = this.parent;
_local4 = 0;
while (_local4 < 5) {
x = (x + (xSpeed * 0.2));
y = (y + (ySpeed * 0.2));
for (_local5 in _arg1) {
if (body.hitTestObject(_arg1[_local5].body)){
_arg1[_local5].damage(damage);
deleteBullet();
_local6 = new EfekHit2();
_local6.x = x;
_local6.y = y;
_local3.addChild(_local6);
return;
};
};
for (_local5 in _arg2) {
if (body.hitTestObject(_arg2[_local5])){
_local7 = new EfekGround();
_local7.x = x;
_local7.y = y;
_local3.addChild(_local7);
_local6 = new EfekHit2();
_local6.x = x;
_local6.y = y;
_local3.addChild(_local6);
deleteBullet();
return;
};
};
_local4++;
};
} else {
delBulet();
};
}
function delBulet():void{
this.removeEventListener(Event.ADDED, initialize);
this.parent.removeChild(thisBullet);
}
function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 179
//PeluruNewB (PeluruNewB)
package {
import flash.display.*;
public dynamic class PeluruNewB extends MovieClip {
}
}//package
Section 180
//PeluruTower (PeluruTower)
package {
import flash.events.*;
import flash.display.*;
public class PeluruTower extends MovieClip {
var ySpeed:Number;
public var speed:Number;
public var yStart:Number;
var Level:Number;
var damage:Number;
var tx:Number;
var ty:Number;
var xSpeed:Number;
var thisBullet:MovieClip;
public var xStart:Number;
var lifeTime:Number;
public function PeluruTower(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
speed = 20;
x = _arg1;
y = _arg2;
xStart = _arg1;
yStart = _arg2;
Level = _arg4;
rotation = _arg3;
this.addEventListener(Event.ADDED, initialize);
lifeTime = 55;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
function initialize(_arg1:Event):void{
thisBullet = MovieClip(this.parent.getChildByName(this.name));
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
alpha = 0;
}
public function moveBullet(_arg1:Array, _arg2:Array):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
_local3 = this.parent;
_local4 = 0;
while (_local4 < lifeTime) {
for (_local5 in _arg1) {
if (this.hitTestObject(_arg1[_local5].body)){
_arg1[_local5].damage(damage);
_local3.cbl.drawBulet2(xStart, yStart, x, y, Level);
_local3.doHit(_local3, x, y);
_local6 = new EfekHit2();
_local6.x = x;
_local6.y = y;
_local3.addChild(_local6);
this.delBulet();
return;
};
};
for (_local5 in _arg2) {
if (this.hitTestObject(_arg2[_local5])){
_local7 = new EfekGround();
_local7.x = x;
_local7.y = y;
_local3.addChild(_local7);
_local6 = new EfekHit2();
_local6.x = x;
_local6.y = y;
_local3.addChild(_local6);
this.delBulet();
_local3.cbl.drawBulet2(xStart, yStart, x, y, Level);
return;
};
};
x = (x + xSpeed);
y = (y + ySpeed);
_local4++;
};
_local3.cbl.drawBulet2(xStart, yStart, x, y, Level);
_local6 = new EfekHit2();
_local6.x = x;
_local6.y = y;
_local3.addChild(_local6);
delBulet();
}
function delBulet():void{
this.removeEventListener(Event.ADDED, initialize);
this.parent.removeChild(thisBullet);
}
public function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 181
//Platform (Platform)
package {
import flash.display.*;
public dynamic class Platform extends MovieClip {
}
}//package
Section 182
//Platform2 (Platform2)
package {
import flash.display.*;
public dynamic class Platform2 extends MovieClip {
}
}//package
Section 183
//Platform3 (Platform3)
package {
import flash.display.*;
public dynamic class Platform3 extends MovieClip {
}
}//package
Section 184
//Platform4 (Platform4)
package {
import flash.display.*;
public dynamic class Platform4 extends MovieClip {
}
}//package
Section 185
//Player (Player)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Player extends MovieClip {
const SPEED:Number = 3;
const CANFIRE:Number = 10;
var maxPower:Number;
public var fire:MovieClip;
var health:Number;
var speed:Number;
var sudut:Number;
var canFireCount:Number;// = 0
var par;
var isDead:Boolean;// = false
public var fire2:MovieClip;
public var body2:MovieClip;
public var body3:MovieClip;
public var body4:MovieClip;
var angle:Number;
var LevelD4:Number;// = 1
public var body1:MovieClip;
var LevelD2:Number;// = 1
var LevelD3:Number;// = 1
var LevelD1:Number;// = 1
var power:Number;
var sound:Sound;
var tempy:Number;
var tempx:Number;
var LevelH:Number;// = 1
var LevelR:Number;// = 1
var LevelP:Number;// = 1
var weaponType:Number;// = 1
public var body:MovieClip;
var canFireWeapon:Boolean;// = true
var sudut2:Number;
public static const MAXHEALTH:Number = 500;
public static const MAXPOWER:Number = 100;
public static var WEAPONDAMAGE = 4;
public function Player():void{
isDead = false;
canFireWeapon = true;
canFireCount = 0;
LevelH = 1;
LevelR = 1;
LevelP = 1;
LevelD1 = 1;
LevelD2 = 1;
LevelD3 = 1;
LevelD4 = 1;
weaponType = 1;
super();
addFrameScript(0, frame1, 1, frame2);
par = this.parent;
speed = SPEED;
health = (MAXHEALTH * LevelH);
maxPower = (MAXPOWER * LevelP);
power = maxPower;
}
public function movePlayer():void{
var _local1:*;
var _local2:*;
par = this.parent;
if (LevelP < 3){
fire2.visible = false;
} else {
fire2.visible = true;
};
if (health > 0){
_local1 = new Point(fire.fire.x, fire.fire.y);
_local1 = fire.fire.localToGlobal(_local1);
_local1 = this.globalToLocal(_local1);
tempx = (par.mouseX - _local1.x);
tempy = (par.mouseY - _local1.y);
angle = Math.atan2(tempy, tempx);
sudut = ((angle * 180) / Math.PI);
fire.fire.rotation = sudut;
_local2 = new Point(fire2.fire.x, fire2.fire.y);
_local2 = fire2.fire.localToGlobal(_local2);
_local2 = this.globalToLocal(_local2);
tempx = (par.mouseX - _local2.x);
tempy = (par.mouseY - _local2.y);
angle = Math.atan2(tempy, tempx);
sudut2 = ((angle * 180) / Math.PI);
fire2.fire.rotation = sudut2;
if (power < maxPower){
power = (power + (0.5 * LevelR));
if (power >= maxPower){
power = maxPower;
};
};
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (par.sKeyIsDown){
};
if (par.wKeyIsDown){
};
if (par.aKeyIsDown){
};
if (par.dKeyIsDown){
};
if (par.key1IsDown){
if (LevelD1 > 0){
weaponType = 1;
};
};
if (par.key2IsDown){
if (LevelD2 > 0){
weaponType = 2;
};
};
if (par.key3IsDown){
if (LevelD3 > 0){
weaponType = 3;
};
};
if (par.key4IsDown){
if (LevelD4 > 0){
weaponType = 4;
};
};
if (par.gKeyIsDown){
};
if (par.rKeyIsDown){
};
if (par.leftClikIsDown){
fireWeapon();
};
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function setLevelD2(_arg1:Number){
LevelD2 = _arg1;
}
public function setLevelD3(_arg1:Number){
LevelD3 = _arg1;
}
public function setLevelD4(_arg1:Number){
LevelD4 = _arg1;
}
public function setLevelD1(_arg1:Number){
LevelD1 = _arg1;
}
public function resetStat():void{
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
var _local2:*;
_local2 = getPersenHealth();
LevelH = _arg1;
health = (_local2 * getMaxHealth());
}
public function getMaxHealth():Number{
return ((LevelH * MAXHEALTH));
}
public function setLevelR(_arg1:Number){
LevelP = _arg1;
maxPower = (MAXPOWER * LevelP);
power = maxPower;
}
function frame1(){
stop();
}
function frame2(){
stop();
}
public function deletePlayer():void{
}
public function TargetX(_arg1:Number):Number{
switch (_arg1){
case 1:
return (body1.x);
case 2:
return (body2.x);
case 3:
return (body3.x);
case 4:
return (body4.x);
};
return (x);
}
public function TargetY(_arg1:Number):Number{
switch (_arg1){
case 1:
return (body1.y);
case 2:
return (body2.y);
case 3:
return (body3.y);
case 4:
return (body4.y);
};
return (y);
}
public function setWeapon(_arg1:Number):Boolean{
var _local2:Boolean;
_local2 = false;
switch (_arg1){
case 1:
if (LevelD1 > 0){
weaponType = 1;
_local2 = true;
};
break;
case 2:
if (LevelD2 > 0){
weaponType = 2;
_local2 = true;
};
break;
case 3:
if (LevelD3 > 0){
weaponType = 3;
_local2 = true;
};
break;
case 4:
if (LevelD4 > 0){
weaponType = 4;
_local2 = true;
};
break;
};
return (_local2);
}
public function getPower():Number{
return ((power / maxPower));
}
public function getHealth():Number{
return (health);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
par.blinkBar();
sound = new BasehitS();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
}
function followMouse():void{
sudut = 0;
rotation = sudut;
if ((((((((par.mouseX > 0)) && ((par.mouseX < 640)))) && ((par.mouseY > 0)))) && ((par.mouseY < 480)))){
x = (x - ((x - par.mouseX) / speed));
y = (y - ((y - par.mouseY) / speed));
};
}
public function getWeaponType():Number{
return (weaponType);
}
public function getPersenHealth():Number{
return ((health / getMaxHealth()));
}
function fireWeapon(){
var _local1:MovieClip;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (canFireWeapon == true){
_local2 = new Point(fire.fire.fire.x, fire.fire.fire.y);
_local2 = fire.fire.localToGlobal(_local2);
_local2 = this.globalToLocal(_local2);
tempx = (par.mouseX - _local2.x);
tempy = (par.mouseY - _local2.y);
angle = Math.atan2(tempy, tempx);
_local3 = ((angle * 180) / Math.PI);
_local4 = new Point(fire2.fire.fire.x, fire2.fire.fire.y);
_local4 = fire2.fire.localToGlobal(_local4);
_local4 = this.globalToLocal(_local4);
tempx = (par.mouseX - _local4.x);
tempy = (par.mouseY - _local4.y);
angle = Math.atan2(tempy, tempx);
_local5 = ((angle * 180) / Math.PI);
if (weaponType == 1){
if ((((power >= 10)) && ((LevelD1 > 0)))){
fire.fire.play();
power = (power - 10);
canFireWeapon = false;
par = this.parent;
canFireCount = CANFIRE;
if (fire2.visible == true){
fire2.fire.play();
_local1 = new PeluruNew(_local2.x, _local2.y, _local3);
_local1.setDamage(((WEAPONDAMAGE * LevelD1) * 0.75));
par.addChild(_local1);
_local1 = new PeluruNew(_local4.x, _local4.y, _local5);
_local1.setDamage(((WEAPONDAMAGE * LevelD1) * 0.75));
par.addChild(_local1);
_local6 = new EfekHit3();
_local6.x = _local4.x;
_local6.y = _local4.y;
par.addChild(_local6);
} else {
_local1 = new PeluruNew(_local2.x, _local2.y, _local3);
_local1.setDamage((WEAPONDAMAGE * LevelD1));
par.addChild(_local1);
};
sound = new Tower1S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
_local6 = new EfekHit3();
_local6.x = _local2.x;
_local6.y = _local2.y;
par.addChild(_local6);
} else {
par.noPower();
};
};
if (weaponType == 2){
if ((((power >= 20)) && ((LevelD2 > 0)))){
fire.fire.play();
power = (power - 23);
canFireWeapon = false;
par = this.parent;
canFireCount = (CANFIRE * 2);
if (fire2.visible == true){
fire2.fire.play();
_local1 = new PeluruElec(_local2.x, _local2.y, _local3, LevelD2);
_local1.setDamage((((WEAPONDAMAGE * LevelD2) * 3) * 0.75));
par.addChild(_local1);
_local1 = new PeluruElec2(_local4.x, _local4.y, _local5, LevelD2);
_local1.setDamage((((WEAPONDAMAGE * LevelD2) * 3) * 0.75));
par.addChild(_local1);
_local6 = new EfekHit3();
_local6.x = _local4.x;
_local6.y = _local4.y;
par.addChild(_local6);
} else {
_local1 = new PeluruElec(_local2.x, _local2.y, _local3, LevelD2);
_local1.setDamage(((WEAPONDAMAGE * LevelD2) * 3));
par.addChild(_local1);
};
sound = new Tower2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
_local6 = new EfekHit3();
_local6.x = _local2.x;
_local6.y = _local2.y;
par.addChild(_local6);
} else {
par.noPower();
};
};
if (weaponType == 3){
if ((((power >= 5)) && ((LevelD3 > 0)))){
fire.fire.play();
power = (power - 4);
canFireWeapon = false;
par = this.parent;
canFireCount = Math.round((CANFIRE / 10));
if (fire2.visible == true){
fire2.fire.play();
_local1 = new PeluruNew(_local2.x, _local2.y, _local3);
_local1.setDamage((((WEAPONDAMAGE * LevelD3) * 0.25) * 0.75));
par.addChild(_local1);
_local1 = new PeluruNew(_local4.x, _local4.y, _local5);
_local1.setDamage((((WEAPONDAMAGE * LevelD3) * 0.25) * 0.75));
par.addChild(_local1);
_local6 = new EfekHit3();
_local6.x = _local4.x;
_local6.y = _local4.y;
par.addChild(_local6);
} else {
_local1 = new PeluruNew(_local2.x, _local2.y, _local3);
_local1.setDamage(((WEAPONDAMAGE * LevelD3) * 0.25));
par.addChild(_local1);
};
sound = new Tower1S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
_local6 = new EfekHit3();
_local6.x = _local2.x;
_local6.y = _local2.y;
par.addChild(_local6);
} else {
par.noPower();
};
};
if (weaponType == 4){
if ((((power >= 20)) && ((LevelD4 > 0)))){
fire.fire.play();
power = (power - 20);
canFireWeapon = false;
par = this.parent;
canFireCount = CANFIRE;
if (fire2.visible == true){
fire2.fire.play();
_local1 = new PeluruNew(_local2.x, _local2.y, _local3);
_local1.setDamage(((WEAPONDAMAGE * LevelD4) * 0.75));
par.addChild(_local1);
_local1 = new PeluruNew(_local2.x, _local2.y, (_local3 - 2));
_local1.setDamage(((WEAPONDAMAGE * LevelD4) * 0.75));
par.addChild(_local1);
_local1 = new PeluruNew(_local2.x, _local2.y, (_local3 + 2));
_local1.setDamage(((WEAPONDAMAGE * LevelD4) * 0.75));
par.addChild(_local1);
_local1 = new PeluruNew(_local4.x, _local4.y, _local5);
_local1.setDamage(((WEAPONDAMAGE * LevelD4) * 0.75));
par.addChild(_local1);
_local1 = new PeluruNew(_local4.x, _local4.y, (_local5 - 2));
_local1.setDamage(((WEAPONDAMAGE * LevelD4) * 0.75));
par.addChild(_local1);
_local1 = new PeluruNew(_local4.x, _local4.y, (_local5 + 2));
_local1.setDamage(((WEAPONDAMAGE * LevelD4) * 0.75));
par.addChild(_local1);
_local6 = new EfekHit3();
_local6.x = _local4.x;
_local6.y = _local4.y;
par.addChild(_local6);
} else {
_local1 = new PeluruNew(_local2.x, _local2.y, _local3);
_local1.setDamage((WEAPONDAMAGE * LevelD4));
par.addChild(_local1);
_local1 = new PeluruNew(_local2.x, _local2.y, (_local3 - 2));
_local1.setDamage((WEAPONDAMAGE * LevelD4));
par.addChild(_local1);
_local1 = new PeluruNew(_local2.x, _local2.y, (_local3 + 2));
_local1.setDamage((WEAPONDAMAGE * LevelD4));
par.addChild(_local1);
};
sound = new Tower4S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
_local6 = new EfekHit3();
_local6.x = _local2.x;
_local6.y = _local2.y;
par.addChild(_local6);
} else {
par.noPower();
};
};
};
}
public function setLevelRL(_arg1:Number){
LevelR = _arg1;
}
}
}//package
Section 186
//Roket (Roket)
package {
import flash.events.*;
import flash.display.*;
public class Roket extends MovieClip {
var ySpeed:Number;
public var speed:Number;
public var yStart:Number;
var damage:Number;
var tx:Number;
var target;
var ty:Number;
var xSpeed:Number;
var thisBullet:MovieClip;
public var xStart:Number;
var lifeTime:Number;
public function Roket(_arg1:Number, _arg2:Number, _arg3:MovieClip):void{
speed = 1;
x = _arg1;
y = _arg2;
xStart = _arg1;
yStart = _arg2;
target = _arg3;
this.addEventListener(Event.ADDED, initialize);
lifeTime = 90;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
function initialize(_arg1:Event):void{
thisBullet = MovieClip(this.parent.getChildByName(this.name));
}
public function moveBullet(_arg1:Array):void{
var _local2:Boolean;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
_local2 = false;
if (lifeTime < 0){
delBulet();
return;
};
_local2 = true;
if (_local2){
if (target.getHealth() > 0){
_local3 = (target.x - x);
_local4 = (target.y - y);
_local5 = Math.atan2(_local4, _local3);
_local6 = ((_local5 * 180) / Math.PI);
rotation = _local6;
};
speed = (speed * 1.1);
if (speed > 13){
speed = 13;
};
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
lifeTime--;
x = (x + xSpeed);
y = (y + ySpeed);
for (_local7 in _arg1) {
if (this.hitTestObject(_arg1[_local7].body)){
_arg1[_local7].damage(damage);
this.delBulet();
return;
};
};
};
}
function delBulet():void{
var _local1:*;
var _local2:*;
_local1 = new BlastRoket();
_local1.x = x;
_local1.y = y;
_local2 = this.parent;
_local2.addChild(_local1);
this.removeEventListener(Event.ADDED, initialize);
this.parent.removeChild(thisBullet);
}
public function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 187
//RoketB (RoketB)
package {
import flash.events.*;
import flash.display.*;
public class RoketB extends MovieClip {
var ySpeed:Number;
public var speed:Number;
public var yStart:Number;
var damage:Number;
var tx:Number;
var target;
var ty:Number;
var xSpeed:Number;
public var xStart:Number;
var lifeTime:Number;
public function RoketB(_arg1:Number, _arg2:Number, _arg3:MovieClip):void{
speed = 1;
x = _arg1;
y = _arg2;
xStart = _arg1;
yStart = _arg2;
target = _arg3;
lifeTime = 90;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
public function moveBullet(_arg1:Array):void{
var _local2:Boolean;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
_local2 = false;
if (lifeTime < 0){
delBulet();
return;
};
_local2 = true;
if (_local2){
if (target.getHealth() > 0){
_local3 = (target.x - x);
_local4 = (target.y - y);
_local5 = Math.atan2(_local4, _local3);
_local6 = ((_local5 * 180) / Math.PI);
rotation = _local6;
};
speed = (speed * 1.1);
if (speed > 25){
speed = 25;
};
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
lifeTime--;
x = (x + xSpeed);
y = (y + ySpeed);
for (_local7 in _arg1) {
if (this.hitTestObject(_arg1[_local7].body)){
_arg1[_local7].damage(damage);
this.delBulet();
return;
};
};
};
}
function delBulet():void{
var _local1:*;
var _local2:*;
_local1 = new BlastRoket();
_local1.x = x;
_local1.y = y;
_local2 = this.parent;
_local2.addChild(_local1);
_local2.removeChild(this);
}
public function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 188
//RoketBoss (RoketBoss)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
public class RoketBoss extends MovieClip {
var sound:Sound;
var ySpeed:Number;
public var speed:Number;
var damage:Number;
var tx:Number;
var ty:Number;
var xSpeed:Number;
var thisBullet:MovieClip;
var lifeTime:Number;
public function RoketBoss(_arg1:Number, _arg2:Number, _arg3:Number):void{
speed = 25;
x = _arg1;
y = _arg2;
rotation = _arg3;
this.addEventListener(Event.ADDED, initialize);
lifeTime = 40;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
function initialize(_arg1:Event):void{
thisBullet = MovieClip(this.parent.getChildByName(this.name));
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
}
public function moveBullet(_arg1:Array):void{
var _local2:*;
var _local3:*;
if (lifeTime > 0){
lifeTime--;
_local2 = this.parent;
for (_local3 in _arg1) {
if (this.hitTestObject(_arg1[_local3].body)){
_arg1[_local3].damage(damage);
deleteBullet();
sound = new ExplodeS();
sound.play(0, 1, new SoundTransform(_local2.parent.parent.efekSound));
return;
};
};
x = (x + xSpeed);
y = (y + ySpeed);
} else {
delBulet();
};
}
function delBulet():void{
var _local1:*;
var _local2:*;
_local1 = new Blast2();
_local1.x = x;
_local1.y = y;
_local2 = this.parent;
_local2.addChild(_local1);
this.removeEventListener(Event.ADDED, initialize);
this.parent.removeChild(thisBullet);
}
function deleteBullet():void{
lifeTime = -1;
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 189
//RoketS (RoketS)
package {
import flash.media.*;
public dynamic class RoketS extends Sound {
}
}//package
Section 190
//Scrap1 (Scrap1)
package {
import flash.display.*;
public dynamic class Scrap1 extends MovieClip {
}
}//package
Section 191
//Scrap2 (Scrap2)
package {
import flash.display.*;
public dynamic class Scrap2 extends MovieClip {
}
}//package
Section 192
//Scrap3 (Scrap3)
package {
import flash.display.*;
public dynamic class Scrap3 extends MovieClip {
}
}//package
Section 193
//Ship (Ship)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Ship extends MovieClip {
const SPEED:Number = 3;
const MAXHEALTH:Number = 100;
const CANFIRE:Number = 10;
var blinkCount:Number;// = 2
var sound:Sound;
var speed:Number;
var health:Number;
var LevelR:Number;// = 3
var weaponType:Number;// = 1
var LevelH:Number;// = 3
var LevelP:Number;// = 3
var canFireCount:Number;// = 0
var WEAPONDAMAGE;// = 5
var par;
public var body:MovieClip;
var blink:Boolean;// = true
var isDead:Boolean;// = false
var canFireWeapon:Boolean;// = true
public function Ship():void{
isDead = false;
canFireWeapon = true;
canFireCount = 0;
WEAPONDAMAGE = 5;
LevelH = 3;
LevelR = 3;
LevelP = 3;
weaponType = 1;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
par = this.parent;
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function getWeaponType():Number{
return (weaponType);
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function getMaxHealth():Number{
return ((LevelH * MAXHEALTH));
}
public function movePlayer():void{
par = this.parent;
if (health > 0){
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
followMouse();
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
fireWeapon();
} else {
deletePlayer();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function resetStat():void{
health = (MAXHEALTH * LevelH);
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
public function setLevelP(_arg1:Number){
LevelP = _arg1;
}
public function getHealth():Number{
return (health);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
}
function followMouse():void{
var _local1:*;
var _local2:*;
if ((((((((par.mouseX > 0)) && ((par.mouseX < 640)))) && ((par.mouseY > 0)))) && ((par.mouseY < 480)))){
_local1 = ((x - par.mouseX) / speed);
_local2 = ((y - par.mouseY) / speed);
x = (x - _local1);
y = (y - _local2);
if (_local2 > 3){
if (currentFrame != 3){
gotoAndStop("up");
};
};
if (_local2 < -3){
if (currentFrame != 2){
gotoAndStop("down");
};
};
if ((((_local2 > -3)) && ((_local2 < 3)))){
if (currentFrame != 1){
gotoAndStop("stand");
};
};
};
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
function frame1(){
stop();
}
public function deletePlayer():void{
par.removeChild(this);
}
function frame3(){
stop();
}
function frame2(){
stop();
}
public function getPersenHealth():Number{
return ((health / (MAXHEALTH * LevelH)));
}
function fireWeapon(){
var _local1:MovieClip;
if (canFireWeapon == true){
canFireWeapon = false;
canFireCount = (10 / LevelR);
_local1 = new Peluru(x, y, 0);
_local1.setDamage((10 * LevelP));
par.addChild(_local1);
sound = new ShotShipBossS();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 194
//ShotShipBossS (ShotShipBossS)
package {
import flash.media.*;
public dynamic class ShotShipBossS extends Sound {
}
}//package
Section 195
//spark (spark)
package {
import flash.display.*;
public dynamic class spark extends MovieClip {
public function spark(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 196
//spark2 (spark2)
package {
import flash.display.*;
public dynamic class spark2 extends MovieClip {
public function spark2(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 197
//Tower1S (Tower1S)
package {
import flash.media.*;
public dynamic class Tower1S extends Sound {
}
}//package
Section 198
//Tower2S (Tower2S)
package {
import flash.media.*;
public dynamic class Tower2S extends Sound {
}
}//package
Section 199
//Tower3S (Tower3S)
package {
import flash.media.*;
public dynamic class Tower3S extends Sound {
}
}//package
Section 200
//Tower4S (Tower4S)
package {
import flash.media.*;
public dynamic class Tower4S extends Sound {
}
}//package
Section 201
//UnitTrainS (UnitTrainS)
package {
import flash.media.*;
public dynamic class UnitTrainS extends Sound {
}
}//package
Section 202
//Wingman (Wingman)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Wingman extends MovieClip {
const SPEED:Number = 6;
const SPEEDROT:Number = 5;
const RANK1:Number = 8;
const RANK3:Number = 6;
const RANK5:Number = 15;
const RANK7:Number = 7;
const RANK4:Number = 4;
const RANK2:Number = 20;
const RELOAD:Number = 6;
const RANK8:Number = 5;
const RANK9:Number = 9;
const RANK6:Number = 10;
const CANFIRE:Number = 10;
var counterPart:Number;// = 2
public var perimeter:MovieClip;
public var fire:MovieClip;
var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var speedR:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var ySpeed:Number;
var targetSudut:Number;
var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var target;
var cekSudut:Number;// = 0
var reload:Number;// = 6
public var body:MovieClip;
var doneReload:Boolean;// = false
var behaviorCount:Number;// = 0
var canFireWeapon:Boolean;// = true
var pla;
var targetLoc:Number;
public static const MAXHEALTH:Number = 6;
public static var WEAPONDAMAGE = 4;
public function Wingman():void{
canFireWeapon = true;
canFireCount = 0;
isDead = false;
behaviorCount = 0;
cekSudut = 0;
LevelH = 1;
LevelR = 1;
LevelD = 1;
reload = RELOAD;
doneReload = false;
targetLoc = randRange(1, 4);
counterPart = 2;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
speed = SPEED;
speedR = SPEEDROT;
health = MAXHEALTH;
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function changeTargetAir():void{
var _local1:Array;
var _local2:*;
var _local3:*;
par = this.parent;
_local1 = new Array();
_local1 = par.getEnemy();
for (_local3 in _local1) {
if (_local2 == null){
_local2 = _local1[_local3];
} else {
if (rankEnemy(_local2) < rankEnemy(_local1[_local3])){
_local2 = _local1[_local3];
} else {
if (_local2.getPersenHealth() > _local1[_local3].getPersenHealth()){
_local2 = _local1[_local3];
};
};
};
};
if (_local2 == null){
_local2 = seekTargetPlayer();
};
pla = _local2;
cekSudut = 0;
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function frame3(){
stop();
}
function seekTargetPlayer():MovieClip{
targetLoc = randRange(1, 4);
return (par.player);
}
function frame1(){
stop();
}
public function moveWingman():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Array;
var _local6:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
par.doTrail(par, x, y);
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (!isNaN(targetSudut)){
cekRot(targetSudut);
};
if (rotation == targetSudut){
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
} else {
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speedR);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speedR);
};
x = (x + xSpeed);
y = (y + ySpeed);
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (perimeter.hitTestObject(pla.body)){
if ((pla is Player)){
} else {
fireWeapon();
};
};
if (doneReload == false){
if (cekSudut <= 0){
if (pla == par.player){
_local1 = (pla.TargetX(targetLoc) - x);
_local2 = (pla.TargetY(targetLoc) - y);
_local5 = new Array();
_local5 = par.getEnemy();
if (_local5.length > 0){
changeTargetAir();
};
if (targetSudut == rotation){
changeTargetAir();
};
} else {
_local1 = (pla.x - x);
_local2 = (pla.y - y);
};
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
targetSudut = _local4;
cekSudut = 5;
} else {
cekSudut--;
};
if (y > 300){
targetSudut = -90;
};
if (y < -10){
targetSudut = 90;
};
if (behaviorCount > 0){
behaviorCount--;
} else {
if (pla == par.player){
behaviorCount = 50;
changeTargetLand();
};
};
if ((((x > 700)) || ((x < 0)))){
if (behaviorCount <= 0){
behaviorCount = 50;
changeTargetLand();
};
};
if (pla.getHealth() <= 0){
changeTargetAir();
};
} else {
reload++;
changeTargetLand();
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (reload <= 0){
doneReload = true;
targetSudut = -(targetSudut);
};
} else {
_local6 = new Blast1();
_local6.x = x;
_local6.y = y;
par.addChild(_local6);
par.quake();
deleteWingman();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
function frame2(){
stop();
}
function rankEnemy(_arg1:MovieClip):Number{
if ((_arg1 is Enemy)){
return (RANK1);
};
if ((_arg1 is Enemy2)){
return (RANK2);
};
if ((_arg1 is Enemy3)){
return (RANK3);
};
if ((_arg1 is Enemy4)){
return (RANK4);
};
if ((_arg1 is Enemy5)){
return (RANK5);
};
if ((_arg1 is Enemy6)){
return (RANK6);
};
if ((_arg1 is Enemy7)){
return (RANK7);
};
if ((_arg1 is Enemy8)){
return (RANK8);
};
if ((_arg1 is Enemy9)){
return (RANK9);
};
return (0);
}
function cekRot(_arg1:Number):void{
var _local2:Boolean;
if ((((((((_arg1 < 170)) && ((rotation < 170)))) && ((_arg1 > -170)))) && ((rotation > -170)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 < -135)) && ((rotation < -135)))) && ((_arg1 > -180)))) && ((rotation > -180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 > 135)) && ((rotation > 135)))) && ((_arg1 < 180)))) && ((rotation < 180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((_arg1 > 135)) && ((rotation < -135)))){
_local2 = false;
} else {
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
};
};
};
};
if (_local2){
rotation = (rotation + (speedR * 2));
if (currentFrame != 2){
gotoAndStop("down");
};
} else {
rotation = (rotation - (speedR * 2));
if (currentFrame != 3){
gotoAndStop("up");
};
};
if (Math.abs((_arg1 - rotation)) <= (speed * 2)){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
if (x > 960){
rotation = targetSudut;
gotoAndStop("stand");
};
}
public function changeTargetLand():void{
pla = par.player;
cekSudut = 0;
}
public function getHealth():Number{
return (health);
}
public function deleteWingman():void{
par.removeChild(this);
}
public function setHealth(_arg1:Number):void{
health = _arg1;
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new Kelip();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
canFireCount = CANFIRE;
par.cbl.drawBulet(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
pla.damage((WEAPONDAMAGE * LevelD));
_local4 = new EfekHit2();
_local4.x = pla.x;
_local4.y = pla.y;
par.addChild(_local4);
sound = new WingmanFireS();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 203
//Wingman2 (Wingman2)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Wingman2 extends MovieClip {
const SPEED:Number = 6;
const SPEEDROT:Number = 6;
const RANK1:Number = 5;
const RANK3:Number = 6;
const RANK5:Number = 20;
const RANK7:Number = 8;
const RANK4:Number = 7;
const RANK2:Number = 9;
const RELOAD:Number = 4;
const RANK8:Number = 4;
const RANK9:Number = 10;
const RANK6:Number = 15;
const CANFIRE:Number = 8;
var counterPart:Number;// = 2
public var perimeter:MovieClip;
public var fire:MovieClip;
var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var speedR:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var ySpeed:Number;
var targetSudut:Number;
var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var target;
var cekSudut:Number;// = 0
var reload:Number;// = 4
public var body:MovieClip;
var doneReload:Boolean;// = false
var behaviorCount:Number;// = 0
var canFireWeapon:Boolean;// = true
var pla;
var targetLoc:Number;
public static const MAXHEALTH:Number = 12;
public static var WEAPONDAMAGE = 4;
public function Wingman2():void{
canFireWeapon = true;
canFireCount = 0;
isDead = false;
behaviorCount = 0;
cekSudut = 0;
LevelD = 1;
LevelH = 1;
LevelR = 1;
reload = RELOAD;
doneReload = false;
targetLoc = randRange(1, 4);
counterPart = 2;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
speed = SPEED;
speedR = SPEEDROT;
health = MAXHEALTH;
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function changeTargetAir():void{
var _local1:Array;
var _local2:*;
var _local3:*;
par = this.parent;
_local1 = new Array();
_local1 = par.getEnemy();
for (_local3 in _local1) {
if (_local2 == null){
_local2 = _local1[_local3];
} else {
if (rankEnemy(_local2) < rankEnemy(_local1[_local3])){
_local2 = _local1[_local3];
} else {
if (_local2.getPersenHealth() > _local1[_local3].getPersenHealth()){
_local2 = _local1[_local3];
};
};
};
};
if (_local2 == null){
_local2 = seekTargetPlayer();
};
pla = _local2;
cekSudut = 0;
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
par = this.parent;
LevelH = _arg1;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function frame3(){
stop();
}
function seekTargetPlayer():MovieClip{
targetLoc = randRange(1, 4);
return (par.player);
}
function frame1(){
stop();
}
public function moveWingman():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Array;
var _local6:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
par.doTrail(par, x, y);
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (!isNaN(targetSudut)){
cekRot(targetSudut);
};
if (rotation == targetSudut){
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
} else {
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speedR);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speedR);
};
x = (x + xSpeed);
y = (y + ySpeed);
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (perimeter.hitTestObject(pla.body)){
if ((pla is Player)){
} else {
fireWeapon();
};
};
if (doneReload == false){
if (cekSudut <= 0){
if (pla == par.player){
_local1 = (pla.TargetX(targetLoc) - x);
_local2 = (pla.TargetY(targetLoc) - y);
_local5 = new Array();
_local5 = par.getEnemy();
if (_local5.length > 0){
changeTargetAir();
};
if (targetSudut == rotation){
changeTargetAir();
};
} else {
_local1 = (pla.x - x);
_local2 = (pla.y - y);
};
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
targetSudut = _local4;
cekSudut = 5;
} else {
cekSudut--;
};
if (y > 300){
targetSudut = -90;
};
if (y < -10){
targetSudut = 90;
};
if (behaviorCount > 0){
behaviorCount--;
} else {
if (pla == par.player){
behaviorCount = 50;
changeTargetLand();
};
};
if ((((x > 700)) || ((x < 0)))){
if (behaviorCount <= 0){
behaviorCount = 50;
changeTargetLand();
};
};
if (pla.getHealth() <= 0){
changeTargetAir();
};
} else {
reload++;
changeTargetAir();
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (reload <= 0){
doneReload = true;
targetSudut = -(targetSudut);
};
} else {
_local6 = new Blast1();
_local6.x = x;
_local6.y = y;
par.addChild(_local6);
par.quake();
deleteWingman();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
function frame2(){
stop();
}
function rankEnemy(_arg1:MovieClip):Number{
if ((_arg1 is Enemy)){
return (RANK1);
};
if ((_arg1 is Enemy2)){
return (RANK2);
};
if ((_arg1 is Enemy3)){
return (RANK3);
};
if ((_arg1 is Enemy4)){
return (RANK4);
};
if ((_arg1 is Enemy5)){
return (RANK5);
};
if ((_arg1 is Enemy6)){
return (RANK6);
};
if ((_arg1 is Enemy7)){
return (RANK7);
};
if ((_arg1 is Enemy8)){
return (RANK8);
};
if ((_arg1 is Enemy9)){
return (RANK9);
};
return (0);
}
function cekRot(_arg1:Number):void{
var _local2:Boolean;
if ((((((((_arg1 < 170)) && ((rotation < 170)))) && ((_arg1 > -170)))) && ((rotation > -170)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 < -135)) && ((rotation < -135)))) && ((_arg1 > -180)))) && ((rotation > -180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 > 135)) && ((rotation > 135)))) && ((_arg1 < 180)))) && ((rotation < 180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((_arg1 > 135)) && ((rotation < -135)))){
_local2 = false;
} else {
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
};
};
};
};
if (_local2){
rotation = (rotation + (speedR * 2));
if (currentFrame != 2){
gotoAndStop("down");
};
} else {
rotation = (rotation - (speedR * 2));
if (currentFrame != 3){
gotoAndStop("up");
};
};
if (Math.abs((_arg1 - rotation)) <= (speed * 2)){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
if (x > 960){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
}
public function changeTargetLand():void{
pla = par.player;
cekSudut = 0;
}
public function getHealth():Number{
return (health);
}
public function deleteWingman():void{
par.removeChild(this);
}
public function setHealth(_arg1:Number):void{
health = _arg1;
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new Kelip();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
canFireCount = CANFIRE;
par.cbl.drawBulet(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
_local4 = new EfekHit2();
_local4.x = pla.x;
_local4.y = pla.y;
par.addChild(_local4);
pla.damage((WEAPONDAMAGE * LevelD));
sound = new WingmanFire2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 204
//Wingman3 (Wingman3)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Wingman3 extends MovieClip {
const SPEED:Number = 3;
const RANK1:Number = 8;
const RANK3:Number = 20;
const RANK5:Number = 5;
const RANK6:Number = 4;
const RANK7:Number = 10;
const RANK4:Number = 15;
const RANK2:Number = 7;
const RELOAD:Number = 7;
const RANK8:Number = 9;
const RANK9:Number = 6;
const CANFIRE:Number = 20;
var counterPart:Number;// = 2
public var fire:MovieClip;
var pitStop:Number;
var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var Range:Number;// = 150
var ySpeed:Number;
var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
var target;
var reload:Number;// = 7
public var body:MovieClip;
var doneReload:Boolean;// = false
var upDown:Number;// = 5
var canFireWeapon:Boolean;// = true
var behaviorCount:Number;// = 0
var pla;
public static const MAXHEALTH:Number = 10;
public static var WEAPONDAMAGE = 2;
public function Wingman3():void{
canFireWeapon = true;
canFireCount = 0;
reload = RELOAD;
doneReload = false;
isDead = false;
behaviorCount = 0;
LevelD = 1;
LevelH = 1;
LevelR = 1;
Range = 150;
upDown = 5;
counterPart = 2;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2);
speed = SPEED;
ySpeed = (speed * 0.25);
health = MAXHEALTH;
pitStop = (480 + randRange(-100, 100));
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function changeTargetAir():void{
par = this.parent;
pla = par.player;
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
par = this.parent;
LevelH = _arg1;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function frame1(){
stop();
}
public function flip():void{
speed = (speed * -1);
scaleX = (scaleX * -1);
gotoAndStop("stand");
x = (x + speed);
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
function frame2(){
stop();
}
public function moveWingman():void{
var _local1:Boolean;
var _local2:Array;
var _local3:*;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
par.doTrail(par, x, y);
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
_local1 = true;
if (doneReload == false){
_local2 = new Array();
_local2 = par.getEnemy();
_local4 = 9999999999;
for (_local5 in _local2) {
_local6 = Math.round(Math.sqrt((Math.pow((x - _local2[_local5].x), 2) + Math.pow((y - _local2[_local5].y), 2))));
if (_local6 < _local4){
_local4 = _local6;
_local3 = _local2[_local5];
};
};
if (_local4 < Range){
pla = _local3;
fireWeapon();
_local1 = false;
};
} else {
reload++;
_local1 = false;
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (x > pitStop){
goFlip();
_local1 = false;
};
if ((((x < 0)) && ((speed < 0)))){
goFlip();
_local1 = false;
};
if (_local1){
x = (x + speed);
if (speed > 0){
rotation = 10;
} else {
rotation = -10;
};
} else {
y = (y + ySpeed);
rotation = 0;
if (upDown > 0){
upDown--;
} else {
upDown = 20;
ySpeed = (ySpeed * -1);
};
};
} else {
_local7 = new Blast1();
_local7.x = x;
_local7.y = y;
par.addChild(_local7);
par.quake();
deleteWingman();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
function rankEnemy(_arg1:MovieClip):Number{
if ((_arg1 is Enemy)){
return (RANK1);
};
if ((_arg1 is Enemy2)){
return (RANK2);
};
if ((_arg1 is Enemy3)){
return (RANK3);
};
if ((_arg1 is Enemy4)){
return (RANK4);
};
if ((_arg1 is Enemy5)){
return (RANK5);
};
if ((_arg1 is Enemy6)){
return (RANK6);
};
if ((_arg1 is Enemy7)){
return (RANK7);
};
if ((_arg1 is Enemy8)){
return (RANK8);
};
if ((_arg1 is Enemy9)){
return (RANK9);
};
return (0);
}
public function changeTargetLand():void{
pla = par.player;
}
public function getHealth():Number{
return (health);
}
public function deleteWingman():void{
par.removeChild(this);
}
public function setHealth(_arg1:Number):void{
health = _arg1;
}
function goFlip():void{
if (currentFrame != 2){
gotoAndStop("flip");
};
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new Kelip();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
canFireCount = CANFIRE;
par.cbl.drawBulet(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
pla.damage((WEAPONDAMAGE * LevelD));
_local4 = new EfekHit2();
_local4.x = pla.x;
_local4.y = pla.y;
par.addChild(_local4);
sound = new EnemyFire5S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 205
//Wingman4 (Wingman4)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Wingman4 extends MovieClip {
const SPEED:Number = 6;
const SPEEDROT:Number = 5;
const RANK1:Number = 8;
const RANK3:Number = 7;
const RANK5:Number = 9;
const RANK7:Number = 5;
const RANK4:Number = 6;
const RANK2:Number = 10;
const RELOAD:Number = 8;
const RANK8:Number = 4;
const RANK9:Number = 20;
const RANK6:Number = 15;
const CANFIRE:Number = 5;
var counterPart:Number;// = 2
public var perimeter:MovieClip;
public var fire:MovieClip;
var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var speedR:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var ySpeed:Number;
var targetSudut:Number;
var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var target;
var cekSudut:Number;// = 0
var reload:Number;// = 8
public var body:MovieClip;
var doneReload:Boolean;// = false
var behaviorCount:Number;// = 0
var canFireWeapon:Boolean;// = true
var pla;
var targetLoc:Number;
public static const MAXHEALTH:Number = 20;
public static var WEAPONDAMAGE = 4;
public function Wingman4():void{
canFireWeapon = true;
canFireCount = 0;
isDead = false;
behaviorCount = 0;
cekSudut = 0;
LevelD = 1;
LevelH = 1;
LevelR = 1;
reload = RELOAD;
doneReload = false;
targetLoc = randRange(1, 4);
counterPart = 2;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
speed = SPEED;
speedR = SPEEDROT;
health = MAXHEALTH;
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function changeTargetAir():void{
var _local1:Array;
var _local2:*;
var _local3:*;
par = this.parent;
_local1 = new Array();
_local1 = par.getEnemy();
for (_local3 in _local1) {
if (_local2 == null){
_local2 = _local1[_local3];
} else {
if (rankEnemy(_local2) < rankEnemy(_local1[_local3])){
_local2 = _local1[_local3];
} else {
if (_local2.getPersenHealth() > _local1[_local3].getPersenHealth()){
_local2 = _local1[_local3];
};
};
};
};
if (_local2 == null){
_local2 = seekTargetPlayer();
};
pla = _local2;
cekSudut = 0;
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function frame3(){
stop();
}
function seekTargetPlayer():MovieClip{
targetLoc = randRange(1, 4);
return (par.player);
}
function frame1(){
stop();
}
public function moveWingman():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Array;
var _local6:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
par.doTrail(par, x, y);
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (!isNaN(targetSudut)){
cekRot(targetSudut);
};
if (rotation == targetSudut){
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
} else {
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speedR);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speedR);
};
x = (x + xSpeed);
y = (y + ySpeed);
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (perimeter.hitTestObject(pla.body)){
if ((pla is Player)){
} else {
fireWeapon();
};
};
if (doneReload == false){
if (cekSudut <= 0){
if (pla == par.player){
_local1 = (pla.TargetX(targetLoc) - x);
_local2 = (pla.TargetY(targetLoc) - y);
_local5 = new Array();
_local5 = par.getEnemy();
if (_local5.length > 0){
changeTargetAir();
};
if (targetSudut == rotation){
changeTargetAir();
};
} else {
_local1 = (pla.x - x);
_local2 = (pla.y - y);
};
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
targetSudut = _local4;
cekSudut = 5;
} else {
cekSudut--;
};
if (y > 300){
targetSudut = -90;
};
if (y < -10){
targetSudut = 90;
};
if (behaviorCount > 0){
behaviorCount--;
} else {
if (pla == par.player){
behaviorCount = 50;
changeTargetLand();
};
};
if ((((x > 700)) || ((x < 0)))){
if (behaviorCount <= 0){
behaviorCount = 50;
changeTargetLand();
};
};
if (pla.getHealth() <= 0){
changeTargetAir();
};
} else {
reload++;
changeTargetAir();
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (reload <= 0){
doneReload = true;
targetSudut = -(targetSudut);
};
} else {
_local6 = new Blast1();
_local6.x = x;
_local6.y = y;
par.addChild(_local6);
par.quake();
deleteWingman();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
function frame2(){
stop();
}
function rankEnemy(_arg1:MovieClip):Number{
if ((_arg1 is Enemy)){
return (RANK1);
};
if ((_arg1 is Enemy2)){
return (RANK2);
};
if ((_arg1 is Enemy3)){
return (RANK3);
};
if ((_arg1 is Enemy4)){
return (RANK4);
};
if ((_arg1 is Enemy5)){
return (RANK5);
};
if ((_arg1 is Enemy6)){
return (RANK6);
};
if ((_arg1 is Enemy7)){
return (RANK7);
};
if ((_arg1 is Enemy8)){
return (RANK8);
};
if ((_arg1 is Enemy9)){
return (RANK9);
};
return (0);
}
function cekRot(_arg1:Number):void{
var _local2:Boolean;
if ((((((((_arg1 < 170)) && ((rotation < 170)))) && ((_arg1 > -170)))) && ((rotation > -170)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 < -135)) && ((rotation < -135)))) && ((_arg1 > -180)))) && ((rotation > -180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 > 135)) && ((rotation > 135)))) && ((_arg1 < 180)))) && ((rotation < 180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((_arg1 > 135)) && ((rotation < -135)))){
_local2 = false;
} else {
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
};
};
};
};
if (_local2){
rotation = (rotation + (speedR * 2));
if (currentFrame != 2){
gotoAndStop("down");
};
} else {
rotation = (rotation - (speedR * 2));
if (currentFrame != 3){
gotoAndStop("up");
};
};
if (Math.abs((_arg1 - rotation)) <= (speed * 2)){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
if (x > 960){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
}
public function changeTargetLand():void{
pla = par.player;
cekSudut = 0;
}
public function getHealth():Number{
return (health);
}
public function deleteWingman():void{
par.removeChild(this);
}
public function setHealth(_arg1:Number):void{
health = _arg1;
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new Kelip();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
canFireCount = CANFIRE;
par.cbl.drawBulet(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
pla.damage((WEAPONDAMAGE * LevelD));
_local4 = new EfekHit2();
_local4.x = pla.x;
_local4.y = pla.y;
par.addChild(_local4);
sound = new WingmanFire3S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 206
//Wingman5 (Wingman5)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Wingman5 extends MovieClip {
const SPEED:Number = 2.5;
const RANK1:Number = 8;
const RANK3:Number = 7;
const RANK5:Number = 4;
const RANK7:Number = 20;
const RANK4:Number = 6;
const RANK2:Number = 10;
const RELOAD:Number = 7;
const RANK8:Number = 15;
const RANK9:Number = 9;
const RANK6:Number = 5;
const CANFIRE:Number = 15;
var counterPart:Number;// = 2
public var fire:MovieClip;
var pitStop:Number;
var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var Range:Number;// = 200
var ySpeed:Number;
var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var target;
var reload:Number;// = 7
public var body:MovieClip;
var doneReload:Boolean;// = false
var upDown:Number;// = 5
var canFireWeapon:Boolean;// = true
var behaviorCount:Number;// = 0
var pla;
public static const MAXHEALTH:Number = 20;
public static var WEAPONDAMAGE = 2;
public function Wingman5():void{
canFireWeapon = true;
canFireCount = 0;
reload = RELOAD;
doneReload = false;
isDead = false;
behaviorCount = 0;
LevelD = 1;
LevelR = 1;
LevelH = 1;
Range = 200;
upDown = 5;
counterPart = 2;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2);
speed = SPEED;
ySpeed = (speed * 0.25);
health = MAXHEALTH;
pitStop = (480 + randRange(-100, 100));
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function changeTargetAir():void{
par = this.parent;
pla = par.player;
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
par = this.parent;
LevelH = _arg1;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function frame1(){
stop();
}
public function flip():void{
speed = (speed * -1);
scaleX = (scaleX * -1);
gotoAndStop("stand");
x = (x + speed);
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
function frame2(){
stop();
}
public function moveWingman():void{
var _local1:Boolean;
var _local2:Array;
var _local3:*;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
_local1 = true;
if (doneReload == false){
_local2 = new Array();
_local2 = par.getEnemy();
_local4 = 9999999999;
for (_local5 in _local2) {
_local6 = Math.round(Math.sqrt((Math.pow((x - _local2[_local5].x), 2) + Math.pow((y - _local2[_local5].y), 2))));
if (_local6 < _local4){
_local4 = _local6;
_local3 = _local2[_local5];
};
};
if (_local4 < Range){
pla = _local3;
fireWeapon();
_local1 = false;
};
} else {
reload++;
_local1 = false;
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (x > pitStop){
goFlip();
_local1 = false;
};
if ((((x < 0)) && ((speed < 0)))){
goFlip();
_local1 = false;
};
if (_local1){
x = (x + speed);
if (speed > 0){
rotation = 10;
} else {
rotation = -10;
};
} else {
y = (y + ySpeed);
rotation = 0;
if (upDown > 0){
upDown--;
} else {
upDown = 20;
ySpeed = (ySpeed * -1);
};
};
} else {
_local7 = new Blast2();
_local7.x = x;
_local7.y = y;
par.addChild(_local7);
par.quake();
deleteWingman();
sound = new ExplodeS();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
function rankEnemy(_arg1:MovieClip):Number{
if ((_arg1 is Enemy)){
return (RANK1);
};
if ((_arg1 is Enemy2)){
return (RANK2);
};
if ((_arg1 is Enemy3)){
return (RANK3);
};
if ((_arg1 is Enemy4)){
return (RANK4);
};
if ((_arg1 is Enemy5)){
return (RANK5);
};
if ((_arg1 is Enemy6)){
return (RANK6);
};
if ((_arg1 is Enemy7)){
return (RANK7);
};
if ((_arg1 is Enemy8)){
return (RANK8);
};
if ((_arg1 is Enemy9)){
return (RANK9);
};
return (0);
}
public function changeTargetLand():void{
pla = par.player;
}
public function getHealth():Number{
return (health);
}
public function deleteWingman():void{
par.removeChild(this);
}
public function setHealth(_arg1:Number):void{
health = _arg1;
}
function goFlip():void{
if (currentFrame != 2){
gotoAndStop("flip");
};
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new Kelip();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
canFireCount = CANFIRE;
pic.play();
par.cbl.drawBulet(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
pla.damage((WEAPONDAMAGE * LevelD));
_local4 = new EfekHit2();
_local4.x = pla.x;
_local4.y = pla.y;
par.addChild(_local4);
sound = new EnemyFire4S();
sound.play(0, 1, new SoundTransform(1));
};
}
}
}//package
Section 207
//Wingman6 (Wingman6)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Wingman6 extends MovieClip {
const SPEED:Number = 3.5;
const RANK1:Number = 20;
const RANK3:Number = 15;
const RANK5:Number = 8;
const RANK6:Number = 7;
const RANK7:Number = 10;
const RANK4:Number = 6;
const RANK2:Number = 4;
const RELOAD:Number = 10;
const RANK8:Number = 9;
const RANK9:Number = 5;
const CANFIRE:Number = 20;
var counterPart:Number;// = 2
public var fire:MovieClip;
var pitStop:Number;
var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var Range:Number;// = 150
var ySpeed:Number;
var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
var target;
var reload:Number;// = 10
public var body:MovieClip;
var doneReload:Boolean;// = false
var upDown:Number;// = 5
var canFireWeapon:Boolean;// = true
var pla;
public static const MAXHEALTH:Number = 5;
public static var WEAPONDAMAGE = 1;
public function Wingman6():void{
canFireWeapon = true;
canFireCount = 0;
reload = RELOAD;
doneReload = false;
isDead = false;
LevelD = 1;
LevelH = 1;
LevelR = 1;
Range = 150;
upDown = 5;
counterPart = 2;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2);
speed = SPEED;
ySpeed = (speed * 0.25);
health = MAXHEALTH;
pitStop = (480 + randRange(-100, 100));
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function changeTargetAir():void{
par = this.parent;
pla = par.player;
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function frame1(){
stop();
}
public function flip():void{
speed = (speed * -1);
scaleX = (scaleX * -1);
gotoAndStop("stand");
x = (x + speed);
}
function frame2(){
stop();
}
public function moveWingman():void{
var _local1:Boolean;
var _local2:Array;
var _local3:*;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
_local1 = true;
if (doneReload == false){
_local2 = new Array();
_local2 = par.getEnemy();
_local4 = 9999999999;
for (_local5 in _local2) {
_local6 = Math.round(Math.sqrt((Math.pow((x - _local2[_local5].x), 2) + Math.pow((y - _local2[_local5].y), 2))));
if (_local6 < _local4){
_local4 = _local6;
_local3 = _local2[_local5];
};
};
if (_local4 < Range){
pla = _local3;
fireWeapon();
_local1 = false;
};
} else {
reload++;
_local1 = false;
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (x > pitStop){
goFlip();
_local1 = false;
};
if ((((x < 0)) && ((speed < 0)))){
goFlip();
_local1 = false;
};
if (_local1){
x = (x + speed);
if (speed > 0){
rotation = 10;
} else {
rotation = -10;
};
} else {
y = (y + ySpeed);
rotation = 0;
if (upDown > 0){
upDown--;
} else {
upDown = 20;
ySpeed = (ySpeed * -1);
};
};
} else {
_local7 = new Blast1();
_local7.x = x;
_local7.y = y;
par.addChild(_local7);
par.quake();
deleteWingman();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
function rankEnemy(_arg1:MovieClip):Number{
if ((_arg1 is Enemy)){
return (RANK1);
};
if ((_arg1 is Enemy2)){
return (RANK2);
};
if ((_arg1 is Enemy3)){
return (RANK3);
};
if ((_arg1 is Enemy4)){
return (RANK4);
};
if ((_arg1 is Enemy5)){
return (RANK5);
};
if ((_arg1 is Enemy6)){
return (RANK6);
};
if ((_arg1 is Enemy7)){
return (RANK7);
};
if ((_arg1 is Enemy8)){
return (RANK8);
};
if ((_arg1 is Enemy9)){
return (RANK9);
};
return (0);
}
public function changeTargetLand():void{
pla = par.player;
}
public function getHealth():Number{
return (health);
}
public function deleteWingman():void{
par.removeChild(this);
}
public function setHealth(_arg1:Number):void{
health = _arg1;
}
function goFlip():void{
if (currentFrame != 2){
gotoAndStop("flip");
};
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new Kelip();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
canFireCount = CANFIRE;
par.cbl.drawBulet(_local2.x, _local2.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
pla.damage((WEAPONDAMAGE * LevelD));
_local4 = new EfekHit2();
_local4.x = pla.x;
_local4.y = pla.y;
par.addChild(_local4);
sound = new WingmanFireS();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 208
//Wingman7 (Wingman7)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Wingman7 extends MovieClip {
const SPEED:Number = 2;
const RANK1:Number = 7;
const RANK3:Number = 9;
const RANK5:Number = 8;
const RANK7:Number = 6;
const RANK4:Number = 15;
const RANK2:Number = 10;
const RELOAD:Number = 30;
const RANK8:Number = 20;
const RANK9:Number = 4;
const RANK6:Number = 5;
const CANFIRE:Number = 30;
var counterPart:Number;// = 2
var pitStop:Number;
var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var Range:Number;// = 250
var ySpeed:Number;
var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var target;
var reload:Number;// = 30
public var body:MovieClip;
var doneReload:Boolean;// = false
var upDown:Number;// = 5
var canFireWeapon:Boolean;// = true
var pla;
public static const MAXHEALTH:Number = 100;
public static var WEAPONDAMAGE = 4;
public function Wingman7():void{
canFireWeapon = true;
canFireCount = 0;
reload = RELOAD;
doneReload = false;
isDead = false;
LevelD = 1;
LevelH = 1;
LevelR = 1;
Range = 250;
upDown = 5;
counterPart = 2;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2);
speed = SPEED;
ySpeed = (speed * 0.25);
health = MAXHEALTH;
pitStop = (480 + randRange(-100, 100));
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function changeTargetAir():void{
par = this.parent;
pla = par.player;
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function frame1(){
stop();
}
public function flip():void{
speed = (speed * -1);
scaleX = (scaleX * -1);
gotoAndStop("stand");
x = (x + speed);
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
function frame2(){
stop();
}
public function moveWingman():void{
var _local1:Boolean;
var _local2:Array;
var _local3:*;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
_local1 = true;
if (doneReload == false){
_local2 = new Array();
_local2 = par.getEnemy();
_local4 = 9999999999;
for (_local5 in _local2) {
_local6 = Math.round(Math.sqrt((Math.pow((x - _local2[_local5].x), 2) + Math.pow((y - _local2[_local5].y), 2))));
if (_local6 < _local4){
_local4 = _local6;
_local3 = _local2[_local5];
};
};
if (_local4 < Range){
pla = _local3;
fireWeapon();
_local1 = false;
};
} else {
reload++;
_local1 = false;
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (x > pitStop){
goFlip();
_local1 = false;
};
if ((((x < 0)) && ((speed < 0)))){
goFlip();
_local1 = false;
};
if (_local1){
x = (x + speed);
} else {
y = (y + ySpeed);
if (upDown > 0){
upDown--;
} else {
upDown = 20;
ySpeed = (ySpeed * -1);
};
};
} else {
_local7 = new Blast2();
_local7.x = x;
_local7.y = y;
par.addChild(_local7);
par.quake();
deleteWingman();
sound = new ExplodeS();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
function rankEnemy(_arg1:MovieClip):Number{
if ((_arg1 is Enemy)){
return (RANK1);
};
if ((_arg1 is Enemy2)){
return (RANK2);
};
if ((_arg1 is Enemy3)){
return (RANK3);
};
if ((_arg1 is Enemy4)){
return (RANK4);
};
if ((_arg1 is Enemy5)){
return (RANK5);
};
if ((_arg1 is Enemy6)){
return (RANK6);
};
if ((_arg1 is Enemy7)){
return (RANK7);
};
if ((_arg1 is Enemy8)){
return (RANK8);
};
if ((_arg1 is Enemy9)){
return (RANK9);
};
return (0);
}
public function changeTargetLand():void{
pla = par.player;
}
public function getHealth():Number{
return (health);
}
public function deleteWingman():void{
par.removeChild(this);
}
public function setHealth(_arg1:Number):void{
health = _arg1;
}
function goFlip():void{
if (currentFrame != 2){
gotoAndStop("flip");
};
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
canFireCount = CANFIRE;
pic.play();
_local1 = new RoketB(x, y, pla);
_local1.setDamage((WEAPONDAMAGE * LevelD));
par.addChild(_local1);
sound = new RoketS();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 209
//Wingman8 (Wingman8)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class Wingman8 extends MovieClip {
const SPEED:Number = 7;
const SPEEDROT:Number = 6;
const RANK1:Number = 4;
const RANK3:Number = 6;
const RANK5:Number = 9;
const RANK6:Number = 20;
const RANK7:Number = 5;
const RANK4:Number = 7;
const RANK2:Number = 10;
const RELOAD:Number = 5;
const RANK8:Number = 8;
const RANK9:Number = 15;
const CANFIRE:Number = 8;
var counterPart:Number;// = 2
public var perimeter:MovieClip;
public var fire:MovieClip;
var health:Number;
var speed:Number;
var canFireCount:Number;// = 0
var par;
var isDead:Boolean;// = false
var xSpeed:Number;
var speedR:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var ySpeed:Number;
var targetSudut:Number;
var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
var target;
var cekSudut:Number;// = 0
var reload:Number;// = 5
public var body:MovieClip;
var doneReload:Boolean;// = false
var behaviorCount:Number;// = 0
var canFireWeapon:Boolean;// = true
var pla;
var targetLoc:Number;
public static const MAXHEALTH:Number = 16;
public static var WEAPONDAMAGE = 4;
public function Wingman8():void{
canFireWeapon = true;
canFireCount = 0;
isDead = false;
behaviorCount = 0;
cekSudut = 0;
LevelD = 1;
LevelH = 1;
LevelR = 1;
reload = RELOAD;
doneReload = false;
targetLoc = randRange(1, 4);
counterPart = 2;
blink = true;
blinkCount = 2;
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3);
speed = SPEED;
speedR = SPEEDROT;
health = MAXHEALTH;
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function changeTargetAir():void{
var _local1:Array;
var _local2:*;
var _local3:*;
par = this.parent;
_local1 = new Array();
_local1 = par.getEnemy();
for (_local3 in _local1) {
if (_local2 == null){
_local2 = _local1[_local3];
} else {
if (rankEnemy(_local2) < rankEnemy(_local1[_local3])){
_local2 = _local1[_local3];
} else {
if (_local2.getPersenHealth() > _local1[_local3].getPersenHealth()){
_local2 = _local1[_local3];
};
};
};
};
if (_local2 == null){
_local2 = seekTargetPlayer();
};
pla = _local2;
cekSudut = 0;
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
function frame3(){
stop();
}
function seekTargetPlayer():MovieClip{
targetLoc = randRange(1, 4);
return (par.player);
}
function frame1(){
stop();
}
public function moveWingman():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Array;
var _local6:*;
if (health > 0){
if (counterPart > 0){
counterPart--;
} else {
counterPart = 1;
par.doTrail(par, x, y);
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
if (!isNaN(targetSudut)){
cekRot(targetSudut);
};
if (rotation == targetSudut){
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
} else {
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speedR);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speedR);
};
x = (x + xSpeed);
y = (y + ySpeed);
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (perimeter.hitTestObject(pla.body)){
if ((pla is Player)){
} else {
fireWeapon();
};
};
if (doneReload == false){
if (cekSudut <= 0){
if (pla == par.player){
_local1 = (pla.TargetX(targetLoc) - x);
_local2 = (pla.TargetY(targetLoc) - y);
_local5 = new Array();
_local5 = par.getEnemy();
if (_local5.length > 0){
changeTargetAir();
};
if (targetSudut == rotation){
changeTargetAir();
};
} else {
_local1 = (pla.x - x);
_local2 = (pla.y - y);
};
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
targetSudut = _local4;
cekSudut = 5;
} else {
cekSudut--;
};
if (y > 300){
targetSudut = -90;
};
if (y < -10){
targetSudut = 90;
};
if (behaviorCount > 0){
behaviorCount--;
} else {
if (pla == par.player){
behaviorCount = 50;
changeTargetLand();
};
};
if ((((x > 700)) || ((x < 0)))){
if (behaviorCount <= 0){
behaviorCount = 50;
changeTargetLand();
};
};
if (pla.getHealth() <= 0){
changeTargetAir();
};
} else {
reload++;
changeTargetAir();
if (reload >= (((RELOAD * 3) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (reload <= 0){
doneReload = true;
targetSudut = -(targetSudut);
};
} else {
_local6 = new Blast1();
_local6.x = x;
_local6.y = y;
par.addChild(_local6);
par.quake();
deleteWingman();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
function frame2(){
stop();
}
function rankEnemy(_arg1:MovieClip):Number{
if ((_arg1 is Enemy)){
return (RANK1);
};
if ((_arg1 is Enemy2)){
return (RANK2);
};
if ((_arg1 is Enemy3)){
return (RANK3);
};
if ((_arg1 is Enemy4)){
return (RANK4);
};
if ((_arg1 is Enemy5)){
return (RANK5);
};
if ((_arg1 is Enemy6)){
return (RANK6);
};
if ((_arg1 is Enemy7)){
return (RANK7);
};
if ((_arg1 is Enemy8)){
return (RANK8);
};
if ((_arg1 is Enemy9)){
return (RANK9);
};
return (0);
}
function cekRot(_arg1:Number):void{
var _local2:Boolean;
if ((((((((_arg1 < 170)) && ((rotation < 170)))) && ((_arg1 > -170)))) && ((rotation > -170)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 < -135)) && ((rotation < -135)))) && ((_arg1 > -180)))) && ((rotation > -180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((((((_arg1 > 135)) && ((rotation > 135)))) && ((_arg1 < 180)))) && ((rotation < 180)))){
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
} else {
if ((((_arg1 > 135)) && ((rotation < -135)))){
_local2 = false;
} else {
if (_arg1 > rotation){
_local2 = true;
} else {
_local2 = false;
};
};
};
};
};
if (_local2){
rotation = (rotation + (speedR * 2));
if (currentFrame != 2){
gotoAndStop("down");
};
} else {
rotation = (rotation - (speedR * 2));
if (currentFrame != 3){
gotoAndStop("up");
};
};
if (Math.abs((_arg1 - rotation)) <= (speed * 2)){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
if (x > 960){
rotation = targetSudut;
if (currentFrame != 1){
gotoAndStop("stand");
};
};
}
public function changeTargetLand():void{
pla = par.player;
cekSudut = 0;
}
public function getHealth():Number{
return (health);
}
public function deleteWingman():void{
par.removeChild(this);
}
public function setHealth(_arg1:Number):void{
health = _arg1;
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
par = this.parent;
_local1 = new Point(fire.x, fire.y);
_local2 = localToGlobal(_local1);
_local2 = par.globalToLocal(_local2);
_local3 = new Kelip();
_local3.x = _local2.x;
_local3.y = _local2.y;
par.addChild(_local3);
canFireCount = CANFIRE;
par.celW.electric(_local2.x, _local2.y, pla.x, pla.y, 2);
par.doHit(par, pla.x, pla.y);
pla.damage((WEAPONDAMAGE * LevelD));
_local4 = new EfekHit2();
_local4.x = pla.x;
_local4.y = pla.y;
par.addChild(_local4);
sound = new Tower2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 210
//WingmanFire2S (WingmanFire2S)
package {
import flash.media.*;
public dynamic class WingmanFire2S extends Sound {
}
}//package
Section 211
//WingmanFire3S (WingmanFire3S)
package {
import flash.media.*;
public dynamic class WingmanFire3S extends Sound {
}
}//package
Section 212
//WingmanFire4S (WingmanFire4S)
package {
import flash.media.*;
public dynamic class WingmanFire4S extends Sound {
}
}//package
Section 213
//WingmanFire5S (WingmanFire5S)
package {
import flash.media.*;
public dynamic class WingmanFire5S extends Sound {
}
}//package
Section 214
//WingmanFire6S (WingmanFire6S)
package {
import flash.media.*;
public dynamic class WingmanFire6S extends Sound {
}
}//package
Section 215
//WingmanFireS (WingmanFireS)
package {
import flash.media.*;
public dynamic class WingmanFireS extends Sound {
}
}//package
Section 216
//WingmanLand (WingmanLand)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class WingmanLand extends MovieClip {
const SPEED:Number = 1.5;
const SPEEDROT:Number = 3;
const RELOAD:Number = 7;
const CANFIRE:Number = 5;
var speedR:Number;
var blinkCount:Number;// = 2
var sound:Sound;
var Range:Number;// = 300
public var fire:MovieClip;
var plat;
var gravitasi:Number;// = 1
var pitStop:Number;
public var speed:Number;
public var health:Number;
var ySpeed:Number;// = 1
var LevelR:Number;// = 1
var LevelH:Number;// = 1
public var pic:MovieClip;
var canFireCount:Number;// = 0
var par;
var LevelD:Number;// = 1
public var body:MovieClip;
var xSpeed:Number;// = 1
var reload:Number;// = 7
public var isDead:Boolean;// = false
var doneReload:Boolean;// = false
var blink:Boolean;// = true
var pla;
var canFireWeapon:Boolean;// = true
public static const MAXHEALTH:Number = 8;
public static var WEAPONDAMAGE = 0.5;
public function WingmanLand():void{
canFireWeapon = true;
canFireCount = 0;
reload = RELOAD;
doneReload = false;
isDead = false;
xSpeed = 1;
ySpeed = 1;
gravitasi = 1;
LevelH = 1;
LevelD = 1;
LevelR = 1;
Range = 300;
plat = new Array();
blink = true;
blinkCount = 2;
super();
speed = SPEED;
xSpeed = speed;
health = MAXHEALTH;
pitStop = (480 + randRange(-150, 150));
}
public function setHealth(_arg1:Number):void{
health = _arg1;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
public function getHealth():Number{
return (health);
}
public function deleteWingman():void{
par.removeChild(this);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
par = this.parent;
LevelH = _arg1;
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
public function setPlat(_arg1:Array){
plat = _arg1;
}
public function moveWingman():void{
var _local1:Boolean;
var _local2:*;
var _local3:Array;
var _local4:*;
var _local5:Number;
var _local6:*;
var _local7:*;
var _local8:*;
if (health > 0){
y = (y + ySpeed);
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
ySpeed = (ySpeed + gravitasi);
if (x > pitStop){
xSpeed = 0;
if (currentFrame != 2){
gotoAndStop("fire");
};
};
_local1 = true;
if (doneReload == false){
_local3 = new Array();
_local3 = par.getEnemy();
_local5 = 9999999999;
for (_local6 in _local3) {
_local7 = Math.round(Math.sqrt((Math.pow((x - _local3[_local6].x), 2) + Math.pow((y - _local3[_local6].y), 2))));
if (_local7 < _local5){
_local5 = _local7;
_local4 = _local3[_local6];
};
};
if (_local5 < Range){
pla = _local4;
fireWeapon();
_local1 = false;
};
} else {
reload++;
_local1 = false;
if (reload >= (((RELOAD * 20) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (_local1){
if (xSpeed > 0){
x = (x + xSpeed);
if (currentFrame != 1){
gotoAndStop("move");
};
};
};
for (_local2 in plat) {
if (body.hitTestObject(plat[_local2])){
ySpeed = 0;
while (body.hitTestObject(plat[_local2])) {
y = (y - 1);
};
};
};
} else {
_local8 = new Blast1();
_local8.x = x;
_local8.y = y;
par.addChild(_local8);
par.quake();
deleteWingman();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function fireWeapon():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
if (currentFrame != 2){
gotoAndStop("fire");
};
if (canFireWeapon){
reload--;
canFireWeapon = false;
_local1 = (pla.x - x);
_local2 = (pla.y - y);
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
if (pic != null){
pic.arm.rotation = _local4;
pic.arm.play();
pic.bd.play();
};
_local5 = new Point(fire.x, fire.y);
_local6 = localToGlobal(_local5);
_local6 = par.globalToLocal(_local6);
_local7 = new Kelip();
_local7.x = _local6.x;
_local7.y = _local6.y;
par.addChild(_local7);
canFireCount = CANFIRE;
par.cbl.drawBulet(_local6.x, _local6.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
_local8 = new EfekHit2();
_local8.x = pla.x;
_local8.y = pla.y;
par.addChild(_local8);
pla.damage((WEAPONDAMAGE * LevelD));
sound = new EnemyFire5S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 217
//WingmanLand2 (WingmanLand2)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class WingmanLand2 extends MovieClip {
const SPEED:Number = 2.5;
const SPEEDROT:Number = 3;
const RELOAD:Number = 5;
const CANFIRE:Number = 20;
public var fire:MovieClip;
var pitStop:Number;
public var health:Number;
public var speed:Number;
var canFireCount:Number;// = 0
var par;
public var isDead:Boolean;// = false
var xSpeed:Number;// = 1
var speedR:Number;
var blinkCount:Number;// = 2
var gravitasi:Number;// = 1
var sound:Sound;
var Range:Number;// = 375
var plat;
var ySpeed:Number;// = 1
var targetSudut:Number;
var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var target;
var cekSudut:Number;// = 0
var reload:Number;// = 5
public var body:MovieClip;
var doneReload:Boolean;// = false
var behaviorCount:Number;// = 0
var canFireWeapon:Boolean;// = true
var pla;
public static const MAXHEALTH:Number = 10;
public static var WEAPONDAMAGE = 1.5;
public function WingmanLand2():void{
canFireWeapon = true;
canFireCount = 0;
reload = RELOAD;
doneReload = false;
isDead = false;
xSpeed = 1;
ySpeed = 1;
gravitasi = 1;
behaviorCount = 0;
cekSudut = 0;
LevelH = 1;
LevelD = 1;
LevelR = 1;
Range = 375;
plat = new Array();
blink = true;
blinkCount = 2;
super();
speed = SPEED;
xSpeed = speed;
health = MAXHEALTH;
pitStop = (480 + randRange(-150, 150));
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
public function moveWingman():void{
var _local1:Boolean;
var _local2:*;
var _local3:Array;
var _local4:*;
var _local5:Number;
var _local6:*;
var _local7:*;
var _local8:*;
if (health > 0){
y = (y + ySpeed);
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
ySpeed = (ySpeed + gravitasi);
if (x > pitStop){
xSpeed = 0;
pic.leg.stop();
};
_local1 = true;
if (doneReload == false){
_local3 = new Array();
_local3 = par.getEnemy();
_local5 = 9999999999;
for (_local6 in _local3) {
_local7 = Math.round(Math.sqrt((Math.pow((x - _local3[_local6].x), 2) + Math.pow((y - _local3[_local6].y), 2))));
if (_local7 < _local5){
_local5 = _local7;
_local4 = _local3[_local6];
};
};
if (_local5 < Range){
pla = _local4;
fireWeapon();
_local1 = false;
};
} else {
reload++;
_local1 = false;
if (reload >= (((RELOAD * 25) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (_local1){
if (xSpeed > 0){
x = (x + xSpeed);
pic.leg.play();
};
} else {
pic.leg.stop();
};
for (_local2 in plat) {
if (body.hitTestObject(plat[_local2])){
ySpeed = 0;
while (body.hitTestObject(plat[_local2])) {
y = (y - 1);
};
};
};
} else {
_local8 = new Blast1();
_local8.x = x;
_local8.y = y;
par.addChild(_local8);
par.quake();
deleteWingman();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function setPlat(_arg1:Array){
plat = _arg1;
}
public function getHealth():Number{
return (health);
}
public function deleteWingman():void{
par.removeChild(this);
}
public function setHealth(_arg1:Number):void{
health = _arg1;
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
_local1 = (x - pla.x);
_local2 = (y - pla.y);
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
pic.arm.rotation = _local4;
canFireCount = CANFIRE;
pic.arm.play();
pic.bd.play();
_local5 = new Point(fire.x, fire.y);
_local6 = localToGlobal(_local5);
_local6 = par.globalToLocal(_local6);
_local7 = new Kelip();
_local7.x = _local6.x;
_local7.y = _local6.y;
par.addChild(_local7);
par.cbl.drawBulet(_local6.x, _local6.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
pla.damage((WEAPONDAMAGE * LevelD));
_local8 = new EfekHit2();
_local8.x = pla.x;
_local8.y = pla.y;
par.addChild(_local8);
sound = new WingmanFire6S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 218
//WingmanLand3 (WingmanLand3)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class WingmanLand3 extends MovieClip {
const SPEED:Number = 3;
const SPEEDROT:Number = 3;
const RELOAD:Number = 3;
const CANFIRE:Number = 30;
public var fire:MovieClip;
var pitStop:Number;
public var health:Number;
public var speed:Number;
var canFireCount:Number;// = 0
var par;
public var isDead:Boolean;// = false
var xSpeed:Number;// = 1
var speedR:Number;
var blinkCount:Number;// = 2
var gravitasi:Number;// = 1
var sound:Sound;
var Range:Number;// = 350
var plat;
var ySpeed:Number;// = 1
var targetSudut:Number;
var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var target;
var cekSudut:Number;// = 0
var reload:Number;// = 3
public var body:MovieClip;
var doneReload:Boolean;// = false
var behaviorCount:Number;// = 0
var canFireWeapon:Boolean;// = true
var pla;
public static const MAXHEALTH:Number = 15;
public static var WEAPONDAMAGE = 2;
public function WingmanLand3():void{
canFireWeapon = true;
canFireCount = 0;
reload = RELOAD;
doneReload = false;
isDead = false;
xSpeed = 1;
ySpeed = 1;
gravitasi = 1;
behaviorCount = 0;
cekSudut = 0;
LevelH = 1;
LevelR = 1;
LevelD = 1;
Range = 350;
plat = new Array();
blink = true;
blinkCount = 2;
super();
speed = SPEED;
xSpeed = speed;
health = MAXHEALTH;
pitStop = (480 + randRange(-150, 150));
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
public function moveWingman():void{
var _local1:Boolean;
var _local2:*;
var _local3:Array;
var _local4:*;
var _local5:Number;
var _local6:*;
var _local7:*;
var _local8:*;
if (health > 0){
y = (y + ySpeed);
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
ySpeed = (ySpeed + gravitasi);
if (x > pitStop){
xSpeed = 0;
pic.leg.stop();
};
_local1 = true;
if (doneReload == false){
_local3 = new Array();
_local3 = par.getEnemy();
_local5 = 9999999999;
for (_local6 in _local3) {
_local7 = Math.round(Math.sqrt((Math.pow((x - _local3[_local6].x), 2) + Math.pow((y - _local3[_local6].y), 2))));
if (_local7 < _local5){
_local5 = _local7;
_local4 = _local3[_local6];
};
};
if (_local5 < Range){
pla = _local4;
fireWeapon();
_local1 = false;
};
} else {
reload++;
_local1 = false;
if (reload >= (((RELOAD * 30) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (_local1){
if (xSpeed > 0){
x = (x + xSpeed);
pic.leg.play();
};
} else {
pic.leg.stop();
};
for (_local2 in plat) {
if (body.hitTestObject(plat[_local2])){
ySpeed = 0;
while (body.hitTestObject(plat[_local2])) {
y = (y - 1);
};
};
};
} else {
_local8 = new Blast1();
_local8.x = x;
_local8.y = y;
par.addChild(_local8);
par.quake();
deleteWingman();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function setPlat(_arg1:Array){
plat = _arg1;
}
public function getHealth():Number{
return (health);
}
public function deleteWingman():void{
par.removeChild(this);
}
public function setHealth(_arg1:Number):void{
health = _arg1;
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
_local1 = (x - pla.x);
_local2 = (y - pla.y);
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
pic.arm.rotation = _local4;
canFireCount = CANFIRE;
pic.arm.play();
pic.bd.play();
_local5 = new Point(fire.x, fire.y);
_local6 = localToGlobal(_local5);
_local6 = par.globalToLocal(_local6);
_local7 = new Kelip();
_local7.x = _local6.x;
_local7.y = _local6.y;
par.addChild(_local7);
par.cbl.drawBulet(_local6.x, _local6.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
_local8 = new EfekHit2();
_local8.x = pla.x;
_local8.y = pla.y;
par.addChild(_local8);
pla.damage((WEAPONDAMAGE * LevelD));
sound = new WingmanFire4S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package
Section 219
//WingmanLand4 (WingmanLand4)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.geom.*;
public class WingmanLand4 extends MovieClip {
const SPEED:Number = 2;
const SPEEDROT:Number = 3;
const RELOAD:Number = 5;
const CANFIRE:Number = 25;
public var fire:MovieClip;
var pitStop:Number;
public var health:Number;
public var speed:Number;
var canFireCount:Number;// = 0
var par;
public var isDead:Boolean;// = false
var xSpeed:Number;// = 1
var speedR:Number;
var blinkCount:Number;// = 2
var gravitasi:Number;// = 1
var sound:Sound;
var Range:Number;// = 400
var plat;
var ySpeed:Number;// = 1
var targetSudut:Number;
var LevelH:Number;// = 1
var blink:Boolean;// = true
var LevelR:Number;// = 1
var LevelD:Number;// = 1
public var pic:MovieClip;
var target;
var cekSudut:Number;// = 0
var reload:Number;// = 5
public var body:MovieClip;
var doneReload:Boolean;// = false
var behaviorCount:Number;// = 0
var canFireWeapon:Boolean;// = true
var pla;
public static const MAXHEALTH:Number = 20;
public static var WEAPONDAMAGE = 2.5;
public function WingmanLand4():void{
canFireWeapon = true;
canFireCount = 0;
reload = RELOAD;
doneReload = false;
isDead = false;
xSpeed = 1;
ySpeed = 1;
gravitasi = 1;
behaviorCount = 0;
cekSudut = 0;
LevelD = 1;
LevelR = 1;
LevelH = 1;
Range = 400;
plat = new Array();
blink = true;
blinkCount = 2;
super();
speed = SPEED;
xSpeed = speed;
health = MAXHEALTH;
pitStop = (480 + randRange(-150, 150));
}
public function getMaxHealth():Number{
return (MAXHEALTH);
}
public function resetStat():void{
speed = SPEED;
health = (MAXHEALTH * LevelH);
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function setLevelH(_arg1:Number){
health = (_arg1 * MAXHEALTH);
LevelH = _arg1;
par = this.parent;
}
public function setLevelR(_arg1:Number){
LevelR = _arg1;
}
public function setLevelD(_arg1:Number){
LevelD = _arg1;
}
public function moveWingman():void{
var _local1:Boolean;
var _local2:*;
var _local3:Array;
var _local4:*;
var _local5:Number;
var _local6:*;
var _local7:*;
var _local8:*;
if (health > 0){
y = (y + ySpeed);
if (canFireCount <= 0){
canFireWeapon = true;
} else {
canFireCount--;
};
if (blink){
if (blinkCount <= 0){
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
blinkCount = 2;
blink = false;
} else {
blinkCount--;
};
};
ySpeed = (ySpeed + gravitasi);
if (x > pitStop){
xSpeed = 0;
pic.leg.stop();
};
_local1 = true;
if (doneReload == false){
_local3 = new Array();
_local3 = par.getEnemy();
_local5 = 9999999999;
for (_local6 in _local3) {
_local7 = Math.round(Math.sqrt((Math.pow((x - _local3[_local6].x), 2) + Math.pow((y - _local3[_local6].y), 2))));
if (_local7 < _local5){
_local5 = _local7;
_local4 = _local3[_local6];
};
};
if (_local5 < Range){
pla = _local4;
fireWeapon();
_local1 = false;
};
} else {
reload++;
_local1 = false;
if (reload >= (((RELOAD * 35) * 3) / LevelR)){
reload = RELOAD;
doneReload = false;
};
};
if (_local1){
if (xSpeed > 0){
x = (x + xSpeed);
pic.leg.play();
};
} else {
pic.leg.stop();
};
for (_local2 in plat) {
if (body.hitTestObject(plat[_local2])){
ySpeed = 0;
while (body.hitTestObject(plat[_local2])) {
y = (y - 1);
};
};
};
} else {
_local8 = new Blast1();
_local8.x = x;
_local8.y = y;
par.addChild(_local8);
par.quake();
deleteWingman();
sound = new Explode2S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
public function setPlat(_arg1:Array){
plat = _arg1;
}
public function getHealth():Number{
return (health);
}
public function deleteWingman():void{
par.removeChild(this);
}
public function setHealth(_arg1:Number):void{
health = _arg1;
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
this.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 100, 100, 100, 0);
blink = true;
}
public function getPersenHealth():Number{
return (((health / MAXHEALTH) * 100));
}
public function fireWeapon():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
if (canFireWeapon){
reload--;
canFireWeapon = false;
_local1 = (x - pla.x);
_local2 = (y - pla.y);
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
pic.arm.rotation = _local4;
canFireCount = CANFIRE;
pic.arm.play();
pic.bd.play();
_local5 = new Point(fire.x, fire.y);
_local6 = localToGlobal(_local5);
_local6 = par.globalToLocal(_local6);
_local7 = new Kelip();
_local7.x = _local6.x;
_local7.y = _local6.y;
par.addChild(_local7);
par.cbl.drawBulet(_local6.x, _local6.y, pla.x, pla.y);
par.doHit(par, pla.x, pla.y);
pla.damage((WEAPONDAMAGE * LevelD));
_local8 = new EfekHit2();
par.addChild(_local8);
_local8.x = pla.x;
_local8.y = pla.y;
sound = new WingmanFire5S();
sound.play(0, 1, new SoundTransform(par.parent.parent.efekSound));
};
}
}
}//package