Section 1
//ab_splash_144 (SpaceCommanderv1_fla.ab_splash_144)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class ab_splash_144 extends MovieClip {
public var ab_link:SimpleButton;
public function ab_splash_144(){
addFrameScript(0, frame1);
}
function frame1(){
ab_link.addEventListener(MouseEvent.CLICK, clickAB);
}
public function clickAB(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2);
}
}
}//package SpaceCommanderv1_fla
Section 2
//Acc1_100 (SpaceCommanderv1_fla.Acc1_100)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Acc1_100 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Acc1_100(){
addFrameScript(0, frame1);
}
function frame1(){
no = 0;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 3
//Acc2_111 (SpaceCommanderv1_fla.Acc2_111)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Acc2_111 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Acc2_111(){
addFrameScript(0, frame1);
}
function frame1(){
no = 1;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 4
//Acc3_114 (SpaceCommanderv1_fla.Acc3_114)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Acc3_114 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Acc3_114(){
addFrameScript(0, frame1);
}
function frame1(){
no = 2;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 5
//alt_intro_holder_146 (SpaceCommanderv1_fla.alt_intro_holder_146)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class alt_intro_holder_146 extends MovieClip {
public var par;
public function alt_intro_holder_146(){
addFrameScript(184, frame185);
}
function frame185(){
stop();
par = this.parent.parent;
par.gotoAndStop("menu");
}
}
}//package SpaceCommanderv1_fla
Section 6
//Animapselect_318 (SpaceCommanderv1_fla.Animapselect_318)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class Animapselect_318 extends MovieClip {
public function Animapselect_318(){
addFrameScript(0, frame1, 19, frame20, 39, frame40, 59, frame60, 79, frame80, 99, frame100, 119, frame120, 139, frame140, 159, frame160, 179, frame180);
}
function frame160(){
stop();
}
function frame80(){
stop();
}
function frame180(){
stop();
}
function frame1(){
stop();
}
function frame100(){
stop();
}
function frame20(){
stop();
}
function frame40(){
stop();
}
function frame120(){
stop();
}
function frame140(){
stop();
}
function frame60(){
stop();
}
}
}//package SpaceCommanderv1_fla
Section 7
//AnimasiBoss_273 (SpaceCommanderv1_fla.AnimasiBoss_273)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class AnimasiBoss_273 extends MovieClip {
public var efek:Sound;
public var speedAni:Number;
public var Mid2:MovieClip;
public var ctr:Number;
public var bg:MovieClip;
public var sc:SoundChannel;
public var bs:MovieClip;
public var skiper:SimpleButton;
public var Mid:MovieClip;
public var time:Number;
public var anicek:Timer;
public function AnimasiBoss_273(){
addFrameScript(0, frame1);
}
public function init():void{
addEventListener(Event.ENTER_FRAME, aniBG);
anicek.addEventListener(TimerEvent.TIMER, staycek);
efek = new alertboss();
sc = efek.play(0, 6);
}
public function staycek(_arg1:TimerEvent):void{
var _local2:*;
anicek.reset();
anicek.removeEventListener(TimerEvent.TIMER, staycek);
sc.stop();
_local2 = this.parent.parent;
_local2.game.gotoAndStop("stage5");
}
function frame1(){
anicek = new Timer(2000);
skiper.addEventListener(MouseEvent.CLICK, skipy);
speedAni = 3;
time = 0;
ctr = 0;
init();
}
public function aniBG(_arg1:Event):void{
bg.x = (bg.x - speedAni);
bs.x = (bs.x - speedAni);
Mid.x = (Mid.x - (speedAni / 3));
Mid2.x = (Mid2.x - (speedAni / 10));
if (ctr < 330){
ctr++;
} else {
time++;
if (time == 1){
ctr = 0;
speedAni = (speedAni * -1);
};
if (time == 2){
stop();
removeEventListener(Event.ENTER_FRAME, aniBG);
anicek.start();
};
};
}
public function skipy(_arg1:MouseEvent):void{
var _local2:*;
anicek.reset();
anicek.removeEventListener(TimerEvent.TIMER, staycek);
sc.stop();
_local2 = this.parent.parent;
_local2.game.gotoAndStop("stage5");
}
}
}//package SpaceCommanderv1_fla
Section 8
//AnimasiBossRobot_283 (SpaceCommanderv1_fla.AnimasiBossRobot_283)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class AnimasiBossRobot_283 extends MovieClip {
public var efek:Sound;
public var Mid2:MovieClip;
public var bg:MovieClip;
public var sc:SoundChannel;
public var Mid:MovieClip;
public var anicek:Timer;
public function AnimasiBossRobot_283(){
addFrameScript(0, frame1);
}
function frame1(){
anicek = new Timer(4000);
anicek.addEventListener(TimerEvent.TIMER, staycek2);
anicek.start();
efek = new alertboss();
sc = efek.play(0, 6);
}
public function staycek2(_arg1:TimerEvent):void{
var _local2:*;
anicek.reset();
anicek.removeEventListener(TimerEvent.TIMER, staycek2);
_local2 = this.parent.parent;
_local2.game.gotoAndStop("stage3a");
sc.stop();
}
}
}//package SpaceCommanderv1_fla
Section 9
//AnimasiUFO_285 (SpaceCommanderv1_fla.AnimasiUFO_285)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class AnimasiUFO_285 extends MovieClip {
public var efek:Sound;
public var Mid2:MovieClip;
public var bg:MovieClip;
public var sc:SoundChannel;
public var Mid:MovieClip;
public var par;
public var bodypic:MovieClip;
public var weaponL:MovieClip;
public var weaponR:MovieClip;
public function AnimasiUFO_285(){
addFrameScript(0, frame1, 194, frame195);
}
function frame1(){
efek = new alertboss();
sc = efek.play(0, 6);
}
function frame195(){
stop();
par = this.parent.parent;
par.game.gotoAndStop("stage3b");
sc.stop();
}
}
}//package SpaceCommanderv1_fla
Section 10
//b_20 (SpaceCommanderv1_fla.b_20)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class b_20 extends MovieClip {
public function b_20(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
this.parent.removeChild(this);
}
}
}//package SpaceCommanderv1_fla
Section 11
//BG1Front_182 (SpaceCommanderv1_fla.BG1Front_182)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class BG1Front_182 extends MovieClip {
public var Height:Number;
public var Width:Number;
public function BG1Front_182(){
addFrameScript(0, frame1);
}
function frame1(){
Width = 1920;
Height = 480;
}
}
}//package SpaceCommanderv1_fla
Section 12
//BG2Front_227 (SpaceCommanderv1_fla.BG2Front_227)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class BG2Front_227 extends MovieClip {
public var Height:Number;
public var Width:Number;
public function BG2Front_227(){
addFrameScript(0, frame1);
}
function frame1(){
Width = 1920;
Height = 480;
}
}
}//package SpaceCommanderv1_fla
Section 13
//BG3Front_204 (SpaceCommanderv1_fla.BG3Front_204)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class BG3Front_204 extends MovieClip {
public var Height:Number;
public var Width:Number;
public function BG3Front_204(){
addFrameScript(0, frame1);
}
function frame1(){
Width = 0x0500;
Height = 480;
}
}
}//package SpaceCommanderv1_fla
Section 14
//BG4Front_272 (SpaceCommanderv1_fla.BG4Front_272)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class BG4Front_272 extends MovieClip {
public var Height:Number;
public var Width:Number;
public function BG4Front_272(){
addFrameScript(0, frame1);
}
function frame1(){
Width = 1920;
Height = 480;
}
}
}//package SpaceCommanderv1_fla
Section 15
//BG5Front_241 (SpaceCommanderv1_fla.BG5Front_241)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class BG5Front_241 extends MovieClip {
public var Height:Number;
public var Width:Number;
public function BG5Front_241(){
addFrameScript(0, frame1);
}
function frame1(){
Width = 0x0500;
Height = 480;
}
}
}//package SpaceCommanderv1_fla
Section 16
//BG6Front_198 (SpaceCommanderv1_fla.BG6Front_198)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class BG6Front_198 extends MovieClip {
public var Height:Number;
public var Width:Number;
public function BG6Front_198(){
addFrameScript(0, frame1);
}
function frame1(){
Width = 0x0500;
Height = 480;
}
}
}//package SpaceCommanderv1_fla
Section 17
//BoostIcon_185 (SpaceCommanderv1_fla.BoostIcon_185)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class BoostIcon_185 extends MovieClip {
public var boo:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 18
//Boss1_88 (SpaceCommanderv1_fla.Boss1_88)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Boss1_88 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Boss1_88(){
addFrameScript(0, frame1);
}
function frame1(){
no = 14;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 19
//Boss2_91 (SpaceCommanderv1_fla.Boss2_91)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Boss2_91 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Boss2_91(){
addFrameScript(0, frame1);
}
function frame1(){
no = 15;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 20
//Boss3_94 (SpaceCommanderv1_fla.Boss3_94)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Boss3_94 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Boss3_94(){
addFrameScript(0, frame1);
}
function frame1(){
no = 16;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 21
//Boss4_97 (SpaceCommanderv1_fla.Boss4_97)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Boss4_97 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Boss4_97(){
addFrameScript(0, frame1);
}
function frame1(){
no = 17;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 22
//bosscopy_284 (SpaceCommanderv1_fla.bosscopy_284)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class bosscopy_284 extends MovieClip {
public function bosscopy_284(){
addFrameScript(109, frame110);
}
function frame110(){
stop();
}
}
}//package SpaceCommanderv1_fla
Section 23
//BossIcon_218 (SpaceCommanderv1_fla.BossIcon_218)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class BossIcon_218 extends MovieClip {
public var boo:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 24
//BossPic_274 (SpaceCommanderv1_fla.BossPic_274)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class BossPic_274 extends MovieClip {
public var upperF:MovieClip;
public var front:MovieClip;
public var garage:MovieClip;
public var mid:MovieClip;
public var bodypic:MovieClip;
public var upperB:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 25
//Credit_160 (SpaceCommanderv1_fla.Credit_160)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Credit_160 extends MovieClip {
public var btnSmall:SimpleButton;
public var btnB:SimpleButton;
public var par;
public var onceTime:Boolean;
public function Credit_160(){
addFrameScript(0, frame1);
}
public function clickSmall(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2);
}
function frame1(){
par = this.parent;
onceTime = true;
btnB.addEventListener(MouseEvent.CLICK, btnBC);
btnSmall.addEventListener(MouseEvent.CLICK, clickSmall);
}
public function btnBC(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:Sound;
if (onceTime){
onceTime = false;
_local2 = new DoorClose();
_local2.goMenu = "menu";
par.addChild(_local2);
_local3 = new buttonOk();
_local3.play(0, 1);
};
}
}
}//package SpaceCommanderv1_fla
Section 26
//Ending_325 (SpaceCommanderv1_fla.Ending_325)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Ending_325 extends MovieClip {
public var btnE:SimpleButton;
public var i;
public var tey:Boolean;
public var par;
public var easyt:MovieClip;
public var hardt:MovieClip;
public var onceTime:Boolean;
public function Ending_325(){
addFrameScript(619, frame620);
}
function frame620(){
stop();
onceTime = true;
par = this.parent;
btnE.addEventListener(MouseEvent.CLICK, btnBC);
if (par.lvl == 1){
hardt.visible = false;
};
if (par.lvl == 2){
easyt.visible = false;
tey = true;
for (i in par.medals) {
if (par.medals == 0){
tey = false;
};
};
if (tey){
hardt.visible = false;
};
};
}
public function btnBC(_arg1:MouseEvent):void{
var _local2:Sound;
if (onceTime){
onceTime = false;
_local2 = new buttonOk();
_local2.play(0, 1);
par.musicChanel.stop();
par.gotoAndStop("menu");
};
}
}
}//package SpaceCommanderv1_fla
Section 27
//final_boss_282 (SpaceCommanderv1_fla.final_boss_282)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class final_boss_282 extends MovieClip {
public function final_boss_282(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
}
}
}//package SpaceCommanderv1_fla
Section 28
//GAME1_177 (SpaceCommanderv1_fla.GAME1_177)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class GAME1_177 extends MovieClip {
public var hIcon:MovieClip;
public var LasIcon:MovieClip;
public var Mid2:MovieClip;
public var BooIcon:MovieClip;
public var Mid:MovieClip;
public var deadpit:MovieClip;
public var main:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 29
//GAME2_193 (SpaceCommanderv1_fla.GAME2_193)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class GAME2_193 extends MovieClip {
public var hIcon:MovieClip;
public var LasIcon:MovieClip;
public var Mid2:MovieClip;
public var BooIcon:MovieClip;
public var Mid:MovieClip;
public var deadpit:MovieClip;
public var main:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 30
//GAME3_199 (SpaceCommanderv1_fla.GAME3_199)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class GAME3_199 extends MovieClip {
public var hIcon:MovieClip;
public var LasIcon:MovieClip;
public var Mid2:MovieClip;
public var white:MovieClip;
public var BooIcon:MovieClip;
public var BosIcon:MovieClip;
public var Mid:MovieClip;
public var deadpit:MovieClip;
public var main:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 31
//GAME4_220 (SpaceCommanderv1_fla.GAME4_220)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class GAME4_220 extends MovieClip {
public var hIcon:MovieClip;
public var LasIcon:MovieClip;
public var Mid2:MovieClip;
public var BooIcon:MovieClip;
public var Mid:MovieClip;
public var deadpit:MovieClip;
public var main:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 32
//GAME5_222 (SpaceCommanderv1_fla.GAME5_222)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class GAME5_222 extends MovieClip {
public var hIcon:MovieClip;
public var LasIcon:MovieClip;
public var Mid2:MovieClip;
public var BooIcon:MovieClip;
public var Mid:MovieClip;
public var deadpit:MovieClip;
public var main:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 33
//GAME6_228 (SpaceCommanderv1_fla.GAME6_228)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class GAME6_228 extends MovieClip {
public var hIcon:MovieClip;
public var LasIcon:MovieClip;
public var Mid2:MovieClip;
public var white:MovieClip;
public var BooIcon:MovieClip;
public var BosIcon:MovieClip;
public var Mid:MovieClip;
public var deadpit:MovieClip;
public var main:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 34
//GAME7_242 (SpaceCommanderv1_fla.GAME7_242)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class GAME7_242 extends MovieClip {
public var hIcon:MovieClip;
public var LasIcon:MovieClip;
public var Mid2:MovieClip;
public var BooIcon:MovieClip;
public var Mid:MovieClip;
public var deadpit:MovieClip;
public var main:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 35
//GAME8_244 (SpaceCommanderv1_fla.GAME8_244)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class GAME8_244 extends MovieClip {
public var hIcon:MovieClip;
public var LasIcon:MovieClip;
public var Mid2:MovieClip;
public var white:MovieClip;
public var BooIcon:MovieClip;
public var BosIcon:MovieClip;
public var Mid:MovieClip;
public var deadpit:MovieClip;
public var main:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 36
//gamesnow_preloader_gamesnow_1 (SpaceCommanderv1_fla.gamesnow_preloader_gamesnow_1)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class gamesnow_preloader_gamesnow_1 extends MovieClip {
public var loaderbar:MovieClip;
public var mb2:SimpleButton;
public var smad:SimpleButton;
public function gamesnow_preloader_gamesnow_1(){
addFrameScript(0, frame1);
}
function frame1(){
mb2.addEventListener(MouseEvent.CLICK, clickAB2);
smad.addEventListener(MouseEvent.CLICK, clickSM);
}
public function clickAB2(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2);
}
public function clickSM(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2);
}
}
}//package SpaceCommanderv1_fla
Section 37
//GameUtama_176 (SpaceCommanderv1_fla.GameUtama_176)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class GameUtama_176 extends MovieClip {
public var game:MovieClip;
public function GameUtama_176(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12);
}
function frame10(){
stop();
}
function frame12(){
stop();
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame9(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
function frame11(){
stop();
}
}
}//package SpaceCommanderv1_fla
Section 38
//HangarOpen_261 (SpaceCommanderv1_fla.HangarOpen_261)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class HangarOpen_261 extends MovieClip {
public var par;
public function HangarOpen_261(){
addFrameScript(39, frame40, 104, frame105);
}
function frame105(){
stop();
}
function frame40(){
par = this.parent;
par.respawn();
}
}
}//package SpaceCommanderv1_fla
Section 39
//HealthIcon_191 (SpaceCommanderv1_fla.HealthIcon_191)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class HealthIcon_191 extends MovieClip {
public var boo:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 40
//Instruction_164 (SpaceCommanderv1_fla.Instruction_164)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Instruction_164 extends MovieClip {
public var doo:DoorOpen;
public var btnB:SimpleButton;
public var btnP:SimpleButton;
public var par;
public var onceTime:Boolean;
public function Instruction_164(){
addFrameScript(0, frame1);
}
function frame1(){
par = this.parent;
onceTime = true;
if (par.intkah == true){
btnP.visible = false;
} else {
btnB.visible = false;
doo.visible = false;
};
btnB.addEventListener(MouseEvent.CLICK, btnBC);
btnP.addEventListener(MouseEvent.CLICK, btnPC);
}
public function btnPC(_arg1:MouseEvent):void{
par.musicChanel.stop();
par.gotoAndStop("game");
}
public function btnBC(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:Sound;
if (onceTime){
onceTime = false;
_local2 = new DoorClose();
_local2.goMenu = "menu";
par.addChild(_local2);
_local3 = new buttonOk();
_local3.play(0, 1);
};
}
}
}//package SpaceCommanderv1_fla
Section 41
//Kami1_37 (SpaceCommanderv1_fla.Kami1_37)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Kami1_37 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Kami1_37(){
addFrameScript(0, frame1);
}
function frame1(){
no = 3;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 42
//Kami2_40 (SpaceCommanderv1_fla.Kami2_40)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Kami2_40 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Kami2_40(){
addFrameScript(0, frame1);
}
function frame1(){
no = 4;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 43
//Kami3_43 (SpaceCommanderv1_fla.Kami3_43)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Kami3_43 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Kami3_43(){
addFrameScript(0, frame1);
}
function frame1(){
no = 5;
textKet.visible = false;
par = this.parent;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 44
//Kill1_59 (SpaceCommanderv1_fla.Kill1_59)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Kill1_59 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Kill1_59(){
addFrameScript(0, frame1);
}
function frame1(){
no = 6;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 45
//Kill2_72 (SpaceCommanderv1_fla.Kill2_72)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Kill2_72 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Kill2_72(){
addFrameScript(0, frame1);
}
function frame1(){
no = 7;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 46
//Kill3_75 (SpaceCommanderv1_fla.Kill3_75)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Kill3_75 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Kill3_75(){
addFrameScript(0, frame1);
}
function frame1(){
no = 8;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 47
//Kill4_78 (SpaceCommanderv1_fla.Kill4_78)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Kill4_78 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Kill4_78(){
addFrameScript(0, frame1);
}
function frame1(){
no = 9;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 48
//LaserIcon_188 (SpaceCommanderv1_fla.LaserIcon_188)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class LaserIcon_188 extends MovieClip {
public var laserglow:MovieClip;
public var las:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 49
//lg_333 (SpaceCommanderv1_fla.lg_333)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class lg_333 extends MovieClip {
public function lg_333(){
addFrameScript(25, frame26);
}
function frame26(){
stop();
}
}
}//package SpaceCommanderv1_fla
Section 50
//lser_cilike_340 (SpaceCommanderv1_fla.lser_cilike_340)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class lser_cilike_340 extends MovieClip {
public var par;
public function lser_cilike_340(){
addFrameScript(0, frame1, 30, frame31);
}
function frame1(){
par = this.parent.parent;
}
function frame31(){
stop();
}
}
}//package SpaceCommanderv1_fla
Section 51
//m1_127 (SpaceCommanderv1_fla.m1_127)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class m1_127 extends MovieClip {
public var ekor1:MovieClip;
public var ekor2:MovieClip;
public var ekor4:MovieClip;
public var ekor3:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 52
//MAIN1_181 (SpaceCommanderv1_fla.MAIN1_181)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MAIN1_181 extends MovieClip {
public const keyf1:Number = 112;
public const keyf2:Number = 113;
public const key2:Number = 50;
public const key3:Number = 51;
public const key4:Number = 52;
public const key6:Number = 54;
public const key1:Number = 49;
public const key5:Number = 53;
public const key8:Number = 56;
public const keyD:Number = 68;
public const keyA:Number = 65;
public const key7:Number = 55;
public const keyP:Number = 80;
public const keyR:Number = 82;
public const keyS:Number = 83;
public const keyW:Number = 87;
public const keyX:Number = 88;
public const keyZ:Number = 90;
public var dKeyIsDown:Boolean;
public var bg:MovieClip;
public var xKeyIsDown:Boolean;
public var jumWave:Number;
public var par;
public var maxkombo:Number;
public var keyPressed:uint;
public var aKeyIsDown:Boolean;
public var zKeyIsDown:Boolean;
public var player:Player;
public var staywin:Timer;
public var staylose:Timer;
public var wave:Number;
public var sKeyIsDown:Boolean;
public var pauseGame:Boolean;
public var komboCount:Timer;
public var rightKeyIsDown:Boolean;
public var wKeyIsDown:Boolean;
public var leftClikIsDown:Boolean;
public var notkilling:Number;
public var kombo:Number;
public var downKeyIsDown:Boolean;
public var spaceKeyIsDown:Boolean;
public var upKeyIsDown:Boolean;
public var maxkilling:Number;
public var leftKeyIsDown:Boolean;
public var killing:Number;
public var part;
public function MAIN1_181(){
addFrameScript(0, frame1);
}
public function medalsCount():void{
var _local1:Number;
_local1 = Math.round(((part.hit / part.shot) * 100));
if ((((_local1 > 30)) && ((part.medals[0] == 0)))){
part.medals[0] = 2;
};
if ((((_local1 > 50)) && ((part.medals[1] == 0)))){
part.medals[1] = 2;
};
if ((((_local1 > 80)) && ((part.medals[2] == 0)))){
part.medals[2] = 2;
};
if (notkilling > 0){
if (part.medals[10] == 0){
part.medals[10] = 2;
};
};
if (notkilling > 1){
if (part.medals[11] == 0){
part.medals[11] = 2;
};
};
if (notkilling > 2){
if (part.medals[12] == 0){
part.medals[12] = 2;
};
};
if (notkilling > 3){
if (part.medals[13] == 0){
part.medals[13] = 2;
};
};
if (killing > 0){
if (part.medals[6] == 0){
part.medals[6] = 2;
};
};
maxkombo = kombo;
if (maxkilling < maxkombo){
maxkilling = maxkombo;
};
if ((((maxkilling > 1)) && ((part.medals[7] == 0)))){
part.medals[7] = 2;
};
if ((((maxkilling > 2)) && ((part.medals[8] == 0)))){
part.medals[8] = 2;
};
if ((((maxkilling > 3)) && ((part.medals[9] == 0)))){
part.medals[9] = 2;
};
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
function frame1(){
wave = 0;
jumWave = 3;
pauseGame = false;
killing = 0;
kombo = 0;
maxkombo = 0;
maxkilling = 0;
notkilling = 0;
komboCount = new Timer(1000);
komboCount.addEventListener(TimerEvent.TIMER, komboCounter);
staywin = new Timer(2000);
staylose = new Timer(4000);
part = this.parent.parent.parent;
if (part.nowStage == 1){
initializeGame();
};
}
public function cekBG(_arg1:Event):void{
var _local2:Point;
var _local3:*;
var _local4:Array;
var _local5:Array;
var _local6:*;
var _local7:*;
var _local8:Number;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:MovieClip;
var _local14:Sound;
var _local15:MovieClip;
par = _arg1.currentTarget.parent;
if (!pauseGame){
if (_local11 != null){
if (!_local11.tShade.running){
_local11.tShade.start();
};
};
_local2 = new Point(player.x, player.y);
_local3 = this.localToGlobal(_local2);
par.BooIcon.boo.width = ((player.boosterGauge / 300) * 50);
par.LasIcon.las.width = ((player.laserGauge / 300) * 50);
if (par.LasIcon.las.width == 50){
par.LasIcon.laserglow.visible = true;
} else {
par.LasIcon.laserglow.visible = false;
};
par.hIcon.boo.width = ((player.health / (player.MAXHEALTH * player.healthLevel)) * 50);
if ((((Math.abs(player.rotation) < 90)) && ((_local3.x > 320)))){
if (x > -1280){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
if ((((Math.abs(player.rotation) > 90)) && ((_local3.x < 320)))){
if (x < 0){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
_local4 = new Array();
_local5 = new Array();
_local6 = 0;
while (_local6 < this.numChildren) {
if ((getChildAt(_local6) is Peluru)){
_local4.push(getChildAt(_local6));
};
if ((((((((((getChildAt(_local6) is Enemy)) || ((getChildAt(_local6) is EnemyGround)))) || ((getChildAt(_local6) is Enemy2)))) || ((getChildAt(_local6) is Enemy3)))) || ((getChildAt(_local6) is Enemy4)))){
_local5.push(getChildAt(_local6));
};
_local6++;
};
for (_local7 in _local4) {
if ((((_local4[_local7].tag == 0)) || ((_local4[_local7].tag == 1)))){
for (_local12 in _local5) {
if (_local5[_local12].body.hitTestObject(_local4[_local7])){
if (_local4[_local7].tag == 0){
player.laserGaugePlus();
part.hit = (part.hit + 1);
};
_local5[_local12].damage(_local4[_local7].damaged());
_local13 = new hitefek();
_local13.x = (_local4[_local7].x + (_local5[_local12].speedX() * 4));
_local13.y = (_local4[_local7].y + (_local5[_local12].speedY() * 4));
addChild(_local13);
_local4[_local7].deleteBullet();
break;
};
};
} else {
if (_local4[_local7].tag == 2){
if (player.hitTestObject(_local4[_local7])){
player.damage(_local4[_local7].damaged());
_local13 = new hitefek();
_local13.x = (_local4[_local7].x + (player.speedX() * 4));
_local13.y = (_local4[_local7].y + (player.speedY() * 4));
addChild(_local13);
_local4[_local7].deleteBullet();
};
};
};
};
for (_local12 in _local5) {
if (_local5[_local12].bodypic.hitTestObject(par.deadpit)){
_local5[_local12].damage(999);
};
};
_local8 = 999;
_local11 = this.getChildByName("lasershot");
if (_local11 != null){
for (_local12 in _local5) {
_local2 = new Point(_local5[_local12].body.x, _local5[_local12].body.y);
_local3 = _local5[_local12].localToGlobal(_local2);
if (((((((((_local11.hitTestPoint((_local3.x - (_local5[_local12].body.width / 2)), (_local3.y - (_local5[_local12].body.height / 2)), true)) || (_local11.hitTestPoint((_local3.x - (_local5[_local12].body.width / 2)), (_local3.y + (_local5[_local12].body.height / 2)), true)))) || (_local11.hitTestPoint((_local3.x + (_local5[_local12].body.width / 2)), (_local3.y - (_local5[_local12].body.height / 2)), true)))) || (_local11.hitTestPoint((_local3.x + (_local5[_local12].body.width / 2)), (_local3.y + (_local5[_local12].body.height / 2)), true)))) || (_local11.hitTestPoint(_local3.x, _local3.y, true)))){
_local9 = Math.round(Math.sqrt((Math.pow((_local11.x - _local5[_local12].x), 2) + Math.pow((_local11.y - _local5[_local12].y), 2))));
if (_local8 > _local9){
_local8 = _local9;
_local10 = _local5[_local12];
};
};
};
if (_local10 != null){
_local10.damage(5);
};
_local11.showL.width = _local8;
};
_local11 = this.getChildByName("koin");
if (_local11 != null){
if (player.hitTestObject(_local11)){
part.koin = (part.koin + 1);
_local11.stop();
_local14 = new coinku();
_local14.play(0, 1);
removeChild(_local11);
};
};
if (player.hitTestObject(par.deadpit)){
player.damage(999);
if (part.nowStage == part.begodi){
part.bego++;
} else {
part.begodi = part.nowStage;
part.bego = 1;
};
if (part.medals[3] == 0){
part.medals[3] = 1;
};
if ((((part.bego > 5)) && ((part.medals[4] == 0)))){
part.medals[4] = 1;
};
};
if (_local5.length > 0){
} else {
wave++;
if (wave <= jumWave){
respawn();
if (wave == jumWave){
_local15 = new Last();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
} else {
_local15 = new Next();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
};
} else {
_local15 = new Clear();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
staywin.start();
pauseGame = true;
endGame();
medalsCount();
};
};
if (player.health <= 0){
if (!staylose.running){
_local15 = new Over();
_local15.x = 0;
_local15.y = 0;
par.addChild(_local15);
} else {
pauseGame = true;
};
staylose.start();
};
};
}
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 keyW:
wKeyIsDown = false;
break;
case keyA:
aKeyIsDown = false;
break;
case keyS:
sKeyIsDown = false;
break;
case keyD:
dKeyIsDown = false;
break;
case keyX:
xKeyIsDown = false;
break;
case keyZ:
zKeyIsDown = false;
break;
case keyP:
pauseGame = !(pauseGame);
break;
case Keyboard.SPACE:
spaceKeyIsDown = false;
break;
};
}
public function staylose1(_arg1:TimerEvent):void{
staylose.reset();
endGame();
part.game.gotoAndStop(1);
part.ms.visible = true;
part.gotoAndStop("gameover");
}
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 keyW:
wKeyIsDown = true;
break;
case keyA:
aKeyIsDown = true;
break;
case keyS:
sKeyIsDown = true;
break;
case keyD:
dKeyIsDown = true;
break;
case keyX:
xKeyIsDown = true;
break;
case keyZ:
zKeyIsDown = true;
break;
case Keyboard.SPACE:
spaceKeyIsDown = true;
break;
};
}
public function respawn():void{
var _local1:MovieClip;
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:MovieClip;
switch (wave){
case 1:
_local1 = new Enemy();
_local1.x = -10;
_local1.y = 50;
_local1.setLevel(0.5);
_local2 = new Enemy();
_local2.x = -10;
_local2.y = 250;
_local2.setLevel(0.5);
if (randRange(1, 2) == 1){
_local1.setKoin(true);
} else {
_local2.setKoin(true);
};
addChild(_local1);
addChild(_local2);
break;
case 2:
_local1 = new Enemy3();
_local1.x = 100;
_local1.y = -20;
_local1.setLevel(0.5);
_local2 = new Enemy3();
_local2.x = (bg.Width - 100);
_local2.y = -20;
_local2.setLevel(0.5);
if (randRange(1, 2) == 1){
_local1.setKoin(true);
} else {
_local2.setKoin(true);
};
addChild(_local1);
addChild(_local2);
break;
case 3:
_local1 = new Enemy();
_local1.x = -10;
_local1.y = 50;
_local1.setLevel(0.5);
_local2 = new Enemy();
_local2.x = -10;
_local2.y = 250;
_local2.setLevel(0.5);
_local3 = new Enemy3();
_local3.x = (bg.Width - 100);
_local3.y = -20;
_local3.setLevel(0.5);
addChild(_local1);
addChild(_local2);
addChild(_local3);
break;
};
}
public function endGame():void{
var _local1:Array;
var _local2:*;
var _local3:*;
komboCount.reset();
komboCount.removeEventListener(TimerEvent.TIMER, komboCounter);
staylose.removeEventListener(TimerEvent.TIMER, staylose1);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.removeEventListener(KeyboardEvent.KEY_UP, releaseKey);
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
if ((((((((((getChildAt(_local2) is Enemy)) || ((getChildAt(_local2) is EnemyGround)))) || ((getChildAt(_local2) is Enemy2)))) || ((getChildAt(_local2) is Enemy3)))) || ((getChildAt(_local2) is Enemy4)))){
_local1.push(getChildAt(_local2));
};
_local2++;
};
for (_local3 in _local1) {
_local1[_local3].deleteEnemy();
};
player.deletePlayer();
part.musicChannel.stop();
removeEventListener(Event.ENTER_FRAME, cekBG);
}
public function komboCounter(_arg1:TimerEvent):void{
komboCount.reset();
maxkombo = kombo;
if (maxkilling < maxkombo){
maxkilling = maxkombo;
};
maxkombo = 0;
kombo = 0;
}
public function initializeGame():void{
rightKeyIsDown = false;
leftKeyIsDown = false;
upKeyIsDown = false;
downKeyIsDown = false;
wKeyIsDown = false;
aKeyIsDown = false;
sKeyIsDown = false;
dKeyIsDown = false;
zKeyIsDown = false;
leftClikIsDown = false;
spaceKeyIsDown = false;
player.setLevel(part.sl, part.wl, part.frl);
part.musicSound = new Stage1BGM();
part.musicChannel = part.musicSound.play(0, 9999);
staywin.addEventListener(TimerEvent.TIMER, staywin1);
staylose.addEventListener(TimerEvent.TIMER, staylose1);
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP, releaseKey);
addEventListener(Event.ENTER_FRAME, cekBG);
}
public function NextStage():void{
part.game.gotoAndStop(1);
part.ms.visible = true;
if (part.lvl == 1){
part.nowStage = 5;
};
if (part.lvl == 2){
part.nowStage = 2;
};
part.gotoAndStop("win");
}
public function staywin1(_arg1:TimerEvent):void{
var _local2:*;
staywin.reset();
staywin.removeEventListener(TimerEvent.TIMER, staywin1);
_local2 = new keterangan();
_local2.x = 0;
_local2.y = 0;
par.addChild(_local2);
}
}
}//package SpaceCommanderv1_fla
Section 53
//MAIN2_197 (SpaceCommanderv1_fla.MAIN2_197)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MAIN2_197 extends MovieClip {
public const keyf1:Number = 112;
public const keyf2:Number = 113;
public const key2:Number = 50;
public const key3:Number = 51;
public const key4:Number = 52;
public const key6:Number = 54;
public const key1:Number = 49;
public const key5:Number = 53;
public const key8:Number = 56;
public const keyD:Number = 68;
public const keyA:Number = 65;
public const key7:Number = 55;
public const keyP:Number = 80;
public const keyR:Number = 82;
public const keyS:Number = 83;
public const keyW:Number = 87;
public const keyX:Number = 88;
public const keyZ:Number = 90;
public var dKeyIsDown:Boolean;
public var bg:MovieClip;
public var xKeyIsDown:Boolean;
public var jumWave:Number;
public var par;
public var maxkombo:Number;
public var keyPressed:uint;
public var aKeyIsDown:Boolean;
public var zKeyIsDown:Boolean;
public var player:Player;
public var staywin:Timer;
public var staylose:Timer;
public var wave:Number;
public var sKeyIsDown:Boolean;
public var pauseGame:Boolean;
public var komboCount:Timer;
public var rightKeyIsDown:Boolean;
public var wKeyIsDown:Boolean;
public var leftClikIsDown:Boolean;
public var notkilling:Number;
public var kombo:Number;
public var downKeyIsDown:Boolean;
public var spaceKeyIsDown:Boolean;
public var upKeyIsDown:Boolean;
public var maxkilling:Number;
public var leftKeyIsDown:Boolean;
public var killing:Number;
public var part;
public function MAIN2_197(){
addFrameScript(0, frame1);
}
public function medalsCount():void{
var _local1:Number;
_local1 = Math.round(((part.hit / part.shot) * 100));
if ((((_local1 > 30)) && ((part.medals[0] == 0)))){
part.medals[0] = 2;
};
if ((((_local1 > 50)) && ((part.medals[1] == 0)))){
part.medals[1] = 2;
};
if ((((_local1 > 80)) && ((part.medals[2] == 0)))){
part.medals[2] = 2;
};
if (notkilling > 0){
if (part.medals[10] == 0){
part.medals[10] = 2;
};
};
if (notkilling > 1){
if (part.medals[11] == 0){
part.medals[11] = 2;
};
};
if (notkilling > 2){
if (part.medals[12] == 0){
part.medals[12] = 2;
};
};
if (notkilling > 3){
if (part.medals[13] == 0){
part.medals[13] = 2;
};
};
if (killing > 0){
if (part.medals[6] == 0){
part.medals[6] = 2;
};
};
maxkombo = kombo;
if (maxkilling < maxkombo){
maxkilling = maxkombo;
};
if ((((maxkilling > 1)) && ((part.medals[7] == 0)))){
part.medals[7] = 2;
};
if ((((maxkilling > 2)) && ((part.medals[8] == 0)))){
part.medals[8] = 2;
};
if ((((maxkilling > 3)) && ((part.medals[9] == 0)))){
part.medals[9] = 2;
};
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
function frame1(){
wave = 0;
jumWave = 5;
pauseGame = false;
killing = 0;
kombo = 0;
maxkombo = 0;
maxkilling = 0;
notkilling = 0;
komboCount = new Timer(1000);
komboCount.addEventListener(TimerEvent.TIMER, komboCounter);
staywin = new Timer(2000);
staylose = new Timer(4000);
part = this.parent.parent.parent;
if (part.nowStage == 2){
initializeGame();
};
}
public function cekBG(_arg1:Event):void{
var _local2:Point;
var _local3:*;
var _local4:Array;
var _local5:Array;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:Number;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:MovieClip;
var _local14:Sound;
var _local15:MovieClip;
par = _arg1.currentTarget.parent;
if (!pauseGame){
_local2 = new Point(player.x, player.y);
_local3 = this.localToGlobal(_local2);
par.BooIcon.boo.width = ((player.boosterGauge / 300) * 50);
par.LasIcon.las.width = ((player.laserGauge / 300) * 50);
if (par.LasIcon.las.width == 50){
par.LasIcon.laserglow.visible = true;
} else {
par.LasIcon.laserglow.visible = false;
};
par.hIcon.boo.width = ((player.health / (player.MAXHEALTH * player.healthLevel)) * 50);
if ((((Math.abs(player.rotation) < 90)) && ((_local3.x > 320)))){
if (x > -640){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
if ((((Math.abs(player.rotation) > 90)) && ((_local3.x < 320)))){
if (x < 0){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
_local4 = new Array();
_local5 = new Array();
_local6 = 0;
while (_local6 < this.numChildren) {
if ((getChildAt(_local6) is Peluru)){
_local4.push(getChildAt(_local6));
};
if ((((((((((getChildAt(_local6) is Enemy)) || ((getChildAt(_local6) is EnemyGround)))) || ((getChildAt(_local6) is Enemy2)))) || ((getChildAt(_local6) is Enemy3)))) || ((getChildAt(_local6) is Enemy4)))){
_local5.push(getChildAt(_local6));
};
_local6++;
};
for (_local7 in _local4) {
if ((((_local4[_local7].tag == 0)) || ((_local4[_local7].tag == 1)))){
for (_local12 in _local5) {
if (_local5[_local12].body.hitTestObject(_local4[_local7])){
if (_local4[_local7].tag == 0){
player.laserGaugePlus();
part.hit = (part.hit + 1);
};
_local5[_local12].damage(_local4[_local7].damaged());
_local13 = new hitefek();
_local13.x = (_local4[_local7].x + (_local5[_local12].speedX() * 4));
_local13.y = (_local4[_local7].y + (_local5[_local12].speedY() * 4));
addChild(_local13);
_local4[_local7].deleteBullet();
};
};
} else {
if (_local4[_local7].tag == 2){
if (player.hitTestObject(_local4[_local7])){
player.damage(_local4[_local7].damaged());
_local13 = new hitefek();
_local13.x = (_local4[_local7].x + (player.speedX() * 4));
_local13.y = (_local4[_local7].y + (player.speedY() * 4));
addChild(_local13);
_local4[_local7].deleteBullet();
};
};
};
};
for (_local12 in _local5) {
if (_local5[_local12].bodypic.hitTestObject(par.deadpit)){
_local5[_local12].damage(999);
};
};
_local8 = this.getChildByName("lasershot");
_local9 = 999;
if (_local8 != null){
for (_local12 in _local5) {
_local2 = new Point(_local5[_local12].body.x, _local5[_local12].body.y);
_local3 = _local5[_local12].localToGlobal(_local2);
if (((((((((_local8.hitTestPoint((_local3.x - (_local5[_local12].body.width / 2)), (_local3.y - (_local5[_local12].body.height / 2)), true)) || (_local8.hitTestPoint((_local3.x - (_local5[_local12].body.width / 2)), (_local3.y + (_local5[_local12].body.height / 2)), true)))) || (_local8.hitTestPoint((_local3.x + (_local5[_local12].body.width / 2)), (_local3.y - (_local5[_local12].body.height / 2)), true)))) || (_local8.hitTestPoint((_local3.x + (_local5[_local12].body.width / 2)), (_local3.y + (_local5[_local12].body.height / 2)), true)))) || (_local8.hitTestPoint(_local3.x, _local3.y, true)))){
_local10 = Math.round(Math.sqrt((Math.pow((_local8.x - _local5[_local12].x), 2) + Math.pow((_local8.y - _local5[_local12].y), 2))));
if (_local9 > _local10){
_local9 = _local10;
_local11 = _local5[_local12];
};
};
};
if (_local11 != null){
_local11.damage((5 * player.weaponLevel));
};
_local8.showL.width = _local9;
};
_local8 = this.getChildByName("koin");
if (_local8 != null){
if (player.hitTestObject(_local8)){
part.koin = (part.koin + 1);
_local8.stop();
_local14 = new coinku();
_local14.play(0, 1);
removeChild(_local8);
};
};
if (player.hitTestObject(par.deadpit)){
player.damage(999);
if (part.nowStage == part.begodi){
part.bego++;
} else {
part.begodi = part.nowStage;
part.bego = 1;
};
if (part.medals[3] == 0){
part.medals[3] = 1;
};
if ((((part.bego > 5)) && ((part.medals[4] == 0)))){
part.medals[4] = 1;
};
};
if (_local5.length > 0){
} else {
wave++;
if (wave <= jumWave){
respawn();
if (wave == jumWave){
_local15 = new Last();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
} else {
_local15 = new Next();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
};
} else {
_local15 = new Clear();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
staywin.start();
pauseGame = true;
endGame();
medalsCount();
};
};
if (player.health <= 0){
if (!staylose.running){
_local15 = new Over();
_local15.x = 0;
_local15.y = 0;
par.addChild(_local15);
} else {
pauseGame = true;
};
staylose.start();
};
};
}
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 keyW:
wKeyIsDown = false;
break;
case keyA:
aKeyIsDown = false;
break;
case keyS:
sKeyIsDown = false;
break;
case keyD:
dKeyIsDown = false;
break;
case keyX:
xKeyIsDown = false;
break;
case keyZ:
zKeyIsDown = false;
break;
case keyP:
pauseGame = !(pauseGame);
break;
case Keyboard.SPACE:
spaceKeyIsDown = false;
break;
};
}
public function staylose1(_arg1:TimerEvent):void{
staylose.reset();
endGame();
part.game.gotoAndStop(1);
part.ms.visible = true;
part.gotoAndStop("gameover");
}
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 keyW:
wKeyIsDown = true;
break;
case keyA:
aKeyIsDown = true;
break;
case keyS:
sKeyIsDown = true;
break;
case keyD:
dKeyIsDown = true;
break;
case keyX:
xKeyIsDown = true;
break;
case keyZ:
zKeyIsDown = true;
break;
case Keyboard.SPACE:
spaceKeyIsDown = true;
break;
};
}
public function respawn():void{
var _local1:MovieClip;
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:MovieClip;
var _local5:MovieClip;
switch (wave){
case 1:
_local1 = new Enemy3();
_local1.x = 100;
_local1.y = -20;
_local1.setLevel(1.5);
addChild(_local1);
_local2 = new Enemy4();
_local2.x = (bg.Width - 100);
_local2.y = -20;
addChild(_local2);
_local2.setLevel(1.5);
break;
case 2:
_local1 = new Enemy4();
_local1.x = 100;
_local1.y = -20;
_local2 = new Enemy4();
_local2.x = (bg.Width - 100);
_local2.y = -20;
_local3 = new EnemyGround();
_local3.x = 401.9;
_local3.y = 406.9;
_local3.rotation = -90;
_local1.setLevel(1.5);
_local2.setLevel(1.5);
_local3.setLevel(1.5);
if (randRange(1, 2) == 1){
_local1.setKoin(true);
} else {
_local2.setKoin(true);
};
addChild(_local1);
addChild(_local2);
addChild(_local3);
break;
case 3:
_local1 = new Enemy3();
_local1.x = 100;
_local1.y = -20;
_local1.setLevel(1.5);
addChild(_local1);
_local2 = new Enemy3();
_local2.x = (bg.Width - 100);
_local2.y = -20;
_local2.setLevel(1.5);
addChild(_local2);
_local3 = new Enemy3();
_local3.x = 200;
_local3.y = -20;
_local3.setLevel(1.5);
addChild(_local3);
break;
case 4:
_local1 = new Enemy3();
_local1.x = 100;
_local1.y = -20;
_local2 = new Enemy3();
_local2.x = (bg.Width - 100);
_local2.y = -20;
_local3 = new Enemy3();
_local3.x = (bg.Width - 200);
_local3.y = -20;
_local1.setLevel(1.5);
_local2.setLevel(1.5);
_local3.setLevel(1.5);
switch (randRange(1, 3)){
case 1:
_local1.setKoin(true);
break;
case 2:
_local2.setKoin(true);
break;
case 3:
_local3.setKoin(true);
break;
};
addChild(_local1);
addChild(_local2);
addChild(_local3);
break;
case 5:
_local1 = new Enemy4();
_local1.x = 100;
_local1.y = -20;
_local1.setLevel(1.5);
addChild(_local1);
_local2 = new Enemy4();
_local2.x = (bg.Width - 100);
_local2.y = -20;
_local2.setLevel(1.5);
addChild(_local2);
_local3 = new Enemy4();
_local3.x = 200;
_local3.y = -20;
_local3.setLevel(1.5);
addChild(_local3);
_local4 = new Enemy4();
_local4.x = (bg.Width - 200);
_local4.y = -20;
_local4.setLevel(1.5);
addChild(_local4);
_local5 = new EnemyGround();
_local5.x = 401.9;
_local5.y = 406.9;
_local5.rotation = -90;
_local5.setLevel(1.5);
addChild(_local5);
break;
};
}
public function endGame():void{
var _local1:Array;
var _local2:*;
var _local3:*;
stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.removeEventListener(KeyboardEvent.KEY_UP, releaseKey);
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
if ((((((((((getChildAt(_local2) is Enemy)) || ((getChildAt(_local2) is EnemyGround)))) || ((getChildAt(_local2) is Enemy2)))) || ((getChildAt(_local2) is Enemy3)))) || ((getChildAt(_local2) is Enemy4)))){
_local1.push(getChildAt(_local2));
};
_local2++;
};
for (_local3 in _local1) {
_local1[_local3].deleteEnemy();
};
player.deletePlayer();
part.musicChannel.stop();
removeEventListener(Event.ENTER_FRAME, cekBG);
}
public function komboCounter(_arg1:TimerEvent):void{
komboCount.reset();
maxkombo = kombo;
if (maxkilling < maxkombo){
maxkilling = maxkombo;
};
maxkombo = 0;
kombo = 0;
}
public function initializeGame():void{
rightKeyIsDown = false;
leftKeyIsDown = false;
upKeyIsDown = false;
downKeyIsDown = false;
wKeyIsDown = false;
aKeyIsDown = false;
sKeyIsDown = false;
dKeyIsDown = false;
zKeyIsDown = false;
leftClikIsDown = false;
spaceKeyIsDown = false;
player.setLevel(part.sl, part.wl, part.frl);
part.musicSound = new Stage2BGM();
part.musicChannel = part.musicSound.play(0, 9999);
staywin.addEventListener(TimerEvent.TIMER, staywin1);
staylose.addEventListener(TimerEvent.TIMER, staylose1);
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP, releaseKey);
addEventListener(Event.ENTER_FRAME, cekBG);
}
public function NextStage():void{
part.game.gotoAndStop(1);
part.ms.visible = true;
part.nowStage = 3;
part.gotoAndStop("win");
}
public function staywin1(_arg1:TimerEvent):void{
var _local2:*;
staywin.reset();
staywin.removeEventListener(TimerEvent.TIMER, staywin1);
_local2 = new keterangan();
_local2.x = 0;
_local2.y = 0;
par.addChild(_local2);
}
}
}//package SpaceCommanderv1_fla
Section 54
//MAIN3_203 (SpaceCommanderv1_fla.MAIN3_203)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MAIN3_203 extends MovieClip {
public const keyf1:Number = 112;
public const keyf2:Number = 113;
public const key2:Number = 50;
public const key3:Number = 51;
public const key4:Number = 52;
public const key6:Number = 54;
public const key1:Number = 49;
public const key5:Number = 53;
public const key8:Number = 56;
public const keyD:Number = 68;
public const keyA:Number = 65;
public const key7:Number = 55;
public const keyP:Number = 80;
public const keyR:Number = 82;
public const keyS:Number = 83;
public const keyW:Number = 87;
public const keyX:Number = 88;
public const keyZ:Number = 90;
public var dKeyIsDown:Boolean;
public var bg:MovieClip;
public var bs:BossRobot;
public var xKeyIsDown:Boolean;
public var par;
public var keyPressed:uint;
public var tAniBlow:Timer;
public var ctrEfek:Number;
public var aKeyIsDown:Boolean;
public var zKeyIsDown:Boolean;
public var player:Player;
public var staywin:Timer;
public var staylose:Timer;
public var sKeyIsDown:Boolean;
public var pauseGame:Boolean;
public var deadBreak:Boolean;
public var rightKeyIsDown:Boolean;
public var wKeyIsDown:Boolean;
public var leftClikIsDown:Boolean;
public var das:Number;
public var downKeyIsDown:Boolean;
public var spaceKeyIsDown:Boolean;
public var upKeyIsDown:Boolean;
public var leftKeyIsDown:Boolean;
public var killing:Number;
public var part;
public function MAIN3_203(){
addFrameScript(0, frame1);
}
public function medalsCount():void{
var _local1:Number;
_local1 = Math.round(((part.hit / part.shot) * 100));
if ((((_local1 > 30)) && ((part.medals[0] == 0)))){
part.medals[0] = 2;
};
if ((((_local1 > 50)) && ((part.medals[1] == 0)))){
part.medals[1] = 2;
};
if ((((_local1 > 80)) && ((part.medals[2] == 0)))){
part.medals[2] = 2;
};
if (part.medals[15] == 0){
part.medals[15] = 2;
};
if (deadBreak == true){
if (part.medals[5] == 0){
part.medals[5] = 2;
};
};
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((((Math.random() * _arg2) - _arg1) + 1)) + _arg1);
return (_local3);
}
function frame1(){
ctrEfek = 100;
pauseGame = false;
das = 0.01;
deadBreak = false;
killing = 1;
tAniBlow = new Timer(7000);
tAniBlow.addEventListener(TimerEvent.TIMER, Aniblow);
staywin = new Timer(2000);
staylose = new Timer(4000);
part = this.parent.parent.parent;
if (part.nowStage == 3){
initializeGame();
};
}
public function cekBG(_arg1:Event):void{
var _local2:Point;
var _local3:*;
var _local4:Array;
var _local5:Array;
var _local6:*;
var _local7:MovieClip;
var _local8:Sound;
var _local9:*;
var _local10:*;
var _local11:Number;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:Sound;
var _local16:*;
var _local17:MovieClip;
var _local18:Number;
var _local19:Number;
par = _arg1.currentTarget.parent;
if (!pauseGame){
_local2 = new Point(player.x, player.y);
_local3 = this.localToGlobal(_local2);
par.BooIcon.boo.width = ((player.boosterGauge / 300) * 50);
par.BosIcon.boo.width = ((bs.health / bs.MAXHEALTH) * 50);
par.LasIcon.las.width = ((player.laserGauge / 300) * 50);
if (par.LasIcon.las.width == 50){
par.LasIcon.laserglow.visible = true;
} else {
par.LasIcon.laserglow.visible = false;
};
par.hIcon.boo.width = ((player.health / (player.MAXHEALTH * player.healthLevel)) * 50);
if ((((Math.abs(player.rotation) < 90)) && ((_local3.x > 320)))){
if (x > -640){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
if ((((Math.abs(player.rotation) > 90)) && ((_local3.x < 320)))){
if (x < 0){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
_local4 = new Array();
_local5 = new Array();
_local6 = 0;
while (_local6 < this.numChildren) {
if ((getChildAt(_local6) is Peluru)){
_local4.push(getChildAt(_local6));
};
if ((((((((((((getChildAt(_local6) is Enemy)) || ((getChildAt(_local6) is EnemyGround)))) || ((getChildAt(_local6) is Enemy2)))) || ((getChildAt(_local6) is Enemy3)))) || ((getChildAt(_local6) is Enemy4)))) || ((getChildAt(_local6) is BossRobot)))){
_local5.push(getChildAt(_local6));
};
_local6++;
};
for (_local9 in _local4) {
if ((((_local4[_local9].tag == 0)) || ((_local4[_local9].tag == 1)))){
for (_local14 in _local5) {
if (_local5[_local14].body.hitTestObject(_local4[_local9])){
if (_local4[_local9].tag == 0){
player.laserGaugePlus();
part.hit = (part.hit + 1);
};
_local5[_local14].damage(_local4[_local9].damaged());
_local7 = new hitefek();
_local7.x = (_local4[_local9].x + (_local5[_local14].speedX() * 4));
_local7.y = (_local4[_local9].y + (_local5[_local14].speedY() * 4));
addChild(_local7);
_local4[_local9].deleteBullet();
break;
};
if (((_local5[_local14].tempwall1.hitTestObject(_local4[_local9])) || (_local5[_local14].tempwall2.hitTestObject(_local4[_local9])))){
_local7 = new hitefek3();
_local7.x = (_local4[_local9].x + (_local5[_local14].speedX() * 4));
_local7.y = (_local4[_local9].y + (_local5[_local14].speedY() * 4));
addChild(_local7);
_local4[_local9].deleteBullet();
_local8 = new hitmetal();
_local8.play(0, 1);
break;
};
if (_local5[_local14].body.hitTestObject(par.deadpit)){
_local5[_local14].damage(999);
};
};
} else {
if (_local4[_local9].tag == 2){
if (player.hitTestObject(_local4[_local9])){
player.damage(_local4[_local9].damaged());
_local7 = new hitefek();
_local7.x = (_local4[_local9].x + (player.speedX() * 4));
_local7.y = (_local4[_local9].y + (player.speedY() * 4));
addChild(_local7);
_local4[_local9].deleteBullet();
};
};
};
};
_local10 = this.getChildByName("lasershot");
_local11 = 999;
if (_local10 != null){
for (_local14 in _local5) {
_local2 = new Point(_local5[_local14].body.x, _local5[_local14].body.y);
_local3 = _local5[_local14].localToGlobal(_local2);
if (((((((((_local10.hitTestPoint((_local3.x - (_local5[_local14].body.width / 2)), (_local3.y - (_local5[_local14].body.height / 2)), true)) || (_local10.hitTestPoint((_local3.x - (_local5[_local14].body.width / 2)), (_local3.y + (_local5[_local14].body.height / 2)), true)))) || (_local10.hitTestPoint((_local3.x + (_local5[_local14].body.width / 2)), (_local3.y - (_local5[_local14].body.height / 2)), true)))) || (_local10.hitTestPoint((_local3.x + (_local5[_local14].body.width / 2)), (_local3.y + (_local5[_local14].body.height / 2)), true)))) || (_local10.hitTestPoint(_local3.x, _local3.y, true)))){
_local12 = Math.round(Math.sqrt((Math.pow((_local10.x - _local5[_local14].x), 2) + Math.pow((_local10.y - _local5[_local14].y), 2))));
if (_local11 > _local12){
_local11 = _local12;
_local13 = _local5[_local14];
};
};
};
if (_local13 != null){
_local13.damage((5 * player.weaponLevel));
};
_local10.showL.width = _local11;
};
if (player.hitTestObject(par.deadpit)){
player.damage(999);
if (part.nowStage == part.begodi){
part.bego++;
} else {
part.begodi = part.nowStage;
part.bego = 1;
};
if (part.medals[3] == 0){
part.medals[3] = 1;
};
if ((((part.bego > 5)) && ((part.medals[4] == 0)))){
part.medals[4] = 1;
};
};
ctrEfek--;
if (bs.health > 0){
if (player.hitTestObject(bs.wall1)){
player.damage(1);
if (ctrEfek < 0){
_local7 = new hitefek2();
_local7.x = (player.x + randRange(-30, 30));
_local7.y = (player.y + randRange(-15, 15));
addChild(_local7);
ctrEfek = 7;
_local15 = new testhit();
_local15.play(0, 2);
};
};
if (player.hitTestObject(bs.body)){
bs.damage(0.5);
};
_local10 = this.getChildByName("botlaser");
if (_local10 != null){
if (player.hitTestObject(_local10)){
if (ctrEfek < 0){
_local7 = new EfekPutih();
_local7.x = (player.x + randRange(-30, 30));
_local7.y = (player.y + randRange(-15, 15));
addChild(_local7);
ctrEfek = 7;
_local15 = new testhit();
_local15.play(0, 2);
};
};
};
};
if (bs.health > 0){
} else {
pauseGame = true;
bs.bodypic.gotoAndStop("die");
tAniBlow.start();
};
if (player.health <= 0){
if (!staylose.running){
_local16 = new Over();
_local16.x = 0;
_local16.y = 0;
par.addChild(_local16);
} else {
pauseGame = true;
};
staylose.start();
};
} else {
if (bs.health <= 0){
ctrEfek--;
if (das >= 0){
_local17 = new Duar();
_local18 = bs.width;
_local19 = bs.height;
_local17.x = ((bs.x - (_local18 / 2)) + randRange(-(_local18), _local18));
_local17.y = ((bs.y - (_local19 / 2)) + randRange(-(_local19), _local19));
if (ctrEfek < 0){
_local15 = new explosion();
_local15.play(0, 1);
ctrEfek = 5;
};
addChild(_local17);
};
par.white.alpha = (par.white.alpha + das);
if (par.white.alpha >= 1){
das = (das * -1);
bs.deleteEnemy();
removeChild(bs);
};
};
};
}
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 keyW:
wKeyIsDown = false;
break;
case keyA:
aKeyIsDown = false;
break;
case keyS:
sKeyIsDown = false;
break;
case keyD:
dKeyIsDown = false;
break;
case keyX:
xKeyIsDown = false;
break;
case keyZ:
zKeyIsDown = false;
break;
case keyP:
break;
case Keyboard.SPACE:
spaceKeyIsDown = false;
break;
};
}
public function staylose1(_arg1:TimerEvent):void{
staylose.reset();
endGame();
part.game.gotoAndStop(1);
part.ms.visible = true;
part.gotoAndStop("gameover");
}
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 keyW:
wKeyIsDown = true;
break;
case keyA:
aKeyIsDown = true;
break;
case keyS:
sKeyIsDown = true;
break;
case keyD:
dKeyIsDown = true;
break;
case keyX:
xKeyIsDown = true;
break;
case keyZ:
zKeyIsDown = true;
break;
case Keyboard.SPACE:
spaceKeyIsDown = true;
break;
};
}
public function endGame():void{
stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.removeEventListener(KeyboardEvent.KEY_UP, releaseKey);
bs.deleteEnemy();
player.deletePlayer();
part.musicChannel.stop();
removeEventListener(Event.ENTER_FRAME, cekBG);
}
public function Aniblow(_arg1:TimerEvent):void{
var _local2:*;
tAniBlow.reset();
tAniBlow.removeEventListener(TimerEvent.TIMER, Aniblow);
_local2 = new Clear();
_local2.x = 314.2;
_local2.y = 196.8;
par.addChild(_local2);
staywin.start();
pauseGame = true;
endGame();
medalsCount();
}
public function initializeGame():void{
rightKeyIsDown = false;
leftKeyIsDown = false;
upKeyIsDown = false;
downKeyIsDown = false;
wKeyIsDown = false;
aKeyIsDown = false;
sKeyIsDown = false;
dKeyIsDown = false;
zKeyIsDown = false;
leftClikIsDown = false;
spaceKeyIsDown = false;
player.setLevel(part.sl, part.wl, part.frl);
part.musicSound = new BossRoboBGM();
part.musicChannel = part.musicSound.play(0, 9999);
staywin.addEventListener(TimerEvent.TIMER, staywin1);
staylose.addEventListener(TimerEvent.TIMER, staylose1);
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP, releaseKey);
addEventListener(Event.ENTER_FRAME, cekBG);
}
public function NextStage():void{
part.game.gotoAndStop(1);
part.ms.visible = true;
part.nowStage = 4;
part.gotoAndStop("win");
}
public function staywin1(_arg1:TimerEvent):void{
var _local2:*;
staywin.reset();
staywin.removeEventListener(TimerEvent.TIMER, staywin1);
_local2 = new keterangan();
_local2.x = 0;
_local2.y = 0;
par.addChild(_local2);
}
}
}//package SpaceCommanderv1_fla
Section 55
//MAIN4_221 (SpaceCommanderv1_fla.MAIN4_221)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MAIN4_221 extends MovieClip {
public const keyf1:Number = 112;
public const keyf2:Number = 113;
public const key2:Number = 50;
public const key3:Number = 51;
public const key4:Number = 52;
public const key6:Number = 54;
public const key1:Number = 49;
public const key5:Number = 53;
public const key8:Number = 56;
public const keyD:Number = 68;
public const keyA:Number = 65;
public const key7:Number = 55;
public const keyP:Number = 80;
public const keyR:Number = 82;
public const keyS:Number = 83;
public const keyW:Number = 87;
public const keyX:Number = 88;
public const keyZ:Number = 90;
public var dKeyIsDown:Boolean;
public var bg:MovieClip;
public var xKeyIsDown:Boolean;
public var jumWave:Number;
public var par;
public var maxkombo:Number;
public var keyPressed:uint;
public var aKeyIsDown:Boolean;
public var zKeyIsDown:Boolean;
public var wm:Wingman;
public var player:Player;
public var staywin:Timer;
public var staylose:Timer;
public var wave:Number;
public var sKeyIsDown:Boolean;
public var pauseGame:Boolean;
public var komboCount:Timer;
public var rightKeyIsDown:Boolean;
public var wKeyIsDown:Boolean;
public var leftClikIsDown:Boolean;
public var notkilling:Number;
public var kombo:Number;
public var downKeyIsDown:Boolean;
public var spaceKeyIsDown:Boolean;
public var upKeyIsDown:Boolean;
public var maxkilling:Number;
public var leftKeyIsDown:Boolean;
public var killing:Number;
public var part;
public function MAIN4_221(){
addFrameScript(0, frame1);
}
public function medalsCount():void{
var _local1:Number;
_local1 = Math.round(((part.hit / part.shot) * 100));
if ((((_local1 > 30)) && ((part.medals[0] == 0)))){
part.medals[0] = 2;
};
if ((((_local1 > 50)) && ((part.medals[1] == 0)))){
part.medals[1] = 2;
};
if ((((_local1 > 80)) && ((part.medals[2] == 0)))){
part.medals[2] = 2;
};
if (notkilling > 0){
if (part.medals[10] == 0){
part.medals[10] = 2;
};
};
if (notkilling > 1){
if (part.medals[11] == 0){
part.medals[11] = 2;
};
};
if (notkilling > 2){
if (part.medals[12] == 0){
part.medals[12] = 2;
};
};
if (notkilling > 3){
if (part.medals[13] == 0){
part.medals[13] = 2;
};
};
if (killing > 0){
if (part.medals[6] == 0){
part.medals[6] = 2;
};
};
maxkombo = kombo;
if (maxkilling < maxkombo){
maxkilling = maxkombo;
};
if ((((maxkilling > 1)) && ((part.medals[7] == 0)))){
part.medals[7] = 2;
};
if ((((maxkilling > 2)) && ((part.medals[8] == 0)))){
part.medals[8] = 2;
};
if ((((maxkilling > 3)) && ((part.medals[9] == 0)))){
part.medals[9] = 2;
};
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
function frame1(){
wave = 0;
jumWave = 7;
pauseGame = false;
killing = 0;
kombo = 0;
maxkombo = 0;
maxkilling = 0;
notkilling = 0;
komboCount = new Timer(1000);
komboCount.addEventListener(TimerEvent.TIMER, komboCounter);
staywin = new Timer(2000);
staylose = new Timer(4000);
part = this.parent.parent.parent;
if (part.nowStage == 4){
initializeGame();
};
}
public function cekBG(_arg1:Event):void{
var _local2:Point;
var _local3:*;
var _local4:Array;
var _local5:Array;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:Number;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:MovieClip;
var _local14:Sound;
var _local15:MovieClip;
par = _arg1.currentTarget.parent;
if (!pauseGame){
_local2 = new Point(player.x, player.y);
_local3 = this.localToGlobal(_local2);
par.BooIcon.boo.width = ((player.boosterGauge / 300) * 50);
par.LasIcon.las.width = ((player.laserGauge / 300) * 50);
if (par.LasIcon.las.width == 50){
par.LasIcon.laserglow.visible = true;
} else {
par.LasIcon.laserglow.visible = false;
};
par.hIcon.boo.width = ((player.health / (player.MAXHEALTH * player.healthLevel)) * 50);
if ((((Math.abs(player.rotation) < 90)) && ((_local3.x > 320)))){
if (x > -640){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
if ((((Math.abs(player.rotation) > 90)) && ((_local3.x < 320)))){
if (x < 0){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
_local4 = new Array();
_local5 = new Array();
_local6 = 0;
while (_local6 < this.numChildren) {
if ((getChildAt(_local6) is Peluru)){
_local4.push(getChildAt(_local6));
};
if ((((((((((getChildAt(_local6) is Enemy)) || ((getChildAt(_local6) is EnemyGround)))) || ((getChildAt(_local6) is Enemy2)))) || ((getChildAt(_local6) is Enemy3)))) || ((getChildAt(_local6) is Enemy4)))){
_local5.push(getChildAt(_local6));
};
_local6++;
};
for (_local7 in _local4) {
if ((((_local4[_local7].tag == 0)) || ((_local4[_local7].tag == 1)))){
for (_local12 in _local5) {
if (_local5[_local12].body.hitTestObject(_local4[_local7])){
if (_local4[_local7].tag == 0){
player.laserGaugePlus();
part.hit = (part.hit + 1);
};
_local5[_local12].damage(_local4[_local7].damaged());
_local13 = new hitefek();
_local13.x = (_local4[_local7].x + (_local5[_local12].speedX() * 4));
_local13.y = (_local4[_local7].y + (_local5[_local12].speedY() * 4));
addChild(_local13);
_local4[_local7].deleteBullet();
};
};
} else {
if (_local4[_local7].tag == 2){
if (player.hitTestObject(_local4[_local7])){
player.damage(_local4[_local7].damaged());
_local13 = new hitefek();
_local13.x = (_local4[_local7].x + (player.speedX() * 4));
_local13.y = (_local4[_local7].y + (player.speedY() * 4));
addChild(_local13);
_local4[_local7].deleteBullet();
} else {
if (wm.body.hitTestObject(_local4[_local7])){
wm.damage(_local4[_local7].damaged());
_local13 = new hitefek();
_local13.x = (_local4[_local7].x + (wm.speedX() * 4));
_local13.y = (_local4[_local7].y + (wm.speedY() * 4));
addChild(_local13);
_local4[_local7].deleteBullet();
};
};
};
};
};
for (_local12 in _local5) {
if (_local5[_local12].bodypic.hitTestObject(par.deadpit)){
_local5[_local12].damage(999);
};
};
_local8 = this.getChildByName("lasershot");
_local9 = 999;
if (_local8 != null){
for (_local12 in _local5) {
_local2 = new Point(_local5[_local12].body.x, _local5[_local12].body.y);
_local3 = _local5[_local12].localToGlobal(_local2);
if (((((((((_local8.hitTestPoint((_local3.x - (_local5[_local12].body.width / 2)), (_local3.y - (_local5[_local12].body.height / 2)), true)) || (_local8.hitTestPoint((_local3.x - (_local5[_local12].body.width / 2)), (_local3.y + (_local5[_local12].body.height / 2)), true)))) || (_local8.hitTestPoint((_local3.x + (_local5[_local12].body.width / 2)), (_local3.y - (_local5[_local12].body.height / 2)), true)))) || (_local8.hitTestPoint((_local3.x + (_local5[_local12].body.width / 2)), (_local3.y + (_local5[_local12].body.height / 2)), true)))) || (_local8.hitTestPoint(_local3.x, _local3.y, true)))){
_local10 = Math.round(Math.sqrt((Math.pow((_local8.x - _local5[_local12].x), 2) + Math.pow((_local8.y - _local5[_local12].y), 2))));
if (_local9 > _local10){
_local9 = _local10;
_local11 = _local5[_local12];
};
};
};
if (_local11 != null){
_local11.damage((5 * player.weaponLevel));
};
_local8.showL.width = _local9;
};
if (player.hitTestObject(par.deadpit)){
player.damage(999);
if (part.nowStage == part.begodi){
part.bego++;
} else {
part.begodi = part.nowStage;
part.bego = 1;
};
if (part.medals[3] == 0){
part.medals[3] = 1;
};
if ((((part.bego > 5)) && ((part.medals[4] == 0)))){
part.medals[4] = 1;
};
};
_local8 = this.getChildByName("koin");
if (_local8 != null){
if (player.hitTestObject(_local8)){
part.koin = (part.koin + 1);
_local8.stop();
_local14 = new coinku();
_local14.play(0, 1);
removeChild(_local8);
};
};
if (wm.body.hitTestObject(par.deadpit)){
wm.damage(999);
};
if (_local5.length > 0){
} else {
wave++;
if (wave <= jumWave){
respawn();
if (wave == jumWave){
_local15 = new Last();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
} else {
_local15 = new Next();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
};
} else {
_local15 = new Clear();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
staywin.start();
pauseGame = true;
endGame();
medalsCount();
};
};
if (player.health <= 0){
if (!staylose.running){
_local15 = new Over();
_local15.x = 0;
_local15.y = 0;
par.addChild(_local15);
} else {
pauseGame = true;
};
staylose.start();
};
};
}
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 keyW:
wKeyIsDown = false;
break;
case keyA:
aKeyIsDown = false;
break;
case keyS:
sKeyIsDown = false;
break;
case keyD:
dKeyIsDown = false;
break;
case keyX:
xKeyIsDown = false;
break;
case keyZ:
zKeyIsDown = false;
break;
case keyP:
pauseGame = !(pauseGame);
break;
case Keyboard.SPACE:
spaceKeyIsDown = false;
break;
};
}
public function staylose1(_arg1:TimerEvent):void{
staylose.reset();
endGame();
part.game.gotoAndStop(1);
part.ms.visible = true;
part.gotoAndStop("gameover");
}
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 keyW:
wKeyIsDown = true;
break;
case keyA:
aKeyIsDown = true;
break;
case keyS:
sKeyIsDown = true;
break;
case keyD:
dKeyIsDown = true;
break;
case keyX:
xKeyIsDown = true;
break;
case keyZ:
zKeyIsDown = true;
break;
case Keyboard.SPACE:
spaceKeyIsDown = true;
break;
};
}
public function respawn():void{
var _local1:MovieClip;
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:MovieClip;
var _local5:MovieClip;
var _local6:MovieClip;
var _local7:MovieClip;
switch (wave){
case 1:
_local1 = new Enemy3();
_local1.x = -10;
_local1.y = 50;
_local1.setLevel(1.5);
addChild(_local1);
_local2 = new Enemy3();
_local2.x = -10;
_local2.y = 250;
_local2.setLevel(1.5);
addChild(_local2);
_local3 = new EnemyGround();
_local3.x = 401.9;
_local3.y = 406.9;
_local3.rotation = -90;
addChild(_local3);
break;
case 2:
_local1 = new Enemy4();
_local1.x = 100;
_local1.y = -20;
_local1.setLevel(1.5);
addChild(_local1);
_local2 = new Enemy4();
_local2.x = (bg.Width - 100);
_local2.y = -20;
_local2.setLevel(1.5);
addChild(_local2);
break;
case 3:
_local1 = new Enemy3();
_local1.x = -10;
_local1.y = 50;
_local2 = new Enemy3();
_local2.x = -10;
_local2.y = 250;
_local3 = new Enemy4();
_local3.x = 100;
_local3.y = -20;
_local4 = new Enemy4();
_local4.x = (bg.Width - 100);
_local4.y = -20;
_local1.setLevel(1.5);
_local2.setLevel(1.5);
_local3.setLevel(1.5);
_local4.setLevel(1.5);
switch (randRange(1, 4)){
case 1:
_local1.setKoin(true);
break;
case 2:
_local2.setKoin(true);
break;
case 3:
_local3.setKoin(true);
break;
case 4:
_local4.setKoin(true);
break;
};
addChild(_local1);
addChild(_local2);
addChild(_local3);
addChild(_local4);
_local5 = new EnemyGround();
_local5.x = 401.9;
_local5.y = 406.9;
_local5.rotation = -90;
addChild(_local5);
break;
case 4:
_local1 = new Enemy3();
_local1.x = -10;
_local1.y = 50;
_local1.setLevel(1.5);
addChild(_local1);
_local2 = new Enemy3();
_local2.x = -10;
_local2.y = 250;
_local2.setLevel(1.5);
addChild(_local2);
_local3 = new Enemy3();
_local3.x = 100;
_local3.y = -20;
_local3.setLevel(1.5);
addChild(_local3);
_local4 = new Enemy3();
_local4.x = (bg.Width - 100);
_local4.y = -20;
_local4.setLevel(1.5);
addChild(_local4);
_local5 = new Enemy3();
_local5.x = -10;
_local5.y = 150;
_local5.setLevel(1.5);
addChild(_local5);
break;
case 5:
_local1 = new Enemy4();
_local1.x = -10;
_local1.y = 50;
_local1.setLevel(1.5);
addChild(_local1);
_local2 = new Enemy4();
_local2.x = -10;
_local2.y = 250;
_local2.setLevel(1.5);
addChild(_local2);
_local3 = new Enemy3();
_local3.x = 100;
_local3.y = -20;
_local3.setLevel(1.5);
addChild(_local3);
_local4 = new Enemy3();
_local4.x = (bg.Width - 100);
_local4.y = -20;
_local4.setLevel(1.5);
addChild(_local4);
_local5 = new Enemy4();
_local5.x = (bg.Width - 200);
_local5.y = -50;
_local5.setLevel(1.5);
addChild(_local5);
_local6 = new EnemyGround();
_local6.x = 401.9;
_local6.y = 406.9;
_local6.rotation = -90;
addChild(_local6);
break;
case 6:
_local1 = new Enemy4();
_local1.x = -10;
_local1.y = 50;
_local2 = new Enemy4();
_local2.x = -10;
_local2.y = 250;
_local3 = new Enemy4();
_local3.x = 100;
_local3.y = -20;
_local4 = new Enemy4();
_local4.x = (bg.Width - 100);
_local4.y = -20;
_local5 = new Enemy4();
_local5.x = -10;
_local5.y = 150;
_local6 = new Enemy4();
_local6.x = (bg.Width - 200);
_local6.y = -50;
_local1.setLevel(1.5);
_local2.setLevel(1.5);
_local3.setLevel(1.5);
_local4.setLevel(1.5);
_local5.setLevel(1.5);
_local6.setLevel(1.5);
switch (randRange(1, 4)){
case 1:
_local1.setKoin(true);
break;
case 2:
_local2.setKoin(true);
break;
case 3:
_local3.setKoin(true);
break;
case 4:
_local4.setKoin(true);
break;
case 5:
_local4.setKoin(true);
break;
case 6:
_local4.setKoin(true);
break;
};
addChild(_local1);
addChild(_local2);
addChild(_local3);
addChild(_local4);
addChild(_local5);
addChild(_local6);
break;
case 7:
_local1 = new Enemy4();
_local1.x = -10;
_local1.y = 50;
_local1.setLevel(1.5);
addChild(_local1);
_local2 = new Enemy4();
_local2.x = -10;
_local2.y = 250;
_local2.setLevel(1.5);
addChild(_local2);
_local3 = new Enemy4();
_local3.x = 100;
_local3.y = -20;
_local3.setLevel(1.5);
addChild(_local3);
_local4 = new Enemy4();
_local4.x = (bg.Width - 100);
_local4.y = -20;
_local4.setLevel(1.5);
addChild(_local4);
_local5 = new Enemy3();
_local5.x = -10;
_local5.y = 150;
_local5.setLevel(1.5);
addChild(_local5);
_local6 = new Enemy3();
_local6.x = (bg.Width - 200);
_local6.y = -50;
_local6.setLevel(1.5);
addChild(_local6);
_local7 = new EnemyGround();
_local7.x = 401.9;
_local7.y = 406.9;
_local7.rotation = -90;
addChild(_local7);
break;
};
}
public function endGame():void{
var _local1:Array;
var _local2:*;
var _local3:*;
stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.removeEventListener(KeyboardEvent.KEY_UP, releaseKey);
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
if ((((((((((getChildAt(_local2) is Enemy)) || ((getChildAt(_local2) is EnemyGround)))) || ((getChildAt(_local2) is Enemy2)))) || ((getChildAt(_local2) is Enemy3)))) || ((getChildAt(_local2) is Enemy4)))){
_local1.push(getChildAt(_local2));
};
_local2++;
};
for (_local3 in _local1) {
_local1[_local3].deleteEnemy();
};
player.deletePlayer();
wm.deleteWingman();
part.musicChannel.stop();
removeEventListener(Event.ENTER_FRAME, cekBG);
}
public function komboCounter(_arg1:TimerEvent):void{
komboCount.reset();
maxkombo = kombo;
if (maxkilling < maxkombo){
maxkilling = maxkombo;
};
maxkombo = 0;
kombo = 0;
}
public function initializeGame():void{
rightKeyIsDown = false;
leftKeyIsDown = false;
upKeyIsDown = false;
downKeyIsDown = false;
wKeyIsDown = false;
aKeyIsDown = false;
sKeyIsDown = false;
dKeyIsDown = false;
zKeyIsDown = false;
leftClikIsDown = false;
spaceKeyIsDown = false;
player.setLevel(part.sl, part.wl, part.frl);
part.musicSound = new Stage3BGM();
part.musicChannel = part.musicSound.play(0, 9999);
staywin.addEventListener(TimerEvent.TIMER, staywin1);
staylose.addEventListener(TimerEvent.TIMER, staylose1);
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP, releaseKey);
addEventListener(Event.ENTER_FRAME, cekBG);
}
public function NextStage():void{
part.game.gotoAndStop(1);
part.ms.visible = true;
part.nowStage = 8;
part.gotoAndStop("win");
}
public function staywin1(_arg1:TimerEvent):void{
var _local2:*;
staywin.reset();
staywin.removeEventListener(TimerEvent.TIMER, staywin1);
_local2 = new keterangan();
_local2.x = 0;
_local2.y = 0;
par.addChild(_local2);
}
}
}//package SpaceCommanderv1_fla
Section 56
//MAIN5_226 (SpaceCommanderv1_fla.MAIN5_226)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MAIN5_226 extends MovieClip {
public const keyf1:Number = 112;
public const keyf2:Number = 113;
public const key2:Number = 50;
public const key3:Number = 51;
public const key4:Number = 52;
public const key6:Number = 54;
public const key1:Number = 49;
public const key5:Number = 53;
public const key8:Number = 56;
public const keyD:Number = 68;
public const keyA:Number = 65;
public const key7:Number = 55;
public const keyP:Number = 80;
public const keyR:Number = 82;
public const keyS:Number = 83;
public const keyW:Number = 87;
public const keyX:Number = 88;
public const keyZ:Number = 90;
public var dKeyIsDown:Boolean;
public var bg:MovieClip;
public var xKeyIsDown:Boolean;
public var jumWave:Number;
public var par;
public var maxkombo:Number;
public var keyPressed:uint;
public var aKeyIsDown:Boolean;
public var zKeyIsDown:Boolean;
public var player:Player;
public var staywin:Timer;
public var staylose:Timer;
public var wave:Number;
public var sKeyIsDown:Boolean;
public var pauseGame:Boolean;
public var komboCount:Timer;
public var rightKeyIsDown:Boolean;
public var wKeyIsDown:Boolean;
public var leftClikIsDown:Boolean;
public var notkilling:Number;
public var kombo:Number;
public var downKeyIsDown:Boolean;
public var spaceKeyIsDown:Boolean;
public var upKeyIsDown:Boolean;
public var maxkilling:Number;
public var leftKeyIsDown:Boolean;
public var killing:Number;
public var part;
public function MAIN5_226(){
addFrameScript(0, frame1);
}
public function medalsCount():void{
var _local1:Number;
_local1 = Math.round(((part.hit / part.shot) * 100));
if ((((_local1 > 30)) && ((part.medals[0] == 0)))){
part.medals[0] = 2;
};
if ((((_local1 > 50)) && ((part.medals[1] == 0)))){
part.medals[1] = 2;
};
if ((((_local1 > 80)) && ((part.medals[2] == 0)))){
part.medals[2] = 2;
};
if (notkilling > 0){
if (part.medals[10] == 0){
part.medals[10] = 2;
};
};
if (notkilling > 1){
if (part.medals[11] == 0){
part.medals[11] = 2;
};
};
if (notkilling > 2){
if (part.medals[12] == 0){
part.medals[12] = 2;
};
};
if (notkilling > 3){
if (part.medals[13] == 0){
part.medals[13] = 2;
};
};
if (killing > 0){
if (part.medals[6] == 0){
part.medals[6] = 2;
};
};
maxkombo = kombo;
if (maxkilling < maxkombo){
maxkilling = maxkombo;
};
if ((((maxkilling > 1)) && ((part.medals[7] == 0)))){
part.medals[7] = 2;
};
if ((((maxkilling > 2)) && ((part.medals[8] == 0)))){
part.medals[8] = 2;
};
if ((((maxkilling > 3)) && ((part.medals[9] == 0)))){
part.medals[9] = 2;
};
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
function frame1(){
wave = 0;
jumWave = 5;
pauseGame = false;
killing = 0;
kombo = 0;
maxkombo = 0;
maxkilling = 0;
notkilling = 0;
komboCount = new Timer(1000);
komboCount.addEventListener(TimerEvent.TIMER, komboCounter);
staywin = new Timer(2000);
staylose = new Timer(4000);
part = this.parent.parent.parent;
if (part.nowStage == 5){
initializeGame();
};
}
public function cekBG(_arg1:Event):void{
var _local2:Point;
var _local3:*;
var _local4:Array;
var _local5:Array;
var _local6:MovieClip;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:Number;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:Sound;
var _local15:MovieClip;
par = _arg1.currentTarget.parent;
if (!pauseGame){
_local2 = new Point(player.x, player.y);
_local3 = this.localToGlobal(_local2);
par.BooIcon.boo.width = ((player.boosterGauge / 300) * 50);
par.LasIcon.las.width = ((player.laserGauge / 300) * 50);
if (par.LasIcon.las.width == 50){
par.LasIcon.laserglow.visible = true;
} else {
par.LasIcon.laserglow.visible = false;
};
par.hIcon.boo.width = ((player.health / (player.MAXHEALTH * player.healthLevel)) * 50);
if ((((Math.abs(player.rotation) < 90)) && ((_local3.x > 320)))){
if (x > -1280){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
if ((((Math.abs(player.rotation) > 90)) && ((_local3.x < 320)))){
if (x < 0){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
_local4 = new Array();
_local5 = new Array();
_local7 = 0;
while (_local7 < this.numChildren) {
if ((getChildAt(_local7) is Peluru)){
_local4.push(getChildAt(_local7));
};
if ((((((((((getChildAt(_local7) is Enemy)) || ((getChildAt(_local7) is EnemyGround)))) || ((getChildAt(_local7) is Enemy2)))) || ((getChildAt(_local7) is Enemy3)))) || ((getChildAt(_local7) is Enemy4)))){
_local5.push(getChildAt(_local7));
};
_local7++;
};
for (_local8 in _local4) {
if ((((_local4[_local8].tag == 0)) || ((_local4[_local8].tag == 1)))){
for (_local13 in _local5) {
if (_local5[_local13].body.hitTestObject(_local4[_local8])){
if (_local4[_local8].tag == 0){
player.laserGaugePlus();
part.hit = (part.hit + 1);
};
_local5[_local13].damage(_local4[_local8].damaged());
_local6 = new hitefek();
_local6.x = (_local4[_local8].x + (_local5[_local13].speedX() * 4));
_local6.y = (_local4[_local8].y + (_local5[_local13].speedY() * 4));
addChild(_local6);
_local4[_local8].deleteBullet();
};
};
} else {
if (_local4[_local8].tag == 2){
if (player.hitTestObject(_local4[_local8])){
player.damage(_local4[_local8].damaged());
_local6 = new hitefek();
_local6.x = (_local4[_local8].x + (player.speedX() * 4));
_local6.y = (_local4[_local8].y + (player.speedY() * 4));
addChild(_local6);
_local4[_local8].deleteBullet();
};
};
};
};
for (_local13 in _local5) {
if (_local5[_local13].bodypic.hitTestObject(par.deadpit)){
_local5[_local13].damage(999);
};
};
_local9 = this.getChildByName("lasershot");
_local10 = 999;
if (_local9 != null){
for (_local13 in _local5) {
_local2 = new Point(_local5[_local13].body.x, _local5[_local13].body.y);
_local3 = _local5[_local13].localToGlobal(_local2);
if (((((((((_local9.hitTestPoint((_local3.x - (_local5[_local13].body.width / 2)), (_local3.y - (_local5[_local13].body.height / 2)), true)) || (_local9.hitTestPoint((_local3.x - (_local5[_local13].body.width / 2)), (_local3.y + (_local5[_local13].body.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local13].body.width / 2)), (_local3.y - (_local5[_local13].body.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local13].body.width / 2)), (_local3.y + (_local5[_local13].body.height / 2)), true)))) || (_local9.hitTestPoint(_local3.x, _local3.y, true)))){
_local11 = Math.round(Math.sqrt((Math.pow((_local9.x - _local5[_local13].x), 2) + Math.pow((_local9.y - _local5[_local13].y), 2))));
if (_local10 > _local11){
_local10 = _local11;
_local12 = _local5[_local13];
};
};
};
if (_local12 != null){
_local12.damage((5 * player.weaponLevel));
};
_local9.showL.width = _local10;
};
if (player.hitTestObject(par.deadpit)){
player.damage(999);
if (part.nowStage == part.begodi){
part.bego++;
} else {
part.begodi = part.nowStage;
part.bego = 1;
};
if (part.medals[3] == 0){
part.medals[3] = 1;
};
if ((((part.bego > 5)) && ((part.medals[4] == 0)))){
part.medals[4] = 1;
};
};
_local9 = this.getChildByName("koin");
if (_local9 != null){
if (player.hitTestObject(_local9)){
part.koin = (part.koin + 1);
_local9.stop();
_local14 = new coinku();
_local14.play(0, 1);
removeChild(_local9);
};
};
if (_local5.length > 0){
} else {
wave++;
if (wave <= jumWave){
respawn();
if (wave == jumWave){
_local15 = new Last();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
} else {
_local15 = new Next();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
};
} else {
_local15 = new Clear();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
staywin.start();
pauseGame = true;
endGame();
medalsCount();
};
};
if (player.health <= 0){
if (!staylose.running){
_local15 = new Over();
_local15.x = 0;
_local15.y = 0;
par.addChild(_local15);
} else {
pauseGame = true;
};
staylose.start();
};
};
}
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 keyW:
wKeyIsDown = false;
break;
case keyA:
aKeyIsDown = false;
break;
case keyS:
sKeyIsDown = false;
break;
case keyD:
dKeyIsDown = false;
break;
case keyX:
xKeyIsDown = false;
break;
case keyZ:
zKeyIsDown = false;
break;
case keyP:
pauseGame = !(pauseGame);
break;
case Keyboard.SPACE:
spaceKeyIsDown = false;
break;
};
}
public function staylose1(_arg1:TimerEvent):void{
staylose.reset();
endGame();
part.game.gotoAndStop(1);
part.ms.visible = true;
part.gotoAndStop("gameover");
}
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 keyW:
wKeyIsDown = true;
break;
case keyA:
aKeyIsDown = true;
break;
case keyS:
sKeyIsDown = true;
break;
case keyD:
dKeyIsDown = true;
break;
case keyX:
xKeyIsDown = true;
break;
case keyZ:
zKeyIsDown = true;
break;
case Keyboard.SPACE:
spaceKeyIsDown = true;
break;
};
}
public function respawn():void{
var _local1:MovieClip;
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:MovieClip;
switch (wave){
case 1:
_local1 = new Enemy();
_local1.x = 100;
_local1.y = -20;
addChild(_local1);
_local2 = new Enemy2();
_local2.x = (bg.Width - 100);
_local2.y = -20;
addChild(_local2);
break;
case 2:
_local1 = new Enemy2();
_local1.x = 100;
_local1.y = -20;
_local2 = new Enemy2();
_local2.x = (bg.Width - 100);
_local2.y = -20;
if (randRange(1, 2) == 1){
_local1.setKoin(true);
} else {
_local2.setKoin(true);
};
addChild(_local1);
addChild(_local2);
break;
case 3:
_local1 = new Enemy();
_local1.x = 100;
_local1.y = -20;
addChild(_local1);
_local2 = new Enemy();
_local2.x = (bg.Width - 100);
_local2.y = -20;
addChild(_local2);
_local3 = new Enemy();
_local3.x = 200;
_local3.y = -20;
addChild(_local3);
break;
case 4:
_local1 = new Enemy();
_local1.x = 100;
_local1.y = -20;
_local2 = new Enemy();
_local2.x = (bg.Width - 100);
_local2.y = -20;
_local3 = new Enemy();
_local3.x = (bg.Width - 200);
_local3.y = -20;
switch (randRange(1, 3)){
case 1:
_local1.setKoin(true);
break;
case 2:
_local2.setKoin(true);
break;
case 3:
_local3.setKoin(true);
break;
};
addChild(_local1);
addChild(_local2);
addChild(_local3);
break;
case 5:
_local1 = new Enemy2();
_local1.x = 100;
_local1.y = -20;
addChild(_local1);
_local2 = new Enemy2();
_local2.x = (bg.Width - 100);
_local2.y = -20;
addChild(_local2);
_local3 = new Enemy2();
_local3.x = 200;
_local3.y = -20;
addChild(_local3);
_local4 = new Enemy2();
_local4.x = (bg.Width - 200);
_local4.y = -20;
addChild(_local4);
break;
};
}
public function endGame():void{
var _local1:Array;
var _local2:*;
var _local3:*;
stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.removeEventListener(KeyboardEvent.KEY_UP, releaseKey);
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
if ((((((((((getChildAt(_local2) is Enemy)) || ((getChildAt(_local2) is EnemyGround)))) || ((getChildAt(_local2) is Enemy2)))) || ((getChildAt(_local2) is Enemy3)))) || ((getChildAt(_local2) is Enemy4)))){
_local1.push(getChildAt(_local2));
};
_local2++;
};
for (_local3 in _local1) {
_local1[_local3].deleteEnemy();
};
player.deletePlayer();
part.musicChannel.stop();
removeEventListener(Event.ENTER_FRAME, cekBG);
}
public function komboCounter(_arg1:TimerEvent):void{
komboCount.reset();
maxkombo = kombo;
if (maxkilling < maxkombo){
maxkilling = maxkombo;
};
maxkombo = 0;
kombo = 0;
}
public function initializeGame():void{
rightKeyIsDown = false;
leftKeyIsDown = false;
upKeyIsDown = false;
downKeyIsDown = false;
wKeyIsDown = false;
aKeyIsDown = false;
sKeyIsDown = false;
dKeyIsDown = false;
zKeyIsDown = false;
leftClikIsDown = false;
spaceKeyIsDown = false;
player.setLevel(part.sl, part.wl, part.frl);
part.musicSound = new Stage2BGM();
part.musicChannel = part.musicSound.play(0, 9999);
staywin.addEventListener(TimerEvent.TIMER, staywin1);
staylose.addEventListener(TimerEvent.TIMER, staylose1);
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP, releaseKey);
addEventListener(Event.ENTER_FRAME, cekBG);
}
public function NextStage():void{
part.game.gotoAndStop(1);
part.ms.visible = true;
part.nowStage = 6;
part.gotoAndStop("win");
}
public function staywin1(_arg1:TimerEvent):void{
var _local2:*;
staywin.reset();
staywin.removeEventListener(TimerEvent.TIMER, staywin1);
_local2 = new keterangan();
_local2.x = 0;
_local2.y = 0;
par.addChild(_local2);
}
}
}//package SpaceCommanderv1_fla
Section 57
//MAIN6_233 (SpaceCommanderv1_fla.MAIN6_233)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MAIN6_233 extends MovieClip {
public const keyf1:Number = 112;
public const keyf2:Number = 113;
public const key2:Number = 50;
public const key3:Number = 51;
public const key4:Number = 52;
public const key6:Number = 54;
public const key1:Number = 49;
public const key5:Number = 53;
public const key8:Number = 56;
public const keyD:Number = 68;
public const keyA:Number = 65;
public const key7:Number = 55;
public const keyP:Number = 80;
public const keyR:Number = 82;
public const keyS:Number = 83;
public const keyW:Number = 87;
public const keyX:Number = 88;
public const keyZ:Number = 90;
public var dKeyIsDown:Boolean;
public var bg:MovieClip;
public var xKeyIsDown:Boolean;
public var par;
public var keyPressed:uint;
public var tAniBlow:Timer;
public var ctrEfek:Number;
public var aKeyIsDown:Boolean;
public var zKeyIsDown:Boolean;
public var player:Player;
public var staywin:Timer;
public var staylose:Timer;
public var sKeyIsDown:Boolean;
public var pauseGame:Boolean;
public var deadBreak:Boolean;
public var bossUFO:BossUFO;
public var rightKeyIsDown:Boolean;
public var wKeyIsDown:Boolean;
public var leftClikIsDown:Boolean;
public var das:Number;
public var downKeyIsDown:Boolean;
public var spaceKeyIsDown:Boolean;
public var upKeyIsDown:Boolean;
public var leftKeyIsDown:Boolean;
public var killing:Number;
public var part;
public function MAIN6_233(){
addFrameScript(0, frame1);
}
public function medalsCount():void{
var _local1:Number;
_local1 = Math.round(((part.hit / part.shot) * 100));
if ((((_local1 > 30)) && ((part.medals[0] == 0)))){
part.medals[0] = 2;
};
if ((((_local1 > 50)) && ((part.medals[1] == 0)))){
part.medals[1] = 2;
};
if ((((_local1 > 80)) && ((part.medals[2] == 0)))){
part.medals[2] = 2;
};
if (part.medals[14] == 0){
part.medals[14] = 2;
};
if (deadBreak == true){
if (part.medals[5] == 0){
part.medals[5] = 2;
};
};
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((((Math.random() * _arg2) - _arg1) + 1)) + _arg1);
return (_local3);
}
function frame1(){
ctrEfek = 10;
pauseGame = false;
das = 0.01;
deadBreak = false;
killing = 1;
tAniBlow = new Timer(7000);
tAniBlow.addEventListener(TimerEvent.TIMER, Aniblow);
staywin = new Timer(2000);
staylose = new Timer(4000);
part = this.parent.parent.parent;
if (part.nowStage == 6){
initializeGame();
};
}
public function cekBG(_arg1:Event):void{
var _local2:Point;
var _local3:*;
var _local4:Array;
var _local5:Array;
var _local6:*;
var _local7:MovieClip;
var _local8:*;
var _local9:*;
var _local10:Number;
var _local11:*;
var _local12:*;
var _local13:Number;
var _local14:*;
var _local15:Sound;
var _local16:*;
var _local17:MovieClip;
var _local18:Number;
var _local19:Number;
par = _arg1.currentTarget.parent;
if (!pauseGame){
_local2 = new Point(player.x, player.y);
_local3 = this.localToGlobal(_local2);
par.BooIcon.boo.width = ((player.boosterGauge / 300) * 50);
par.BosIcon.boo.width = ((bossUFO.health / bossUFO.MAXHEALTH) * 50);
par.LasIcon.las.width = ((player.laserGauge / 300) * 50);
if (par.LasIcon.las.width == 50){
par.LasIcon.laserglow.visible = true;
} else {
par.LasIcon.laserglow.visible = false;
};
par.hIcon.boo.width = ((player.health / (player.MAXHEALTH * player.healthLevel)) * 50);
if ((((Math.abs(player.rotation) < 90)) && ((_local3.x > 320)))){
if (x > -640){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
if ((((Math.abs(player.rotation) > 90)) && ((_local3.x < 320)))){
if (x < 0){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
_local4 = new Array();
_local5 = new Array();
_local6 = 0;
while (_local6 < this.numChildren) {
if ((getChildAt(_local6) is Peluru)){
_local4.push(getChildAt(_local6));
};
if ((((((((((((getChildAt(_local6) is Enemy)) || ((getChildAt(_local6) is EnemyGround)))) || ((getChildAt(_local6) is Enemy2)))) || ((getChildAt(_local6) is Enemy3)))) || ((getChildAt(_local6) is Enemy4)))) || ((getChildAt(_local6) is BossUFO)))){
_local5.push(getChildAt(_local6));
};
_local6++;
};
for (_local8 in _local4) {
if ((((_local4[_local8].tag == 0)) || ((_local4[_local8].tag == 1)))){
for (_local14 in _local5) {
if (_local5[_local14].body.hitTestObject(_local4[_local8])){
if (_local4[_local8].tag == 0){
player.laserGaugePlus();
part.hit = (part.hit + 1);
};
_local5[_local14].damage(_local4[_local8].damaged());
_local7 = new hitefek();
_local7.x = _local4[_local8].x;
_local7.y = _local4[_local8].y;
addChild(_local7);
_local4[_local8].deleteBullet();
break;
};
if ((_local5[_local14] is BossUFO)){
if (_local5[_local14].healthWeapon1 > 0){
if (_local5[_local14].weaponL.hitTestObject(_local4[_local8])){
_local5[_local14].damageWeapon1(_local4[_local8].damaged());
_local7 = new hitefek();
_local7.x = _local4[_local8].x;
_local7.y = _local4[_local8].y;
addChild(_local7);
_local4[_local8].deleteBullet();
break;
};
};
if (_local5[_local14].healthWeapon2 > 0){
if (_local5[_local14].weaponR.hitTestObject(_local4[_local8])){
_local5[_local14].damageWeapon2(_local4[_local8].damaged());
_local7 = new hitefek();
_local7.x = _local4[_local8].x;
_local7.y = _local4[_local8].y;
addChild(_local7);
_local4[_local8].deleteBullet();
break;
};
};
};
if (_local5[_local14].body.hitTestObject(par.deadpit)){
_local5[_local14].damage(999);
};
};
} else {
if (_local4[_local8].tag == 2){
if (player.hitTestObject(_local4[_local8])){
player.damage(_local4[_local8].damaged());
_local7 = new hitefek();
_local7.x = (_local4[_local8].x + (player.speedX() * 4));
_local7.y = (_local4[_local8].y + (player.speedY() * 4));
addChild(_local7);
_local4[_local8].deleteBullet();
};
};
};
};
_local9 = this.getChildByName("lasershot");
_local10 = 999;
if (_local9 != null){
for (_local14 in _local5) {
_local2 = new Point(_local5[_local14].body.x, _local5[_local14].body.y);
_local3 = _local5[_local14].localToGlobal(_local2);
if ((_local5[_local14] is BossUFO)){
if (((((((((_local9.hitTestPoint((_local3.x - (_local5[_local14].body.width / 2)), (_local3.y - (_local5[_local14].body.height / 2)), true)) || (_local9.hitTestPoint((_local3.x - (_local5[_local14].body.width / 2)), (_local3.y + (_local5[_local14].body.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local14].body.width / 2)), (_local3.y - (_local5[_local14].body.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local14].body.width / 2)), (_local3.y + (_local5[_local14].body.height / 2)), true)))) || (_local9.hitTestPoint(_local3.x, _local3.y, true)))){
_local11 = Math.round(Math.sqrt((Math.pow((_local9.x - _local5[_local14].x), 2) + Math.pow((_local9.y - _local5[_local14].y), 2))));
if (_local10 > _local11){
_local10 = _local11;
_local12 = _local5[_local14];
_local13 = 0;
};
};
if (_local5[_local14].healthWeapon1 > 0){
_local2 = new Point(_local5[_local14].weaponL.x, _local5[_local14].weaponL.y);
_local3 = _local5[_local14].localToGlobal(_local2);
if (((((((((_local9.hitTestPoint((_local3.x - (_local5[_local14].weaponL.width / 2)), (_local3.y - (_local5[_local14].weaponL.height / 2)), true)) || (_local9.hitTestPoint((_local3.x - (_local5[_local14].weaponL.width / 2)), (_local3.y + (_local5[_local14].weaponL.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local14].weaponL.width / 2)), (_local3.y - (_local5[_local14].weaponL.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local14].weaponL.width / 2)), (_local3.y + (_local5[_local14].weaponL.height / 2)), true)))) || (_local9.hitTestPoint(_local3.x, _local3.y, true)))){
_local11 = Math.round(Math.sqrt((Math.pow((_local9.x - _local5[_local14].x), 2) + Math.pow((_local9.y - _local5[_local14].y), 2))));
if (_local10 > _local11){
_local10 = _local11;
_local12 = _local5[_local14];
_local13 = 1;
};
};
};
if (_local5[_local14].healthWeapon2 > 0){
_local2 = new Point(_local5[_local14].weaponR.x, _local5[_local14].weaponR.y);
_local3 = _local5[_local14].localToGlobal(_local2);
if (((((((((_local9.hitTestPoint((_local3.x - (_local5[_local14].weaponR.width / 2)), (_local3.y - (_local5[_local14].weaponR.height / 2)), true)) || (_local9.hitTestPoint((_local3.x - (_local5[_local14].weaponR.width / 2)), (_local3.y + (_local5[_local14].weaponR.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local14].weaponR.width / 2)), (_local3.y - (_local5[_local14].weaponR.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local14].weaponR.width / 2)), (_local3.y + (_local5[_local14].weaponR.height / 2)), true)))) || (_local9.hitTestPoint(_local3.x, _local3.y, true)))){
_local11 = Math.round(Math.sqrt((Math.pow((_local9.x - _local5[_local14].x), 2) + Math.pow((_local9.y - _local5[_local14].y), 2))));
if (_local10 > _local11){
_local10 = _local11;
_local12 = _local5[_local14];
_local13 = 2;
};
};
};
} else {
if (((((((((_local9.hitTestPoint((_local3.x - (_local5[_local14].body.width / 2)), (_local3.y - (_local5[_local14].body.height / 2)), true)) || (_local9.hitTestPoint((_local3.x - (_local5[_local14].body.width / 2)), (_local3.y + (_local5[_local14].body.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local14].body.width / 2)), (_local3.y - (_local5[_local14].body.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local14].body.width / 2)), (_local3.y + (_local5[_local14].body.height / 2)), true)))) || (_local9.hitTestPoint(_local3.x, _local3.y, true)))){
_local11 = Math.round(Math.sqrt((Math.pow((_local9.x - _local5[_local14].x), 2) + Math.pow((_local9.y - _local5[_local14].y), 2))));
if (_local10 > _local11){
_local10 = _local11;
_local12 = _local5[_local14];
};
};
};
};
if (_local12 != null){
if ((_local12 is BossUFO)){
if (_local13 == 0){
_local12.damage((5 * player.weaponLevel));
};
if (_local13 == 1){
_local12.damageWeapon1((5 * player.weaponLevel));
};
if (_local13 == 2){
_local12.damageWeapon2((5 * player.weaponLevel));
};
} else {
_local12.damage((5 * player.weaponLevel));
};
};
_local9.showL.width = _local10;
};
if (player.hitTestObject(par.deadpit)){
player.damage(999);
if (part.nowStage == part.begodi){
part.bego++;
} else {
part.begodi = part.nowStage;
part.bego = 1;
};
if (part.medals[3] == 0){
part.medals[3] = 1;
};
if ((((part.bego > 5)) && ((part.medals[4] == 0)))){
part.medals[4] = 1;
};
};
ctrEfek--;
if (((player.hitTestObject(bossUFO.wall1)) || (player.hitTestObject(bossUFO.wall2)))){
player.damage(2);
if (ctrEfek < 0){
_local7 = new hitefek2();
_local7.x = (player.x + randRange(-30, 30));
_local7.y = (player.y + randRange(-15, 15));
addChild(_local7);
ctrEfek = 7;
_local15 = new testhit();
_local15.play(0, 2);
};
};
if (player.hitTestObject(bossUFO.body)){
bossUFO.damage(0.5);
};
if (bossUFO.health > 0){
} else {
pauseGame = true;
tAniBlow.start();
};
if (player.health <= 0){
if (!staylose.running){
_local16 = new Over();
_local16.x = 0;
_local16.y = 0;
par.addChild(_local16);
} else {
pauseGame = true;
};
staylose.start();
};
} else {
if (bossUFO.health <= 0){
ctrEfek--;
if (das >= 0){
_local17 = new Duar();
_local18 = bossUFO.width;
_local19 = bossUFO.height;
_local17.x = ((bossUFO.x - (_local18 / 2)) + randRange(-(_local18), _local18));
_local17.y = ((bossUFO.y - (_local19 / 2)) + randRange(-(_local19), _local19));
if (ctrEfek < 0){
_local15 = new explosion();
_local15.play(0, 1);
ctrEfek = 5;
};
addChild(_local17);
};
par.white.alpha = (par.white.alpha + das);
if (par.white.alpha >= 1){
das = (das * -1);
bossUFO.deleteEnemy();
removeChild(bossUFO);
};
};
};
}
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 keyW:
wKeyIsDown = false;
break;
case keyA:
aKeyIsDown = false;
break;
case keyS:
sKeyIsDown = false;
break;
case keyD:
dKeyIsDown = false;
break;
case keyX:
xKeyIsDown = false;
break;
case keyZ:
zKeyIsDown = false;
break;
case keyP:
break;
case Keyboard.SPACE:
spaceKeyIsDown = false;
break;
};
}
public function staylose1(_arg1:TimerEvent):void{
staylose.reset();
endGame();
part.game.gotoAndStop(1);
part.ms.visible = true;
part.gotoAndStop("gameover");
}
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 keyW:
wKeyIsDown = true;
break;
case keyA:
aKeyIsDown = true;
break;
case keyS:
sKeyIsDown = true;
break;
case keyD:
dKeyIsDown = true;
break;
case keyX:
xKeyIsDown = true;
break;
case keyZ:
zKeyIsDown = true;
break;
case Keyboard.SPACE:
spaceKeyIsDown = true;
break;
};
}
public function endGame():void{
var _local1:Array;
var _local2:*;
var _local3:*;
stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.removeEventListener(KeyboardEvent.KEY_UP, releaseKey);
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
if ((getChildAt(_local2) is BossUFO)){
_local1.push(getChildAt(_local2));
};
_local2++;
};
for (_local3 in _local1) {
_local1[_local3].deleteEnemy();
};
part.musicChannel.stop();
player.deletePlayer();
removeEventListener(Event.ENTER_FRAME, cekBG);
}
public function Aniblow(_arg1:TimerEvent):void{
var _local2:*;
tAniBlow.reset();
tAniBlow.removeEventListener(TimerEvent.TIMER, Aniblow);
_local2 = new Clear();
_local2.x = 314.2;
_local2.y = 196.8;
par.addChild(_local2);
staywin.start();
pauseGame = true;
endGame();
medalsCount();
}
public function initializeGame():void{
rightKeyIsDown = false;
leftKeyIsDown = false;
upKeyIsDown = false;
downKeyIsDown = false;
wKeyIsDown = false;
aKeyIsDown = false;
sKeyIsDown = false;
dKeyIsDown = false;
zKeyIsDown = false;
leftClikIsDown = false;
spaceKeyIsDown = false;
player.setLevel(part.sl, part.wl, part.frl);
part.musicSound = new BossUFOBGM();
part.musicChannel = part.musicSound.play(0, 9999);
staywin.addEventListener(TimerEvent.TIMER, staywin1);
staylose.addEventListener(TimerEvent.TIMER, staylose1);
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP, releaseKey);
addEventListener(Event.ENTER_FRAME, cekBG);
}
public function NextStage():void{
part.game.gotoAndStop(1);
part.ms.visible = true;
part.nowStage = 7;
part.gotoAndStop("win");
}
public function staywin1(_arg1:TimerEvent):void{
var _local2:*;
staywin.reset();
staywin.removeEventListener(TimerEvent.TIMER, staywin1);
_local2 = new keterangan();
_local2.x = 0;
_local2.y = 0;
par.addChild(_local2);
}
}
}//package SpaceCommanderv1_fla
Section 58
//MAIN7_243 (SpaceCommanderv1_fla.MAIN7_243)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MAIN7_243 extends MovieClip {
public const keyf1:Number = 112;
public const keyf2:Number = 113;
public const key2:Number = 50;
public const key3:Number = 51;
public const key4:Number = 52;
public const key6:Number = 54;
public const key1:Number = 49;
public const key5:Number = 53;
public const key8:Number = 56;
public const keyD:Number = 68;
public const keyA:Number = 65;
public const key7:Number = 55;
public const keyP:Number = 80;
public const keyR:Number = 82;
public const keyS:Number = 83;
public const keyW:Number = 87;
public const keyX:Number = 88;
public const keyZ:Number = 90;
public var dKeyIsDown:Boolean;
public var bg:MovieClip;
public var xKeyIsDown:Boolean;
public var jumWave:Number;
public var par;
public var maxkombo:Number;
public var keyPressed:uint;
public var aKeyIsDown:Boolean;
public var zKeyIsDown:Boolean;
public var wm:Wingman2;
public var player:Player;
public var staywin:Timer;
public var staylose:Timer;
public var wave:Number;
public var sKeyIsDown:Boolean;
public var pauseGame:Boolean;
public var komboCount:Timer;
public var rightKeyIsDown:Boolean;
public var wKeyIsDown:Boolean;
public var leftClikIsDown:Boolean;
public var notkilling:Number;
public var kombo:Number;
public var downKeyIsDown:Boolean;
public var spaceKeyIsDown:Boolean;
public var upKeyIsDown:Boolean;
public var maxkilling:Number;
public var leftKeyIsDown:Boolean;
public var killing:Number;
public var part;
public function MAIN7_243(){
addFrameScript(0, frame1);
}
public function medalsCount():void{
var _local1:Number;
_local1 = Math.round(((part.hit / part.shot) * 100));
if ((((_local1 > 30)) && ((part.medals[0] == 0)))){
part.medals[0] = 2;
};
if ((((_local1 > 50)) && ((part.medals[1] == 0)))){
part.medals[1] = 2;
};
if ((((_local1 > 80)) && ((part.medals[2] == 0)))){
part.medals[2] = 2;
};
if (notkilling > 0){
if (part.medals[10] == 0){
part.medals[10] = 2;
};
};
if (notkilling > 1){
if (part.medals[11] == 0){
part.medals[11] = 2;
};
};
if (notkilling > 2){
if (part.medals[12] == 0){
part.medals[12] = 2;
};
};
if (notkilling > 3){
if (part.medals[13] == 0){
part.medals[13] = 2;
};
};
if (killing > 0){
if (part.medals[6] == 0){
part.medals[6] = 2;
};
};
maxkombo = kombo;
if (maxkilling < maxkombo){
maxkilling = maxkombo;
};
if ((((maxkilling > 1)) && ((part.medals[7] == 0)))){
part.medals[7] = 2;
};
if ((((maxkilling > 2)) && ((part.medals[8] == 0)))){
part.medals[8] = 2;
};
if ((((maxkilling > 3)) && ((part.medals[9] == 0)))){
part.medals[9] = 2;
};
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
function frame1(){
wave = 0;
jumWave = 7;
pauseGame = false;
killing = 0;
kombo = 0;
maxkombo = 0;
maxkilling = 0;
notkilling = 0;
komboCount = new Timer(1000);
komboCount.addEventListener(TimerEvent.TIMER, komboCounter);
staywin = new Timer(2000);
staylose = new Timer(4000);
part = this.parent.parent.parent;
if (part.nowStage == 7){
initializeGame();
};
}
public function cekBG(_arg1:Event):void{
var _local2:Point;
var _local3:*;
var _local4:Array;
var _local5:Array;
var _local6:MovieClip;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:Number;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:Sound;
var _local15:MovieClip;
par = _arg1.currentTarget.parent;
if (!pauseGame){
_local2 = new Point(player.x, player.y);
_local3 = this.localToGlobal(_local2);
par.BooIcon.boo.width = ((player.boosterGauge / 300) * 50);
par.LasIcon.las.width = ((player.laserGauge / 300) * 50);
if (par.LasIcon.las.width == 50){
par.LasIcon.laserglow.visible = true;
} else {
par.LasIcon.laserglow.visible = false;
};
par.hIcon.boo.width = ((player.health / (player.MAXHEALTH * player.healthLevel)) * 50);
if ((((Math.abs(player.rotation) < 90)) && ((_local3.x > 320)))){
if (x > -1280){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
if ((((Math.abs(player.rotation) > 90)) && ((_local3.x < 320)))){
if (x < 0){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
_local4 = new Array();
_local5 = new Array();
_local7 = 0;
while (_local7 < this.numChildren) {
if ((getChildAt(_local7) is Peluru)){
_local4.push(getChildAt(_local7));
};
if ((((((((((getChildAt(_local7) is Enemy)) || ((getChildAt(_local7) is EnemyGround)))) || ((getChildAt(_local7) is Enemy2)))) || ((getChildAt(_local7) is Enemy3)))) || ((getChildAt(_local7) is Enemy4)))){
_local5.push(getChildAt(_local7));
};
_local7++;
};
for (_local8 in _local4) {
if ((((_local4[_local8].tag == 0)) || ((_local4[_local8].tag == 1)))){
for (_local13 in _local5) {
if (_local5[_local13].body.hitTestObject(_local4[_local8])){
if (_local4[_local8].tag == 0){
player.laserGaugePlus();
part.hit = (part.hit + 1);
};
_local5[_local13].damage(_local4[_local8].damaged());
_local6 = new hitefek();
_local6.x = (_local4[_local8].x + (_local5[_local13].speedX() * 4));
_local6.y = (_local4[_local8].y + (_local5[_local13].speedY() * 4));
addChild(_local6);
_local4[_local8].deleteBullet();
};
};
} else {
if (_local4[_local8].tag == 2){
if (player.hitTestObject(_local4[_local8])){
player.damage(_local4[_local8].damaged());
_local6 = new hitefek();
_local6.x = (_local4[_local8].x + (player.speedX() * 4));
_local6.y = (_local4[_local8].y + (player.speedY() * 4));
addChild(_local6);
_local4[_local8].deleteBullet();
} else {
if (wm.body.hitTestObject(_local4[_local8])){
wm.damage(_local4[_local8].damaged());
_local6 = new hitefek();
_local6.x = (_local4[_local8].x + (wm.speedX() * 4));
_local6.y = (_local4[_local8].y + (wm.speedY() * 4));
addChild(_local6);
_local4[_local8].deleteBullet();
};
};
};
};
};
_local9 = this.getChildByName("lasershot");
_local10 = 999;
if (_local9 != null){
for (_local13 in _local5) {
_local2 = new Point(_local5[_local13].body.x, _local5[_local13].body.y);
_local3 = _local5[_local13].localToGlobal(_local2);
if (((((((((_local9.hitTestPoint((_local3.x - (_local5[_local13].body.width / 2)), (_local3.y - (_local5[_local13].body.height / 2)), true)) || (_local9.hitTestPoint((_local3.x - (_local5[_local13].body.width / 2)), (_local3.y + (_local5[_local13].body.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local13].body.width / 2)), (_local3.y - (_local5[_local13].body.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local13].body.width / 2)), (_local3.y + (_local5[_local13].body.height / 2)), true)))) || (_local9.hitTestPoint(_local3.x, _local3.y, true)))){
_local11 = Math.round(Math.sqrt((Math.pow((_local9.x - _local5[_local13].x), 2) + Math.pow((_local9.y - _local5[_local13].y), 2))));
if (_local10 > _local11){
_local10 = _local11;
_local12 = _local5[_local13];
};
};
};
if (_local12 != null){
_local12.damage((5 * player.weaponLevel));
};
_local9.showL.width = _local10;
};
for (_local13 in _local5) {
if (_local5[_local13].bodypic.hitTestObject(par.deadpit)){
_local5[_local13].damage(999);
};
};
if (player.hitTestObject(par.deadpit)){
player.damage(999);
if (part.nowStage == part.begodi){
part.bego++;
} else {
part.begodi = part.nowStage;
part.bego = 1;
};
if (part.medals[3] == 0){
part.medals[3] = 1;
};
if ((((part.bego > 5)) && ((part.medals[4] == 0)))){
part.medals[4] = 1;
};
};
if (wm.body.hitTestObject(par.deadpit)){
wm.damage(999);
};
_local9 = this.getChildByName("koin");
if (_local9 != null){
if (player.hitTestObject(_local9)){
part.koin = (part.koin + 1);
_local9.stop();
_local14 = new coinku();
_local14.play(0, 1);
removeChild(_local9);
};
};
if (_local5.length > 0){
} else {
wave++;
if (wave <= jumWave){
respawn();
if (wave == jumWave){
_local15 = new Last();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
} else {
_local15 = new Next();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
};
} else {
_local15 = new Clear();
_local15.x = 314.2;
_local15.y = 196.8;
par.addChild(_local15);
staywin.start();
pauseGame = true;
endGame();
medalsCount();
};
};
if (player.health <= 0){
if (!staylose.running){
_local15 = new Over();
_local15.x = 0;
_local15.y = 0;
par.addChild(_local15);
} else {
pauseGame = true;
};
staylose.start();
};
};
}
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 keyW:
wKeyIsDown = false;
break;
case keyA:
aKeyIsDown = false;
break;
case keyS:
sKeyIsDown = false;
break;
case keyD:
dKeyIsDown = false;
break;
case keyX:
xKeyIsDown = false;
break;
case keyZ:
zKeyIsDown = false;
break;
case keyP:
pauseGame = !(pauseGame);
break;
case Keyboard.SPACE:
spaceKeyIsDown = false;
break;
};
}
public function staylose1(_arg1:TimerEvent):void{
staylose.reset();
endGame();
part.game.gotoAndStop(1);
part.ms.visible = true;
part.gotoAndStop("gameover");
}
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 keyW:
wKeyIsDown = true;
break;
case keyA:
aKeyIsDown = true;
break;
case keyS:
sKeyIsDown = true;
break;
case keyD:
dKeyIsDown = true;
break;
case keyX:
xKeyIsDown = true;
break;
case keyZ:
zKeyIsDown = true;
break;
case Keyboard.SPACE:
spaceKeyIsDown = true;
break;
};
}
public function respawn():void{
var _local1:MovieClip;
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:MovieClip;
var _local5:MovieClip;
var _local6:MovieClip;
switch (wave){
case 1:
_local1 = new Enemy();
_local1.x = -10;
_local1.y = 50;
addChild(_local1);
_local2 = new Enemy();
_local2.x = -10;
_local2.y = 250;
addChild(_local2);
break;
case 2:
_local1 = new Enemy2();
_local1.x = 100;
_local1.y = -20;
addChild(_local1);
_local2 = new Enemy2();
_local2.x = (bg.Width - 100);
_local2.y = -20;
addChild(_local2);
break;
case 3:
_local1 = new Enemy();
_local1.x = -10;
_local1.y = 50;
_local2 = new Enemy();
_local2.x = -10;
_local2.y = 250;
_local3 = new Enemy2();
_local3.x = 100;
_local3.y = -20;
_local4 = new Enemy2();
_local4.x = (bg.Width - 100);
_local4.y = -20;
switch (randRange(1, 4)){
case 1:
_local1.setKoin(true);
break;
case 2:
_local2.setKoin(true);
break;
case 3:
_local3.setKoin(true);
break;
case 4:
_local4.setKoin(true);
break;
};
addChild(_local1);
addChild(_local2);
addChild(_local3);
addChild(_local4);
break;
case 4:
_local1 = new Enemy();
_local1.x = -10;
_local1.y = 50;
addChild(_local1);
_local2 = new Enemy();
_local2.x = -10;
_local2.y = 250;
addChild(_local2);
_local3 = new Enemy();
_local3.x = 100;
_local3.y = -20;
addChild(_local3);
_local4 = new Enemy();
_local4.x = (bg.Width - 100);
_local4.y = -20;
addChild(_local4);
_local5 = new Enemy();
_local5.x = -10;
_local5.y = 150;
addChild(_local5);
break;
case 5:
_local1 = new Enemy2();
_local1.x = -10;
_local1.y = 50;
addChild(_local1);
_local2 = new Enemy2();
_local2.x = -10;
_local2.y = 250;
addChild(_local2);
_local3 = new Enemy();
_local3.x = 100;
_local3.y = -20;
addChild(_local3);
_local4 = new Enemy();
_local4.x = (bg.Width - 100);
_local4.y = -20;
addChild(_local4);
_local5 = new Enemy2();
_local5.x = (bg.Width - 200);
_local5.y = -50;
addChild(_local5);
break;
case 6:
_local1 = new Enemy2();
_local1.x = -10;
_local1.y = 50;
_local2 = new Enemy2();
_local2.x = -10;
_local2.y = 250;
_local3 = new Enemy2();
_local3.x = 100;
_local3.y = -20;
_local4 = new Enemy2();
_local4.x = (bg.Width - 100);
_local4.y = -20;
_local5 = new Enemy2();
_local5.x = -10;
_local5.y = 150;
_local6 = new Enemy2();
_local6.x = (bg.Width - 200);
_local6.y = -50;
switch (randRange(1, 4)){
case 1:
_local1.setKoin(true);
break;
case 2:
_local2.setKoin(true);
break;
case 3:
_local3.setKoin(true);
break;
case 4:
_local4.setKoin(true);
break;
case 5:
_local4.setKoin(true);
break;
case 6:
_local4.setKoin(true);
break;
};
addChild(_local1);
addChild(_local2);
addChild(_local3);
addChild(_local4);
addChild(_local5);
addChild(_local6);
break;
case 7:
_local1 = new Enemy2();
_local1.x = -10;
_local1.y = 50;
addChild(_local1);
_local2 = new Enemy2();
_local2.x = -10;
_local2.y = 250;
addChild(_local2);
_local3 = new Enemy2();
_local3.x = 100;
_local3.y = -20;
addChild(_local3);
_local4 = new Enemy2();
_local4.x = (bg.Width - 100);
_local4.y = -20;
addChild(_local4);
_local5 = new Enemy();
_local5.x = -10;
_local5.y = 150;
addChild(_local5);
_local6 = new Enemy();
_local6.x = (bg.Width - 200);
_local6.y = -50;
addChild(_local6);
break;
};
}
public function endGame():void{
var _local1:Array;
var _local2:*;
var _local3:*;
stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.removeEventListener(KeyboardEvent.KEY_UP, releaseKey);
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
if ((((((((((getChildAt(_local2) is Enemy)) || ((getChildAt(_local2) is EnemyGround)))) || ((getChildAt(_local2) is Enemy2)))) || ((getChildAt(_local2) is Enemy3)))) || ((getChildAt(_local2) is Enemy4)))){
_local1.push(getChildAt(_local2));
};
_local2++;
};
for (_local3 in _local1) {
_local1[_local3].deleteEnemy();
};
player.deletePlayer();
wm.deleteWingman();
part.musicChannel.stop();
removeEventListener(Event.ENTER_FRAME, cekBG);
}
public function komboCounter(_arg1:TimerEvent):void{
komboCount.reset();
maxkombo = kombo;
if (maxkilling < maxkombo){
maxkilling = maxkombo;
};
maxkombo = 0;
kombo = 0;
}
public function initializeGame():void{
rightKeyIsDown = false;
leftKeyIsDown = false;
upKeyIsDown = false;
downKeyIsDown = false;
wKeyIsDown = false;
aKeyIsDown = false;
sKeyIsDown = false;
dKeyIsDown = false;
zKeyIsDown = false;
leftClikIsDown = false;
spaceKeyIsDown = false;
player.setLevel(part.sl, part.wl, part.frl);
part.musicSound = new Stage3BGM();
part.musicChannel = part.musicSound.play(0, 9999);
staywin.addEventListener(TimerEvent.TIMER, staywin1);
staylose.addEventListener(TimerEvent.TIMER, staylose1);
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP, releaseKey);
addEventListener(Event.ENTER_FRAME, cekBG);
}
public function NextStage():void{
part.game.gotoAndStop(1);
part.ms.visible = true;
part.nowStage = 8;
part.gotoAndStop("win");
}
public function staywin1(_arg1:TimerEvent):void{
var _local2:*;
staywin.reset();
staywin.removeEventListener(TimerEvent.TIMER, staywin1);
_local2 = new keterangan();
_local2.x = 0;
_local2.y = 0;
par.addChild(_local2);
}
}
}//package SpaceCommanderv1_fla
Section 59
//MAIN8_250 (SpaceCommanderv1_fla.MAIN8_250)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MAIN8_250 extends MovieClip {
public const keyf1:Number = 112;
public const keyf2:Number = 113;
public const key2:Number = 50;
public const key3:Number = 51;
public const key4:Number = 52;
public const key6:Number = 54;
public const key1:Number = 49;
public const key5:Number = 53;
public const key8:Number = 56;
public const keyD:Number = 68;
public const keyA:Number = 65;
public const key7:Number = 55;
public const keyP:Number = 80;
public const keyR:Number = 82;
public const keyS:Number = 83;
public const keyW:Number = 87;
public const keyX:Number = 88;
public const keyZ:Number = 90;
public var upperBWeapon:WeaponMother;
public var dKeyIsDown:Boolean;
public var bg:MovieClip;
public var bm:BossMother;
public var midWeapon:WeaponMother;
public var xKeyIsDown:Boolean;
public var par;
public var tAniBlow:Timer;
public var maxkombo:Number;
public var keyPressed:uint;
public var aKeyIsDown:Boolean;
public var ctrEfek:Number;
public var zKeyIsDown:Boolean;
public var player:Player;
public var staywin:Timer;
public var staylose:Timer;
public var sKeyIsDown:Boolean;
public var pauseGame:Boolean;
public var komboCount:Timer;
public var upperFWeapon:WeaponMother;
public var rightKeyIsDown:Boolean;
public var wKeyIsDown:Boolean;
public var leftClikIsDown:Boolean;
public var notkilling:Number;
public var das:Number;
public var frontWeapon:WeaponMother;
public var downKeyIsDown:Boolean;
public var kombo:Number;
public var spaceKeyIsDown:Boolean;
public var upKeyIsDown:Boolean;
public var maxkilling:Number;
public var leftKeyIsDown:Boolean;
public var killing:Number;
public var part;
public function MAIN8_250(){
addFrameScript(0, frame1);
}
public function medalsCount():void{
var _local1:Number;
_local1 = Math.round(((part.hit / part.shot) * 100));
if ((((_local1 > 30)) && ((part.medals[0] == 0)))){
part.medals[0] = 2;
};
if ((((_local1 > 50)) && ((part.medals[1] == 0)))){
part.medals[1] = 2;
};
if ((((_local1 > 80)) && ((part.medals[2] == 0)))){
part.medals[2] = 2;
};
if ((((part.medals[16] == 0)) && ((part.lvl == 1)))){
part.medals[16] = 2;
};
if ((((part.medals[17] == 0)) && ((part.lvl == 2)))){
part.medals[17] = 2;
};
maxkombo = kombo;
if (maxkilling < maxkombo){
maxkilling = maxkombo;
};
if ((((maxkilling > 1)) && ((part.medals[7] == 0)))){
part.medals[7] = 2;
};
if ((((maxkilling > 2)) && ((part.medals[8] == 0)))){
part.medals[8] = 2;
};
if ((((maxkilling > 3)) && ((part.medals[9] == 0)))){
part.medals[9] = 2;
};
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((((Math.random() * _arg2) - _arg1) + 1)) + _arg1);
return (_local3);
}
function frame1(){
ctrEfek = 100;
pauseGame = false;
das = 0.01;
killing = 0;
kombo = 0;
maxkombo = 0;
maxkilling = 0;
notkilling = 0;
komboCount = new Timer(1000);
komboCount.addEventListener(TimerEvent.TIMER, komboCounter);
tAniBlow = new Timer(7000);
tAniBlow.addEventListener(TimerEvent.TIMER, Aniblow);
staywin = new Timer(2000);
staylose = new Timer(4000);
part = this.parent.parent.parent;
if (part.nowStage == 8){
initializeGame();
};
}
public function cekBG(_arg1:Event):void{
var _local2:Point;
var _local3:*;
var _local4:Array;
var _local5:Array;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:Number;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:MovieClip;
var _local15:Sound;
var _local16:*;
var _local17:MovieClip;
var _local18:Number;
var _local19:Number;
var _local20:Array;
par = _arg1.currentTarget.parent;
if (!pauseGame){
_local2 = new Point(player.x, player.y);
_local3 = this.localToGlobal(_local2);
par.BooIcon.boo.width = ((player.boosterGauge / 300) * 50);
par.BosIcon.boo.width = ((bm.health / bm.MAXHEALTH) * 50);
par.LasIcon.las.width = ((player.laserGauge / 300) * 50);
if (par.LasIcon.las.width == 50){
par.LasIcon.laserglow.visible = true;
} else {
par.LasIcon.laserglow.visible = false;
};
par.hIcon.boo.width = ((player.health / (player.MAXHEALTH * player.healthLevel)) * 50);
if ((((Math.abs(player.rotation) < 90)) && ((_local3.x > 320)))){
if (x > -1280){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
if ((((Math.abs(player.rotation) > 90)) && ((_local3.x < 320)))){
if (x < 0){
x = (x - player.backMove());
par.Mid.x = (par.Mid.x - (player.backMove() / 3));
par.Mid2.x = (par.Mid2.x - (player.backMove() / 10));
};
};
_local4 = new Array();
_local5 = new Array();
_local7 = 0;
while (_local7 < this.numChildren) {
if ((getChildAt(_local7) is Peluru)){
_local4.push(getChildAt(_local7));
};
if ((((((((((((((getChildAt(_local7) is Enemy)) || ((getChildAt(_local7) is EnemyGround)))) || ((getChildAt(_local7) is Enemy2)))) || ((getChildAt(_local7) is Enemy3)))) || ((getChildAt(_local7) is Enemy4)))) || ((getChildAt(_local7) is WeaponMother)))) || ((getChildAt(_local7) is BossMother)))){
_local6 = getChildAt(_local7);
if (_local6.health > 0){
_local5.push(getChildAt(_local7));
};
};
_local7++;
};
for (_local8 in _local4) {
if ((((_local4[_local8].tag == 0)) || ((_local4[_local8].tag == 1)))){
for (_local13 in _local5) {
if ((_local5[_local13] is BossMother)){
if (_local5[_local13].healthHangar > 0){
if (((_local5[_local13].garage.hitTestObject(_local4[_local8])) || (_local5[_local13].garageAni.hitTestObject(_local4[_local8])))){
if (_local4[_local8].tag == 0){
player.laserGaugePlus();
part.hit = (part.hit + 1);
};
_local5[_local13].damageGarage(_local4[_local8].damaged());
_local14 = new hitefek();
_local14.x = (_local4[_local8].x + (_local5[_local13].speedX() * 4));
_local14.y = (_local4[_local8].y + (_local5[_local13].speedY() * 4));
addChild(_local14);
_local4[_local8].deleteBullet();
break;
};
};
} else {
if (_local5[_local13].body.hitTestObject(_local4[_local8])){
if (_local4[_local8].tag == 0){
player.laserGaugePlus();
};
_local5[_local13].damage(_local4[_local8].damaged());
_local14 = new hitefek();
_local14.x = (_local4[_local8].x + (_local5[_local13].speedX() * 4));
_local14.y = (_local4[_local8].y + (_local5[_local13].speedY() * 4));
addChild(_local14);
_local4[_local8].deleteBullet();
break;
};
};
};
} else {
if (_local4[_local8].tag == 2){
if (player.hitTestObject(_local4[_local8])){
player.damage(_local4[_local8].damaged());
_local14 = new hitefek();
_local14.x = (_local4[_local8].x + (player.speedX() * 4));
_local14.y = (_local4[_local8].y + (player.speedY() * 4));
addChild(_local14);
_local4[_local8].deleteBullet();
};
};
};
};
_local9 = this.getChildByName("lasershot");
_local10 = 999;
if (_local9 != null){
for (_local13 in _local5) {
_local2 = new Point(_local5[_local13].body.x, _local5[_local13].body.y);
_local3 = _local5[_local13].localToGlobal(_local2);
if (((((((((_local9.hitTestPoint((_local3.x - (_local5[_local13].body.width / 2)), (_local3.y - (_local5[_local13].body.height / 2)), true)) || (_local9.hitTestPoint((_local3.x - (_local5[_local13].body.width / 2)), (_local3.y + (_local5[_local13].body.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local13].body.width / 2)), (_local3.y - (_local5[_local13].body.height / 2)), true)))) || (_local9.hitTestPoint((_local3.x + (_local5[_local13].body.width / 2)), (_local3.y + (_local5[_local13].body.height / 2)), true)))) || (_local9.hitTestPoint(_local3.x, _local3.y, true)))){
_local11 = Math.round(Math.sqrt((Math.pow((_local9.x - _local5[_local13].x), 2) + Math.pow((_local9.y - _local5[_local13].y), 2))));
if (_local10 > _local11){
_local10 = _local11;
_local12 = _local5[_local13];
};
};
};
if (_local12 != null){
_local12.damage((5 * player.weaponLevel));
};
_local9.showL.width = _local10;
};
for (_local13 in _local5) {
if (_local5[_local13].bodypic.hitTestObject(par.deadpit)){
_local5[_local13].damage(999);
};
};
if (player.hitTestObject(par.deadpit)){
player.damage(999);
if (part.nowStage == part.begodi){
part.bego++;
} else {
part.begodi = part.nowStage;
part.bego = 1;
};
if (part.medals[3] == 0){
part.medals[3] = 1;
};
if ((((part.bego > 5)) && ((part.medals[4] == 0)))){
part.medals[4] = 1;
};
};
ctrEfek--;
if (((((((player.hitTestObject(bm.wall1)) || (player.hitTestObject(bm.wall2)))) || (player.hitTestObject(bm.wall3)))) || (player.hitTestObject(bm.wall4)))){
player.damage(1);
if (ctrEfek < 0){
_local14 = new hitefek2();
_local14.x = (player.x + randRange(-30, 30));
_local14.y = (player.y + randRange(-15, 15));
addChild(_local14);
ctrEfek = 7;
_local15 = new testhit();
_local15.play(0, 2);
};
};
if (frontWeapon.health > 0){
bm.front.dead.visible = false;
bm.front.live.visible = true;
} else {
bm.front.live.visible = false;
bm.front.dead.visible = true;
};
if (upperFWeapon.health > 0){
bm.upperF.dead.visible = false;
bm.upperF.live.visible = true;
} else {
bm.upperF.live.visible = false;
bm.upperF.dead.visible = true;
};
if (upperBWeapon.health > 0){
bm.upperB.dead.visible = false;
bm.upperB.live.visible = true;
} else {
bm.upperB.live.visible = false;
bm.upperB.dead.visible = true;
};
if (midWeapon.health > 0){
bm.mid.dead.visible = false;
bm.mid.live.visible = true;
} else {
bm.mid.live.visible = false;
bm.mid.dead.visible = true;
};
if (bm.health > 0){
} else {
pauseGame = true;
tAniBlow.start();
};
if (player.health <= 0){
if (!staylose.running){
_local16 = new Over();
_local16.x = 0;
_local16.y = 0;
par.addChild(_local16);
} else {
pauseGame = true;
};
staylose.start();
};
} else {
if (bm.health <= 0){
ctrEfek--;
if (das >= 0){
_local18 = bm.width;
_local19 = bm.height;
_local7 = 0;
while (_local7 < 10) {
_local17 = new Duar();
_local17.x = ((bm.x - (_local18 / 2)) + randRange(-(_local18), _local18));
_local17.y = ((bm.y - (_local19 / 2)) + randRange(-(_local19), _local19));
addChild(_local17);
_local7++;
};
if (ctrEfek < 0){
_local15 = new explosion();
_local15.play(0, 1);
ctrEfek = 5;
};
};
par.white.alpha = (par.white.alpha + das);
if (par.white.alpha >= 1){
das = (das * -1);
bm.deleteEnemy();
removeChild(bm);
_local20 = new Array();
_local7 = 0;
while (_local7 < this.numChildren) {
if ((((((((((((((getChildAt(_local7) is Enemy)) || ((getChildAt(_local7) is EnemyGround)))) || ((getChildAt(_local7) is Enemy2)))) || ((getChildAt(_local7) is Enemy3)))) || ((getChildAt(_local7) is Enemy4)))) || ((getChildAt(_local7) is WeaponMother)))) || ((getChildAt(_local7) is BossMother)))){
_local20.push(getChildAt(_local7));
};
_local7++;
};
for (_local13 in _local20) {
_local20[_local13].deleteEnemy();
removeChild(_local20[_local13]);
};
};
};
};
}
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 keyW:
wKeyIsDown = false;
break;
case keyA:
aKeyIsDown = false;
break;
case keyS:
sKeyIsDown = false;
break;
case keyD:
dKeyIsDown = false;
break;
case keyX:
xKeyIsDown = false;
break;
case keyZ:
zKeyIsDown = false;
break;
case keyP:
break;
case Keyboard.SPACE:
spaceKeyIsDown = false;
break;
};
}
public function staylose1(_arg1:TimerEvent):void{
staylose.reset();
endGame();
part.game.gotoAndStop(1);
part.ms.visible = true;
part.gotoAndStop("gameover");
}
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 keyW:
wKeyIsDown = true;
break;
case keyA:
aKeyIsDown = true;
break;
case keyS:
sKeyIsDown = true;
break;
case keyD:
dKeyIsDown = true;
break;
case keyX:
xKeyIsDown = true;
break;
case keyZ:
zKeyIsDown = true;
break;
case Keyboard.SPACE:
spaceKeyIsDown = true;
break;
};
}
public function endGame():void{
var _local1:Array;
var _local2:*;
var _local3:*;
stage.removeEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.removeEventListener(KeyboardEvent.KEY_UP, releaseKey);
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
if ((((((((((((getChildAt(_local2) is WeaponMother)) || ((getChildAt(_local2) is BossMother)))) || ((getChildAt(_local2) is Enemy)))) || ((getChildAt(_local2) is Enemy2)))) || ((getChildAt(_local2) is Enemy3)))) || ((getChildAt(_local2) is Enemy4)))){
_local1.push(getChildAt(_local2));
};
_local2++;
};
for (_local3 in _local1) {
_local1[_local3].deleteEnemy();
};
player.deletePlayer();
part.musicChannel.stop();
removeEventListener(Event.ENTER_FRAME, cekBG);
}
public function Aniblow(_arg1:TimerEvent):void{
var _local2:*;
tAniBlow.reset();
tAniBlow.removeEventListener(TimerEvent.TIMER, Aniblow);
_local2 = new Clear();
_local2.x = 314.2;
_local2.y = 196.8;
par.addChild(_local2);
staywin.start();
pauseGame = true;
endGame();
medalsCount();
}
public function komboCounter(_arg1:TimerEvent):void{
komboCount.reset();
maxkombo = kombo;
if (maxkilling < maxkombo){
maxkilling = maxkombo;
};
maxkombo = 0;
kombo = 0;
}
public function initializeGame():void{
var _local1:*;
var _local2:*;
rightKeyIsDown = false;
leftKeyIsDown = false;
upKeyIsDown = false;
downKeyIsDown = false;
wKeyIsDown = false;
aKeyIsDown = false;
sKeyIsDown = false;
dKeyIsDown = false;
zKeyIsDown = false;
leftClikIsDown = false;
spaceKeyIsDown = false;
part.musicSound = new FinalBossBGM();
part.musicChannel = part.musicSound.play(0, 9999);
_local2 = 0;
while (_local2 < this.numChildren) {
if ((getChildAt(_local2) is WeaponMother)){
_local1 = getChildAt(_local2);
_local1.setLevel(1.5);
};
_local2++;
};
bm.setLevel(1.5);
player.setLevel(part.sl, part.wl, part.frl);
staywin.addEventListener(TimerEvent.TIMER, staywin1);
staylose.addEventListener(TimerEvent.TIMER, staylose1);
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP, releaseKey);
addEventListener(Event.ENTER_FRAME, cekBG);
}
public function NextStage():void{
part.game.gotoAndStop(1);
part.ms.visible = true;
part.gotoAndStop("end");
}
public function staywin1(_arg1:TimerEvent):void{
var _local2:*;
staywin.reset();
staywin.removeEventListener(TimerEvent.TIMER, staywin1);
_local2 = new keterangan();
_local2.x = 0;
_local2.y = 0;
par.addChild(_local2);
}
}
}//package SpaceCommanderv1_fla
Section 60
//MainMenu_148 (SpaceCommanderv1_fla.MainMenu_148)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MainMenu_148 extends MovieClip {
public var instrucB:SimpleButton;
public var startG:SimpleButton;
public var medalB:SimpleButton;
public var startC:SimpleButton;
public var glowing;
public var mb2:SimpleButton;
public var creditB:SimpleButton;
public var par;
public var ms:MovieClip;
public var Glow:TextField;
public var onceTime:Boolean;
public function MainMenu_148(){
addFrameScript(0, frame1);
}
public function clickPlay(_arg1:MouseEvent):void{
var _local2:Sound;
par.nowStage = 1;
par.lvl = 0;
par.wl = 1;
par.sl = 1;
par.frl = 1;
par.koin = 0;
_local2 = new buttonOk();
_local2.play(0, 1);
par.intkah = false;
par.firstSound = true;
par.gotoAndStop("instruc");
}
function frame1(){
par = this.parent;
par.musicSound = new MainMenuMusic();
onceTime = true;
if (par.firstSound == true){
par.musicChanel = par.musicSound.play(0, 10000);
par.firstSound = false;
} else {
ms = new DoorOpen();
par.addChild(ms);
};
startG.addEventListener(MouseEvent.CLICK, clickPlay);
glowing = Glow;
if (par.so.data.playGame > 1){
glowing.visible = true;
} else {
glowing.visible = false;
};
startC.addEventListener(MouseEvent.CLICK, clickC);
medalB.addEventListener(MouseEvent.CLICK, medalShow);
instrucB.addEventListener(MouseEvent.CLICK, instrucShow);
creditB.addEventListener(MouseEvent.CLICK, creditShow);
mb2.addEventListener(MouseEvent.CLICK, clickAB2);
}
public function instrucShow(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:Sound;
if (onceTime){
onceTime = false;
_local2 = new DoorClose();
_local2.goMenu = "instruc";
par.addChild(_local2);
_local3 = new buttonOk();
_local3.play(0, 1);
par.intkah = true;
};
}
public function creditShow(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:Sound;
if (onceTime){
onceTime = false;
_local2 = new DoorClose();
_local2.goMenu = "credit";
par.addChild(_local2);
_local3 = new buttonOk();
_local3.play(0, 1);
};
}
public function clickAB2(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2);
}
public function medalShow(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:Sound;
if (onceTime){
onceTime = false;
_local2 = new DoorClose();
_local2.goMenu = "medal";
par.addChild(_local2);
_local3 = new buttonOk();
_local3.play(0, 1);
};
}
public function clickC(_arg1:MouseEvent):void{
var _local2:Sound;
if (par.so.data.playGame > 1){
par.nowStage = par.so.data.nowStage;
par.lvl = par.so.data.LEVEL;
par.wl = par.so.data.WeaponLevel;
par.sl = par.so.data.ShieldLevel;
par.frl = par.so.data.FireLevel;
par.koin = par.so.data.Koin;
_local2 = new buttonOk();
_local2.play(0, 1);
par.musicChanel.stop();
par.gotoAndStop("game");
par.firstSound = true;
} else {
_local2 = new buttonNo();
_local2.play(0, 1);
};
}
}
}//package SpaceCommanderv1_fla
Section 61
//MainTimeline (SpaceCommanderv1_fla.MainTimeline)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var meda:MovieClip;
public var lvl:int;
public var begodi:Number;
public var firstSound:Boolean;
public var sl:Number;
public var medals:Array;
public var so:SharedObject;
public var i;
public var bego:Number;
public var e2:Enemy2;
public var e3:Enemy3;
public var e4:Enemy4;
public var e5:EnemyGround;
public var e1:Enemy;
public var acc:Number;
public var w1:Wingman2;
public var w2:Wingman;
public var wl:Number;
public var shot:Number;
public var yt;
public var frl:Number;
public var customContextMenu:ContextMenu;
public var intkah:Boolean;
public var koin:Number;
public var hit:Number;
public var mo:Over;
public var ms:MovieClip;
public var mu:MovieClip;
public var pbar:MovieClip;
public var nowStage:int;
public var musicSound:Sound;
public var game:MovieClip;
public var musicChanel:SoundChannel;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11);
}
function frame10(){
stop();
so.data.playGame = 2;
so.data.nowStage = nowStage;
so.data.LEVEL = lvl;
so.data.WeaponLevel = wl;
so.data.ShieldLevel = sl;
so.data.FireLevel = frl;
so.data.Koin = koin;
for (i in medals) {
if (medals[i] == 2){
medals[i] = 1;
};
};
so.data.medals = medals.concat();
so.flush();
gotoAndStop("game");
}
function frame3(){
stop();
fscommand("allowscale", "false");
fscommand("trapallkeys", "true");
}
function frame4(){
stop();
nowStage = 1;
lvl = 0;
wl = 1;
sl = 1;
frl = 1;
koin = 0;
acc = 0;
shot = 0;
hit = 0;
intkah = true;
medals = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
so = SharedObject.getLocal("spacecommander");
if (so.data.medals != null){
medals = so.data.medals.concat();
};
}
function frame5(){
stop();
firstSound = false;
}
function frame7(){
stop();
firstSound = false;
meda.medals = medals;
}
function frame2(){
w1.deleteWingman();
w2.deleteWingman();
e1.deleteEnemy();
e2.deleteEnemy();
e3.deleteEnemy();
e4.deleteEnemy();
e5.deleteEnemy();
}
function frame9(){
stop();
gotoAndStop("menu");
so.data.medals = medals;
so.flush();
}
function frame1(){
stage.scaleMode = StageScaleMode.NO_SCALE;
customContextMenu = new ContextMenu();
customContextMenu.hideBuiltInItems();
contextMenu = customContextMenu;
stage.showDefaultContextMenu = false;
firstSound = true;
stop();
addEventListener(Event.ENTER_FRAME, loading);
}
function frame8(){
stop();
}
function frame11(){
stop();
so.data.playGame = 2;
so.data.nowStage = 1;
so.data.LEVEL = 0;
so.data.WeaponLevel = 1;
so.data.ShieldLevel = 1;
so.data.FireLevel = 1;
so.data.Koin = 0;
for (yt in medals) {
if (medals[yt] == 2){
medals[yt] = 1;
};
};
so.data.medals = medals.concat();
so.flush();
musicSound = new EndBGM();
musicChanel = musicSound.play(0, 9999);
}
function frame6(){
stop();
if (intkah == true){
firstSound = false;
} else {
firstSound = true;
};
}
public function initGame(){
switch (nowStage){
case 1:
game.gotoAndStop("stage1");
break;
case 2:
game.gotoAndStop("stage2a");
break;
case 3:
game.gotoAndStop("stage3aa");
break;
case 4:
game.gotoAndStop("stage4a");
break;
case 5:
game.gotoAndStop("stage2b");
break;
case 6:
game.gotoAndStop("stage3ba");
break;
case 7:
game.gotoAndStop("stage4b");
break;
case 8:
game.gotoAndStop("stage5a");
break;
};
}
public function loading(_arg1:Event){
var _local2:*;
_local2 = (this.loaderInfo.bytesLoaded / this.loaderInfo.bytesTotal);
pbar.loaderbar.gotoAndStop(Math.floor((_local2 * 100)));
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
removeEventListener(Event.ENTER_FRAME, loading);
gotoAndPlay("adab");
};
}
}
}//package SpaceCommanderv1_fla
Section 62
//Manu1_47 (SpaceCommanderv1_fla.Manu1_47)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Manu1_47 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Manu1_47(){
addFrameScript(0, frame1);
}
function frame1(){
no = 10;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 63
//Manu2_50 (SpaceCommanderv1_fla.Manu2_50)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Manu2_50 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Manu2_50(){
addFrameScript(0, frame1);
}
function frame1(){
no = 11;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 64
//Manu3_53 (SpaceCommanderv1_fla.Manu3_53)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Manu3_53 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Manu3_53(){
addFrameScript(0, frame1);
}
function frame1(){
no = 12;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 65
//Manu4_56 (SpaceCommanderv1_fla.Manu4_56)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Manu4_56 extends MovieClip {
public var par;
public var body:MovieClip;
public var no:Number;
public var textKet:MovieClip;
public var black:MovieClip;
public function Manu4_56(){
addFrameScript(0, frame1);
}
function frame1(){
no = 13;
par = this.parent;
textKet.visible = false;
if (par.medals[no] > 0){
black.visible = false;
};
}
}
}//package SpaceCommanderv1_fla
Section 66
//MapSelect_309 (SpaceCommanderv1_fla.MapSelect_309)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MapSelect_309 extends MovieClip {
public var stageadd:SimpleButton;
public var resetmedal:SimpleButton;
public var bl3:MovieClip;
public var bl5:MovieClip;
public var bl6:MovieClip;
public var bl7:MovieClip;
public var bl4:MovieClip;
public var mb2:SimpleButton;
public var btn3:SimpleButton;
public var btn8:SimpleButton;
public var btn1:SimpleButton;
public var btn4:SimpleButton;
public var btn5:SimpleButton;
public var btneasy:SimpleButton;
public var bl2:MovieClip;
public var btn2:SimpleButton;
public var btn6:SimpleButton;
public var nextbtn:SimpleButton;
public var btn7:SimpleButton;
public var par;
public var textnya:MovieClip;
public var btnhard:SimpleButton;
public var animasi:MovieClip;
public function MapSelect_309(){
addFrameScript(0, frame1);
}
public function clickButtoneasy(_arg1:MouseEvent):void{
par.lvl = 1;
textnya.visible = false;
initial();
}
public function initial():void{
btn1.enabled = false;
btn2.enabled = false;
btn3.enabled = false;
btn4.enabled = false;
btn5.enabled = false;
btn6.enabled = false;
btn7.enabled = false;
btn8.enabled = false;
bl5.visible = true;
bl6.visible = true;
bl7.visible = true;
bl2.visible = true;
bl3.visible = true;
bl4.visible = true;
animasi.visible = false;
if (par.lvl == 0){
btneasy.addEventListener(MouseEvent.CLICK, clickButtoneasy);
btnhard.addEventListener(MouseEvent.CLICK, clickButtonhard);
bl5.visible = false;
bl6.visible = false;
bl7.visible = false;
bl2.visible = false;
bl3.visible = false;
bl4.visible = false;
} else {
btnhard.visible = false;
btneasy.visible = false;
if (par.lvl == 1){
bl5.visible = false;
bl6.visible = false;
bl7.visible = false;
};
if (par.lvl == 2){
bl2.visible = false;
bl3.visible = false;
bl4.visible = false;
};
switch (par.nowStage){
case 1:
btn1.addEventListener(MouseEvent.CLICK, clickButtonStage);
btn1.enabled = true;
animasi.gotoAndStop(1);
animasi.visible = true;
break;
case 2:
btn2.addEventListener(MouseEvent.CLICK, clickButtonStage);
btn2.enabled = true;
animasi.gotoAndPlay(101);
animasi.visible = true;
break;
case 3:
btn3.addEventListener(MouseEvent.CLICK, clickButtonStage);
btn3.enabled = true;
animasi.gotoAndPlay(121);
animasi.visible = true;
break;
case 4:
btn4.addEventListener(MouseEvent.CLICK, clickButtonStage);
btn4.enabled = true;
animasi.gotoAndPlay(141);
animasi.visible = true;
break;
case 5:
btn5.addEventListener(MouseEvent.CLICK, clickButtonStage);
btn5.enabled = true;
animasi.gotoAndPlay(2);
animasi.visible = true;
break;
case 6:
btn6.addEventListener(MouseEvent.CLICK, clickButtonStage);
btn6.enabled = true;
animasi.gotoAndPlay(21);
animasi.visible = true;
break;
case 7:
btn7.addEventListener(MouseEvent.CLICK, clickButtonStage);
btn7.enabled = true;
animasi.gotoAndPlay(41);
animasi.visible = true;
break;
case 8:
btn8.addEventListener(MouseEvent.CLICK, clickButtonStage);
btn8.enabled = true;
if (par.lvl == 2){
animasi.gotoAndPlay(161);
} else {
animasi.gotoAndPlay(61);
};
animasi.visible = true;
break;
};
};
}
public function resetmedals(_arg1:MouseEvent):void{
par.medals = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
par.so.data.medals = par.medals.concat();
par.so.flush();
}
public function clickButtonStage(_arg1:MouseEvent):void{
if (par.nowStage == 1){
par.initGame();
par.musicChanel.stop();
par.mu.visible = false;
this.visible = false;
} else {
par.mu.initial();
par.mu.visible = true;
this.visible = false;
};
}
function frame1(){
par = this.parent;
stageadd.addEventListener(MouseEvent.CLICK, stageaddd);
resetmedal.addEventListener(MouseEvent.CLICK, resetmedals);
stageadd.visible = false;
resetmedal.visible = false;
par.musicSound = new MapSelectMusic();
par.musicChanel = par.musicSound.play(0, 10000);
mb2.addEventListener(MouseEvent.CLICK, clickAB2);
initial();
if (par.lvl > 0){
textnya.visible = false;
};
nextbtn.visible = false;
}
public function clickButtonhard(_arg1:MouseEvent):void{
par.lvl = 2;
textnya.visible = false;
initial();
}
public function clickAB2(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2);
}
public function stageaddd(_arg1:MouseEvent):void{
par.nowStage = (par.nowStage + 1);
par.koin = 6;
initial();
}
}
}//package SpaceCommanderv1_fla
Section 67
//Medals_175 (SpaceCommanderv1_fla.Medals_175)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Medals_175 extends MovieClip {
public var mdl0:MovieClip;
public var mdl1:MovieClip;
public var mdl3:MovieClip;
public var mdl7:MovieClip;
public var mdl8:MovieClip;
public var mdl9:MovieClip;
public var mdl2:MovieClip;
public var mdl6:MovieClip;
public var mdl4:MovieClip;
public var medals:Array;
public var mdl5:MovieClip;
public var btnB:SimpleButton;
public var mdl11:MovieClip;
public var mdl13:MovieClip;
public var mdl14:MovieClip;
public var mdl15:MovieClip;
public var mdl16:MovieClip;
public var par;
public var mdl10:MovieClip;
public var mdl17:MovieClip;
public var mdl12:MovieClip;
public var onceTime:Boolean;
public function Medals_175(){
addFrameScript(0, frame1);
}
public function btnHD(_arg1:MouseEvent):void{
if (_arg1.currentTarget.parent.black.visible == false){
_arg1.currentTarget.parent.textKet.visible = true;
};
}
function frame1(){
par = this.parent;
onceTime = true;
medals = new Array();
medals = par.medals;
btnB.addEventListener(MouseEvent.CLICK, btnBC);
mdl0.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl0.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl1.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl1.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl2.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl2.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl3.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl3.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl4.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl4.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl5.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl5.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl6.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl6.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl7.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl7.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl8.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl8.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl9.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl9.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl10.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl10.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl11.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl11.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl12.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl12.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl13.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl13.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl14.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl14.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl15.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl15.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl16.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl16.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl17.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl17.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
}
public function btnHE(_arg1:MouseEvent):void{
_arg1.currentTarget.parent.textKet.visible = false;
}
public function btnBC(_arg1:MouseEvent):void{
var _local2:MovieClip;
var _local3:Sound;
if (onceTime){
onceTime = false;
_local2 = new DoorClose();
_local2.goMenu = "menu";
par.addChild(_local2);
_local3 = new buttonOk();
_local3.play(0, 1);
};
}
}
}//package SpaceCommanderv1_fla
Section 68
//MenuUpgrade_286 (SpaceCommanderv1_fla.MenuUpgrade_286)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class MenuUpgrade_286 extends MovieClip {
public var nextw:MovieClip;
public var frl:MovieClip;
public var nowf:MovieClip;
public var nows:MovieClip;
public var rst:SimpleButton;
public var noww:MovieClip;
public var sl:MovieClip;
public var btnNext:SimpleButton;
public var btnf:SimpleButton;
public var koin:MovieClip;
public var btns:SimpleButton;
public var par;
public var btnw:SimpleButton;
public var nextf:MovieClip;
public var wl:MovieClip;
public var nexts:MovieClip;
public function MenuUpgrade_286(){
addFrameScript(0, frame1);
}
public function resetstat(_arg1:MouseEvent):void{
par.koin = (par.koin + (((par.wl - 1) + (par.sl - 1)) + (par.frl - 1)));
par.wl = 1;
par.sl = 1;
par.frl = 1;
initial();
}
public function klik(_arg1:MouseEvent):void{
var _local2:String;
var _local3:String;
var _local4:Sound;
_local2 = _arg1.currentTarget.name;
_local3 = _local2.substr(3, (_local2.length - 3));
if (_local3.charCodeAt(0) == 102){
if ((((par.frl < 3)) && ((par.koin > 0)))){
par.frl++;
par.koin--;
_local4 = new buttonOk();
_local4.play(0, 1);
} else {
_local4 = new buttonFail();
_local4.play(0, 1);
};
};
if (_local3.charCodeAt(0) == 115){
if ((((par.sl < 3)) && ((par.koin > 0)))){
par.sl++;
par.koin--;
_local4 = new buttonOk();
_local4.play(0, 1);
} else {
_local4 = new buttonFail();
_local4.play(0, 1);
};
};
if (_local3.charCodeAt(0) == 119){
if ((((par.wl < 3)) && ((par.koin > 0)))){
par.wl++;
par.koin--;
_local4 = new buttonOk();
_local4.play(0, 1);
} else {
_local4 = new buttonFail();
_local4.play(0, 1);
};
};
initial();
}
public function initial():void{
var _local1:Number;
var _local2:Number;
koin.gotoAndStop((par.koin + 1));
sl.gotoAndStop(par.sl);
wl.gotoAndStop(par.wl);
frl.gotoAndStop(par.frl);
nows.gotoAndStop(par.sl);
nexts.gotoAndStop((par.sl + 1));
noww.gotoAndStop(par.wl);
nextw.gotoAndStop((par.wl + 1));
nowf.gotoAndStop(par.frl);
nextf.gotoAndStop((par.frl + 1));
}
public function klik2(_arg1:MouseEvent):void{
this.visible = false;
par.musicChanel.stop();
par.initGame();
}
function frame1(){
par = this.parent;
btns.addEventListener(MouseEvent.CLICK, klik);
btnw.addEventListener(MouseEvent.CLICK, klik);
btnf.addEventListener(MouseEvent.CLICK, klik);
btnNext.addEventListener(MouseEvent.CLICK, klik2);
rst.addEventListener(MouseEvent.CLICK, resetstat);
initial();
}
}
}//package SpaceCommanderv1_fla
Section 69
//musuh_4_139 (SpaceCommanderv1_fla.musuh_4_139)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class musuh_4_139 extends MovieClip {
public var lshot:MovieClip;
public var body:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 70
//musuh1_128 (SpaceCommanderv1_fla.musuh1_128)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class musuh1_128 extends MovieClip {
public function musuh1_128(){
addFrameScript(0, frame1, 27, frame28);
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
function frame1(){
gotoAndPlay(randRange(2, 27));
}
function frame28(){
gotoAndPlay(2);
}
}
}//package SpaceCommanderv1_fla
Section 71
//Part1_252 (SpaceCommanderv1_fla.Part1_252)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class Part1_252 extends MovieClip {
public var live:MovieClip;
public var dead:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 72
//Part2_263 (SpaceCommanderv1_fla.Part2_263)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class Part2_263 extends MovieClip {
public var live:MovieClip;
public var dead:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 73
//Part3_255 (SpaceCommanderv1_fla.Part3_255)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class Part3_255 extends MovieClip {
public var live:MovieClip;
public var dead:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 74
//Part4_266 (SpaceCommanderv1_fla.Part4_266)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class Part4_266 extends MovieClip {
public var live:MovieClip;
public var dead:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 75
//Part5_258 (SpaceCommanderv1_fla.Part5_258)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class Part5_258 extends MovieClip {
public var live:MovieClip;
public var dead:MovieClip;
}
}//package SpaceCommanderv1_fla
Section 76
//posisi_ngelaser_216 (SpaceCommanderv1_fla.posisi_ngelaser_216)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class posisi_ngelaser_216 extends MovieClip {
public var par;
public function posisi_ngelaser_216(){
addFrameScript(69, frame70);
}
function frame70(){
stop();
par = this.parent.parent;
par.redeWeapon = true;
par.StandByMoveUp();
par.body.x = 19.4;
par.body.y = -73.7;
}
}
}//package SpaceCommanderv1_fla
Section 77
//posisi_ngelaser_217 (SpaceCommanderv1_fla.posisi_ngelaser_217)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class posisi_ngelaser_217 extends MovieClip {
public var efekSound:Sound;
public var par;
public function posisi_ngelaser_217(){
addFrameScript(69, frame70, 72, frame73, 100, frame101);
}
function frame70(){
efekSound = new laserrobot();
efekSound.play(0, 1);
}
function frame73(){
par = this.parent.parent;
if (par.redeWeapon == false){
par.redeWeapon = true;
par.body.x = -12.7;
par.body.y = -57.2;
};
}
function frame101(){
gotoAndPlay("repeat");
}
}
}//package SpaceCommanderv1_fla
Section 78
//prcikan_kna_tmbak_33 (SpaceCommanderv1_fla.prcikan_kna_tmbak_33)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class prcikan_kna_tmbak_33 extends MovieClip {
public function prcikan_kna_tmbak_33(){
addFrameScript(10, frame11);
}
function frame11(){
stop();
this.parent.removeChild(this);
}
}
}//package SpaceCommanderv1_fla
Section 79
//PreSound_8 (SpaceCommanderv1_fla.PreSound_8)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class PreSound_8 extends MovieClip {
public function PreSound_8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SpaceCommanderv1_fla
Section 80
//RobotBack_214 (SpaceCommanderv1_fla.RobotBack_214)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class RobotBack_214 extends MovieClip {
public var par;
public function RobotBack_214(){
addFrameScript(79, frame80);
}
function frame80(){
stop();
par = this.parent.parent;
par.canMove = true;
par.body.x = 19.4;
par.body.y = -73.7;
}
}
}//package SpaceCommanderv1_fla
Section 81
//RobotPic_206 (SpaceCommanderv1_fla.RobotPic_206)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class RobotPic_206 extends MovieClip {
public function RobotPic_206(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame8(){
stop();
}
function frame2(){
stop();
}
}
}//package SpaceCommanderv1_fla
Section 82
//RobotReadyFireL_212 (SpaceCommanderv1_fla.RobotReadyFireL_212)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class RobotReadyFireL_212 extends MovieClip {
public var par;
public function RobotReadyFireL_212(){
addFrameScript(25, frame26);
}
function frame26(){
stop();
par = this.parent.parent;
par.redeWeapon = true;
}
}
}//package SpaceCommanderv1_fla
Section 83
//RobotReadyFireR_210 (SpaceCommanderv1_fla.RobotReadyFireR_210)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class RobotReadyFireR_210 extends MovieClip {
public var par;
public function RobotReadyFireR_210(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
par = this.parent.parent;
par.redeWeapon = true;
}
}
}//package SpaceCommanderv1_fla
Section 84
//robt_mtek_215 (SpaceCommanderv1_fla.robt_mtek_215)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class robt_mtek_215 extends MovieClip {
public function robt_mtek_215(){
addFrameScript(29, frame30);
}
function frame30(){
stop();
}
}
}//package SpaceCommanderv1_fla
Section 85
//Siap2Move_209 (SpaceCommanderv1_fla.Siap2Move_209)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Siap2Move_209 extends MovieClip {
public var par;
public function Siap2Move_209(){
addFrameScript(49, frame50);
}
function frame50(){
stop();
par = this.parent.parent;
par.canMove = true;
stop();
}
}
}//package SpaceCommanderv1_fla
Section 86
//test_334 (SpaceCommanderv1_fla.test_334)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class test_334 extends MovieClip {
public var par;
public function test_334(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13, 13, frame14, 14, frame15);
}
function frame10(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame14(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame12(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame3(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame6(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame7(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame1(){
par = this.parent.parent.parent;
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame13(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame4(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame5(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame8(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame9(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame2(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame15(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
function frame11(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(3);
};
};
}
}
}//package SpaceCommanderv1_fla
Section 87
//test2_343 (SpaceCommanderv1_fla.test2_343)
package SpaceCommanderv1_fla {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class test2_343 extends MovieClip {
public var par;
public function test2_343(){
addFrameScript(0, frame1, 2, frame3, 4, frame5, 6, frame7, 8, frame9, 10, frame11, 12, frame13, 14, frame15, 16, frame17, 18, frame19, 20, frame21, 22, frame23);
}
function frame3(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(2);
};
};
}
function frame15(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(2);
};
};
}
function frame7(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(2);
};
};
}
function frame1(){
par = this.parent.parent.parent;
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(2);
};
};
}
function frame19(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(2);
};
};
}
function frame13(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(2);
};
};
}
function frame17(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(2);
};
};
}
function frame5(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(2);
};
};
}
function frame9(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(2);
};
};
}
function frame23(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(2);
};
};
}
function frame21(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(2);
};
};
}
function frame11(){
if (this.hitTestObject(par.player)){
if (!par.pauseGame){
par.player.damage(2);
};
};
}
}
}//package SpaceCommanderv1_fla
Section 88
//WeaponUFO_237 (SpaceCommanderv1_fla.WeaponUFO_237)
package SpaceCommanderv1_fla {
import flash.display.*;
public dynamic class WeaponUFO_237 extends MovieClip {
public var live:MovieClip;
public var dead:MovieClip;
public function WeaponUFO_237(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package SpaceCommanderv1_fla
Section 89
//alertboss (alertboss)
package {
import flash.media.*;
public dynamic class alertboss extends Sound {
}
}//package
Section 90
//Bom (Bom)
package {
import flash.media.*;
import flash.display.*;
public dynamic class Bom extends MovieClip {
public var efekSound:Sound;
public function Bom(){
addFrameScript(0, frame1);
}
function frame1(){
efekSound = new explosion();
efekSound.play(0, 1);
}
}
}//package
Section 91
//BossMother (BossMother)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class BossMother extends MovieClip {
public const MAXHEALTH:Number = 220;
const MAXHEALTHHANGAR:Number = 1500;
public var upperF:MovieClip;
public var front:MovieClip;
public var garage:MovieClip;
public var garageAni:MovieClip;
public var mid:MovieClip;
public var health:Number;
var sudut:Number;
var efekSound:Sound;
var tSpawn:Timer;
var levele:Number;
public var healthHangar:Number;
var par;
public var wall1:MovieClip;
public var wall2:MovieClip;
public var body:MovieClip;
public var bodypic:MovieClip;
public var wall3:MovieClip;
public var wall4:MovieClip;
var tCanFireWeapon:Timer;
public var upperB:MovieClip;
var pla;
var canFireWeapon:Boolean;
public function BossMother():void{
tCanFireWeapon = new Timer((1000 / 3));
tSpawn = new Timer(10000);
super();
health = MAXHEALTH;
healthHangar = MAXHEALTHHANGAR;
canFireWeapon = true;
this.addEventListener(Event.ENTER_FRAME, moveEnemy);
tCanFireWeapon.addEventListener(TimerEvent.TIMER, cfw);
tSpawn.addEventListener(TimerEvent.TIMER, cmw);
tSpawn.start();
garageAni.visible = false;
garageAni.gotoAndStop(100);
}
function fireWeapon(){
var _local1:MovieClip;
if (canFireWeapon){
};
}
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{
health = MAXHEALTH;
}
function cmw(_arg1:TimerEvent):void{
spawnAni();
}
public function respawn():void{
var _local1:MovieClip;
var _local2:Number;
_local2 = randRange(1, 4);
switch (_local2){
case 1:
_local1 = new Enemy();
break;
case 2:
_local1 = new Enemy2();
break;
case 3:
_local1 = new Enemy3();
break;
case 4:
_local1 = new Enemy4();
break;
};
_local1.x = 591;
_local1.y = 270;
_local1.setLevel(levele);
par.addChild(_local1);
efekSound = new spaceshiplaunch();
efekSound.play(0, 1);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
efekSound = new hit();
efekSound.play(0, 1);
}
public function damageGarage(_arg1:Number):void{
healthHangar = (healthHangar - _arg1);
}
function setTarget():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = (pla.x - x);
_local2 = (pla.y - y);
_local3 = Math.atan2(_local2, _local1);
sudut = ((_local3 * 180) / Math.PI);
}
public function deleteEnemy():void{
tCanFireWeapon.stop();
tCanFireWeapon.removeEventListener(TimerEvent.TIMER, cfw);
tSpawn.stop();
tSpawn.removeEventListener(TimerEvent.TIMER, cmw);
removeEventListener(Event.ENTER_FRAME, moveEnemy);
}
function cfw(_arg1:TimerEvent):void{
canFireWeapon = true;
tCanFireWeapon.reset();
}
public function setLevel(_arg1:Number){
levele = _arg1;
healthHangar = (_arg1 * MAXHEALTH);
}
function moveEnemy(_arg1:Event):void{
var _local2:MovieClip;
var _local3:Point;
var _local4:*;
par = _arg1.currentTarget.parent;
pla = par.player;
if (!par.pauseGame){
if (!tSpawn.running){
tSpawn.start();
};
if (healthHangar > 0){
} else {
tSpawn.reset();
garageAni.visible = false;
garage.visible = true;
garage.live.visible = false;
garage.dead.visible = true;
if (healthHangar > -100){
damage(100);
_local2 = new Bom();
_local3 = new Point(garage.x, garage.y);
_local4 = localToGlobal(_local3);
_local2.x = _local4.x;
_local2.y = _local4.y;
par.addChild(_local2);
healthHangar = -999;
};
};
if (health > 0){
setTarget();
} else {
deleteEnemy();
stop();
return;
};
} else {
if (tSpawn.running){
tSpawn.stop();
};
};
}
function spawnAni():void{
var _local1:Number;
var _local2:*;
_local1 = 0;
_local2 = 0;
while (_local2 < par.numChildren) {
if ((((((((par.getChildAt(_local2) is Enemy)) || ((par.getChildAt(_local2) is Enemy2)))) || ((par.getChildAt(_local2) is Enemy3)))) || ((par.getChildAt(_local2) is Enemy4)))){
_local1++;
};
_local2++;
};
if (_local1 < 3){
garage.visible = false;
garageAni.visible = true;
garageAni.gotoAndPlay(1);
};
}
public function speedX():Number{
return (0);
}
public function speedY():Number{
return (0);
}
}
}//package
Section 92
//BossRoboBGM (BossRoboBGM)
package {
import flash.media.*;
public dynamic class BossRoboBGM extends Sound {
}
}//package
Section 93
//BossRobot (BossRobot)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
public class BossRobot extends MovieClip {
public const MAXHEALTH:Number = 2000;
const MAXSPEED = 4;
var tChangeModeWeapon:Timer;
var moveUpMode:Number;// = 0
var pasu:Boolean;
var LaserShot:Boolean;// = false
var efekSound:Sound;
var sc:SoundChannel;
var ttemp;
public var tempwall2:MovieClip;
public var health:Number;
var speed:Number;
var sudut:Number;
public var tempwall1:MovieClip;
var mundur:Boolean;// = false
var dd:Number;// = -18
var modeFire:Number;
var dx:Number;// = 0
var par;
var dy:Number;// = 0
public var bodypic:MovieClip;
var moveUpDown:Boolean;// = false
var degreeFire:Number;// = 0
public var redeWeapon:Boolean;// = true
public var body:MovieClip;
public var wall1:MovieClip;
public var canMove:Boolean;// = true
var tCanFireWeapon:Timer;
var maju:Boolean;// = false
var canFireWeapon:Boolean;
var pla;
public function BossRobot():void{
tCanFireWeapon = new Timer((1000 / 3));
tChangeModeWeapon = new Timer(2100);
canMove = true;
dx = 0;
dy = 0;
maju = false;
mundur = false;
degreeFire = 0;
dd = -18;
redeWeapon = true;
LaserShot = false;
moveUpDown = false;
moveUpMode = 0;
super();
health = MAXHEALTH;
canFireWeapon = true;
speed = MAXSPEED;
this.addEventListener(Event.ENTER_FRAME, moveEnemy);
tCanFireWeapon.addEventListener(TimerEvent.TIMER, cfw);
tChangeModeWeapon.addEventListener(TimerEvent.TIMER, cmw);
tChangeModeWeapon.start();
modeFire = 0;
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((((Math.random() * _arg2) - _arg1) + 1)) + _arg1);
return (_local3);
}
function moveEnemy(_arg1:Event):void{
var _local2:*;
par = _arg1.currentTarget.parent;
pla = par.player;
if (!par.pauseGame){
resumeMove();
if (health > 0){
if (canMove){
x = (x + dx);
};
if (redeWeapon){
fireWeapon();
};
if ((((((x > (par.bg.width - 250))) && ((canMove == true)))) && ((mundur == true)))){
body.x = -42.6;
body.y = -65.7;
bodypic.gotoAndStop("standby");
canMove = false;
tChangeModeWeapon.start();
mundur = false;
};
if ((((((x < ((par.bg.width - 250) - 320))) && ((canMove == true)))) && ((maju == true)))){
body.x = -42.6;
body.y = -65.7;
bodypic.gotoAndStop("standby");
canMove = false;
tChangeModeWeapon.start();
maju = false;
};
if (moveUpDown){
y = (y + dy);
_local2 = par.getChildByName("botlaser");
if (_local2 != null){
_local2.y = (_local2.y + dy);
};
if ((((moveUpMode == 1)) && ((y > 350)))){
dy = (dy * -1);
moveUpMode = 2;
};
if ((((moveUpMode == 2)) && ((y < 50)))){
dy = (dy * -1);
moveUpMode = 3;
};
if ((((moveUpMode == 3)) && ((y == 197)))){
body.x = -42.6;
body.y = -65.7;
bodypic.gotoAndStop("standby");
tChangeModeWeapon.start();
moveUpDown = false;
_local2 = par.getChildByName("botlaser");
par.removeChild(_local2);
sc.stop();
};
};
} else {
deleteEnemy();
stop();
return;
};
} else {
pauseMove();
};
}
public function resetStat():void{
health = MAXHEALTH;
}
function cfw(_arg1:TimerEvent):void{
canFireWeapon = true;
tCanFireWeapon.reset();
}
function setTarget():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = (pla.x - x);
_local2 = (pla.y - y);
_local3 = Math.atan2(_local2, _local1);
sudut = ((_local3 * 180) / Math.PI);
}
public function deleteEnemy():void{
if ((((modeFire == 9)) || ((modeFire == 7)))){
sc.stop();
};
tCanFireWeapon.stop();
tCanFireWeapon.removeEventListener(TimerEvent.TIMER, cfw);
tChangeModeWeapon.stop();
tChangeModeWeapon.removeEventListener(TimerEvent.TIMER, cmw);
bodypic.gotoAndStop("die");
removeEventListener(Event.ENTER_FRAME, moveEnemy);
}
function pauseMove():void{
if (pasu == false){
pasu = true;
if (tChangeModeWeapon.running){
ttemp = tChangeModeWeapon.running;
tChangeModeWeapon.stop();
};
};
}
public function changeBehaviour():void{
var _local1:*;
modeFire = (modeFire + 1);
if (modeFire > 11){
modeFire = 1;
};
switch (modeFire){
case 1:
tChangeModeWeapon.reset();
tChangeModeWeapon.delay = 2100;
canMove = false;
dx = speed;
bodypic.gotoAndStop("back");
mundur = true;
break;
case 2:
tChangeModeWeapon.reset();
tChangeModeWeapon.delay = 4200;
tChangeModeWeapon.start();
canMove = false;
bodypic.gotoAndStop("firel");
redeWeapon = false;
break;
case 3:
tChangeModeWeapon.reset();
tChangeModeWeapon.delay = 4200;
tChangeModeWeapon.start();
canMove = false;
bodypic.gotoAndStop("firer");
redeWeapon = false;
break;
case 4:
tChangeModeWeapon.reset();
tChangeModeWeapon.delay = 2100;
canMove = false;
dx = -(speed);
bodypic.gotoAndStop("move");
maju = true;
break;
case 5:
dd = 10;
tChangeModeWeapon.reset();
tChangeModeWeapon.delay = 6300;
tChangeModeWeapon.start();
canMove = false;
degreeFire = 60;
bodypic.gotoAndStop("firer");
redeWeapon = false;
break;
case 6:
tChangeModeWeapon.reset();
tChangeModeWeapon.delay = 2100;
canMove = false;
dx = speed;
bodypic.gotoAndStop("back");
mundur = true;
break;
case 7:
tChangeModeWeapon.reset();
tChangeModeWeapon.delay = 2100;
canMove = false;
bodypic.gotoAndStop("laser");
LaserShot = true;
redeWeapon = false;
break;
case 8:
dd = -10;
tChangeModeWeapon.reset();
tChangeModeWeapon.delay = 6300;
degreeFire = 0;
tChangeModeWeapon.start();
canMove = false;
bodypic.gotoAndStop("firer");
redeWeapon = false;
break;
case 9:
tChangeModeWeapon.reset();
tChangeModeWeapon.delay = 7400;
tChangeModeWeapon.start();
canMove = false;
bodypic.gotoAndStop("laserbig");
LaserShot = true;
redeWeapon = false;
break;
case 10:
body.x = -42.6;
body.y = -65.7;
_local1 = par.getChildByName("botlaser");
par.removeChild(_local1);
sc.stop();
tChangeModeWeapon.reset();
tChangeModeWeapon.delay = 2100;
canMove = false;
dx = -(speed);
bodypic.gotoAndStop("move");
maju = true;
redeWeapon = false;
break;
case 11:
tChangeModeWeapon.reset();
tChangeModeWeapon.delay = 4200;
tChangeModeWeapon.start();
canMove = false;
bodypic.gotoAndStop("firel");
redeWeapon = false;
break;
};
}
public function speedX():Number{
return (0);
}
public function speedY():Number{
return (0);
}
function cmw(_arg1:TimerEvent):void{
changeBehaviour();
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
if (_arg1 < 10){
par.deadBreak = true;
} else {
par.deadBreak = false;
};
efekSound = new hit();
efekSound.play(0, 1);
}
public function StandByMoveUp():void{
moveUpDown = true;
moveUpMode = 1;
dy = (speed / 2);
}
function resumeMove():void{
if (pasu == true){
if (ttemp){
tChangeModeWeapon.start();
};
(pasu == false);
};
}
function fireWeapon(){
var _local1:MovieClip;
var _local2:MovieClip;
var _local3:*;
if (canFireWeapon){
canFireWeapon = false;
tCanFireWeapon.start();
switch (modeFire){
case 2:
_local3 = 0;
while (_local3 < 7) {
_local1 = new Peluru((x - 159.7), (y - 30.6), ((_local3 * 18) + 126), 2);
_local1.setDamage(5);
par.addChild(_local1);
_local3++;
};
break;
case 3:
setTarget();
_local1 = new Peluru((x - 139.7), (y - 33.6), sudut, 2);
_local1.setDamage(10);
par.addChild(_local1);
break;
case 5:
_local1 = new Peluru((x - 139.7), (y - 33.6), (degreeFire + 135), 2);
_local1.setDamage(10);
par.addChild(_local1);
degreeFire = (degreeFire + dd);
if ((((degreeFire < 0)) || ((degreeFire > 90)))){
dd = (dd * -1);
};
break;
case 7:
if (LaserShot){
LaserShot = false;
_local2 = new Laser();
_local2.x = (x - 20.6);
_local2.y = (y - 33.6);
_local2.name = "botlaser";
par.addChild(_local2);
efekSound = new laserbeamrobot();
sc = efekSound.play(0, 100);
};
break;
case 8:
_local1 = new Peluru((x - 139.7), (y - 33.6), (degreeFire + 126), 2);
_local1.setDamage(10);
par.addChild(_local1);
degreeFire = (degreeFire + dd);
if ((((degreeFire < 0)) || ((degreeFire > 108)))){
dd = (dd * -1);
};
break;
case 9:
if (LaserShot){
LaserShot = false;
_local2 = new LaserBig();
_local2.x = (x - 155);
_local2.y = y;
_local2.name = "botlaser";
par.addChild(_local2);
efekSound = new laserbeamrobot();
sc = efekSound.play(0, 100);
};
break;
case 11:
_local3 = 0;
while (_local3 < 7) {
_local1 = new Peluru((x - 159.7), (y - 30.6), ((_local3 * 18) + 126), 2);
_local1.setDamage(5);
par.addChild(_local1);
_local3++;
};
break;
};
};
}
}
}//package
Section 94
//BossUFO (BossUFO)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.geom.*;
public class BossUFO extends MovieClip {
public const MAXHEALTH:Number = 750;
const MAXHEALTHWEAPON:Number = 300;
const MAXSPEED = 3;
var tChangeModeWeapon:Timer;
var modeMove:Number;
var efekSound:Sound;
public var health:Number;
var speed:Number;
var sudut:Number;
public var isFire:Boolean;
var modeFire:Number;// = 2
var dx:Number;
var tRecAF:Timer;
var dy:Number;
public var bodypic:MovieClip;
public var isDead:Boolean;
var par;
var degreeFire1:Number;
public var jenisWeapon:String;
var maxArmFocus:Number;
public var healthWeapon2:Number;
public var healthWeapon1:Number;
public var body:MovieClip;
public var wall1:MovieClip;
public var wall2:MovieClip;
public var weaponL:MovieClip;
public var weaponR:MovieClip;
var canMove:Boolean;// = true
var tCanFireWeapon:Timer;
var armFocus:Number;
public var asap:MovieClip;
var canFireWeapon:Boolean;
var pla;
public function BossUFO():void{
tRecAF = new Timer(100);
tCanFireWeapon = new Timer((1000 / 3));
tChangeModeWeapon = new Timer(5000);
modeFire = 2;
canMove = true;
super();
armFocus = 0;
health = MAXHEALTH;
isDead = false;
canFireWeapon = true;
speed = MAXSPEED;
tRecAF.addEventListener(TimerEvent.TIMER, recAF);
tRecAF.start();
modeMove = 2;
dx = 0;
dy = speed;
degreeFire1 = 0;
healthWeapon1 = MAXHEALTHWEAPON;
healthWeapon2 = MAXHEALTHWEAPON;
this.addEventListener(Event.ENTER_FRAME, moveEnemy);
tCanFireWeapon.addEventListener(TimerEvent.TIMER, cfw);
tChangeModeWeapon.addEventListener(TimerEvent.TIMER, cmw);
tChangeModeWeapon.start();
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((((Math.random() * _arg2) - _arg1) + 1)) + _arg1);
return (_local3);
}
function moveEnemy(_arg1:Event):void{
var _local2:Number;
var _local3:MovieClip;
par = _arg1.currentTarget.parent;
pla = par.player;
if (randRange(1, 2) == 1){
} else {
_local2 = randRange(1, 3);
_local3 = new EfekAsap();
_local3.x = randRange(-15, 15);
_local3.y = randRange(-15, 15);
asap.addChild(_local3);
};
if (!par.pauseGame){
resumeMove();
if (health > 0){
if (healthWeapon1 <= 0){
weaponL.dead.visible = true;
weaponL.live.visible = false;
} else {
weaponL.dead.visible = false;
weaponL.live.visible = true;
};
if (healthWeapon2 <= 0){
weaponR.dead.visible = true;
weaponR.live.visible = false;
} else {
weaponR.dead.visible = false;
weaponR.live.visible = true;
};
setTarget();
if (canMove){
x = (x + dx);
y = (y + dy);
};
fireWeapon();
switch (modeMove){
case 1:
if (x > 1150){
dx = 0;
dy = speed;
modeMove = 2;
};
break;
case 2:
if (y > 200){
dx = (speed * -1);
dy = 0;
modeMove = 3;
};
break;
case 3:
if (x < 150){
dx = 0;
dy = (speed * -1);
modeMove = 4;
};
break;
case 4:
if (y < 75){
dx = speed;
dy = 0;
modeMove = 1;
};
break;
};
} else {
deleteEnemy();
stop();
return;
};
} else {
pauseMove();
};
}
public function subArmFocus():void{
armFocus = (armFocus - 1);
if (armFocus < 0){
resetArmFocus();
};
}
public function resetStat():void{
armFocus = 0;
health = MAXHEALTH;
isDead = false;
}
public function resetArmFocus():void{
armFocus = 0;
}
function cfw(_arg1:TimerEvent):void{
canFireWeapon = true;
tCanFireWeapon.reset();
}
function setTarget():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = (pla.x - x);
_local2 = (pla.y - y);
_local3 = Math.atan2(_local2, _local1);
sudut = ((_local3 * 180) / Math.PI);
}
public function deleteEnemy():void{
tRecAF.stop();
tRecAF.removeEventListener(TimerEvent.TIMER, recAF);
tCanFireWeapon.stop();
tCanFireWeapon.removeEventListener(TimerEvent.TIMER, cfw);
tChangeModeWeapon.stop();
tChangeModeWeapon.removeEventListener(TimerEvent.TIMER, cmw);
removeEventListener(Event.ENTER_FRAME, moveEnemy);
}
function recAF(_arg1:TimerEvent):void{
subArmFocus();
}
function pauseMove():void{
if (tChangeModeWeapon.running){
tChangeModeWeapon.stop();
};
}
public function damageWeapon1(_arg1:Number):void{
healthWeapon1 = (healthWeapon1 - _arg1);
}
public function damageWeapon2(_arg1:Number):void{
healthWeapon2 = (healthWeapon2 - _arg1);
}
function cmw(_arg1:TimerEvent):void{
modeFire = (modeFire + 1);
if (modeFire > 6){
modeFire = 1;
};
if ((((healthWeapon1 <= 0)) && ((healthWeapon2 <= 0)))){
if (modeFire == 5){
modeFire = 1;
};
};
switch (modeFire){
case 1:
tChangeModeWeapon.delay = 4000;
tCanFireWeapon.delay = (1000 / 2);
canMove = false;
break;
case 2:
tChangeModeWeapon.delay = 5000;
canMove = false;
break;
case 3:
tChangeModeWeapon.delay = 5000;
tCanFireWeapon.delay = (1000 / 3);
canMove = false;
break;
case 4:
tChangeModeWeapon.delay = 5000;
canMove = true;
break;
case 5:
tChangeModeWeapon.delay = 5000;
tCanFireWeapon.delay = (1000 / 3);
canMove = false;
break;
case 6:
tChangeModeWeapon.delay = 5000;
canMove = true;
break;
};
}
public function getArmFocus():Number{
return (armFocus);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
if (_arg1 < 10){
par.deadBreak = true;
} else {
par.deadBreak = false;
};
efekSound = new hit();
efekSound.play(0, 1);
}
public function addArmFocus(_arg1:Number):void{
armFocus = (armFocus + (_arg1 / 2));
if (armFocus > maxArmFocus){
armFocus = maxArmFocus;
};
}
function resumeMove():void{
if (!tChangeModeWeapon.running){
tChangeModeWeapon.start();
};
}
public function setMaxArmFocus(_arg1:Number):void{
maxArmFocus = (_arg1 / 2);
}
function fireWeapon(){
var _local1:MovieClip;
var _local2:*;
var _local3:Point;
var _local4:*;
if (canFireWeapon){
if (modeFire == 1){
canFireWeapon = false;
tCanFireWeapon.start();
_local2 = 0;
while (_local2 < 20) {
_local1 = new Peluru(x, y, (degreeFire1 + (_local2 * 18)), 2);
_local1.setDamage(10);
par.addChild(_local1);
_local2++;
};
degreeFire1 = (degreeFire1 + 3);
if (degreeFire1 > 180){
degreeFire1 = 0;
};
};
if (modeFire == 3){
canFireWeapon = false;
tCanFireWeapon.start();
_local1 = new Peluru(x, y, sudut, 2);
_local1.setDamage(10);
par.addChild(_local1);
};
if (modeFire == 5){
canFireWeapon = false;
tCanFireWeapon.start();
if (healthWeapon2 > 0){
_local2 = 0;
while (_local2 < 5) {
_local1 = new Peluru(((x + 109.3) + 14.75), ((y + 29.5) + 16), (_local2 * 18), 2);
_local1.setDamage(10);
par.addChild(_local1);
_local2++;
};
};
if (healthWeapon1 > 0){
_local2 = 1;
while (_local2 < 6) {
_local1 = new Peluru(((x - 105) - 14.75), ((y + 29.5) + 16), ((_local2 * 18) + 90), 2);
_local1.setDamage(10);
par.addChild(_local1);
_local2++;
};
};
};
};
}
}
}//package
Section 95
//BossUFOBGM (BossUFOBGM)
package {
import flash.media.*;
public dynamic class BossUFOBGM extends Sound {
}
}//package
Section 96
//buttonFail (buttonFail)
package {
import flash.media.*;
public dynamic class buttonFail extends Sound {
}
}//package
Section 97
//buttonNo (buttonNo)
package {
import flash.media.*;
public dynamic class buttonNo extends Sound {
}
}//package
Section 98
//buttonOk (buttonOk)
package {
import flash.media.*;
public dynamic class buttonOk extends Sound {
}
}//package
Section 99
//Clear (Clear)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Clear extends MovieClip {
public var par;
public function Clear(){
addFrameScript(0, frame1, 59, frame60);
}
function frame1(){
par = this.parent.parent.parent;
par.musicSound = new StageClearBGM();
par.musicChannel = par.musicSound.play(0, 99999);
}
function frame60(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 100
//coinku (coinku)
package {
import flash.media.*;
public dynamic class coinku extends Sound {
}
}//package
Section 101
//dash (dash)
package {
import flash.media.*;
public dynamic class dash extends Sound {
}
}//package
Section 102
//dashstop (dashstop)
package {
import flash.media.*;
public dynamic class dashstop extends Sound {
}
}//package
Section 103
//door (door)
package {
import flash.media.*;
public dynamic class door extends Sound {
}
}//package
Section 104
//DoorClose (DoorClose)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class DoorClose extends MovieClip {
public var goMenu:String;
public var sou:Sound;
public var par;
public function DoorClose(){
addFrameScript(0, frame1, 39, frame40);
}
function frame1(){
sou = new door();
sou.play(0, 1);
}
function frame40(){
stop();
par = this.parent;
par.gotoAndStop(goMenu);
par.removeChild(this);
}
}
}//package
Section 105
//DoorOpen (DoorOpen)
package {
import flash.display.*;
public dynamic class DoorOpen extends MovieClip {
public function DoorOpen(){
addFrameScript(39, frame40);
}
function frame40(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 106
//Duar (Duar)
package {
import flash.display.*;
public dynamic class Duar extends MovieClip {
public function Duar(){
addFrameScript(42, frame43);
}
function frame43(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 107
//EfekAsap (EfekAsap)
package {
import flash.display.*;
public dynamic class EfekAsap extends MovieClip {
public function EfekAsap(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 108
//EfekPutih (EfekPutih)
package {
import flash.display.*;
public dynamic class EfekPutih extends MovieClip {
}
}//package
Section 109
//Electric (Electric)
package {
import flash.media.*;
public dynamic class Electric extends Sound {
}
}//package
Section 110
//EndBGM (EndBGM)
package {
import flash.media.*;
public dynamic class EndBGM extends Sound {
}
}//package
Section 111
//Enemy (Enemy)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
public class Enemy extends MovieClip {
const SPEED:Number = 5;
const MAXHEALTH:Number = 100;
var ctrFire:Number;// = 0
var armFocus:Number;
public var perimeter:MovieClip;
var flightMode:String;
var efekSound:Sound;
public var speed:Number;
public var health:Number;
var adaKoin:Boolean;// = false
var sudut:Number;
var tSetTarget:Timer;
public var isFire:Boolean;
public var jenisWeapon:String;
var maxArmFocus:Number;
var tRecAF:Timer;
public var bodypic:MovieClip;
public var body:MovieClip;
var deadDrop:Boolean;
var par;
public var isDead:Boolean;
var tCanFireWeapon:Timer;
var pla;
var canFireWeapon:Boolean;
public function Enemy():void{
tRecAF = new Timer(100);
tCanFireWeapon = new Timer((1000 / 2));
tSetTarget = new Timer(1000);
ctrFire = 0;
adaKoin = false;
super();
speed = SPEED;
armFocus = 0;
health = MAXHEALTH;
isDead = false;
canFireWeapon = true;
tRecAF.addEventListener(TimerEvent.TIMER, recAF);
tRecAF.start();
tSetTarget.delay = randRange(10, 400);
tSetTarget.addEventListener(TimerEvent.TIMER, setTar);
tSetTarget.start();
this.addEventListener(Event.ENTER_FRAME, moveEnemy);
tCanFireWeapon.addEventListener(TimerEvent.TIMER, cfw);
flightMode = "chase";
}
public function speedY():Number{
return ((Math.sin(((rotation * Math.PI) / 180)) * speed));
}
public function setKoin(_arg1:Boolean):void{
adaKoin = _arg1;
}
function setTar(_arg1:TimerEvent):void{
setTarget();
}
public function deleteEnemy():void{
tRecAF.stop();
tRecAF.removeEventListener(TimerEvent.TIMER, recAF);
tCanFireWeapon.stop();
tCanFireWeapon.removeEventListener(TimerEvent.TIMER, cfw);
tSetTarget.stop();
tSetTarget.removeEventListener(TimerEvent.TIMER, setTar);
removeEventListener(Event.ENTER_FRAME, moveEnemy);
}
function fireWeapon(){
var _local1:MovieClip;
if (canFireWeapon){
canFireWeapon = false;
tCanFireWeapon.start();
_local1 = new Peluru(x, y, rotation, 2);
_local1.setDamage(10);
par.addChild(_local1);
efekSound = new gunenemy2();
efekSound.play(0, 1);
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function subArmFocus():void{
armFocus = (armFocus - 1);
if (armFocus < 0){
resetArmFocus();
};
}
function moveEnemy(_arg1:Event):void{
var _local2:MovieClip;
par = _arg1.currentTarget.parent;
pla = par.player;
if (!par.pauseGame){
if (health > 0){
y = (y + (Math.sin(((rotation * Math.PI) / 180)) * speed));
x = (x + (Math.cos(((rotation * Math.PI) / 180)) * speed));
if (sudut < rotation){
goUp();
};
if (sudut > rotation){
goDown();
};
if (x < -50){
rotation = sudut;
};
if (x > (par.bg.Width + 50)){
rotation = sudut;
};
if (y < -50){
rotation = sudut;
};
if (y > (par.bg.Height - 150)){
flightMode = "avoid";
} else {
flightMode = "chase";
};
if (this.perimeter.hitTestObject(pla)){
ctrFire = (ctrFire + 1);
} else {
ctrFire = (ctrFire - 2);
};
if (ctrFire >= 30){
fireWeapon();
ctrFire = 30;
};
if (ctrFire < 0){
ctrFire = 0;
};
} else {
deleteEnemy();
_local2 = new Bom();
_local2.x = x;
_local2.y = y;
par.addChild(_local2);
if (adaKoin){
_local2 = new Koin();
_local2.x = x;
_local2.y = y;
_local2.name = "koin";
par.addChild(_local2);
};
if (deadDrop){
par.notkilling++;
} else {
par.killing++;
par.kombo++;
if (par.komboCount.running){
par.komboCount.reset;
par.komboCount.start();
} else {
par.komboCount.start();
};
};
par.removeChild(this);
stop();
return;
};
};
}
public function resetStat():void{
speed = SPEED;
armFocus = 0;
health = MAXHEALTH;
isDead = false;
}
public function getArmFocus():Number{
return (armFocus);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
if (_arg1 > 100){
deadDrop = true;
} else {
deadDrop = false;
};
efekSound = new hit();
efekSound.play(0, 1);
}
function cfw(_arg1:TimerEvent):void{
canFireWeapon = true;
tCanFireWeapon.reset();
}
public function resetArmFocus():void{
armFocus = 0;
}
function setTarget():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
if (flightMode == "chase"){
_local1 = (pla.x - x);
_local2 = (pla.y - y);
_local3 = Math.atan2(_local2, _local1);
sudut = ((_local3 * 180) / Math.PI);
};
if (flightMode == "avoid"){
sudut = -90;
};
}
public function setMaxArmFocus(_arg1:Number):void{
maxArmFocus = (_arg1 / 2);
}
public function goDown():void{
rotation = (rotation + speed);
}
public function goUp():void{
rotation = (rotation - speed);
}
public function setLevel(_arg1:Number){
health = (_arg1 * MAXHEALTH);
}
function recAF(_arg1:TimerEvent):void{
subArmFocus();
}
public function addArmFocus(_arg1:Number):void{
armFocus = (armFocus + (_arg1 / 2));
if (armFocus > maxArmFocus){
armFocus = maxArmFocus;
};
}
public function speedX():Number{
return ((Math.cos(((rotation * Math.PI) / 180)) * speed));
}
}
}//package
Section 112
//Enemy2 (Enemy2)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
public class Enemy2 extends MovieClip {
const SPEED:Number = 5;
const MAXHEALTH:Number = 100;
var ctrFire:Number;// = 0
var armFocus:Number;
public var perimeter:MovieClip;
var flightMode:String;
var efekSound:Sound;
public var speed:Number;
public var health:Number;
var adaKoin:Boolean;// = false
var sudut:Number;
var tSetTarget:Timer;
public var isFire:Boolean;
public var jenisWeapon:String;
var maxArmFocus:Number;
var tRecAF:Timer;
public var bodypic:MovieClip;
public var body:MovieClip;
var tar;
var par;
public var isDead:Boolean;
var deadDrop:Boolean;
var tCanFireWeapon:Timer;
var pla;
var canFireWeapon:Boolean;
public function Enemy2():void{
tRecAF = new Timer(100);
tCanFireWeapon = new Timer((1000 / 4));
tSetTarget = new Timer(1000);
ctrFire = 0;
adaKoin = false;
super();
speed = SPEED;
armFocus = 0;
health = MAXHEALTH;
isDead = false;
canFireWeapon = true;
tRecAF.addEventListener(TimerEvent.TIMER, recAF);
tRecAF.start();
tSetTarget.delay = randRange(10, 400);
tSetTarget.addEventListener(TimerEvent.TIMER, setTar);
tSetTarget.start();
this.addEventListener(Event.ENTER_FRAME, moveEnemy);
tCanFireWeapon.addEventListener(TimerEvent.TIMER, cfw);
flightMode = "chase";
}
public function speedY():Number{
return ((Math.sin(((rotation * Math.PI) / 180)) * speed));
}
public function setKoin(_arg1:Boolean):void{
adaKoin = _arg1;
}
function setTar(_arg1:TimerEvent):void{
setTarget();
}
public function deleteEnemy():void{
tRecAF.stop();
tRecAF.removeEventListener(TimerEvent.TIMER, recAF);
tCanFireWeapon.stop();
tCanFireWeapon.removeEventListener(TimerEvent.TIMER, cfw);
tSetTarget.stop();
tSetTarget.removeEventListener(TimerEvent.TIMER, setTar);
removeEventListener(Event.ENTER_FRAME, moveEnemy);
}
function fireWeapon(){
var _local1:MovieClip;
if (canFireWeapon){
canFireWeapon = false;
tCanFireWeapon.start();
_local1 = new Peluru(x, y, rotation, 2);
_local1.setDamage(10);
par.addChild(_local1);
efekSound = new gunenemy2();
efekSound.play(0, 1);
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function subArmFocus():void{
armFocus = (armFocus - 1);
if (armFocus < 0){
resetArmFocus();
};
}
function moveEnemy(_arg1:Event):void{
var _local2:MovieClip;
par = _arg1.currentTarget.parent;
pla = par.player;
if (!par.pauseGame){
if (health > 0){
y = (y + (Math.sin(((rotation * Math.PI) / 180)) * speed));
x = (x + (Math.cos(((rotation * Math.PI) / 180)) * speed));
if (sudut < rotation){
goUp();
};
if (sudut > rotation){
goDown();
};
if (x < -50){
rotation = sudut;
};
if (x > (par.bg.Width + 50)){
rotation = sudut;
};
if (y < -50){
rotation = sudut;
};
if (y > (par.bg.Height - 150)){
flightMode = "avoid";
} else {
flightMode = "chase";
};
if (tar == null){
} else {
if (this.perimeter.hitTestObject(tar)){
ctrFire = (ctrFire + 1);
} else {
ctrFire = (ctrFire - 2);
};
};
if (ctrFire >= 30){
fireWeapon();
ctrFire = 30;
};
if (ctrFire < 0){
ctrFire = 0;
};
} else {
deleteEnemy();
_local2 = new Bom();
_local2.x = x;
_local2.y = y;
par.addChild(_local2);
if (adaKoin){
_local2 = new Koin();
_local2.x = x;
_local2.y = y;
_local2.name = "koin";
par.addChild(_local2);
};
if (deadDrop){
par.notkilling++;
} else {
par.killing++;
par.kombo++;
if (par.komboCount.running){
par.komboCount.reset;
par.komboCount.start();
} else {
par.komboCount.start();
};
};
par.removeChild(this);
stop();
return;
};
};
}
public function resetStat():void{
speed = SPEED;
armFocus = 0;
health = MAXHEALTH;
isDead = false;
}
public function getArmFocus():Number{
return (armFocus);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
if (_arg1 > 100){
deadDrop = true;
} else {
deadDrop = false;
};
efekSound = new hit();
efekSound.play(0, 1);
}
function cfw(_arg1:TimerEvent):void{
canFireWeapon = true;
tCanFireWeapon.reset();
}
public function resetArmFocus():void{
armFocus = 0;
}
function setTarget():void{
var _local1:Array;
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
var _local8:Number;
var _local9:Number;
var _local10:Number;
if (flightMode == "chase"){
_local1 = new Array();
_local2 = 0;
while (_local2 < par.numChildren) {
if ((((((par.getChildAt(_local2) is Player)) || ((par.getChildAt(_local2) is Wingman)))) || ((par.getChildAt(_local2) is Wingman2)))){
_local1.push(par.getChildAt(_local2));
};
_local2++;
};
_local3 = 9999;
_local4 = 9999;
_local5 = 9999;
for (_local7 in _local1) {
_local6 = Math.round(Math.sqrt((Math.pow((x - _local1[_local7].x), 2) + Math.pow((y - _local1[_local7].y), 2))));
if (_local5 > _local6){
_local5 = _local6;
_local3 = _local1[_local7].x;
_local4 = _local1[_local7].y;
tar = _local1[_local7];
};
};
_local8 = (_local3 - x);
_local9 = (_local4 - y);
_local10 = Math.atan2(_local9, _local8);
sudut = ((_local10 * 180) / Math.PI);
};
if (flightMode == "avoid"){
sudut = -90;
};
}
public function setMaxArmFocus(_arg1:Number):void{
maxArmFocus = (_arg1 / 2);
}
public function goDown():void{
rotation = (rotation + speed);
}
public function goUp():void{
rotation = (rotation - speed);
}
public function setLevel(_arg1:Number){
health = (_arg1 * MAXHEALTH);
}
function recAF(_arg1:TimerEvent):void{
subArmFocus();
}
public function addArmFocus(_arg1:Number):void{
armFocus = (armFocus + (_arg1 / 2));
if (armFocus > maxArmFocus){
armFocus = maxArmFocus;
};
}
public function speedX():Number{
return ((Math.cos(((rotation * Math.PI) / 180)) * speed));
}
}
}//package
Section 113
//Enemy3 (Enemy3)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
public class Enemy3 extends MovieClip {
const SPEED:Number = 5;
const MAXHEALTH:Number = 100;
var ctrFire:Number;// = 0
var armFocus:Number;
public var perimeter:MovieClip;
var flightMode:String;
var efekSound:Sound;
public var speed:Number;
public var health:Number;
var adaKoin:Boolean;// = false
var sudut:Number;
var tSetTarget:Timer;
public var isFire:Boolean;
public var jenisWeapon:String;
var maxArmFocus:Number;
var tRecAF:Timer;
public var bodypic:MovieClip;
public var body:MovieClip;
var deadDrop:Boolean;
var par;
public var isDead:Boolean;
var tCanFireWeapon:Timer;
var pla;
var canFireWeapon:Boolean;
public function Enemy3():void{
tRecAF = new Timer(100);
tCanFireWeapon = new Timer((1000 / 3));
tSetTarget = new Timer(1000);
ctrFire = 0;
adaKoin = false;
super();
speed = SPEED;
armFocus = 0;
health = MAXHEALTH;
isDead = false;
canFireWeapon = true;
tRecAF.addEventListener(TimerEvent.TIMER, recAF);
tRecAF.start();
tSetTarget.delay = randRange(10, 400);
tSetTarget.addEventListener(TimerEvent.TIMER, setTar);
tSetTarget.start();
this.addEventListener(Event.ENTER_FRAME, moveEnemy);
tCanFireWeapon.addEventListener(TimerEvent.TIMER, cfw);
flightMode = "chase";
}
public function speedY():Number{
return ((Math.sin(((rotation * Math.PI) / 180)) * speed));
}
public function setKoin(_arg1:Boolean):void{
adaKoin = _arg1;
}
function setTar(_arg1:TimerEvent):void{
setTarget();
}
public function deleteEnemy():void{
tRecAF.stop();
tRecAF.removeEventListener(TimerEvent.TIMER, recAF);
tCanFireWeapon.stop();
tCanFireWeapon.removeEventListener(TimerEvent.TIMER, cfw);
tSetTarget.stop();
tSetTarget.removeEventListener(TimerEvent.TIMER, setTar);
removeEventListener(Event.ENTER_FRAME, moveEnemy);
}
function fireWeapon(){
var _local1:MovieClip;
if (canFireWeapon){
canFireWeapon = false;
tCanFireWeapon.start();
_local1 = new Peluru(x, y, rotation, 2);
_local1.setDamage(10);
par.addChild(_local1);
efekSound = new gunenemy1();
efekSound.play(0, 1);
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function subArmFocus():void{
armFocus = (armFocus - 1);
if (armFocus < 0){
resetArmFocus();
};
}
function moveEnemy(_arg1:Event):void{
var _local2:MovieClip;
par = _arg1.currentTarget.parent;
pla = par.player;
if (!par.pauseGame){
if (health > 0){
y = (y + (Math.sin(((rotation * Math.PI) / 180)) * speed));
x = (x + (Math.cos(((rotation * Math.PI) / 180)) * speed));
if (sudut < rotation){
goUp();
};
if (sudut > rotation){
goDown();
};
if (x < -50){
rotation = sudut;
};
if (x > (par.bg.Width + 50)){
rotation = sudut;
};
if (y < -50){
rotation = sudut;
};
if (y > (par.bg.Height - 150)){
flightMode = "avoid";
} else {
flightMode = "chase";
};
if (this.perimeter.hitTestObject(pla)){
ctrFire = (ctrFire + 1);
} else {
ctrFire = (ctrFire - 2);
};
if (ctrFire >= 30){
fireWeapon();
ctrFire = 30;
};
if (ctrFire < 0){
ctrFire = 0;
};
} else {
deleteEnemy();
_local2 = new Bom();
_local2.x = x;
_local2.y = y;
par.addChild(_local2);
if (adaKoin){
_local2 = new Koin();
_local2.x = x;
_local2.y = y;
_local2.name = "koin";
par.addChild(_local2);
};
if (deadDrop){
par.notkilling++;
} else {
par.killing++;
par.kombo++;
if (par.komboCount.running){
par.komboCount.reset;
par.komboCount.start();
} else {
par.komboCount.start();
};
};
par.removeChild(this);
stop();
return;
};
};
}
public function resetStat():void{
speed = SPEED;
armFocus = 0;
health = MAXHEALTH;
isDead = false;
}
public function getArmFocus():Number{
return (armFocus);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
if (_arg1 > 100){
deadDrop = true;
} else {
deadDrop = false;
};
efekSound = new hit();
efekSound.play(0, 1);
}
function cfw(_arg1:TimerEvent):void{
canFireWeapon = true;
tCanFireWeapon.reset();
}
public function resetArmFocus():void{
armFocus = 0;
}
function setTarget():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
if (flightMode == "chase"){
_local1 = (pla.x - x);
_local2 = (pla.y - y);
_local3 = Math.atan2(_local2, _local1);
sudut = ((_local3 * 180) / Math.PI);
};
if (flightMode == "avoid"){
sudut = -90;
};
}
public function setMaxArmFocus(_arg1:Number):void{
maxArmFocus = (_arg1 / 2);
}
public function goDown():void{
rotation = (rotation + speed);
}
public function goUp():void{
rotation = (rotation - speed);
}
public function setLevel(_arg1:Number){
health = (_arg1 * MAXHEALTH);
}
function recAF(_arg1:TimerEvent):void{
subArmFocus();
}
public function addArmFocus(_arg1:Number):void{
armFocus = (armFocus + (_arg1 / 2));
if (armFocus > maxArmFocus){
armFocus = maxArmFocus;
};
}
public function speedX():Number{
return ((Math.cos(((rotation * Math.PI) / 180)) * speed));
}
}
}//package
Section 114
//Enemy4 (Enemy4)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
public class Enemy4 extends MovieClip {
const SPEED:Number = 5;
const MAXHEALTH:Number = 100;
var ctrFire:Number;// = 0
var armFocus:Number;
public var perimeter:MovieClip;
var flightMode:String;
var efekSound:Sound;
public var speed:Number;
public var health:Number;
var adaKoin:Boolean;// = false
var sudut:Number;
var tSetTarget:Timer;
public var isFire:Boolean;
public var jenisWeapon:String;
var maxArmFocus:Number;
var tRecAF:Timer;
public var bodypic:MovieClip;
public var body:MovieClip;
var tar;
var par;
public var isDead:Boolean;
var deadDrop:Boolean;
var tCanFireWeapon:Timer;
var pla;
var canFireWeapon:Boolean;
public function Enemy4():void{
tRecAF = new Timer(100);
tCanFireWeapon = new Timer((1000 / 5));
tSetTarget = new Timer(1000);
ctrFire = 0;
adaKoin = false;
super();
speed = SPEED;
armFocus = 0;
health = MAXHEALTH;
isDead = false;
canFireWeapon = true;
tRecAF.addEventListener(TimerEvent.TIMER, recAF);
tRecAF.start();
tSetTarget.delay = randRange(10, 400);
tSetTarget.addEventListener(TimerEvent.TIMER, setTar);
tSetTarget.start();
this.addEventListener(Event.ENTER_FRAME, moveEnemy);
tCanFireWeapon.addEventListener(TimerEvent.TIMER, cfw);
flightMode = "chase";
}
public function speedY():Number{
return ((Math.sin(((rotation * Math.PI) / 180)) * speed));
}
public function setKoin(_arg1:Boolean):void{
adaKoin = _arg1;
}
function setTar(_arg1:TimerEvent):void{
setTarget();
}
public function deleteEnemy():void{
tRecAF.stop();
tRecAF.removeEventListener(TimerEvent.TIMER, recAF);
tCanFireWeapon.stop();
tCanFireWeapon.removeEventListener(TimerEvent.TIMER, cfw);
tSetTarget.stop();
tSetTarget.removeEventListener(TimerEvent.TIMER, setTar);
removeEventListener(Event.ENTER_FRAME, moveEnemy);
}
function fireWeapon(){
var _local1:MovieClip;
var _local2:Sound;
if (canFireWeapon){
canFireWeapon = false;
tCanFireWeapon.start();
_local1 = new Peluru(x, y, rotation, 2);
_local1.setDamage(10);
par.addChild(_local1);
_local2 = new gunenemy1();
_local2.play(0, 1);
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function subArmFocus():void{
armFocus = (armFocus - 1);
if (armFocus < 0){
resetArmFocus();
};
}
function moveEnemy(_arg1:Event):void{
var _local2:MovieClip;
par = _arg1.currentTarget.parent;
pla = par.player;
if (!par.pauseGame){
if (health > 0){
y = (y + (Math.sin(((rotation * Math.PI) / 180)) * speed));
x = (x + (Math.cos(((rotation * Math.PI) / 180)) * speed));
if (sudut < rotation){
goUp();
};
if (sudut > rotation){
goDown();
};
if (x < -50){
rotation = sudut;
};
if (x > (par.bg.Width + 50)){
rotation = sudut;
};
if (y < -50){
rotation = sudut;
};
if (y > (par.bg.Height - 150)){
flightMode = "avoid";
} else {
flightMode = "chase";
};
if (tar == null){
} else {
if (this.perimeter.hitTestObject(tar)){
ctrFire = (ctrFire + 1);
} else {
ctrFire = (ctrFire - 2);
};
};
if (ctrFire >= 30){
fireWeapon();
ctrFire = 30;
};
if (ctrFire < 0){
ctrFire = 0;
};
} else {
deleteEnemy();
_local2 = new Bom();
_local2.x = x;
_local2.y = y;
par.addChild(_local2);
if (adaKoin){
_local2 = new Koin();
_local2.x = x;
_local2.y = y;
_local2.name = "koin";
par.addChild(_local2);
};
if (deadDrop){
par.notkilling++;
} else {
par.killing++;
par.kombo++;
if (par.komboCount.running){
par.komboCount.reset;
par.komboCount.start();
} else {
par.komboCount.start();
};
};
par.removeChild(this);
stop();
return;
};
};
}
public function resetStat():void{
speed = SPEED;
armFocus = 0;
health = MAXHEALTH;
isDead = false;
}
public function getArmFocus():Number{
return (armFocus);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
if (_arg1 > 100){
deadDrop = true;
} else {
deadDrop = false;
};
efekSound = new hit();
efekSound.play(0, 1);
}
function cfw(_arg1:TimerEvent):void{
canFireWeapon = true;
tCanFireWeapon.reset();
}
public function resetArmFocus():void{
armFocus = 0;
}
function setTarget():void{
var _local1:Array;
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
var _local8:Number;
var _local9:Number;
var _local10:Number;
if (flightMode == "chase"){
_local1 = new Array();
_local2 = 0;
while (_local2 < par.numChildren) {
if ((((((par.getChildAt(_local2) is Player)) || ((par.getChildAt(_local2) is Wingman)))) || ((par.getChildAt(_local2) is Wingman2)))){
_local1.push(par.getChildAt(_local2));
};
_local2++;
};
_local3 = 9999;
_local4 = 9999;
_local5 = 9999;
for (_local7 in _local1) {
_local6 = Math.round(Math.sqrt((Math.pow((x - _local1[_local7].x), 2) + Math.pow((y - _local1[_local7].y), 2))));
if (_local5 > _local6){
_local5 = _local6;
_local3 = _local1[_local7].x;
_local4 = _local1[_local7].y;
tar = _local1[_local7];
};
};
_local8 = (_local3 - x);
_local9 = (_local4 - y);
_local10 = Math.atan2(_local9, _local8);
sudut = ((_local10 * 180) / Math.PI);
};
if (flightMode == "avoid"){
sudut = -90;
};
}
public function setMaxArmFocus(_arg1:Number):void{
maxArmFocus = (_arg1 / 2);
}
public function goDown():void{
rotation = (rotation + speed);
}
public function goUp():void{
rotation = (rotation - speed);
}
public function setLevel(_arg1:Number){
health = (_arg1 * MAXHEALTH);
}
function recAF(_arg1:TimerEvent):void{
subArmFocus();
}
public function addArmFocus(_arg1:Number):void{
armFocus = (armFocus + (_arg1 / 2));
if (armFocus > maxArmFocus){
armFocus = maxArmFocus;
};
}
public function speedX():Number{
return ((Math.cos(((rotation * Math.PI) / 180)) * speed));
}
}
}//package
Section 115
//EnemyGround (EnemyGround)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
public class EnemyGround extends MovieClip {
const MAXHEALTH:Number = 100;
var ctrFire:Number;// = 0
var armFocus:Number;
public var perimeter:MovieClip;
var efekSound:Sound;
public var health:Number;
var sudut:Number;
public var isFire:Boolean;
public var jenisWeapon:String;
var deadDrop:Boolean;
var maxArmFocus:Number;
var tRecAF:Timer;
public var bodypic:MovieClip;
public var body:MovieClip;
var par;
public var isDead:Boolean;
var tCanFireWeapon:Timer;
public var bodyMC:MovieClip;
var canFireWeapon:Boolean;
var pla;
public function EnemyGround():void{
tRecAF = new Timer(100);
tCanFireWeapon = new Timer((1000 / 1));
ctrFire = 0;
super();
armFocus = 0;
health = MAXHEALTH;
isDead = false;
canFireWeapon = true;
tRecAF.addEventListener(TimerEvent.TIMER, recAF);
tRecAF.start();
this.addEventListener(Event.ENTER_FRAME, moveEnemy);
tCanFireWeapon.addEventListener(TimerEvent.TIMER, cfw);
}
public function speedY():Number{
return (0);
}
function fireWeapon(){
var _local1:MovieClip;
if (canFireWeapon){
canFireWeapon = false;
tCanFireWeapon.start();
_local1 = new Peluru(x, y, (perimeter.rotation - 90), 2);
_local1.setDamage(10);
par.addChild(_local1);
efekSound = new weaponground();
efekSound.play(0, 1);
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function subArmFocus():void{
armFocus = (armFocus - 1);
if (armFocus < 0){
resetArmFocus();
};
}
function moveEnemy(_arg1:Event):void{
var _local2:MovieClip;
par = _arg1.currentTarget.parent;
pla = par.player;
if (!par.pauseGame){
if (health > 0){
setTarget();
if (this.perimeter.hitTestObject(pla)){
fireWeapon();
};
} else {
deleteEnemy();
_local2 = new Bom();
_local2.x = x;
_local2.y = y;
if (deadDrop){
par.notkilling++;
} else {
par.killing++;
par.kombo++;
if (par.komboCount.running){
par.komboCount.reset;
par.komboCount.start();
} else {
par.komboCount.start();
};
};
par.addChild(_local2);
par.removeChild(this);
stop();
return;
};
};
}
public function resetStat():void{
armFocus = 0;
health = MAXHEALTH;
isDead = false;
}
public function getArmFocus():Number{
return (armFocus);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
if (_arg1 > 100){
deadDrop = true;
} else {
deadDrop = false;
};
efekSound = new hit();
efekSound.play(0, 1);
}
public function resetArmFocus():void{
armFocus = 0;
}
function setTarget():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = (pla.x - x);
_local2 = (pla.y - y);
_local3 = Math.atan2(_local2, _local1);
sudut = ((_local3 * 180) / Math.PI);
bodyMC.lshot.rotation = (sudut + 90);
perimeter.rotation = (sudut + 90);
}
public function addArmFocus(_arg1:Number):void{
armFocus = (armFocus + (_arg1 / 2));
if (armFocus > maxArmFocus){
armFocus = maxArmFocus;
};
}
function cfw(_arg1:TimerEvent):void{
canFireWeapon = true;
tCanFireWeapon.reset();
}
public function setLevel(_arg1:Number){
health = (_arg1 * MAXHEALTH);
}
function recAF(_arg1:TimerEvent):void{
subArmFocus();
}
public function deleteEnemy():void{
tRecAF.stop();
tRecAF.removeEventListener(TimerEvent.TIMER, recAF);
tCanFireWeapon.stop();
tCanFireWeapon.removeEventListener(TimerEvent.TIMER, cfw);
removeEventListener(Event.ENTER_FRAME, moveEnemy);
}
public function setMaxArmFocus(_arg1:Number):void{
maxArmFocus = (_arg1 / 2);
}
public function speedX():Number{
return (0);
}
}
}//package
Section 116
//explosion (explosion)
package {
import flash.media.*;
public dynamic class explosion extends Sound {
}
}//package
Section 117
//FinalBossBGM (FinalBossBGM)
package {
import flash.media.*;
public dynamic class FinalBossBGM extends Sound {
}
}//package
Section 118
//GameOverBGM (GameOverBGM)
package {
import flash.media.*;
public dynamic class GameOverBGM extends Sound {
}
}//package
Section 119
//gunenemy1 (gunenemy1)
package {
import flash.media.*;
public dynamic class gunenemy1 extends Sound {
}
}//package
Section 120
//gunenemy2 (gunenemy2)
package {
import flash.media.*;
public dynamic class gunenemy2 extends Sound {
}
}//package
Section 121
//gunhero (gunhero)
package {
import flash.media.*;
public dynamic class gunhero extends Sound {
}
}//package
Section 122
//hit (hit)
package {
import flash.media.*;
public dynamic class hit extends Sound {
}
}//package
Section 123
//hitefek (hitefek)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public dynamic class hitefek extends MovieClip {
public var tFade:Timer;
public function hitefek(){
addFrameScript(0, frame1);
}
function frame1(){
tFade = new Timer(200);
tFade.addEventListener(TimerEvent.TIMER, fade);
tFade.start();
}
public function fade(_arg1:TimerEvent):void{
tFade.reset();
tFade.removeEventListener(TimerEvent.TIMER, fade);
this.parent.removeChild(this);
}
}
}//package
Section 124
//hitefek2 (hitefek2)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public dynamic class hitefek2 extends MovieClip {
public var tFade:Timer;
public function hitefek2(){
addFrameScript(0, frame1);
}
function frame1(){
tFade = new Timer(200);
tFade.addEventListener(TimerEvent.TIMER, fade);
tFade.start();
}
public function fade(_arg1:TimerEvent):void{
tFade.reset();
tFade.removeEventListener(TimerEvent.TIMER, fade);
this.parent.removeChild(this);
}
}
}//package
Section 125
//hitefek3 (hitefek3)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public dynamic class hitefek3 extends MovieClip {
public var tFade:Timer;
public function hitefek3(){
addFrameScript(0, frame1);
}
function frame1(){
tFade = new Timer(300);
tFade.addEventListener(TimerEvent.TIMER, fade);
tFade.start();
}
public function fade(_arg1:TimerEvent):void{
tFade.reset();
tFade.removeEventListener(TimerEvent.TIMER, fade);
this.parent.removeChild(this);
}
}
}//package
Section 126
//hitmetal (hitmetal)
package {
import flash.media.*;
public dynamic class hitmetal extends Sound {
}
}//package
Section 127
//keterangan (keterangan)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class keterangan extends MovieClip {
public var a;
public var medals:Array;
public var i;
public var te:int;
public var new0:MovieClip;
public var coin:TextField;
public var new4:MovieClip;
public var mdl11:MovieClip;
public var mdl12:MovieClip;
public var mdl13:MovieClip;
public var mdl14:MovieClip;
public var mdl15:MovieClip;
public var mdl16:MovieClip;
public var mdl17:MovieClip;
public var new6:MovieClip;
public var new8:MovieClip;
public var new2:MovieClip;
public var mdl10:MovieClip;
public var new5:MovieClip;
public var new7:MovieClip;
public var new9:MovieClip;
public var new1:MovieClip;
public var new3:MovieClip;
public var acc:TextField;
public var par;
public var mdl0:MovieClip;
public var mdl1:MovieClip;
public var mdl3:MovieClip;
public var mdl5:MovieClip;
public var mdl7:MovieClip;
public var mdl8:MovieClip;
public var mdl9:MovieClip;
public var mdl2:MovieClip;
public var mdl4:MovieClip;
public var mdl6:MovieClip;
public var kill:TextField;
public var btnB:SimpleButton;
public var new11:MovieClip;
public var new12:MovieClip;
public var new13:MovieClip;
public var new14:MovieClip;
public var new16:MovieClip;
public var new17:MovieClip;
public var new10:MovieClip;
public var new15:MovieClip;
public var part;
public function keterangan(){
addFrameScript(29, frame30);
}
public function btnHE(_arg1:MouseEvent):void{
_arg1.currentTarget.parent.textKet.visible = false;
}
public function btnHD(_arg1:MouseEvent):void{
if (_arg1.currentTarget.parent.black.visible == false){
_arg1.currentTarget.parent.textKet.visible = true;
};
}
function frame30(){
stop();
part = this.parent.parent.parent;
par = this.parent;
medals = new Array();
medals = part.medals;
kill.text = par.main.killing;
te = Math.round(((part.hit / part.shot) * 100));
acc.text = te.toString();
coin.text = part.koin;
btnB.addEventListener(MouseEvent.CLICK, clickB);
for (i in medals) {
if ((((medals[i] == 1)) || ((medals[i] == 0)))){
a = getChildByName(("new" + i));
a.visible = false;
};
};
mdl0.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl0.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl1.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl1.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl2.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl2.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl3.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl3.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl4.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl4.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl5.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl5.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl6.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl6.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl7.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl7.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl8.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl8.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl9.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl9.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl10.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl10.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl11.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl11.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl12.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl12.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl13.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl13.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl14.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl14.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl15.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl15.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl16.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl16.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
mdl17.body.addEventListener(MouseEvent.MOUSE_OVER, btnHD);
mdl17.body.addEventListener(MouseEvent.MOUSE_OUT, btnHE);
}
public function clickB(_arg1:MouseEvent):void{
par.main.NextStage();
part.musicChannel.stop();
}
}
}//package
Section 128
//Koin (Koin)
package {
import flash.display.*;
public dynamic class Koin extends MovieClip {
public var spining:Number;
public function Koin(){
addFrameScript(0, frame1, 25, frame26, 49, frame50);
}
function frame1(){
spining = 6;
}
function frame26(){
stop();
spining--;
if (spining <= 0){
spining = 4;
gotoAndPlay(27);
} else {
gotoAndPlay(2);
};
}
function frame50(){
stop();
spining--;
if (spining <= 0){
this.parent.removeChild(this);
} else {
gotoAndPlay(27);
};
}
}
}//package
Section 129
//Laser (Laser)
package {
import flash.display.*;
public dynamic class Laser extends MovieClip {
}
}//package
Section 130
//laserbeam (laserbeam)
package {
import flash.media.*;
public dynamic class laserbeam extends Sound {
}
}//package
Section 131
//laserbeamrobot (laserbeamrobot)
package {
import flash.media.*;
public dynamic class laserbeamrobot extends Sound {
}
}//package
Section 132
//LaserBig (LaserBig)
package {
import flash.display.*;
public dynamic class LaserBig extends MovieClip {
}
}//package
Section 133
//laserrobot (laserrobot)
package {
import flash.media.*;
public dynamic class laserrobot extends Sound {
}
}//package
Section 134
//LaserShot (LaserShot)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class LaserShot extends MovieClip {
public var tShade:Timer;
public var efekSound:Sound;
public var sc:SoundChannel;
public var lhit2:MovieClip;
public var lhit:MovieClip;
public var showL:MovieClip;
public function LaserShot(){
addFrameScript(0, frame1);
}
public function cfw(_arg1:TimerEvent):void{
tShade.stop();
tShade.removeEventListener(TimerEvent.TIMER, cfw);
stop();
removeEventListener(Event.ENTER_FRAME, moveIn);
sc.stop();
this.parent.removeChild(this);
}
function frame1(){
tShade = new Timer(5000);
tShade.addEventListener(TimerEvent.TIMER, cfw);
tShade.start();
addEventListener(Event.ENTER_FRAME, moveIn);
efekSound = new laserbeam();
sc = efekSound.play(0, 99999999);
}
public function moveIn(_arg1:Event):void{
var _local2:*;
_local2 = this.parent;
x = _arg1.currentTarget.parent.player.x;
y = _arg1.currentTarget.parent.player.y;
lhit.x = (showL.width - 10);
lhit2.x = (showL.width - 10);
rotation = _arg1.currentTarget.parent.player.rotation;
if (_local2.pauseGame){
if (tShade.running){
tShade.stop();
sc.stop();
};
} else {
if (!tShade.running){
tShade.start();
sc = efekSound.play(0, 999999999);
};
};
}
}
}//package
Section 135
//Last (Last)
package {
import flash.display.*;
public dynamic class Last extends MovieClip {
public function Last(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 136
//MainMenuMusic (MainMenuMusic)
package {
import flash.media.*;
public dynamic class MainMenuMusic extends Sound {
}
}//package
Section 137
//MapSelectMusic (MapSelectMusic)
package {
import flash.media.*;
public dynamic class MapSelectMusic extends Sound {
}
}//package
Section 138
//Meteor (Meteor)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
public class Meteor extends MovieClip {
const MAXSPEED = 6;
const MAXHEALTH:Number = 30;
var speed:Number;
public var health:Number;
var par;
var dx:Number;
var dy:Number;
public function Meteor():void{
health = MAXHEALTH;
speed = MAXSPEED;
dx = (-1 * randRange((speed / 2), speed));
dy = randRange((speed / 4), (speed / 2));
this.addEventListener(Event.ENTER_FRAME, moveMeteor);
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((((Math.random() * _arg2) - _arg1) + 1)) + _arg1);
return (_local3);
}
public function deleteMeteor():void{
removeEventListener(Event.ENTER_FRAME, moveMeteor);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
}
function moveMeteor(_arg1:Event):void{
par = _arg1.currentTarget.parent;
if (health > 0){
x = (x + dx);
y = (y + dy);
} else {
deleteMeteor();
par.removeChild(this);
stop();
return;
};
}
}
}//package
Section 139
//Next (Next)
package {
import flash.display.*;
public dynamic class Next extends MovieClip {
public function Next(){
addFrameScript(59, frame60);
}
function frame60(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 140
//Over (Over)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
import flash.geom.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.system.*;
import flash.xml.*;
public dynamic class Over extends MovieClip {
public var par;
public function Over(){
addFrameScript(0, frame1, 239, frame240);
}
function frame1(){
par = this.parent.parent.parent;
par.musicChannel.stop();
par.musicSound = new GameOverBGM();
par.musicChannel = par.musicSound.play(0, 2);
}
function frame240(){
stop();
this.parent.removeChild(this);
}
}
}//package
Section 141
//Peluru (Peluru)
package {
import flash.events.*;
import flash.display.*;
public class Peluru extends MovieClip {
var focus:Number;
var ySpeed:Number;
public var speed:Number;
var lOr:Number;
var tx:Number;
var damage:Number;
var nSudut:Number;
var ty:Number;
var par;
public var tag:Number;
var xSpeed:Number;
var thisBullet:MovieClip;
var lifeTime:Number;
public function Peluru(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
speed = 20;
this.x = _arg1;
this.y = _arg2;
tag = _arg4;
rotation = _arg3;
this.addEventListener(Event.ADDED, initialize);
lifeTime = 25;
}
public function getLOR():Number{
return (lOr);
}
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);
this.addEventListener(Event.ENTER_FRAME, moveBullet);
}
function moveBullet(_arg1:Event):void{
var _local2:Boolean;
var _local3:Boolean;
var _local4:MovieClip;
_local2 = false;
_local3 = false;
par = _arg1.currentTarget.parent;
if (!par.pauseGame){
if ((((((((((this.x < 0)) || ((this.x > par.bg.Width)))) || ((this.y < 0)))) || ((this.y > par.bg.Height)))) || ((lifeTime < 0)))){
deleteBullet();
return;
};
_local2 = true;
if (_local2){
lifeTime--;
this.x = (this.x + xSpeed);
this.y = (this.y + ySpeed);
};
};
}
public function deleteBullet():void{
this.removeEventListener(Event.ENTER_FRAME, moveBullet);
this.removeEventListener(Event.ADDED, initialize);
this.parent.removeChild(thisBullet);
}
public function damaged():Number{
return (damage);
}
}
}//package
Section 142
//Player (Player)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
public class Player extends MovieClip {
const SPEED:Number = 5;
public const WEAPONDAMAGE:Number = 10;
public const MAXHEALTH:Number = 150;
var armFocus:Number;
var tempRun:Array;
var tSlower:Timer;
public var weaponFireRateLevel:Number;// = 1
var efekSound:Sound;
public var boosterGauge:Number;
public var speed:Number;
public var health:Number;
var tBooster:Timer;
public var isFire:Boolean;
public var jenisWeapon:String;
public var healthLevel:Number;// = 1
var maxArmFocus:Number;// = 4
var tRecAF:Timer;
var par;
public var isDead:Boolean;
var tStoper:Timer;
var tCanFireWeapon:Timer;
public var weaponLevel:Number;// = 1
var canFireWeapon:Boolean;
public var laserGauge:Number;
public function Player():void{
maxArmFocus = 4;
tRecAF = new Timer(100);
tCanFireWeapon = new Timer((1000 / 10));
tBooster = new Timer(250);
tStoper = new Timer(200);
tSlower = new Timer(300);
healthLevel = 1;
weaponLevel = 1;
weaponFireRateLevel = 1;
super();
speed = SPEED;
armFocus = 0;
health = (MAXHEALTH * healthLevel);
isDead = false;
canFireWeapon = true;
tRecAF.addEventListener(TimerEvent.TIMER, recAF);
tRecAF.start();
tCanFireWeapon.addEventListener(TimerEvent.TIMER, cfw);
tBooster.addEventListener(TimerEvent.TIMER, bost);
tStoper.addEventListener(TimerEvent.TIMER, sto);
tSlower.addEventListener(TimerEvent.TIMER, slo);
boosterGauge = 0;
laserGauge = 0;
this.addEventListener(Event.ENTER_FRAME, movePlayer);
}
public function speedY():Number{
return ((Math.sin(((rotation * Math.PI) / 180)) * speed));
}
public function setLevel(_arg1:Number, _arg2:Number, _arg3:Number){
healthLevel = _arg1;
weaponLevel = _arg2;
weaponFireRateLevel = _arg3;
health = (healthLevel * MAXHEALTH);
tCanFireWeapon.delay = (1000 / (5 + (5 * weaponFireRateLevel)));
}
public function deletePlayer():void{
tRecAF.stop();
tRecAF.removeEventListener(TimerEvent.TIMER, recAF);
tCanFireWeapon.stop();
tCanFireWeapon.removeEventListener(TimerEvent.TIMER, cfw);
tBooster.stop();
tBooster.removeEventListener(TimerEvent.TIMER, bost);
tStoper.stop();
tStoper.removeEventListener(TimerEvent.TIMER, sto);
tSlower.stop();
tSlower.removeEventListener(TimerEvent.TIMER, slo);
removeEventListener(Event.ENTER_FRAME, movePlayer);
}
function fireWeapon(){
var _local1:Number;
var _local2:MovieClip;
if (((canFireWeapon) && ((par.getChildByName("lasershot") == null)))){
canFireWeapon = false;
tCanFireWeapon.start();
if (randRange(1, 10) <= 6){
_local1 = 0;
} else {
if (randRange(1, 10) <= 5){
_local1 = -2;
} else {
_local1 = 2;
};
};
efekSound = new gunhero();
efekSound.play(0, 1);
_local2 = new Peluru(x, y, (rotation + _local1), 0);
_local2.setDamage((WEAPONDAMAGE * weaponLevel));
par.addChild(_local2);
par.parent.parent.parent.shot = (par.parent.parent.parent.shot + 1);
};
}
function pauseMove():void{
if (tRecAF.running){
tempRun = new Array(tCanFireWeapon.running, tBooster.running, tStoper.running, tSlower.running);
tRecAF.stop();
tCanFireWeapon.stop();
tBooster.stop();
tStoper.stop();
tSlower.stop();
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
function slo(_arg1:TimerEvent):void{
if (speed > 1){
speed = (speed - 1);
} else {
tSlower.reset();
tStoper.start();
};
}
public function subArmFocus():void{
armFocus = (armFocus - 1);
if (armFocus < 0){
resetArmFocus();
};
}
function movePlayer(_arg1:Event):void{
var _local2:MovieClip;
var _local3:MovieClip;
par = _arg1.currentTarget.parent;
if (!par.pauseGame){
resumeMove();
if (health > 0){
y = (y + (Math.sin(((rotation * Math.PI) / 180)) * speed));
x = (x + (Math.cos(((rotation * Math.PI) / 180)) * speed));
if (speed > SPEED){
_local2 = new PlayerShadow();
_local2.x = x;
_local2.y = y;
_local2.rotation = rotation;
par.addChild(_local2);
} else {
if ((((boosterGauge < 300)) && (!(tSlower.running)))){
boosterGauge++;
};
};
if (par.upKeyIsDown){
goUp();
};
if (par.downKeyIsDown){
goDown();
};
if (par.aKeyIsDown){
fireWeapon();
};
if (par.spaceKeyIsDown){
booster();
};
if (par.dKeyIsDown){
slower();
};
if (par.sKeyIsDown){
laserShot();
};
if (x < -30){
rotation = 0;
};
if (x > (par.bg.Width + 30)){
rotation = 180;
};
if (y < -30){
rotation = 90;
};
if (y > par.bg.Height){
rotation = -90;
};
} else {
deletePlayer();
_local3 = new Bom();
_local3.x = x;
_local3.y = y;
par.addChild(_local3);
stop();
x = 0;
y = 0;
par.removeChild(this);
return;
};
} else {
pauseMove();
};
}
public function resetStat():void{
speed = SPEED;
armFocus = 0;
health = (healthLevel * MAXHEALTH);
tCanFireWeapon.delay = (1000 / (10 * weaponFireRateLevel));
isDead = false;
}
function sto(_arg1:TimerEvent):void{
if (speed < SPEED){
speed = (speed + 1);
} else {
tStoper.reset();
};
}
public function backMove():Number{
return ((Math.cos(((rotation * Math.PI) / 180)) * speed));
}
function bost(_arg1:TimerEvent):void{
if (speed > SPEED){
speed = (speed - 1);
} else {
tBooster.reset();
};
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
efekSound = new hit();
efekSound.play(0, 1);
}
function cfw(_arg1:TimerEvent):void{
canFireWeapon = true;
tCanFireWeapon.reset();
}
function resetArmFocus():void{
armFocus = 0;
}
public function addArmFocus(_arg1:Number):void{
armFocus = (armFocus + (_arg1 / 2));
if (armFocus > maxArmFocus){
armFocus = maxArmFocus;
};
}
function resumeMove():void{
if (!tRecAF.running){
tRecAF.start();
if (tempRun[0]){
tCanFireWeapon.start();
};
if (tempRun[1]){
tBooster.start();
};
if (tempRun[2]){
tStoper.start();
};
if (tempRun[3]){
tSlower.start();
};
};
}
public function laserGaugePlus():void{
if (laserGauge < 300){
laserGauge = (laserGauge + 10);
};
}
public function goDown():void{
if (speed < SPEED){
rotation = (rotation + (SPEED / 3));
} else {
rotation = (rotation + speed);
};
}
function laserShot():void{
var _local1:MovieClip;
if (laserGauge >= 300){
laserGauge = 0;
_local1 = new LaserShot();
_local1.x = x;
_local1.y = y;
_local1.rotation = rotation;
_local1.name = "lasershot";
par.addChild(_local1);
};
}
public function goUp():void{
if (speed < SPEED){
rotation = (rotation - (SPEED / 3));
} else {
rotation = (rotation - speed);
};
}
function booster():void{
if (((((!(tBooster.running)) && ((boosterGauge >= 100)))) && (!(tSlower.running)))){
boosterGauge = (boosterGauge - 100);
speed = (2 * SPEED);
tBooster.start();
efekSound = new dash();
efekSound.play(0, 1);
};
}
function slower():void{
if (((((!(tSlower.running)) && ((boosterGauge >= 100)))) && (!(tBooster.running)))){
boosterGauge = (boosterGauge - 100);
tSlower.start();
efekSound = new dashstop();
efekSound.play(0, 1);
};
}
function recAF(_arg1:TimerEvent):void{
subArmFocus();
}
public function speedX():Number{
return ((Math.cos(((rotation * Math.PI) / 180)) * speed));
}
}
}//package
Section 143
//PlayerShadow (PlayerShadow)
package {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
public dynamic class PlayerShadow extends MovieClip {
public var tShade:Timer;
public function PlayerShadow(){
addFrameScript(0, frame1);
}
function frame1(){
tShade = new Timer(200);
tShade.addEventListener(TimerEvent.TIMER, cfw);
tShade.start();
}
public function cfw(_arg1:TimerEvent):void{
tShade.stop();
tShade.removeEventListener(TimerEvent.TIMER, cfw);
this.parent.removeChild(this);
}
}
}//package
Section 144
//spaceshiplaunch (spaceshiplaunch)
package {
import flash.media.*;
public dynamic class spaceshiplaunch extends Sound {
}
}//package
Section 145
//Stage1BGM (Stage1BGM)
package {
import flash.media.*;
public dynamic class Stage1BGM extends Sound {
}
}//package
Section 146
//Stage2BGM (Stage2BGM)
package {
import flash.media.*;
public dynamic class Stage2BGM extends Sound {
}
}//package
Section 147
//Stage3BGM (Stage3BGM)
package {
import flash.media.*;
public dynamic class Stage3BGM extends Sound {
}
}//package
Section 148
//StageClearBGM (StageClearBGM)
package {
import flash.media.*;
public dynamic class StageClearBGM extends Sound {
}
}//package
Section 149
//testhit (testhit)
package {
import flash.media.*;
public dynamic class testhit extends Sound {
}
}//package
Section 150
//weaponground (weaponground)
package {
import flash.media.*;
public dynamic class weaponground extends Sound {
}
}//package
Section 151
//WeaponMother (WeaponMother)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
public class WeaponMother extends MovieClip {
const MAXHEALTH:Number = 200;
public var live:MovieClip;
var ctrFire:Number;// = 0
var armFocus:Number;
public var perimeter:MovieClip;
var efekSound:Sound;
public var health:Number;
public var dead:MovieClip;
var sudut:Number;
public var isFire:Boolean;
public var jenisWeapon:String;
var maxArmFocus:Number;
var tRecAF:Timer;
public var bodypic:MovieClip;
public var body:MovieClip;
var par;
public var isDead:Boolean;
var tCanFireWeapon:Timer;
var pla;
var canFireWeapon:Boolean;
public function WeaponMother():void{
tRecAF = new Timer(100);
tCanFireWeapon = new Timer((1000 / 1));
ctrFire = 0;
super();
armFocus = 0;
health = MAXHEALTH;
isDead = false;
canFireWeapon = true;
tRecAF.addEventListener(TimerEvent.TIMER, recAF);
tRecAF.start();
this.addEventListener(Event.ENTER_FRAME, moveEnemy);
tCanFireWeapon.addEventListener(TimerEvent.TIMER, cfw);
}
public function speedY():Number{
return (0);
}
function fireWeapon(){
var _local1:MovieClip;
if (canFireWeapon){
canFireWeapon = false;
tCanFireWeapon.start();
_local1 = new Peluru(x, y, (rotation - 180), 2);
_local1.setDamage(10);
par.addChild(_local1);
efekSound = new weaponmothersound();
efekSound.play(0, 1);
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function subArmFocus():void{
armFocus = (armFocus - 1);
if (armFocus < 0){
resetArmFocus();
};
}
function moveEnemy(_arg1:Event):void{
var _local2:MovieClip;
par = _arg1.currentTarget.parent;
pla = par.player;
if (!par.pauseGame){
if (health > 0){
setTarget();
if (this.perimeter.hitTestObject(pla)){
fireWeapon();
};
} else {
deleteEnemy();
_local2 = new Bom();
_local2.x = x;
_local2.y = y;
par.addChild(_local2);
stop();
live.visible = false;
par.bm.damage(10);
return;
};
};
}
public function resetStat():void{
armFocus = 0;
health = MAXHEALTH;
isDead = false;
}
public function getArmFocus():Number{
return (armFocus);
}
public function damage(_arg1:Number):void{
efekSound = new hit();
efekSound.play(0, 1);
health = (health - _arg1);
}
function cfw(_arg1:TimerEvent):void{
canFireWeapon = true;
tCanFireWeapon.reset();
}
public function resetArmFocus():void{
armFocus = 0;
}
function setTarget():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = (pla.x - x);
_local2 = (pla.y - y);
_local3 = Math.atan2(_local2, _local1);
sudut = ((_local3 * 180) / Math.PI);
rotation = (sudut - 180);
}
public function addArmFocus(_arg1:Number):void{
armFocus = (armFocus + (_arg1 / 2));
if (armFocus > maxArmFocus){
armFocus = maxArmFocus;
};
}
public function setMaxArmFocus(_arg1:Number):void{
maxArmFocus = (_arg1 / 2);
}
public function setLevel(_arg1:Number){
health = (_arg1 * MAXHEALTH);
}
function recAF(_arg1:TimerEvent):void{
subArmFocus();
}
public function deleteEnemy():void{
tRecAF.stop();
tRecAF.removeEventListener(TimerEvent.TIMER, recAF);
tCanFireWeapon.stop();
tCanFireWeapon.removeEventListener(TimerEvent.TIMER, cfw);
removeEventListener(Event.ENTER_FRAME, moveEnemy);
}
public function speedX():Number{
return (0);
}
}
}//package
Section 152
//weaponmothersound (weaponmothersound)
package {
import flash.media.*;
public dynamic class weaponmothersound extends Sound {
}
}//package
Section 153
//Wingman (Wingman)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
public class Wingman extends MovieClip {
const SPEED:Number = 4;
const MAXHEALTH:Number = 500;
var ctrFire:Number;// = 0
var armFocus:Number;
var ene;
public var perimeter:MovieClip;
var flightMode:String;
var efekSound:Sound;
public var speed:Number;
public var health:Number;
var sudut:Number;
var tSetTarget:Timer;
public var isFire:Boolean;
public var jenisWeapon:String;
var maxArmFocus:Number;
var tRecAF:Timer;
var par;
public var body:MovieClip;
public var isDead:Boolean;
var tCanFireWeapon:Timer;
var canFireWeapon:Boolean;
public function Wingman():void{
tRecAF = new Timer(100);
tSetTarget = new Timer(10);
tCanFireWeapon = new Timer((1000 / 5));
ctrFire = 0;
super();
speed = SPEED;
armFocus = 0;
health = MAXHEALTH;
isDead = false;
canFireWeapon = true;
tRecAF.addEventListener(TimerEvent.TIMER, recAF);
tRecAF.start();
tSetTarget.delay = randRange(100, 400);
tSetTarget.addEventListener(TimerEvent.TIMER, setTar);
tSetTarget.start();
this.addEventListener(Event.ENTER_FRAME, moveWingman);
tCanFireWeapon.addEventListener(TimerEvent.TIMER, cfw);
flightMode = "chase";
}
public function speedY():Number{
return ((Math.sin(((rotation * Math.PI) / 180)) * speed));
}
function setTar(_arg1:TimerEvent):void{
setTarget();
}
function fireWeapon(){
var _local1:MovieClip;
if (canFireWeapon){
canFireWeapon = false;
tCanFireWeapon.start();
_local1 = new Peluru(x, y, rotation, 1);
efekSound = new gunhero();
efekSound.play(0, 1);
_local1.setDamage(20);
par.addChild(_local1);
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function subArmFocus():void{
armFocus = (armFocus - 1);
if (armFocus < 0){
resetArmFocus();
};
}
public function resetStat():void{
speed = SPEED;
armFocus = 0;
health = MAXHEALTH;
isDead = false;
}
public function getArmFocus():Number{
return (armFocus);
}
public function deleteWingman():void{
tRecAF.stop();
tRecAF.removeEventListener(TimerEvent.TIMER, recAF);
tCanFireWeapon.stop();
tCanFireWeapon.removeEventListener(TimerEvent.TIMER, cfw);
tSetTarget.stop();
tSetTarget.removeEventListener(TimerEvent.TIMER, setTar);
removeEventListener(Event.ENTER_FRAME, moveWingman);
}
function moveWingman(_arg1:Event):void{
var _local2:MovieClip;
par = _arg1.currentTarget.parent;
if (!par.pauseGame){
if (health > 0){
y = (y + (Math.sin(((rotation * Math.PI) / 180)) * speed));
x = (x + (Math.cos(((rotation * Math.PI) / 180)) * speed));
if (sudut < rotation){
goUp();
};
if (sudut > rotation){
goDown();
};
if (x < -50){
rotation = sudut;
};
if (x > (par.bg.Width + 50)){
rotation = sudut;
};
if (y < -50){
rotation = sudut;
};
if (y > (par.bg.Height - 175)){
flightMode = "avoid";
} else {
flightMode = "chase";
};
if (ene == null){
} else {
if (this.perimeter.hitTestObject(ene)){
ctrFire = (ctrFire + 1);
} else {
ctrFire = (ctrFire - 2);
};
};
if (ctrFire >= 30){
fireWeapon();
ctrFire = 30;
};
if (ctrFire < 0){
ctrFire = 0;
};
} else {
deleteWingman();
_local2 = new Bom();
_local2.x = x;
_local2.y = y;
par.addChild(_local2);
par.removeChild(this);
stop();
return;
};
};
}
function cfw(_arg1:TimerEvent):void{
canFireWeapon = true;
tCanFireWeapon.reset();
}
public function resetArmFocus():void{
armFocus = 0;
}
function setTarget():void{
var _local1:Array;
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
var _local8:Number;
var _local9:Number;
var _local10:Number;
if (flightMode == "chase"){
_local1 = new Array();
_local2 = 0;
while (_local2 < par.numChildren) {
if ((((((par.getChildAt(_local2) is Enemy)) || ((par.getChildAt(_local2) is EnemyGround)))) || ((par.getChildAt(_local2) is Enemy2)))){
_local1.push(par.getChildAt(_local2));
};
_local2++;
};
_local3 = 9999;
_local4 = 9999;
_local5 = 9999;
for (_local7 in _local1) {
_local6 = Math.round(Math.sqrt((Math.pow((x - _local1[_local7].x), 2) + Math.pow((y - _local1[_local7].y), 2))));
if (_local5 > _local6){
_local5 = _local6;
_local3 = _local1[_local7].x;
_local4 = _local1[_local7].y;
ene = _local1[_local7];
};
};
_local8 = (_local3 - x);
_local9 = (_local4 - y);
_local10 = Math.atan2(_local9, _local8);
sudut = ((_local10 * 180) / Math.PI);
};
if (flightMode == "avoid"){
sudut = -90;
};
}
public function addArmFocus(_arg1:Number):void{
armFocus = (armFocus + (_arg1 / 2));
if (armFocus > maxArmFocus){
armFocus = maxArmFocus;
};
}
public function setMaxArmFocus(_arg1:Number):void{
maxArmFocus = (_arg1 / 2);
}
public function goDown():void{
rotation = (rotation + speed);
}
public function goUp():void{
rotation = (rotation - speed);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
efekSound = new hit();
efekSound.play(0, 1);
}
function recAF(_arg1:TimerEvent):void{
subArmFocus();
}
public function speedX():Number{
return ((Math.cos(((rotation * Math.PI) / 180)) * speed));
}
}
}//package
Section 154
//Wingman2 (Wingman2)
package {
import flash.events.*;
import flash.media.*;
import flash.display.*;
import flash.utils.*;
public class Wingman2 extends MovieClip {
const SPEED:Number = 6;
const MAXHEALTH:Number = 250;
var ctrFire:Number;// = 0
var armFocus:Number;
var ene;
public var perimeter:MovieClip;
var flightMode:String;
var efekSound:Sound;
public var speed:Number;
public var health:Number;
var sudut:Number;
var tSetTarget:Timer;
public var isFire:Boolean;
public var jenisWeapon:String;
var maxArmFocus:Number;
var tRecAF:Timer;
var par;
public var body:MovieClip;
public var isDead:Boolean;
var tCanFireWeapon:Timer;
var canFireWeapon:Boolean;
public function Wingman2():void{
tRecAF = new Timer(100);
tSetTarget = new Timer(10);
tCanFireWeapon = new Timer((1000 / 5));
ctrFire = 0;
super();
speed = SPEED;
armFocus = 0;
health = MAXHEALTH;
isDead = false;
canFireWeapon = true;
tRecAF.addEventListener(TimerEvent.TIMER, recAF);
tRecAF.start();
tSetTarget.delay = randRange(100, 500);
tSetTarget.addEventListener(TimerEvent.TIMER, setTar);
tSetTarget.start();
this.addEventListener(Event.ENTER_FRAME, moveWingman);
tCanFireWeapon.addEventListener(TimerEvent.TIMER, cfw);
flightMode = "chase";
}
public function speedY():Number{
return ((Math.sin(((rotation * Math.PI) / 180)) * speed));
}
function setTar(_arg1:TimerEvent):void{
setTarget();
}
function fireWeapon(){
var _local1:MovieClip;
if (canFireWeapon){
canFireWeapon = false;
tCanFireWeapon.start();
_local1 = new Peluru(x, y, rotation, 1);
_local1.setDamage(5);
efekSound = new gunhero();
efekSound.play(0, 1);
par.addChild(_local1);
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function subArmFocus():void{
armFocus = (armFocus - 1);
if (armFocus < 0){
resetArmFocus();
};
}
public function resetStat():void{
speed = SPEED;
armFocus = 0;
health = MAXHEALTH;
isDead = false;
}
public function getArmFocus():Number{
return (armFocus);
}
public function deleteWingman():void{
tRecAF.stop();
tRecAF.removeEventListener(TimerEvent.TIMER, recAF);
tCanFireWeapon.stop();
tCanFireWeapon.removeEventListener(TimerEvent.TIMER, cfw);
tSetTarget.stop();
tSetTarget.removeEventListener(TimerEvent.TIMER, setTar);
removeEventListener(Event.ENTER_FRAME, moveWingman);
}
function moveWingman(_arg1:Event):void{
var _local2:MovieClip;
par = _arg1.currentTarget.parent;
if (!par.pauseGame){
if (health > 0){
y = (y + (Math.sin(((rotation * Math.PI) / 180)) * speed));
x = (x + (Math.cos(((rotation * Math.PI) / 180)) * speed));
if (sudut < rotation){
goUp();
};
if (sudut > rotation){
goDown();
};
if (x < -50){
rotation = sudut;
};
if (x > (par.bg.Width + 50)){
rotation = sudut;
};
if (y < -50){
rotation = sudut;
};
if (y > (par.bg.Height - 175)){
flightMode = "avoid";
} else {
flightMode = "chase";
};
if (ene == null){
} else {
if (this.perimeter.hitTestObject(ene)){
ctrFire = (ctrFire + 1);
} else {
ctrFire = (ctrFire - 2);
};
};
if (ctrFire >= 15){
fireWeapon();
ctrFire = 15;
};
if (ctrFire < 0){
ctrFire = 0;
};
} else {
deleteWingman();
_local2 = new Bom();
_local2.x = x;
_local2.y = y;
par.addChild(_local2);
par.removeChild(this);
stop();
return;
};
};
}
function cfw(_arg1:TimerEvent):void{
canFireWeapon = true;
tCanFireWeapon.reset();
}
public function resetArmFocus():void{
armFocus = 0;
}
function setTarget():void{
var _local1:Array;
var _local2:*;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
var _local8:Number;
var _local9:Number;
var _local10:Number;
if (flightMode == "chase"){
_local1 = new Array();
_local2 = 0;
while (_local2 < par.numChildren) {
if ((((((par.getChildAt(_local2) is Enemy)) || ((par.getChildAt(_local2) is EnemyGround)))) || ((par.getChildAt(_local2) is Enemy2)))){
_local1.push(par.getChildAt(_local2));
};
_local2++;
};
_local3 = 9999;
_local4 = 9999;
_local5 = 9999;
for (_local7 in _local1) {
_local6 = Math.round(Math.sqrt((Math.pow((x - _local1[_local7].x), 2) + Math.pow((y - _local1[_local7].y), 2))));
if (_local5 > _local6){
_local5 = _local6;
_local3 = _local1[_local7].x;
_local4 = _local1[_local7].y;
ene = _local1[_local7];
};
};
_local8 = (_local3 - x);
_local9 = (_local4 - y);
_local10 = Math.atan2(_local9, _local8);
sudut = ((_local10 * 180) / Math.PI);
};
if (flightMode == "avoid"){
sudut = -90;
};
}
public function addArmFocus(_arg1:Number):void{
armFocus = (armFocus + (_arg1 / 2));
if (armFocus > maxArmFocus){
armFocus = maxArmFocus;
};
}
public function setMaxArmFocus(_arg1:Number):void{
maxArmFocus = (_arg1 / 2);
}
public function goDown():void{
rotation = (rotation + speed);
}
public function goUp():void{
rotation = (rotation - speed);
}
public function damage(_arg1:Number):void{
health = (health - _arg1);
efekSound = new hit();
efekSound.play(0, 1);
}
function recAF(_arg1:TimerEvent):void{
subArmFocus();
}
public function speedX():Number{
return ((Math.cos(((rotation * Math.PI) / 180)) * speed));
}
}
}//package