Section 1
//mp3 (FarmCow02.mp3)
package FarmCow02 {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package FarmCow02
Section 2
//mp3 (futuristicefek1.mp3)
package futuristicefek1 {
import flash.media.*;
public dynamic class mp3 extends Sound {
}
}//package futuristicefek1
Section 3
//Achie_191 (GatalicRebelv1_fla.Achie_191)
package GatalicRebelv1_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Achie_191 extends MovieClip {
public var ashield:MovieClip;
public var exi:SimpleButton;
public var astar:MovieClip;
public var aroket:MovieClip;
public var bg:MovieClip;
public var par;
public var aboss3:MovieClip;
public var aboss2:MovieClip;
public var abase:MovieClip;
public var abreed:MovieClip;
public var aboss1:MovieClip;
public var aupgrade:MovieClip;
public var aunit:MovieClip;
public function Achie_191(){
addFrameScript(0, frame1, 5, frame6);
}
public function klikexi(_arg1:MouseEvent):void{
par.par.playEfek("btnklik");
exi.removeEventListener(MouseEvent.CLICK, klikexi);
play();
}
function frame6(){
stop();
par = this.parent;
aunit.visible = par.par.achiDestroy;
aupgrade.visible = par.par.achiUpgrade;
astar.visible = par.par.achiStar;
ashield.visible = par.par.achiShield;
aroket.visible = par.par.achiBigBoy;
abreed.visible = par.par.achiBreed;
aboss1.visible = par.par.achi1st;
aboss2.visible = par.par.achi2nd;
aboss3.visible = par.par.achi3rd;
abase.visible = par.par.achiDominate;
bg.addEventListener(MouseEvent.CLICK, thisPLAY);
exi.addEventListener(MouseEvent.CLICK, klikexi);
}
function frame1(){
stop();
}
public function thisPLAY(_arg1:MouseEvent):void{
play();
}
}
}//package GatalicRebelv1_fla
Section 4
//alt_intro_holder_135 (GatalicRebelv1_fla.alt_intro_holder_135)
package GatalicRebelv1_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class alt_intro_holder_135 extends MovieClip {
public var par;
public function alt_intro_holder_135(){
addFrameScript(184, frame185);
}
function frame185(){
stop();
par = this.parent;
par.gotoAndStop("splashsf");
}
}
}//package GatalicRebelv1_fla
Section 5
//BAR2_236 (GatalicRebelv1_fla.BAR2_236)
package GatalicRebelv1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class BAR2_236 extends MovieClip {
public var ket:TextField;
}
}//package GatalicRebelv1_fla
Section 6
//BAR3_237 (GatalicRebelv1_fla.BAR3_237)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class BAR3_237 extends MovieClip {
public var ket:MovieClip;
public var pic:MovieClip;
public function BAR3_237(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 7
//Bg_232 (GatalicRebelv1_fla.Bg_232)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class Bg_232 extends MovieClip {
public function Bg_232(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 8
//boss1_222 (GatalicRebelv1_fla.boss1_222)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class boss1_222 extends MovieClip {
public function boss1_222(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 9
//boss3_223 (GatalicRebelv1_fla.boss3_223)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class boss3_223 extends MovieClip {
public function boss3_223(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 10
//box_163 (GatalicRebelv1_fla.box_163)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class box_163 extends MovieClip {
public var noFrame:Number;
public var pic:MovieClip;
public function box_163(){
addFrameScript(0, frame1, 7, frame8, 56, frame57);
}
function frame1(){
stop();
}
function frame8(){
pic.gotoAndStop(noFrame);
}
function frame57(){
noFrame = -1;
}
}
}//package GatalicRebelv1_fla
Section 11
//BtnSelect_186 (GatalicRebelv1_fla.BtnSelect_186)
package GatalicRebelv1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class BtnSelect_186 extends MovieClip {
public var ket:TextField;
public var star:MovieClip;
}
}//package GatalicRebelv1_fla
Section 12
//ContainerBulet_197 (GatalicRebelv1_fla.ContainerBulet_197)
package GatalicRebelv1_fla {
import flash.display.*;
import flash.filters.*;
public dynamic class ContainerBulet_197 extends MovieClip {
public var drawed:Boolean;
public var glow_alpha:Number;
public var filter_glow:GlowFilter;
public var glow_color:Number;
public var buletDraw:Sprite;
public var glow_blurX:Number;
public var glow_quality:Number;
public var glow_blurY:Number;
public var glow_strength:Number;
public var lightningColor;
public function ContainerBulet_197(){
addFrameScript(0, frame1);
}
public function drawBulet(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
buletDraw.graphics.lineStyle(1, 52479, 1, true);
buletDraw.graphics.moveTo(_arg1, _arg2);
buletDraw.graphics.lineTo(_arg3, _arg4);
drawed = true;
}
function frame1(){
stop();
buletDraw = new Sprite();
drawed = false;
this.addChild(buletDraw);
lightningColor = "0xCCCCCC";
glow_color = lightningColor;
glow_alpha = 0.6;
glow_blurX = 5;
glow_blurY = 5;
glow_strength = 2;
glow_quality = 3;
filter_glow = new GlowFilter(glow_color, glow_alpha, glow_blurX, glow_blurY, glow_strength, glow_quality);
}
public function drawBuletE2(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
buletDraw.graphics.lineStyle(1, 0xFFCC00, 1, true);
buletDraw.graphics.moveTo(_arg1, _arg2);
buletDraw.graphics.lineTo(_arg3, _arg4);
drawed = true;
}
public function drawBulet2(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1):void{
switch (_arg5){
case 1:
buletDraw.graphics.lineStyle(1, 0xFFFFFF, 1, true);
break;
case 2:
buletDraw.graphics.lineStyle(1, 13434726, 1, true);
break;
case 3:
buletDraw.graphics.lineStyle(1, 0xFFFF, 1, true);
break;
};
buletDraw.graphics.moveTo(_arg1, _arg2);
buletDraw.graphics.lineTo(_arg3, _arg4);
drawed = true;
}
public function drawBuletE(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
buletDraw.graphics.lineStyle(1, 0xFF3300, 1, true);
buletDraw.graphics.moveTo(_arg1, _arg2);
buletDraw.graphics.lineTo(_arg3, _arg4);
drawed = true;
}
public function drawLaser(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1):void{
switch (_arg5){
case 1:
buletDraw.graphics.lineStyle(4, 0xFFFFFF, 0.7, true);
break;
case 2:
buletDraw.graphics.lineStyle(4, 16724838, 0.7, true);
break;
case 3:
buletDraw.graphics.lineStyle(4, 0xFF0000, 0.7, true);
break;
};
buletDraw.graphics.moveTo(_arg1, _arg2);
buletDraw.graphics.lineTo(_arg3, _arg4);
drawed = true;
}
}
}//package GatalicRebelv1_fla
Section 13
//ContainerNewWay_190 (GatalicRebelv1_fla.ContainerNewWay_190)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class ContainerNewWay_190 extends MovieClip {
public var wayDraw:Sprite;
public function ContainerNewWay_190(){
addFrameScript(0, frame1);
}
public function drawWay(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
wayDraw.graphics.lineStyle(10, 0xFFFFFF, 1, true);
wayDraw.graphics.moveTo(_arg1, _arg2);
wayDraw.graphics.lineTo(_arg3, _arg4);
}
function frame1(){
stop();
wayDraw = new Sprite();
this.addChild(wayDraw);
}
}
}//package GatalicRebelv1_fla
Section 14
//ContainerWay_189 (GatalicRebelv1_fla.ContainerWay_189)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class ContainerWay_189 extends MovieClip {
public var wayDraw:Sprite;
public function ContainerWay_189(){
addFrameScript(0, frame1);
}
public function drawWay(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):void{
wayDraw.graphics.lineStyle(4, 0xFFFFFF, 1, true);
wayDraw.graphics.moveTo(_arg1, _arg2);
wayDraw.graphics.lineTo(_arg3, _arg4);
}
function frame1(){
stop();
wayDraw = new Sprite();
this.addChild(wayDraw);
}
}
}//package GatalicRebelv1_fla
Section 15
//CreditAnim_153 (GatalicRebelv1_fla.CreditAnim_153)
package GatalicRebelv1_fla {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public dynamic class CreditAnim_153 extends MovieClip {
public var btnlogo2:SimpleButton;
public var btnlogo:SimpleButton;
public var exi:SimpleButton;
public var bge:MovieClip;
public function CreditAnim_153(){
addFrameScript(0, frame1, 1, frame2, 6, frame7);
}
public function tgo(_arg1:MouseEvent):void{
exi.removeEventListener(MouseEvent.CLICK, tgo);
bge.removeEventListener(MouseEvent.CLICK, tgo);
play();
}
function frame7(){
stop();
bge.addEventListener(MouseEvent.CLICK, tgo);
exi.addEventListener(MouseEvent.CLICK, tgo);
btnlogo2.addEventListener(MouseEvent.CLICK, klikLOGO2);
btnlogo.addEventListener(MouseEvent.CLICK, klikLOGO);
}
function frame1(){
stop();
visible = false;
}
public function klikLOGO(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
public function klikLOGO2(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2, "_blank");
}
function frame2(){
visible = true;
}
}
}//package GatalicRebelv1_fla
Section 16
//ExitYes_227 (GatalicRebelv1_fla.ExitYes_227)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class ExitYes_227 extends MovieClip {
public var no:MovieClip;
public var yes:MovieClip;
}
}//package GatalicRebelv1_fla
Section 17
//FadeINOUT_175 (GatalicRebelv1_fla.FadeINOUT_175)
package GatalicRebelv1_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class FadeINOUT_175 extends MovieClip {
public var tempBGM;
public var goOUT:Boolean;
public var goes:String;
public var par;
public var ctrBGM;
public function FadeINOUT_175(){
addFrameScript(0, frame1);
}
public function goFADE(_arg1:Event):void{
var _local2:SoundTransform;
if (goOUT == false){
alpha = (alpha + 0.1);
if (ctrBGM > 0){
ctrBGM = (ctrBGM - 0.1);
};
if (alpha >= 1){
goOUT = true;
par.gotoAndStop(goes);
};
} else {
alpha = (alpha - 0.1);
if (ctrBGM < tempBGM){
ctrBGM = (ctrBGM + 0.1);
};
if (alpha <= 0){
removeEventListener(Event.ENTER_FRAME, goFADE);
if (par.muteON == false){
_local2 = new SoundTransform(tempBGM);
par.soundChannelMain.soundTransform = _local2;
};
return;
};
};
if (par.muteON == false){
_local2 = new SoundTransform(ctrBGM);
par.soundChannelMain.soundTransform = _local2;
};
}
function frame1(){
mouseEnabled = false;
mouseChildren = false;
goOUT = false;
par = this.parent;
}
public function fadeIN(_arg1:String):void{
trace(("gofade " + _arg1));
tempBGM = par.soundBGM;
ctrBGM = par.soundBGM;
goOUT = false;
addEventListener(Event.ENTER_FRAME, goFADE);
goes = _arg1;
}
}
}//package GatalicRebelv1_fla
Section 18
//finalboss_224 (GatalicRebelv1_fla.finalboss_224)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class finalboss_224 extends MovieClip {
public function finalboss_224(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 19
//garis_213 (GatalicRebelv1_fla.garis_213)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class garis_213 extends MovieClip {
public function garis_213(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 20
//garis2_214 (GatalicRebelv1_fla.garis2_214)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class garis2_214 extends MovieClip {
public function garis2_214(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 21
//garis3_215 (GatalicRebelv1_fla.garis3_215)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class garis3_215 extends MovieClip {
public function garis3_215(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 22
//KetGroup_208 (GatalicRebelv1_fla.KetGroup_208)
package GatalicRebelv1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class KetGroup_208 extends MovieClip {
public var pop1:TextField;
public var pop2:TextField;
public var pop4:TextField;
public var pop3:TextField;
public var pic2:MovieClip;
public var pic3:MovieClip;
public var pic1:MovieClip;
public var pic4:MovieClip;
}
}//package GatalicRebelv1_fla
Section 23
//KetTextBuilding_206 (GatalicRebelv1_fla.KetTextBuilding_206)
package GatalicRebelv1_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class KetTextBuilding_206 extends MovieClip {
public var pope:TextField;
public var theUNIT:MovieClip;
public var unit:MovieClip;
public var nama:TextField;
public var Target;
public function KetTextBuilding_206(){
addFrameScript(0, frame1);
}
public function updateTa(_arg1:Event):void{
var _local2:*;
if (visible == true){
_local2 = Target.whosBase();
theUNIT.visible = true;
if (_local2 == 0){
_local2 = 1;
theUNIT.visible = false;
};
switch (Target.whatUNIT()){
case 1:
unit.gotoAndStop((((_local2 * 4) - 4) + 1));
break;
case 2:
unit.gotoAndStop((((_local2 * 4) - 4) + 2));
break;
case 3:
unit.gotoAndStop((((_local2 * 4) - 4) + 3));
break;
case 4:
unit.gotoAndStop((((_local2 * 4) - 4) + 4));
break;
case 5:
unit.gotoAndStop((((_local2 * 4) - 4) + 2));
break;
};
theUNIT.pop1.text = Target.UNIT1();
theUNIT.pop2.text = Target.UNIT2();
theUNIT.pop3.text = Target.UNIT3();
theUNIT.pop4.text = Target.UNIT4();
theUNIT.pic1.gotoAndStop((((_local2 * 4) - 4) + 1));
theUNIT.pic2.gotoAndStop((((_local2 * 4) - 4) + 2));
theUNIT.pic3.gotoAndStop((((_local2 * 4) - 4) + 3));
theUNIT.pic4.gotoAndStop((((_local2 * 4) - 4) + 4));
};
}
function frame1(){
addEventListener(Event.ENTER_FRAME, updateTa);
}
}
}//package GatalicRebelv1_fla
Section 24
//kroco_221 (GatalicRebelv1_fla.kroco_221)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class kroco_221 extends MovieClip {
public function kroco_221(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 25
//Kursor_176 (GatalicRebelv1_fla.Kursor_176)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class Kursor_176 extends MovieClip {
public function Kursor_176(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 26
//lakon_217 (GatalicRebelv1_fla.lakon_217)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class lakon_217 extends MovieClip {
public function lakon_217(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 27
//lakon2_218 (GatalicRebelv1_fla.lakon2_218)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class lakon2_218 extends MovieClip {
public function lakon2_218(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 28
//LeftSide_216 (GatalicRebelv1_fla.LeftSide_216)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class LeftSide_216 extends MovieClip {
public function LeftSide_216(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 29
//Loader_1 (GatalicRebelv1_fla.Loader_1)
package GatalicRebelv1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Loader_1 extends MovieClip {
public var teks:TextField;
}
}//package GatalicRebelv1_fla
Section 30
//LoseSign_198 (GatalicRebelv1_fla.LoseSign_198)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class LoseSign_198 extends MovieClip {
public function LoseSign_198(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
stop();
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 31
//MainTimeline (GatalicRebelv1_fla.MainTimeline)
package GatalicRebelv1_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var achiShield:Boolean;
public var prea:MovieClip;
public var achi3rd:Boolean;
public var myStar;
public var levelBreed:Number;
public var so:SharedObject;
public var FARSTAGE:Number;
public var intro:IntroMC;
public var loader2:URLLoader;
public var costSkill:Array;
public var MOUSE:MovieClip;
public var red:MovieClip;
public var achiBreed:Boolean;
public var dominateBase:Number;
public var soundChannelMain:SoundChannel;
public var achi1st:Boolean;
public var STAGE:Number;
public var soundSFX:Number;
public var spesialWhat:String;
public var achiDominate:Boolean;
public var sound:Sound;
public var levelInvur:Number;
public var picachi:MovieClip;
public var ending:EndingMC;
public var achiBigBoy:Boolean;
public var soundBGM:Number;
public var destroyShip:Number;
public var GoldTime;
public var fades:MovieClip;
public var btnab:MovieClip;
public var request2:URLRequest;
public var customContextMenu:ContextMenu;
public var upgradeSkill:Number;
public var variables2:URLVariables;
public var achiStar:Boolean;
public var credittext:MovieClip;
public var btnsf:MovieClip;
public var muteON:Boolean;
public var temp;
public var achiDestroy:Boolean;
public var levelRoket:Number;
public var achi2nd:Boolean;
public var achiUpgrade:Boolean;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 14, frame15, 19, frame20, 24, frame25, 29, frame30, 34, frame35);
}
public function clikfarm(_arg1:ContextMenuEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
public function clickSFSPLASH(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function LoadGame():void{
FARSTAGE = so.data.FARSTAGE;
levelRoket = so.data.levelRoket;
levelBreed = so.data.levelBreed;
levelInvur = so.data.levelInvur;
upgradeSkill = so.data.upgradeSkill;
spesialWhat = so.data.spesialWhat;
myStar = so.data.myStar;
achiDominate = so.data.achiDominate;
achiDestroy = so.data.achiDestroy;
achiBigBoy = so.data.achiBigBoy;
achiShield = so.data.achiShield;
achiBreed = so.data.achiBreed;
achi1st = so.data.achi1st;
achi2nd = so.data.achi2nd;
achi3rd = so.data.achi3rd;
achiUpgrade = so.data.achiUpgrade;
achiStar = so.data.achiStar;
destroyShip = destroyShip;
dominateBase = dominateBase;
}
public function outSP():void{
MOUSE.gotoAndStop("idle");
}
public function onComplete(_arg1:Event):void{
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgress);
this.loaderInfo.removeEventListener(Event.COMPLETE, onComplete);
play();
}
function frame10(){
stop();
btnab.addEventListener(MouseEvent.CLICK, clickABSPLASH);
btnab.buttonMode = true;
}
function frame15(){
btnsf.addEventListener(MouseEvent.CLICK, clickSFSPLASH);
btnsf.buttonMode = true;
}
public function playEfek(_arg1:String):void{
var _local2:Sound;
switch (_arg1){
case "explo1":
_local2 = new Explo1();
break;
case "explo2":
_local2 = new Explo2();
break;
case "explo3":
_local2 = new Explo3();
break;
case "laser":
switch (randRange(1, 3)){
case 1:
_local2 = new Laser1();
break;
case 2:
_local2 = new Laser2();
break;
case 3:
_local2 = new Laser3();
break;
};
break;
case "roket":
_local2 = new RoketSound();
break;
case "hit":
_local2 = new HitBase();
break;
case "bighit":
_local2 = new BigHitBase();
break;
case "in":
_local2 = new InUnit();
break;
case "sendok":
_local2 = new SendOk();
break;
case "sendno":
_local2 = new SendFailed();
break;
case "bigboy":
_local2 = new NukeSound();
break;
case "btnklik":
_local2 = new BtnKlik();
break;
case "mouseover":
_local2 = new MouseOver();
break;
};
if (muteON == false){
_local2.play(0, 1, new SoundTransform(soundSFX));
};
}
function frame1(){
stop();
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
customContextMenu = new ContextMenu();
customContextMenu.hideBuiltInItems();
temp = new ContextMenuItem("Small Farm Studio");
temp.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, clikfarm);
customContextMenu.customItems.push(temp);
contextMenu = customContextMenu;
stage.showDefaultContextMenu = false;
if (loaderInfo.url.substring(0, 4) != "file"){
Security.allowDomain("*");
Security.loadPolicyFile("http://track.g-bot.net/crossdomain.xml");
variables2 = new URLVariables();
variables2.id = "galacticrebelion";
variables2.ui = loaderInfo.url;
request2 = new URLRequest("http://track.g-bot.net/track.php");
request2.method = "POST";
request2.data = variables2;
loader2 = new URLLoader();
loader2.load(request2);
};
}
public function thisIntro(_arg1:MouseEvent):void{
intro.gotoAndStop("end");
}
function frame25(){
stop();
intro.addEventListener(MouseEvent.CLICK, thisIntro);
intro.gotoAndPlay(1);
playMusic("intro");
}
function frame2(){
stop();
gotoAndStop("splashab");
}
public function cekACHI():void{
var _local1:Number;
var _local2:*;
if (picachi.currentFrame == 1){
picachi.noFrame = 0;
if (achiDominate == false){
if (dominateBase >= 10){
achiDominate = true;
picachi.noFrame = 2;
};
};
if (achiDestroy == false){
if (destroyShip >= 10){
achiDestroy = true;
picachi.noFrame = 1;
};
};
if (achiUpgrade == false){
if ((((((levelRoket == 5)) && ((levelBreed == 5)))) && ((levelInvur == 5)))){
achiUpgrade = true;
picachi.noFrame = 9;
};
};
if (achiStar == false){
_local1 = 0;
for (_local2 in myStar) {
if (myStar[_local2] == 3){
_local1++;
};
};
if (_local1 > 30){
achiStar = true;
picachi.noFrame = 10;
};
};
if (picachi.noFrame != 0){
if (picachi.currentFrame == 1){
picachi.play();
};
};
};
}
function frame20(){
Mouse.hide();
MOUSE.mouseEnabled = false;
MOUSE.mouseChildren = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveCursor);
stage.addEventListener(Event.MOUSE_LEAVE, mouseLeaveHandler);
STAGE = 1;
so = SharedObject.getLocal("ww231");
FARSTAGE = 1;
levelRoket = 1;
levelBreed = 1;
levelInvur = 1;
upgradeSkill = 0;
spesialWhat = "roket";
myStar = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
costSkill = new Array(0, 1, 2, 3, 4);
GoldTime = new Array((24 * 120), (24 * 5), (24 * 15), (24 * 15), (24 * 35), (24 * 45), (24 * 60), (24 * 78), (24 * 90), (24 * 95), (24 * 120), (24 * 85), (24 * 100), (24 * 130), (24 * 150), (24 * 105), (24 * 130), (24 * 105), (24 * 95), (24 * 60), (24 * 135), (24 * 85), (24 * 120), (24 * 60), (24 * 115), (24 * 90), (24 * 80), (24 * 120), (24 * 130), (24 * 140), (24 * 295));
soundSFX = 1;
soundBGM = 1;
muteON = false;
achiDominate = false;
achiDestroy = false;
achiBigBoy = false;
achiShield = false;
achiBreed = false;
achi1st = false;
achi2nd = false;
achi3rd = false;
achiUpgrade = false;
achiStar = false;
destroyShip = 0;
dominateBase = 0;
stop();
playMusic("menu");
}
public function moveCursor(_arg1:MouseEvent):void{
MOUSE.visible = true;
MOUSE.x = mouseX;
MOUSE.y = mouseY;
}
function frame35(){
stop();
ending.addEventListener(MouseEvent.CLICK, thisEnd);
}
function frame30(){
red.mouseEnabled = false;
red.mouseChildren = false;
red.gotoAndStop("end");
stop();
}
public function kursorGOSP():void{
MOUSE.gotoAndStop("sprok");
}
public function mouseChange(_arg1:Number=0):void{
if (MOUSE.currentLabel != "sprok"){
if (_arg1 == 1){
MOUSE.gotoAndStop("overenemy");
};
if (_arg1 == 2){
MOUSE.gotoAndStop("cannotmove");
};
};
}
public function logoclick(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
public function changeSoundSFX(_arg1:Number):void{
_arg1 = (_arg1 / 100);
soundSFX = _arg1;
}
public function logoclick2(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.gamepirate.com");
navigateToURL(_local2, "_blank");
}
public function getAchi(_arg1:Number=0):void{
if (picachi.currentFrame == 1){
picachi.noFrame = 0;
switch (_arg1){
case 1:
if (achiBigBoy == false){
achiBigBoy = true;
picachi.noFrame = 3;
};
break;
case 2:
if (achiShield == false){
achiShield = true;
picachi.noFrame = 4;
};
break;
case 3:
if (achiBreed == false){
achiBreed = true;
picachi.noFrame = 5;
};
break;
case 4:
if (achi1st == false){
achi1st = true;
picachi.noFrame = 6;
};
break;
case 5:
if (achi2nd == false){
picachi.noFrame = 7;
achi2nd = true;
};
break;
case 6:
if (achi3rd == false){
picachi.noFrame = 8;
achi3rd = true;
};
break;
};
if (picachi.noFrame != 0){
if (picachi.currentFrame == 1){
picachi.play();
};
};
};
}
public function onProgress(_arg1:ProgressEvent):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.target.bytesLoaded;
_local3 = _arg1.target.bytesTotal;
_local4 = (_local2 / _local3);
prea.teks.text = String(Math.round((_local4 * 100)));
}
public function mouseBack():void{
if (MOUSE.currentLabel != "sprok"){
MOUSE.gotoAndStop("idle");
};
}
public function SaveGame():void{
so.data.FARSTAGE = FARSTAGE;
so.data.levelRoket = levelRoket;
so.data.levelBreed = levelBreed;
so.data.levelInvur = levelInvur;
so.data.upgradeSkill = upgradeSkill;
so.data.spesialWhat = spesialWhat;
so.data.myStar = myStar;
so.data.achiDominate = achiDominate;
so.data.achiDestroy = achiDestroy;
so.data.achiBigBoy = achiBigBoy;
so.data.achiShield = achiShield;
so.data.achiBreed = achiBreed;
so.data.achi1st = achi1st;
so.data.achi2nd = achi2nd;
so.data.achi3rd = achi3rd;
so.data.achiUpgrade = achiUpgrade;
so.data.achiStar = achiStar;
so.data.destroyShip = destroyShip;
so.data.dominateBase = dominateBase;
so.flush();
}
public function changeSound(_arg1:Number):void{
var _local2:SoundTransform;
_arg1 = (_arg1 / 100);
soundBGM = _arg1;
if (muteON == false){
_local2 = new SoundTransform(soundBGM);
soundChannelMain.soundTransform = _local2;
} else {
_local2 = new SoundTransform(0);
soundChannelMain.soundTransform = _local2;
};
}
public function stopMusic():void{
if (soundChannelMain != null){
soundChannelMain.stop();
};
}
public function clickABSPLASH(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2, "_blank");
}
public function playMusic(_arg1:String):void{
stopMusic();
switch (_arg1){
case "ingame":
sound = new Ingame();
break;
case "intro":
sound = new Intro();
break;
case "map":
sound = new Map();
break;
case "menu":
sound = new MainMenu();
break;
};
if (muteON == false){
soundChannelMain = sound.play(0, 99999, new SoundTransform(soundBGM));
} else {
soundChannelMain = sound.play(0, 99999, new SoundTransform(0));
};
}
public function thisEnd(_arg1:MouseEvent):void{
if (ending.currentLabel == "end"){
gotoAndStop("menu");
};
}
public function MuteSoundAll():void{
var _local1:SoundTransform;
muteON = !(muteON);
if (muteON == false){
_local1 = new SoundTransform(soundBGM);
soundChannelMain.soundTransform = _local1;
} else {
_local1 = new SoundTransform(0);
soundChannelMain.soundTransform = _local1;
};
}
public function ResetGame():void{
FARSTAGE = 1;
levelRoket = 1;
levelBreed = 1;
levelInvur = 1;
upgradeSkill = 0;
spesialWhat = "roket";
myStar = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
achiDominate = false;
achiDestroy = false;
achiBigBoy = false;
achiShield = false;
achiBreed = false;
achi1st = false;
achi2nd = false;
achi3rd = false;
achiUpgrade = false;
achiStar = false;
destroyShip = 0;
dominateBase = 0;
SaveGame();
}
public function mouseLeaveHandler(_arg1:Event):void{
MOUSE.visible = false;
}
}
}//package GatalicRebelv1_fla
Section 32
//MapTutor_228 (GatalicRebelv1_fla.MapTutor_228)
package GatalicRebelv1_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MapTutor_228 extends MovieClip {
public var par;
public function MapTutor_228(){
addFrameScript(0, frame1);
}
public function endTutor():void{
visible = false;
stage.removeEventListener(MouseEvent.CLICK, tur);
par.DEINIT("win");
}
public function nextTur():void{
switch (currentFrame){
case 1:
nextFrame();
break;
case 2:
nextFrame();
break;
};
}
public function tur(_arg1:MouseEvent):void{
nextTur();
}
function frame1(){
stop();
par = this.parent;
mouseEnabled = false;
mouseChildren = false;
}
public function ready():void{
gotoAndStop(1);
visible = true;
stage.addEventListener(MouseEvent.CLICK, tur);
}
}
}//package GatalicRebelv1_fla
Section 33
//MenuPanel_240 (GatalicRebelv1_fla.MenuPanel_240)
package GatalicRebelv1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class MenuPanel_240 extends MovieClip {
public var exi:SimpleButton;
public var sou:SimpleButton;
public var rep:SimpleButton;
public var teks:TextField;
public var pau:SimpleButton;
}
}//package GatalicRebelv1_fla
Section 34
//PanelSpecial_193 (GatalicRebelv1_fla.PanelSpecial_193)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class PanelSpecial_193 extends MovieClip {
public var up:SimpleButton;
}
}//package GatalicRebelv1_fla
Section 35
//PauseSign_203 (GatalicRebelv1_fla.PauseSign_203)
package GatalicRebelv1_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class PauseSign_203 extends MovieClip {
public var qh:MovieClip;
public var ql:MovieClip;
public var qm:MovieClip;
public var pss:MovieClip;
public var quall:MovieClip;
public function PauseSign_203(){
addFrameScript(0, frame1, 4, frame5, 9, frame10);
}
public function qlKlik(_arg1:MouseEvent):void{
stage.quality = "LOW";
quall.gotoAndStop(stage.quality);
}
public function qhKlik(_arg1:MouseEvent):void{
stage.quality = "HIGH";
quall.gotoAndStop(stage.quality);
}
function frame10(){
stop();
gotoAndStop(1);
}
function frame1(){
stop();
}
function frame5(){
quall.gotoAndStop(stage.quality);
ql.addEventListener(MouseEvent.CLICK, qlKlik);
qm.addEventListener(MouseEvent.CLICK, qmKlik);
qh.addEventListener(MouseEvent.CLICK, qhKlik);
stop();
pss.addEventListener(MouseEvent.CLICK, goPause);
}
public function qmKlik(_arg1:MouseEvent):void{
stage.quality = "MEDIUM";
quall.gotoAndStop(stage.quality);
}
public function goPause(_arg1:MouseEvent):void{
var _local2:*;
_local2 = this.parent;
_local2.par.playEfek("btnklik");
_local2.pauseGame = false;
play();
}
}
}//package GatalicRebelv1_fla
Section 36
//PicText_238 (GatalicRebelv1_fla.PicText_238)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class PicText_238 extends MovieClip {
public function PicText_238(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 37
//pirates_225 (GatalicRebelv1_fla.pirates_225)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class pirates_225 extends MovieClip {
public function pirates_225(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 38
//Preloader_5 (GatalicRebelv1_fla.Preloader_5)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class Preloader_5 extends MovieClip {
public function Preloader_5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 39
//Qual_205 (GatalicRebelv1_fla.Qual_205)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class Qual_205 extends MovieClip {
public var qh:MovieClip;
public var ql:MovieClip;
public var qm:MovieClip;
public function Qual_205(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame3(){
stop();
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 40
//Red_244 (GatalicRebelv1_fla.Red_244)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class Red_244 extends MovieClip {
public function Red_244(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 41
//RightSode_220 (GatalicRebelv1_fla.RightSode_220)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class RightSode_220 extends MovieClip {
public function RightSode_220(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 42
//SoundPreload_130 (GatalicRebelv1_fla.SoundPreload_130)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class SoundPreload_130 extends MovieClip {
public function SoundPreload_130(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 43
//splasha_139 (GatalicRebelv1_fla.splasha_139)
package GatalicRebelv1_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class splasha_139 extends MovieClip {
public var par;
public function splasha_139(){
addFrameScript(0, frame1, 103, frame104);
}
function frame1(){
addEventListener(MouseEvent.CLICK, clickMore);
}
function frame104(){
stop();
par = this.parent;
par.gotoAndStop("menu");
}
public function clickMore(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
}
}//package GatalicRebelv1_fla
Section 44
//StarStage_187 (GatalicRebelv1_fla.StarStage_187)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class StarStage_187 extends MovieClip {
public function StarStage_187(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 45
//Symbol1_33 (GatalicRebelv1_fla.Symbol1_33)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class Symbol1_33 extends MovieClip {
public function Symbol1_33(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 46
//textket_15 (GatalicRebelv1_fla.textket_15)
package GatalicRebelv1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class textket_15 extends MovieClip {
public var ket:TextField;
}
}//package GatalicRebelv1_fla
Section 47
//TheSpeaker_212 (GatalicRebelv1_fla.TheSpeaker_212)
package GatalicRebelv1_fla {
import flash.events.*;
import flash.display.*;
import flash.text.*;
public dynamic class TheSpeaker_212 extends MovieClip {
public var left:MovieClip;
public var right:MovieClip;
public var theText:String;
public var blue:MovieClip;
public var textlength:Number;
public var yellow:MovieClip;
public var red:MovieClip;
public var warn:MovieClip;
public var teks:TextField;
public var par;
public var DONETYPE:Boolean;
public function TheSpeaker_212(){
addFrameScript(0, frame1);
}
public function init():void{
warn.visible = false;
theText = "";
teks.text = "";
textlength = 0;
DONETYPE = false;
left.gotoAndStop(1);
right.gotoAndStop(1);
blue.gotoAndStop(1);
red.gotoAndStop(1);
blue.gotoAndStop(1);
yellow.gotoAndStop(1);
}
public function initText():void{
theText = "";
teks.text = "";
textlength = 0;
DONETYPE = false;
}
public function doType(_arg1:Event):void{
warn.visible = false;
if ((((((red.currentLabel == "end")) || ((blue.currentLabel == "end")))) || ((yellow.currentLabel == "end")))){
teks.appendText(theText.charAt(textlength));
if (textlength < theText.length){
textlength++;
} else {
warn.visible = true;
DONETYPE = true;
removeEventListener(Event.ENTER_FRAME, doType);
return;
};
teks.appendText(theText.charAt(textlength));
if (textlength < theText.length){
textlength++;
} else {
warn.visible = true;
DONETYPE = true;
removeEventListener(Event.ENTER_FRAME, doType);
return;
};
teks.appendText(theText.charAt(textlength));
if (textlength < theText.length){
textlength++;
} else {
warn.visible = true;
DONETYPE = true;
removeEventListener(Event.ENTER_FRAME, doType);
return;
};
};
}
public function showTextThis(_arg1:Number=0):void{
switch (_arg1){
case 1:
init();
theText = "We'll need a strong foot to tackle the dark emperor \nEstablish bases at minoria moon orbit will be our \ncrucial first step.";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 2:
initText();
theText = "Our first mission is to take over the rebel warlord's supplies, \nEngange!";
break;
case 3:
init();
theText = "Uwewwwaaaaa!! \nWe are under attack by the rebellion \nprepare for battle!!";
red.gotoAndPlay(2);
right.gotoAndStop(2);
break;
case 4:
init();
theText = "This mission is important for our long survivability. \n \nRoll out!";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 5:
init();
theText = "Outpost guardian are embarrassing! \nHow have they advance this far!!? \nAnnihilate them once and for all!";
red.gotoAndPlay(2);
right.gotoAndStop(2);
break;
case 6:
init();
theText = "Huh! \nI thought their entire fleet was annihilated, we must repel them to secure our stronghold";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 7:
init();
theText = "Surrender!! \nOr feel the wrath of our dark emperor!!";
red.gotoAndPlay(2);
right.gotoAndStop(2);
break;
case 8:
init();
theText = "All star fighter scramble!!";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 9:
init();
theText = "Rebellion raid !!! Crush them!";
red.gotoAndPlay(2);
right.gotoAndStop(2);
break;
case 10:
init();
theText = "I believe this is their last fleet inside this system, we are one step closer to takeover the outpost.";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 11:
init();
theText = "Yeah! we did it! \nWe have taken over their bases! Our goal is getting closer!";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 12:
init();
theText = "We must not underestimate the rebellion force! \nRetake the bases!!!";
red.gotoAndPlay(2);
right.gotoAndStop(2);
break;
case 13:
init();
theText = "Alert! The space pirates is coming from nowhere!! \nWe must not careless";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 14:
init();
theText = "Heh! Let me join the party~!";
yellow.gotoAndPlay(2);
right.gotoAndStop(6);
break;
case 15:
init();
theText = "Hehe time to escape, See you soon~!";
yellow.gotoAndPlay(2);
right.gotoAndStop(6);
break;
case 16:
init();
theText = "Argh!!! Noooooo!! We lose again!";
red.gotoAndPlay(2);
right.gotoAndStop(2);
break;
case 17:
init();
theText = "We have succesfully secured this area \nTime to expand our plan";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 18:
init();
theText = "Retake this outpost at all cost!! \nCrush them all!!";
red.gotoAndPlay(2);
right.gotoAndStop(2);
break;
case 19:
init();
theText = "The dark emperor forces are well prepared this time. \nAnd the appearance of space pirates makes the situation worse carefull!";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 20:
init();
theText = "I wont forget this! Retreat!";
red.gotoAndPlay(2);
right.gotoAndStop(2);
break;
case 21:
init();
theText = "Well done! This victory will boost our forces confidence";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 22:
init();
theText = "This time you wont be that lucky!";
red.gotoAndPlay(2);
right.gotoAndStop(2);
break;
case 23:
init();
theText = "Great this region is ours, now they are helpless, \nour next mission should be a piece of cake.";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 24:
init();
theText = "Gah!!!! it seems you have gone too far rebels!! \nI will destroy you once for all. \nThe dark emperor will be pleased when i successfully repel your rebellion!";
red.gotoAndPlay(2);
right.gotoAndStop(3);
break;
case 25:
initText();
theText = "Geh pathetic rebels, they make us step in and fight this weakling. \nWe'll finish your rebellion quickly.";
right.gotoAndStop(4);
break;
case 26:
init();
theText = "The dark emperor's generals is stepping in, this will be difficult. \nWe must develop a better strategy than our previous battle.";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 27:
init();
theText = "Gah!! impossible, \nYou'll need a lot more than that to defeat me! \nI'll see you soon in the next battle!!";
red.gotoAndPlay(2);
right.gotoAndStop(3);
break;
case 28:
initText();
theText = "A weakling will always be weak! \nI'll see you soon!!";
right.gotoAndStop(4);
break;
case 29:
init();
theText = "Yeah we did it!! \nWe were lucky enough to win this battle \nBut the war is far from over!";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 30:
init();
theText = "Welcome \n \nI will explain all the things you need to know about how to give orders to this Fleet";
blue.gotoAndPlay(2);
left.gotoAndStop(4);
break;
case 31:
initText();
theText = "To command your unit to move from base to another one, either to support your own base or to attack enemy's base. Just click drag from your base to other base.\n(Try to move your unit)";
break;
case 32:
initText();
theText = "Just remember there is a path from one base to other. You can't order unit from base that haven't path to other base.";
break;
case 33:
initText();
theText = "If you want to auto move your unit you can press Shift while click drag. Your unit automatically send if there are 10 unit or more in the base.\n(Try to automove your unit)";
break;
case 34:
initText();
theText = "If your unit meet enemy unit in the path. Their will shot each other. While there is a war in path you increase your critical bar. If your critical bar full your unit have a chance to double damage for a period time. (Critical bar is on right lower screen)";
break;
case 35:
initText();
theText = "You can use special skill when spesial bar is full. This bar will automatically increase over time. (Special bar is on right upper screen)";
break;
case 36:
init();
theText = "That's all. \nYour mission is to conquer the enemy's Bases. \n \nGood luck commander.";
blue.gotoAndPlay(2);
left.gotoAndStop(4);
break;
case 37:
init();
theText = "This is it, the pirates lair \nif we destroy their main base, i can guarantee \nthey wont have ability to bother us.";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 38:
init();
theText = "Argh, the have found our lair. \nwe must try to counter them. if we failed \nthen we should retreat... don't play hero, boys";
yellow.gotoAndPlay(2);
right.gotoAndStop(6);
break;
case 39:
init();
theText = "Retreat!!!!!!";
yellow.gotoAndPlay(2);
right.gotoAndStop(6);
break;
case 40:
init();
theText = "Rebellion, i wont hesitate to wipe you out down to the roots! \nit is too late for you to ask for a surrender. \nfeel the wrath of the dark emperor!";
red.gotoAndPlay(5);
right.gotoAndStop(3);
break;
case 41:
init();
theText = "The dark emperor's advance warship has appeared \nthis is our final task, the result will determine our choice \nbe strong and do not afraid !";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
case 42:
init();
theText = "Arggh impossible! how can we lose?!";
red.gotoAndPlay(5);
right.gotoAndStop(3);
break;
case 43:
init();
theText = "Congratulation we win this fierce battle!";
blue.gotoAndPlay(2);
left.gotoAndStop(2);
break;
};
addEventListener(Event.ENTER_FRAME, doType);
}
function frame1(){
stop();
textlength = 0;
theText = "";
par = this.parent;
mouseEnabled = false;
mouseChildren = false;
init();
}
}
}//package GatalicRebelv1_fla
Section 48
//tutorialspeaker_219 (GatalicRebelv1_fla.tutorialspeaker_219)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class tutorialspeaker_219 extends MovieClip {
public function tutorialspeaker_219(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 49
//upgrade_192 (GatalicRebelv1_fla.upgrade_192)
package GatalicRebelv1_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class upgrade_192 extends MovieClip {
public var knockout:Boolean;
public var exi:SimpleButton;
public var bg:MovieClip;
public var strength:Number;
public var inner:Boolean;
public var color:Number;
public var shield:MovieClip;
public var nuke:MovieClip;
public var unit:MovieClip;
public var filter:BitmapFilter;
public var par;
public var Glow;
public var kettex:MovieClip;
public var pupg:TextField;
public var blurX:Number;
public var blurY:Number;
public var quality:Number;
public function upgrade_192(){
addFrameScript(0, frame1, 5, frame6);
}
public function nukeUp(_arg1:MouseEvent):void{
if ((((par.par.levelRoket < 5)) && ((par.par.upgradeSkill >= par.par.costSkill[par.par.levelRoket])))){
par.par.upgradeSkill = (par.par.upgradeSkill - par.par.costSkill[par.par.levelRoket]);
par.par.playEfek("btnklik");
par.par.levelRoket++;
nuke.gotoAndStop(par.par.levelRoket);
par.par.cekACHI();
};
}
public function klikexi(_arg1:MouseEvent):void{
par.par.playEfek("btnklik");
exi.removeEventListener(MouseEvent.CLICK, klikexi);
play();
}
public function unitUp(_arg1:MouseEvent):void{
if ((((par.par.levelBreed < 5)) && ((par.par.upgradeSkill >= par.par.costSkill[par.par.levelBreed])))){
par.par.upgradeSkill = (par.par.upgradeSkill - par.par.costSkill[par.par.levelBreed]);
par.par.playEfek("btnklik");
par.par.levelBreed++;
unit.gotoAndStop(par.par.levelBreed);
par.par.cekACHI();
};
}
public function klikNuke(_arg1:MouseEvent):void{
nuke.filters = Glow;
unit.filters = [];
shield.filters = [];
par.par.spesialWhat = "roket";
par.par.playEfek("btnklik");
pupg.text = par.par.upgradeSkill;
}
function frame1(){
stop();
}
public function klikUnit(_arg1:MouseEvent):void{
nuke.filters = [];
unit.filters = Glow;
shield.filters = [];
par.par.spesialWhat = "breed";
par.par.playEfek("btnklik");
pupg.text = par.par.upgradeSkill;
}
public function invurUp(_arg1:MouseEvent):void{
if ((((par.par.levelInvur < 5)) && ((par.par.upgradeSkill >= par.par.costSkill[par.par.levelInvur])))){
par.par.upgradeSkill = (par.par.upgradeSkill - par.par.costSkill[par.par.levelInvur]);
par.par.playEfek("btnklik");
par.par.levelInvur++;
shield.gotoAndStop(par.par.levelInvur);
par.par.cekACHI();
};
}
public function moveE(_arg1:MouseEvent):void{
if (kettex.visible == true){
kettex.x = mouseX;
kettex.y = mouseY;
};
}
public function outE(_arg1:MouseEvent):void{
kettex.visible = false;
}
function frame6(){
stop();
par = this.parent;
kettex.visible = false;
exi.addEventListener(MouseEvent.CLICK, klikexi);
nuke.gotoAndStop(par.par.levelRoket);
unit.gotoAndStop(par.par.levelBreed);
shield.gotoAndStop(par.par.levelInvur);
pupg.text = par.par.upgradeSkill;
nuke.up.addEventListener(MouseEvent.CLICK, nukeUp);
unit.up.addEventListener(MouseEvent.CLICK, unitUp);
shield.up.addEventListener(MouseEvent.CLICK, invurUp);
nuke.up.addEventListener(MouseEvent.MOUSE_OVER, overE);
unit.up.addEventListener(MouseEvent.MOUSE_OVER, overE);
shield.up.addEventListener(MouseEvent.MOUSE_OVER, overE);
nuke.up.addEventListener(MouseEvent.MOUSE_OUT, outE);
unit.up.addEventListener(MouseEvent.MOUSE_OUT, outE);
shield.up.addEventListener(MouseEvent.MOUSE_OUT, outE);
nuke.up.addEventListener(MouseEvent.MOUSE_MOVE, moveE);
unit.up.addEventListener(MouseEvent.MOUSE_MOVE, moveE);
shield.up.addEventListener(MouseEvent.MOUSE_MOVE, moveE);
nuke.addEventListener(MouseEvent.CLICK, klikNuke);
unit.addEventListener(MouseEvent.CLICK, klikUnit);
shield.addEventListener(MouseEvent.CLICK, klikInvur);
color = 16777062;
blurX = 10;
blurY = 10;
strength = 1;
inner = false;
knockout = false;
quality = BitmapFilterQuality.LOW;
filter = new GlowFilter(color, 1, blurX, blurY, strength, quality, inner, knockout);
Glow = new Array();
Glow.push(filter);
if (par.par.spesialWhat == "roket"){
nuke.filters = Glow;
unit.filters = [];
shield.filters = [];
};
if (par.par.spesialWhat == "breed"){
nuke.filters = [];
unit.filters = Glow;
shield.filters = [];
};
if (par.par.spesialWhat == "invur"){
nuke.filters = [];
unit.filters = [];
shield.filters = Glow;
};
bg.addEventListener(MouseEvent.CLICK, thisPLAY);
}
public function klikInvur(_arg1:MouseEvent):void{
nuke.filters = [];
unit.filters = [];
shield.filters = Glow;
par.par.spesialWhat = "invur";
par.par.playEfek("btnklik");
pupg.text = par.par.upgradeSkill;
}
public function thisPLAY(_arg1:MouseEvent):void{
play();
}
public function overE(_arg1:MouseEvent):void{
var _local2:*;
par.par.playEfek("mouseover");
kettex.visible = true;
_local2 = _arg1.currentTarget.parent.name;
switch (_local2){
case "nuke":
kettex.no.text = par.par.costSkill[par.par.levelRoket];
break;
case "unit":
kettex.no.text = par.par.costSkill[par.par.levelBreed];
break;
case "shield":
kettex.no.text = par.par.costSkill[par.par.levelInvur];
break;
};
}
}
}//package GatalicRebelv1_fla
Section 50
//UpgradeText_195 (GatalicRebelv1_fla.UpgradeText_195)
package GatalicRebelv1_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UpgradeText_195 extends MovieClip {
public var no:TextField;
}
}//package GatalicRebelv1_fla
Section 51
//WarnTextPlay_152 (GatalicRebelv1_fla.WarnTextPlay_152)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class WarnTextPlay_152 extends MovieClip {
public var no:MovieClip;
public var yes:MovieClip;
}
}//package GatalicRebelv1_fla
Section 52
//WinSign_200 (GatalicRebelv1_fla.WinSign_200)
package GatalicRebelv1_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class WinSign_200 extends MovieClip {
public var waktu;
public var star:MovieClip;
public var par;
public var timeteks:TextField;
public function WinSign_200(){
addFrameScript(0, frame1, 9, frame10);
}
function frame10(){
par = this.parent;
stop();
timeteks.text = ((Math.floor((waktu / 60)) + ":") + String((waktu % 60)));
star.gotoAndStop(par.cekWaktunya((waktu * 24)));
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 53
//WinStar_202 (GatalicRebelv1_fla.WinStar_202)
package GatalicRebelv1_fla {
import flash.display.*;
public dynamic class WinStar_202 extends MovieClip {
public function WinStar_202(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package GatalicRebelv1_fla
Section 54
//BigHitBase (BigHitBase)
package {
import flash.media.*;
public dynamic class BigHitBase extends Sound {
}
}//package
Section 55
//Blow1 (Blow1)
package {
import flash.display.*;
public dynamic class Blow1 extends MovieClip {
public function Blow1(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 56
//Blow2 (Blow2)
package {
import flash.display.*;
public dynamic class Blow2 extends MovieClip {
public function Blow2(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package
Section 57
//Blow3 (Blow3)
package {
import flash.display.*;
public dynamic class Blow3 extends MovieClip {
public function Blow3(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
}
}
}//package
Section 58
//Blow4 (Blow4)
package {
import flash.display.*;
public dynamic class Blow4 extends MovieClip {
public function Blow4(){
addFrameScript(14, frame15);
}
function frame15(){
stop();
}
}
}//package
Section 59
//BlowBoss (BlowBoss)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BlowBoss extends MovieClip {
public var par;
public function BlowBoss(){
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, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20, 20, frame21, 21, frame22, 22, frame23, 23, frame24, 24, frame25, 25, frame26, 26, frame27, 27, frame28, 28, frame29, 29, frame30, 30, frame31, 31, frame32, 32, frame33, 33, frame34, 34, frame35, 35, frame36, 36, frame37, 37, frame38, 38, frame39, 39, frame40, 40, frame41, 41, frame42, 42, frame43, 43, frame44, 44, frame45, 45, frame46, 46, frame47, 47, frame48, 48, frame49, 49, frame50, 50, frame51, 51, frame52, 52, frame53, 53, frame54, 54, frame55, 55, frame56, 56, frame57, 57, frame58, 58, frame59, 59, frame60, 60, frame61, 61, frame62, 62, frame63, 63, frame64, 64, frame65, 65, frame66, 66, frame67, 67, frame68, 68, frame69, 69, frame70, 70, frame71, 71, frame72, 72, frame73, 73, frame74, 74, frame75, 75, frame76, 76, frame77, 77, frame78);
}
function frame10(){
goBLOW();
}
function frame14(){
goBLOW();
}
function frame16(){
goBLOW();
}
function frame15(){
goBLOW();
}
function frame18(){
goBLOW();
}
function frame19(){
goBLOW();
}
function frame12(){
goBLOW();
}
function frame17(){
goBLOW();
}
function frame3(){
goBLOW();
}
function frame13(){
goBLOW();
}
function frame5(){
goBLOW();
}
function frame6(){
goBLOW();
}
function frame7(){
goBLOW();
}
function frame1(){
par = this.parent;
goBLOW();
}
function frame22(){
goBLOW();
}
function frame4(){
goBLOW();
}
function frame24(){
goBLOW();
}
function frame25(){
goBLOW();
}
function frame26(){
goBLOW();
}
function frame9(){
goBLOW();
}
function frame2(){
goBLOW();
}
function frame23(){
goBLOW();
}
function frame21(){
goBLOW();
}
function frame8(){
goBLOW();
}
function frame11(){
goBLOW();
}
function frame27(){
goBLOW();
}
function frame29(){
goBLOW();
}
function frame35(){
goBLOW();
}
function frame36(){
goBLOW();
}
function frame37(){
goBLOW();
}
function frame33(){
goBLOW();
}
function frame28(){
goBLOW();
}
function frame20(){
goBLOW();
}
function frame30(){
goBLOW();
}
public function goBLOW():void{
par = this.parent;
par.Efek("blow", (x + par.randRange(-10, 10)), (y + par.randRange(-10, 10)));
}
function frame32(){
goBLOW();
}
function frame34(){
goBLOW();
}
function frame31(){
goBLOW();
}
function frame40(){
goBLOW();
}
function frame39(){
goBLOW();
}
function frame43(){
goBLOW();
}
function frame44(){
goBLOW();
}
function frame45(){
goBLOW();
}
function frame46(){
goBLOW();
}
function frame47(){
goBLOW();
}
function frame41(){
goBLOW();
}
function frame48(){
goBLOW();
}
function frame49(){
goBLOW();
}
function frame42(){
goBLOW();
}
function frame38(){
goBLOW();
}
function frame51(){
goBLOW();
}
function frame52(){
goBLOW();
}
function frame53(){
goBLOW();
}
function frame54(){
goBLOW();
}
function frame55(){
goBLOW();
}
function frame56(){
goBLOW();
}
function frame50(){
goBLOW();
}
function frame58(){
goBLOW();
}
function frame59(){
goBLOW();
}
function frame57(){
goBLOW();
}
function frame60(){
goBLOW();
}
function frame61(){
goBLOW();
}
function frame62(){
goBLOW();
}
function frame63(){
goBLOW();
}
function frame64(){
goBLOW();
}
function frame65(){
goBLOW();
}
function frame66(){
goBLOW();
}
function frame67(){
goBLOW();
}
function frame68(){
goBLOW();
}
function frame69(){
goBLOW();
}
function frame70(){
goBLOW();
}
function frame72(){
goBLOW();
}
function frame73(){
goBLOW();
}
function frame75(){
goBLOW();
}
function frame77(){
goBLOW();
}
function frame71(){
goBLOW();
}
function frame76(){
goBLOW();
}
function frame78(){
stop();
par.removeChild(this);
}
function frame74(){
goBLOW();
}
}
}//package
Section 60
//BlowCont (BlowCont)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BlowCont extends MovieClip {
public var par;
public function BlowCont(){
addFrameScript(6, frame7);
}
function frame7(){
stop();
par = this.parent;
par.removeChild(this);
}
}
}//package
Section 61
//BlowSpRoket (BlowSpRoket)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BlowSpRoket extends MovieClip {
public var par;
public function BlowSpRoket(){
addFrameScript(19, frame20);
}
function frame20(){
stop();
par = this.parent;
par.removeChild(this);
}
}
}//package
Section 62
//Boss (Boss)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
public class Boss extends MovieClip {
public var Model:Number;// = 1
public var Link:String;
public var jumUnit:Number;// = 0
var buildCoolDown:Number;// = 0
public var tujuanBuild:MovieClip;
public var thePath:String;
var speed:Number;// = 1
public var whoUnit:Number;// = 0
var MaxbuildCoolDown:Number;// = 72
var damage:Number;// = 50
public var Health:Number;// = 10
var range:Number;// = 100
var ket;
public var pic:MovieClip;
var par;
public var body:MovieClip;
public var isDead:Boolean;// = false
var fireCoolDown:Number;// = 0
public function Boss():void{
Health = 10;
damage = 50;
speed = 1;
jumUnit = 0;
whoUnit = 0;
Model = 1;
isDead = false;
range = 100;
fireCoolDown = 0;
buildCoolDown = 0;
MaxbuildCoolDown = 72;
super();
addFrameScript(0, frame1);
addEventListener(Event.ADDED_TO_STAGE, TheInit);
}
function TheInit(_arg1:Event):void{
par = this.parent;
removeEventListener(Event.ADDED_TO_STAGE, TheInit);
ket = new KetHpBoss();
par.addChild(ket);
ket.setTarget(this);
ket.visible = false;
addEventListener(MouseEvent.MOUSE_OVER, ketON);
addEventListener(MouseEvent.MOUSE_OUT, ketOFF);
}
public function setUnit(_arg1:Number, _arg2:Number, _arg3:Number):void{
jumUnit = _arg2;
Model = _arg3;
whoUnit = _arg1;
switch (Model){
case 5:
gotoAndStop(1);
Health = 7500;
damage = 50;
speed = 1;
MaxbuildCoolDown = 72;
ket.nama.text = "X-Destroyer";
break;
case 6:
gotoAndStop(2);
Health = 20000;
damage = 75;
speed = 0.5;
MaxbuildCoolDown = 72;
ket.nama.text = "XXL-Destroyer";
break;
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
function frame1(){
stop();
}
public function setNextDestination(_arg1:MovieClip, _arg2:MovieClip):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Array;
tujuanBuild = _arg2;
x = (_arg1.x + randRange(-10, 10));
y = (_arg1.y + randRange(-10, 10));
_local3 = ((tujuanBuild.x + randRange(-5, 5)) - x);
_local4 = ((tujuanBuild.y + randRange(-5, 5)) - y);
_local5 = Math.atan2(_local4, _local3);
_local6 = ((_local5 * 180) / Math.PI);
rotation = _local6;
_local7 = new Array();
_local7.push(_arg1.name);
_local7.push(_arg2.name);
_local7.sort(Array.CASEINSENSITIVE);
Link = _local7.toString();
}
public function Attack():Number{
var _local1:Number;
_local1 = 0;
_local1 = (damage * 50);
return (_local1);
}
public function setNextDestinationNew(_arg1:MovieClip):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Array;
tujuanBuild = _arg1;
_local2 = ((tujuanBuild.x + randRange(-5, 5)) - x);
_local3 = ((tujuanBuild.y + randRange(-5, 5)) - y);
_local4 = Math.atan2(_local3, _local2);
_local5 = ((_local4 * 180) / Math.PI);
rotation = _local5;
_local6 = new Array();
_local6.push(_arg1.name);
_local6.sort(Array.CASEINSENSITIVE);
Link = _local6.toString();
}
function ketON(_arg1:MouseEvent):void{
ket.visible = true;
}
function ketOFF(_arg1:MouseEvent):void{
ket.visible = false;
}
public function Damage(_arg1:Number=0):void{
Health = (Health - _arg1);
par.Efek("hit", this.x, this.y);
if (Health <= 0){
par.Efek("bossDead", this.x, this.y);
isDead = true;
} else {
jumUnit = Math.ceil((Health / (10 * Model)));
};
}
public function Move(_arg1:Array=null):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:Boolean;
var _local6:*;
var _local7:Array;
var _local8:Array;
var _local9:*;
var _local10:Number;
var _local11:Number;
var _local12:Number;
var _local13:Number;
if (fireCoolDown > 0){
fireCoolDown--;
};
_local5 = false;
for (_local4 in _arg1) {
if (_arg1[_local4].isDead == false){
if (_arg1[_local4].whoUnit != whoUnit){
_local6 = Math.round(Math.sqrt((Math.pow((_arg1[_local4].x - x), 2) + Math.pow((_arg1[_local4].y - y), 2))));
if (_local6 <= range){
if (fireCoolDown <= 0){
_arg1[_local4].Damage(damage);
par.efekBulet(this, _arg1[_local4]);
fireCoolDown = 12;
};
};
if (_arg1[_local4].hitTestObject(this)){
_arg1[_local4].Damage((damage * 50));
Damage(_arg1[_local4].Attack());
};
};
};
};
if (tujuanBuild.body.hitTestObject(this.body)){
_local5 = true;
if (buildCoolDown <= 0){
buildCoolDown = MaxbuildCoolDown;
if (tujuanBuild.whoBase != whoUnit){
tujuanBuild.unitIN(this);
} else {
_local7 = new Array();
_local8 = new Array();
for (_local4 in tujuanBuild.link) {
if (tujuanBuild.link[_local4].whosBase() != whoUnit){
_local7.push(_local4);
} else {
_local8.push(_local4);
};
};
_local9 = _local7[randRange(0, (_local7.length - 1))];
if (_local7.length < 1){
_local9 = _local8[randRange(0, (_local8.length - 1))];
};
setNextDestination(tujuanBuild, tujuanBuild.link[_local9]);
};
} else {
buildCoolDown--;
};
};
if (_local5 == false){
_local10 = (tujuanBuild.x - x);
_local11 = (tujuanBuild.y - y);
_local12 = Math.atan2(_local11, _local10);
_local13 = ((_local12 * 180) / Math.PI);
rotation = _local13;
_local2 = (Math.cos(((rotation * Math.PI) / 180)) * speed);
_local3 = (Math.sin(((rotation * Math.PI) / 180)) * speed);
x = (x + _local2);
y = (y + _local3);
};
}
}
}//package
Section 63
//BtnKlik (BtnKlik)
package {
import flash.media.*;
public dynamic class BtnKlik extends Sound {
}
}//package
Section 64
//Building (Building)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
public class Building extends MovieClip {
var reloadAmmo:Number;// = 0
var Pop1:Number;// = 0
var Pop2:Number;// = 0
var Pop3:Number;// = 0
var Pop4:Number;// = 0
var yellowGlow:Array;
public var ket:MovieClip;
public var maxPop:Number;// = 60
var par;
var creatAt:Number;// = 12
var popAWAL:Number;// = 0
public var over:MovieClip;
var Ammo:Number;// = 5
var blueGlow:Array;
var greenGlow:Array;
var ctrUnit:Number;
var goAttack:Boolean;// = false
var bobotlink:Array;
public var shield:MovieClip;
var tujuanPASTI;
var damage:Number;// = 20
public var takeCom:Boolean;// = false
public var breed:MovieClip;
public var pic:MovieClip;
var unitCreate:Number;// = 1
public var body:MovieClip;
var ctrATTACK:Number;// = 0
var whoBase:Number;// = 0
var redGlow:Array;
var rangeTower:Number;// = 100
var fireCoolDown:Number;// = 0
public var link:Array;
public function Building():void{
unitCreate = 1;
Pop1 = 0;
Pop2 = 0;
Pop3 = 0;
Pop4 = 0;
whoBase = 0;
creatAt = 12;
maxPop = 60;
goAttack = false;
ctrATTACK = 0;
popAWAL = 0;
rangeTower = 100;
damage = 20;
fireCoolDown = 0;
Ammo = 5;
reloadAmmo = 0;
takeCom = false;
redGlow = new Array();
blueGlow = new Array();
yellowGlow = new Array();
greenGlow = new Array();
super();
addFrameScript(0, frame1);
initGlow();
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function whatUNIT():Number{
return (unitCreate);
}
public function setBase(_arg1:Number):void{
whoBase = _arg1;
}
function frame1(){
stop();
}
public function setPop(_arg1:Number):void{
popAWAL = _arg1;
switch (unitCreate){
case 1:
Pop1 = _arg1;
break;
case 2:
Pop2 = _arg1;
break;
case 3:
Pop3 = _arg1;
break;
case 4:
Pop4 = _arg1;
break;
case 5:
Pop2 = _arg1;
break;
};
}
public function createUnit(_arg1:Number):void{
par = this.parent;
unitCreate = _arg1;
gotoAndStop(unitCreate);
switch (unitCreate){
case 1:
maxPop = 60;
creatAt = 20;
break;
case 2:
maxPop = 60;
creatAt = 30;
break;
case 3:
maxPop = 60;
creatAt = 40;
break;
case 4:
maxPop = 60;
creatAt = 50;
break;
case 5:
maxPop = 30;
creatAt = 45;
break;
};
}
function initGlow():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Number;
var _local9:BitmapFilter;
_local1 = 0xFF3300;
_local2 = 1;
_local3 = 10;
_local4 = 10;
_local5 = 2.5;
_local6 = false;
_local7 = false;
_local8 = BitmapFilterQuality.LOW;
_local9 = new GlowFilter(_local1, _local2, _local3, _local4, _local5, _local8, _local6, _local7);
redGlow = new Array();
redGlow.push(_local9);
_local1 = 52479;
_local9 = new GlowFilter(_local1, _local2, _local3, _local4, _local5, _local8, _local6, _local7);
blueGlow = new Array();
blueGlow.push(_local9);
_local1 = 0xFFCC00;
_local9 = new GlowFilter(_local1, _local2, _local3, _local4, _local5, _local8, _local6, _local7);
yellowGlow = new Array();
yellowGlow.push(_local9);
_local1 = 0xFF00;
_local9 = new GlowFilter(_local1, _local2, _local3, _local4, _local5, _local8, _local6, _local7);
greenGlow = new Array();
greenGlow.push(_local9);
}
function addPOPNOW():void{
switch (unitCreate){
case 1:
Pop1 = (Pop1 + 1);
break;
case 2:
Pop2 = (Pop2 + 1);
break;
case 3:
Pop3 = (Pop3 + 1);
break;
case 4:
Pop4 = (Pop4 + 1);
break;
case 5:
Pop2 = (Pop2 + 1);
break;
};
}
function Defend():Number{
var _local1:Number;
_local1 = 0;
_local1 = (_local1 + (Pop1 * 10));
_local1 = (_local1 + (Pop2 * 20));
_local1 = (_local1 + (Pop3 * 30));
_local1 = (_local1 + (Pop4 * 40));
return (_local1);
}
public function whosBase():Number{
return (whoBase);
}
public function Check(_arg1:Array=null):void{
var _local2:*;
var _local3:*;
var _local4:*;
par = this.parent;
ket.ket.text = String(Populasi());
if (par.goBREED(this) == 1){
breed.visible = false;
} else {
breed.visible = true;
};
shield.visible = par.goINVUR(this);
if (Populasi() == maxPop){
ket.filters = greenGlow;
} else {
ket.filters = [];
};
switch (whoBase){
case 0:
filters = [];
break;
case 1:
filters = blueGlow;
break;
case 2:
filters = redGlow;
break;
case 3:
filters = yellowGlow;
break;
};
if (whoBase != 0){
if (ctrUnit < (creatAt - (Math.floor((Populasi() / 20)) * 5))){
ctrUnit = (ctrUnit + (1 * par.goBREED(this)));
} else {
ctrUnit = 0;
if (Populasi() < maxPop){
addPOPNOW();
};
};
};
if (goAttack == true){
par.drawWayStatis(this, tujuanPASTI);
};
if (ctrATTACK <= 0){
if (goAttack == true){
if (Populasi() > 10){
MoveUnit(tujuanPASTI);
ctrATTACK = 48;
};
};
} else {
ctrATTACK--;
};
if (unitCreate == 5){
if (reloadAmmo > 0){
reloadAmmo--;
} else {
if (fireCoolDown > 0){
fireCoolDown--;
} else {
for (_local2 in _arg1) {
if (_arg1[_local2].whoUnit != whoBase){
if (Ammo > 0){
_local3 = Math.round(Math.sqrt((Math.pow((_arg1[_local2].x - x), 2) + Math.pow((_arg1[_local2].y - y), 2))));
if (_local3 <= rangeTower){
Ammo--;
fireCoolDown = 6;
_local4 = new Roket(x, y, _arg1[_local2]);
par.par.playEfek("roket");
_local4.setDamage(damage);
par.addChild(_local4);
};
};
if (Ammo <= 0){
Ammo = 5;
reloadAmmo = 48;
};
};
};
};
};
};
}
public function Populasi():Number{
return ((((Pop1 + Pop2) + Pop3) + Pop4));
}
public function attackThis(_arg1:MovieClip):void{
var _local2:*;
for (_local2 in link) {
if (link[_local2] == _arg1){
tujuanPASTI = _arg1;
goAttack = true;
par.drawBuletStatis(this, tujuanPASTI);
};
};
}
public function MoveUnit(_arg1:MovieClip):void{
var _local2:Boolean;
var _local3:*;
var _local4:*;
par = this.parent;
_local2 = false;
for (_local3 in link) {
if (link[_local3] == _arg1){
if (bobotlink[_local3] != 1){
if (Pop1 > 1){
_local2 = true;
_local4 = new Unit();
_local4.setUnit(this, _arg1, Math.floor((Pop1 / 2)), 1);
Pop1 = Math.round((Pop1 / 2));
par.addChild(_local4);
};
};
if (bobotlink[_local3] != 2){
if (Pop2 > 1){
_local2 = true;
_local4 = new Unit();
_local4.setUnit(this, _arg1, Math.floor((Pop2 / 2)), 2);
Pop2 = Math.round((Pop2 / 2));
par.addChild(_local4);
};
};
if (bobotlink[_local3] != 2){
if (Pop3 > 1){
_local2 = true;
_local4 = new Unit();
_local4.setUnit(this, _arg1, Math.floor((Pop3 / 2)), 3);
Pop3 = Math.round((Pop3 / 2));
par.addChild(_local4);
};
};
if (bobotlink[_local3] != 3){
if (Pop4 > 1){
_local2 = true;
_local4 = new Unit();
_local4.setUnit(this, _arg1, Math.floor((Pop4 / 2)), 4);
Pop4 = Math.round((Pop4 / 2));
par.addChild(_local4);
};
};
};
};
if (_local2 == false){
par.par.playEfek("sendno");
};
}
public function InitBOBOT():void{
var _local1:*;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:DisplayObject;
var _local12:Number;
for (_local1 in link) {
if (bobotlink[_local1] != 0){
_local2 = (link[_local1].x - x);
_local3 = (link[_local1].y - y);
_local4 = Math.atan2(_local3, _local2);
_local5 = ((_local4 * 180) / Math.PI);
_local6 = Math.round(Math.sqrt((Math.pow((link[_local1].x - x), 2) + Math.pow((link[_local1].y - y), 2))));
_local6 = Math.round((_local6 / 40));
_local7 = (Math.cos(((_local5 * Math.PI) / 180)) * 40);
_local8 = (Math.sin(((_local5 * Math.PI) / 180)) * 40);
_local10 = 0;
while (_local10 < (_local6 - 1)) {
_local9 = new Stone();
_local9.gotoAndStop(randRange(1, 3));
_local9.rotation = randRange(-180, 180);
_local9.x = ((x + (_local7 * (_local10 + 1))) + randRange(-10, 10));
_local9.y = ((y + (_local8 * (_local10 + 1))) + randRange(-10, 10));
_local11 = par.getChildByName("cway");
_local12 = par.getChildIndex(_local11);
par.addChildAt(_local9, (_local12 - 1));
_local10++;
};
};
};
}
public function UNIT1():Number{
return (Pop1);
}
public function UNIT2():Number{
return (Pop2);
}
public function UNIT3():Number{
return (Pop3);
}
public function UNIT4():Number{
return (Pop4);
}
public function cancelAttack():void{
goAttack = false;
takeCom = false;
par.eraseBuletStatis(this);
}
public function SetLink(_arg1:Array, _arg2:Array=null):void{
var _local3:*;
link = new Array();
link = _arg1;
bobotlink = new Array();
if (_arg2 == null){
for (_local3 in link) {
bobotlink.push(0);
};
} else {
bobotlink = _arg2;
};
}
public function unitIN(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:Number;
par = this.parent;
if (_arg1.whoUnit == whoBase){
par.par.playEfek("in");
if (Populasi() < maxPop){
if ((Populasi() + _arg1.jumUnit) <= maxPop){
switch (_arg1.Model){
case 1:
Pop1 = (Pop1 + _arg1.jumUnit);
break;
case 2:
Pop2 = (Pop2 + _arg1.jumUnit);
break;
case 3:
Pop3 = (Pop3 + _arg1.jumUnit);
break;
case 4:
Pop4 = (Pop4 + _arg1.jumUnit);
break;
};
} else {
_local2 = ((((maxPop - Pop1) - Pop2) - Pop3) - Pop4);
switch (_arg1.Model){
case 1:
Pop1 = (Pop1 + _local2);
break;
case 2:
Pop2 = (Pop2 + _local2);
break;
case 3:
Pop3 = (Pop3 + _local2);
break;
case 4:
Pop4 = (Pop4 + _local2);
break;
};
};
};
} else {
if (par.goINVUR(this) == false){
_local3 = 0;
while (_local3 < _arg1.pic.currentFrame) {
par.Efek("hitb", _arg1.x, _arg1.y);
_local3++;
};
_local4 = _arg1.Attack();
_local5 = Defend();
if (_local4 > 200){
par.Quake();
par.par.playEfek("bighit");
} else {
par.par.playEfek("hit");
};
if (whoBase == 1){
par.redScren();
};
if (_local4 <= _local5){
_local6 = (_local5 - _local4);
_local7 = 1;
while (_local4 > 0) {
switch (_local7){
case 1:
if (Pop1 > 0){
_local4 = (_local4 - 10);
if (_local4 >= 0){
Pop1 = (Pop1 - 1);
};
};
break;
case 2:
if (Pop2 > 0){
_local4 = (_local4 - 20);
if (_local4 >= 0){
Pop2 = (Pop2 - 1);
};
};
break;
case 3:
if (Pop3 > 0){
_local4 = (_local4 - 30);
if (_local4 >= 0){
Pop3 = (Pop3 - 1);
};
};
break;
case 4:
if (Pop4 > 0){
_local4 = (_local4 - 40);
if (_local4 >= 0){
Pop4 = (Pop4 - 1);
};
};
break;
};
++_local7;
if (_local7 > 4){
_local7 = 1;
};
};
if (Populasi() == 0){
ctrUnit = 0;
addPOPNOW();
};
} else {
Pop1 = 0;
Pop2 = 0;
Pop3 = 0;
Pop4 = 0;
whoBase = _arg1.whoUnit;
if (_arg1.whoUnit == 1){
par.theDOMINATE();
};
cancelAttack();
_local6 = (_local4 - _local5);
switch (_arg1.Model){
case 1:
Pop1 = Math.round((_local6 / 10));
break;
case 2:
Pop2 = Math.round((_local6 / 20));
break;
case 3:
Pop3 = Math.round((_local6 / 30));
break;
case 4:
Pop4 = Math.round((_local6 / 40));
break;
};
switch (unitCreate){
case 1:
Pop1 = (Pop1 + popAWAL);
break;
case 2:
Pop2 = (Pop2 + popAWAL);
break;
case 3:
Pop3 = (Pop3 + popAWAL);
break;
case 4:
Pop4 = (Pop4 + popAWAL);
break;
case 5:
Pop2 = (Pop2 + popAWAL);
break;
};
};
};
};
}
public function cekLINK():Boolean{
var _local1:*;
var _local2:*;
_local1 = true;
for (_local2 in link) {
if (link[_local2].whosBase() != whoBase){
_local1 = false;
};
};
return (_local1);
}
public function hitSProket(_arg1:Number):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:Number;
_local2 = _arg1;
_local3 = Defend();
if (_local2 > 200){
par.Quake();
par.par.playEfek("bighit");
} else {
par.par.playEfek("hit");
};
if (whoBase == 1){
par.redScren();
};
if (_local2 <= _local3){
_local4 = (_local3 - _local2);
_local5 = 1;
while (_local2 > 0) {
switch (_local5){
case 1:
if (Pop1 > 0){
_local2 = (_local2 - 10);
if (_local2 >= 0){
Pop1 = (Pop1 - 1);
};
};
break;
case 2:
if (Pop2 > 0){
_local2 = (_local2 - 20);
if (_local2 >= 0){
Pop2 = (Pop2 - 1);
};
};
break;
case 3:
if (Pop3 > 0){
_local2 = (_local2 - 30);
if (_local2 >= 0){
Pop3 = (Pop3 - 1);
};
};
break;
case 4:
if (Pop4 > 0){
_local2 = (_local2 - 40);
if (_local2 >= 0){
Pop4 = (Pop4 - 1);
};
};
break;
};
++_local5;
if (_local5 > 4){
_local5 = 1;
};
};
if (Populasi() == 0){
ctrUnit = 0;
addPOPNOW();
};
} else {
Pop1 = 0;
Pop2 = 0;
Pop3 = 0;
Pop4 = 0;
addPOPNOW();
};
}
}
}//package
Section 65
//EndingMC (EndingMC)
package {
import flash.display.*;
public dynamic class EndingMC extends MovieClip {
public function EndingMC(){
addFrameScript(344, frame345);
}
function frame345(){
stop();
}
}
}//package
Section 66
//Explo1 (Explo1)
package {
import flash.media.*;
public dynamic class Explo1 extends Sound {
}
}//package
Section 67
//Explo2 (Explo2)
package {
import flash.media.*;
public dynamic class Explo2 extends Sound {
}
}//package
Section 68
//Explo3 (Explo3)
package {
import flash.media.*;
public dynamic class Explo3 extends Sound {
}
}//package
Section 69
//HitB (HitB)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class HitB extends MovieClip {
public var par;
public function HitB(){
addFrameScript(12, frame13);
}
function frame13(){
stop();
par = this.parent;
par.removeChild(this);
}
}
}//package
Section 70
//HitBase (HitBase)
package {
import flash.media.*;
public dynamic class HitBase extends Sound {
}
}//package
Section 71
//Ingame (Ingame)
package {
import flash.media.*;
public dynamic class Ingame extends Sound {
}
}//package
Section 72
//Intro (Intro)
package {
import flash.media.*;
public dynamic class Intro extends Sound {
}
}//package
Section 73
//IntroMC (IntroMC)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class IntroMC extends MovieClip {
public var par;
public function IntroMC(){
addFrameScript(0, frame1, 959, frame960);
}
function frame960(){
stop();
par = this.parent;
par.fades.fadeIN("main");
}
function frame1(){
stop();
}
}
}//package
Section 74
//InUnit (InUnit)
package {
import flash.media.*;
public dynamic class InUnit extends Sound {
}
}//package
Section 75
//KetHpBoss (KetHpBoss)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class KetHpBoss extends MovieClip {
public var hp:TextField;
public var nama:TextField;
public var target;
public function KetHpBoss(){
addFrameScript(0, frame1);
}
function frame1(){
mouseEnabled = false;
mouseChildren = false;
}
public function setTarget(_arg1:MovieClip):void{
target = _arg1;
addEventListener(Event.ENTER_FRAME, follow);
}
public function follow(_arg1:Event):void{
var _local2:*;
if (target.isDead == false){
x = target.x;
y = target.y;
hp.text = target.Health;
};
if ((((target.isDead == true)) || ((target == null)))){
removeEventListener(Event.ENTER_FRAME, follow);
_local2 = this.parent;
_local2.removeChild(this);
};
}
}
}//package
Section 76
//Laser1 (Laser1)
package {
import flash.media.*;
public dynamic class Laser1 extends Sound {
}
}//package
Section 77
//Laser2 (Laser2)
package {
import flash.media.*;
public dynamic class Laser2 extends Sound {
}
}//package
Section 78
//Laser3 (Laser3)
package {
import flash.media.*;
public dynamic class Laser3 extends Sound {
}
}//package
Section 79
//MainMC (MainMC)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainMC extends MovieClip {
public const key1:Number = 49;
public const key2:Number = 50;
public const key3:Number = 51;
public const key4:Number = 52;
public const key5:Number = 53;
public const key6:Number = 54;
public const key8:Number = 56;
public const keyA:Number = 65;
public const keyB:Number = 66;
public const keyD:Number = 68;
public const keyF:Number = 70;
public const keyG:Number = 71;
public const keyH:Number = 72;
public const keyI:Number = 73;
public const keyE:Number = 69;
public const key7:Number = 55;
public const keyP:Number = 80;
public const keyQ:Number = 81;
public const keyR:Number = 82;
public const keyT:Number = 84;
public const keyW:Number = 87;
public const keyU:Number = 85;
public const keyV:Number = 86;
public const keyZ:Number = 90;
public const keyC:Number = 67;
public const keyY:Number = 89;
public const keyM:Number = 77;
public const keyX:Number = 88;
public const keyS:Number = 83;
public const keyf2:Number = 113;
public const keyf1:Number = 112;
public var menupanel:MovieClip;
public var b1:Building;
public var b3:Building;
public var b5:Building;
public var b8:Building;
public var b2:Building;
public var b4:Building;
public var addGAME:SimpleButton;
public var b6:Building;
public var b7:Building;
public var achie:MovieClip;
public var breedBoolean:Boolean;
public var BUILDINGarray:Array;
public var tex:MovieClip;
public var ringe:MovieClip;
public var dKeyIsDown:Boolean;
public var bg:MovieClip;
public var breedCTR:Number;
public var i;
public var b9:Building;
public var barcrit:MovieClip;
public var vKeyIsDown:Boolean;
public var skipbtn:MovieClip;
public var key2IsDown:Boolean;
public var maxTEXT:Number;
public var buildingFrom;
public var par;
public var keyPressed:uint;
public var goQuake:Boolean;
public var zKeyIsDown:Boolean;
public var aKeyIsDown:Boolean;
public var jumCommand2:Number;
public var jumCommand3:Number;
public var critBoolean:Boolean;
public var invurCTR:Number;
public var sKeyIsDown:Boolean;
public var fullCTR:Number;
public var enemyunit:Array;
public var theTEXT:Number;
public var upg:MovieClip;
public var btnmainmenu:SimpleButton;
public var waitToCommand3:Number;
public var key1IsDown:Boolean;
public var eKeyIsDown:Boolean;
public var ctrSpesial:Number;
public var starTemp;
public var waitToCommand2:Number;
public var btnupg:SimpleButton;
public var BOSSDEAD:Boolean;
public var modeTEXT:Number;
public var MAXCOMMAND:Number;
public var wKeyIsDown:Boolean;
public var musifFIRST:Boolean;
public var isSHIFT:Boolean;
public var rightKeyIsDown:Boolean;
public var delay:Number;
public var unit:Array;
public var ctrTUTOR:Number;
public var downKeyIsDown:Boolean;
public var s12:MovieClip;
public var s14:MovieClip;
public var s15:MovieClip;
public var s10:MovieClip;
public var s11:MovieClip;
public var s19:MovieClip;
public var s13:MovieClip;
public var s17:MovieClip;
public var s18:MovieClip;
public var s16:MovieClip;
public var critCTR:Number;
public var s20:MovieClip;
public var s21:MovieClip;
public var s22:MovieClip;
public var s23:MovieClip;
public var s24:MovieClip;
public var s25:MovieClip;
public var s26:MovieClip;
public var s27:MovieClip;
public var s28:MovieClip;
public var s29:MovieClip;
public var spaceKeyIsDown:Boolean;
public var b10:Building;
public var b11:Building;
public var ps:MovieClip;
public var b13:Building;
public var b14:Building;
public var cway2:MovieClip;
public var cway3:MovieClip;
public var b17:Building;
public var b18:Building;
public var b19:Building;
public var b15:Building;
public var b16:Building;
public var s30:MovieClip;
public var b12:Building;
public var btnmedal:SimpleButton;
public var invurBoolean:Boolean;
public var s0:MovieClip;
public var s1:MovieClip;
public var s3:MovieClip;
public var ext:MovieClip;
public var s5:MovieClip;
public var s6:MovieClip;
public var s7:MovieClip;
public var s8:MovieClip;
public var b26:Building;
public var b27:Building;
public var b28:Building;
public var b29:Building;
public var b24:Building;
public var s9:MovieClip;
public var s2:MovieClip;
public var b20:Building;
public var s4:MovieClip;
public var b22:Building;
public var b23:Building;
public var b25:Building;
public var sta:Array;
public var b30:Building;
public var b21:Building;
public var lagiDown:Boolean;
public var boss2:Boss;
public var kettext:MovieClip;
public var xKeyIsDown:Boolean;
public var fKeyIsDown:Boolean;
public var spesial:MovieClip;
public var BOSSDEADDELAY:Number;
public var building:Array;
public var speedyBoolean:Boolean;
public var qKeyIsDown:Boolean;
public var theQuake:Number;
public var key4IsDown:Boolean;
public var lose:MovieClip;
public var pauseGame:Boolean;
public var timeR:Number;
public var cKeyIsDown:Boolean;
public var mapTUTOR:MovieClip;
public var countTutor:Boolean;
public var boss:Boss;
public var buildingDest;
public var gKeyIsDown:Boolean;
public var btnmore:SimpleButton;
public var cway:MovieClip;
public var mainbg:MovieClip;
public var pancon:MovieClip;
public var key3IsDown:Boolean;
public var upKeyIsDown:Boolean;
public var speedyCTR:Number;
public var rKeyIsDown:Boolean;
public var win:MovieClip;
public var leftKeyIsDown:Boolean;
public var cbl:MovieClip;
public function MainMC(){
addFrameScript(0, frame1, 1, frame2, 9, frame10, 17, frame18, 25, frame26, 33, frame34, 41, frame42, 49, frame50, 57, frame58, 64, frame65, 71, frame72, 79, frame80, 87, frame88, 95, frame96, 103, frame104, 111, frame112, 119, frame120, 127, frame128, 135, frame136, 143, frame144, 151, frame152, 159, frame160, 167, frame168, 175, frame176, 183, frame184, 191, frame192, 199, frame200, 207, frame208, 215, frame216, 223, frame224, 231, frame232, 239, frame240, 250, frame251);
}
public function SKIPDUNG():void{
skipbtn.visible = false;
tex.init();
stage.removeEventListener(MouseEvent.CLICK, klikText);
if (modeTEXT == 0){
INIT();
} else {
YESWIN();
};
}
public function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1);
return (_local3);
}
public function efekBulet(_arg1:MovieClip, _arg2:MovieClip):void{
if (_arg1.whoUnit == 1){
addCrit();
cbl.drawBulet((_arg1.x + randRange(-5, 5)), (_arg1.y + randRange(-5, 5)), (_arg2.x + randRange(-5, 5)), (_arg2.y + randRange(-5, 5)));
};
if (_arg1.whoUnit == 2){
cbl.drawBuletE((_arg1.x + randRange(-5, 5)), (_arg1.y + randRange(-5, 5)), (_arg2.x + randRange(-5, 5)), (_arg2.y + randRange(-5, 5)));
};
if (_arg1.whoUnit == 3){
cbl.drawBuletE2((_arg1.x + randRange(-5, 5)), (_arg1.y + randRange(-5, 5)), (_arg2.x + randRange(-5, 5)), (_arg2.y + randRange(-5, 5)));
};
}
public function klikMore(_arg1:MouseEvent):void{
var _local2:URLRequest;
par.playEfek("btnklik");
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2, "_blank");
}
public function outBuilding(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
if (pauseGame == false){
if (lagiDown == false){
cway.wayDraw.graphics.clear();
_local2 = getAllPanah();
for (_local3 in _local2) {
removeChild(_local2[_local3]);
};
};
cway3.wayDraw.graphics.clear();
kettext.visible = false;
par.mouseBack();
};
}
public function spesialCLICK(_arg1:MouseEvent):void{
DOSP();
}
function frame18(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
b1.SetLink(new Array(b2));
b2.SetLink(new Array(b1, b3));
b3.SetLink(new Array(b2));
b1.createUnit(1);
b2.createUnit(1);
b3.createUnit(1);
b1.setBase(1);
b2.setBase(1);
b3.setBase(2);
b1.setPop(5);
b2.setPop(10);
b3.setPop(15);
goTexting(1);
}
function frame2(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
b1.SetLink(new Array(b2));
b2.SetLink(new Array(b1, b3));
b3.SetLink(new Array(b2));
b1.createUnit(1);
b2.createUnit(1);
b3.createUnit(1);
b1.setBase(1);
b1.setPop(10);
b2.setPop(5);
b3.setPop(10);
goTexting(14);
}
public function goSPEED(_arg1:MovieClip):Number{
if (_arg1.whoUnit == 1){
if (speedyBoolean == true){
_arg1.speedico.visible = true;
return (2);
};
};
_arg1.speedico.visible = false;
return (1);
}
function frame26(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
b1.SetLink(new Array(b2));
b2.SetLink(new Array(b1, b3, b4));
b3.SetLink(new Array(b2, b4));
b4.SetLink(new Array(b2, b3));
b1.createUnit(1);
b2.createUnit(1);
b3.createUnit(1);
b4.createUnit(1);
b1.setBase(1);
b4.setBase(2);
b1.setPop(20);
b2.setPop(10);
b3.setPop(10);
b4.setPop(5);
b1.createUnit(1);
b2.createUnit(1);
b3.createUnit(1);
b4.createUnit(1);
goTexting(2);
}
function frame1(){
theTEXT = 0;
maxTEXT = 0;
modeTEXT = 0;
skipbtn.visible = false;
skipbtn.addEventListener(MouseEvent.CLICK, skipALL);
stop();
BUILDINGarray = new Array();
par = this.parent;
delay = 0;
lagiDown = false;
critCTR = 1;
critBoolean = false;
BOSSDEAD = false;
BOSSDEADDELAY = 500;
pauseGame = false;
timeR = 0;
lose.gotoAndStop(1);
lose.visible = false;
win.gotoAndStop(1);
win.visible = false;
ps.visible = false;
par.stopMusic();
kettext.visible = false;
musifFIRST = false;
ext.visible = false;
mapTUTOR.visible = false;
par.playMusic("map");
countTutor = false;
ctrTUTOR = 96;
theQuake = 0;
goQuake = false;
isSHIFT = false;
stage.addEventListener(KeyboardEvent.KEY_DOWN, pressKey);
stage.addEventListener(KeyboardEvent.KEY_UP, releaseKey);
ctrSpesial = 0;
fullCTR = (24 * 60);
speedyCTR = 1;
speedyBoolean = false;
breedCTR = 1;
breedBoolean = false;
invurCTR = 1;
invurBoolean = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMOVE);
sta = new Array();
sta.push(s0);
sta.push(s1);
sta.push(s2);
sta.push(s3);
sta.push(s4);
sta.push(s5);
sta.push(s6);
sta.push(s7);
sta.push(s8);
sta.push(s9);
sta.push(s10);
sta.push(s11);
sta.push(s12);
sta.push(s13);
sta.push(s14);
sta.push(s15);
sta.push(s16);
sta.push(s17);
sta.push(s18);
sta.push(s19);
sta.push(s20);
sta.push(s21);
sta.push(s22);
sta.push(s23);
sta.push(s24);
sta.push(s25);
sta.push(s26);
sta.push(s27);
sta.push(s28);
sta.push(s29);
sta.push(s30);
for (i in sta) {
sta[i].addEventListener(MouseEvent.CLICK, klikStage);
sta[i].addEventListener(MouseEvent.MOUSE_OVER, overStage);
sta[i].ket.text = i;
starTemp = par.myStar[i];
if (starTemp == 0){
starTemp = 4;
};
sta[i].star.gotoAndStop(starTemp);
sta[i].visible = false;
if (i <= par.FARSTAGE){
sta[i].visible = true;
};
};
btnupg.addEventListener(MouseEvent.CLICK, klikUPG);
btnupg.addEventListener(MouseEvent.MOUSE_OVER, overStage);
btnmedal.addEventListener(MouseEvent.MOUSE_OVER, overStage);
btnmore.addEventListener(MouseEvent.MOUSE_OVER, overStage);
btnmedal.addEventListener(MouseEvent.CLICK, klikMedal);
btnmainmenu.addEventListener(MouseEvent.CLICK, klikMenu);
btnmore.addEventListener(MouseEvent.CLICK, klikMore);
addGAME.addEventListener(MouseEvent.CLICK, klikMore);
addGAME.visible = false;
if (par.FARSTAGE > 6){
addGAME.visible = true;
};
waitToCommand2 = 0;
jumCommand2 = 0;
waitToCommand3 = 0;
jumCommand3 = 0;
MAXCOMMAND = 3;
}
public function dealCrit(_arg1:MovieClip):Number{
if (_arg1.whoUnit != 1){
return (1);
};
if (critBoolean == true){
if (randRange(1, 100) <= 20){
return (2);
};
return (1);
};
return (1);
}
public function DOSP():void{
if (pauseGame == false){
if (spesial.currentLabel == "rede"){
if (spesial.pic.currentLabel == "roket"){
par.playEfek("btnklik");
par.kursorGOSP();
stage.addEventListener(MouseEvent.MOUSE_UP, roketGO);
};
if (spesial.pic.currentLabel == "speed"){
par.playEfek("btnklik");
speedyBoolean = true;
speedyCTR = (24 * 20);
ctrSpesial = 0;
};
if (spesial.pic.currentLabel == "breed"){
par.playEfek("btnklik");
breedBoolean = true;
breedCTR = (24 * 15);
par.getAchi(3);
ctrSpesial = 0;
};
if (spesial.pic.currentLabel == "invur"){
par.playEfek("btnklik");
invurBoolean = true;
invurCTR = (24 * (3 + Math.round((1.5 * par.levelInvur))));
par.getAchi(2);
ctrSpesial = 0;
};
};
};
}
public function cekSP():void{
if (ctrSpesial < fullCTR){
ctrSpesial++;
};
if (ctrSpesial == fullCTR){
spesial.gotoAndStop("rede");
spesial.ket.visible = true;
} else {
spesial.gotoAndStop(Math.floor(((ctrSpesial / fullCTR) * 50)));
spesial.ket.visible = false;
};
speedCek();
breedCek();
invurCek();
}
function frame34(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
b1.SetLink(new Array(b2, b3, b4));
b2.SetLink(new Array(b1, b3, b4, b5));
b3.SetLink(new Array(b1, b2, b5));
b4.SetLink(new Array(b1, b2, b5));
b5.SetLink(new Array(b2, b3, b4));
b1.createUnit(1);
b2.createUnit(2);
b3.createUnit(1);
b4.createUnit(1);
b5.createUnit(1);
b1.setBase(1);
b5.setBase(2);
b1.setPop(5);
b5.setPop(5);
b2.setPop(20);
b3.setPop(10);
b4.setPop(10);
goTexting(3);
}
function frame10(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
b1.SetLink(new Array(b2));
b2.SetLink(new Array(b1));
b1.createUnit(1);
b2.createUnit(1);
b1.setBase(1);
b2.setBase(2);
b1.setPop(20);
b2.setPop(5);
INIT();
}
public function roketGO(_arg1:MouseEvent):void{
var _local2:*;
par.playEfek("bigboy");
stage.removeEventListener(MouseEvent.MOUSE_UP, roketGO);
ctrSpesial = 0;
_local2 = new RoketSpesial();
_local2.x = mouseX;
_local2.y = mouseY;
addChild(_local2);
par.getAchi(1);
par.outSP();
}
function frame42(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
b1.SetLink(new Array(b2, b3));
b2.SetLink(new Array(b1, b7));
b3.SetLink(new Array(b1, b4));
b4.SetLink(new Array(b3, b6));
b5.SetLink(new Array(b6, b7));
b6.SetLink(new Array(b4, b5));
b7.SetLink(new Array(b2, b5));
b1.createUnit(1);
b2.createUnit(1);
b3.createUnit(1);
b4.createUnit(2);
b5.createUnit(1);
b6.createUnit(1);
b7.createUnit(1);
b1.setBase(1);
b5.setBase(2);
b1.setPop(5);
b5.setPop(5);
b2.setPop(10);
b3.setPop(10);
b4.setPop(20);
b6.setPop(10);
b7.setPop(10);
goTexting(4);
}
public function Quake():void{
if (theQuake == 0){
theQuake++;
goQuake = true;
};
switch (theQuake){
case 1:
x = (x - 4);
y = (y - 4);
theQuake++;
break;
case 2:
x = (x + 4);
y = (y + 4);
theQuake++;
break;
case 3:
x = (x + 4);
y = (y - 4);
theQuake++;
break;
case 4:
x = (x - 4);
y = (y + 4);
theQuake++;
break;
case 5:
x = (x - 4);
y = (y + 4);
theQuake++;
break;
case 6:
x = (x + 4);
y = (y - 4);
theQuake++;
break;
case 7:
x = (x + 4);
y = (y + 4);
theQuake++;
break;
case 8:
x = (x - 4);
y = (y - 4);
theQuake = 0;
goQuake = false;
break;
};
}
public function getAllStone():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((_local3 is Stone)){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
function frame50(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
b1.SetLink(new Array(b2, b3));
b2.SetLink(new Array(b1, b3));
b3.SetLink(new Array(b1, b2, b4, b5, b6, b7));
b4.SetLink(new Array(b3, b5, b6));
b5.SetLink(new Array(b4, b3));
b6.SetLink(new Array(b3, b4, b7));
b7.SetLink(new Array(b3, b6));
b1.createUnit(1);
b2.createUnit(1);
b3.createUnit(1);
b4.createUnit(1);
b5.createUnit(1);
b6.createUnit(1);
b7.createUnit(2);
b1.setBase(1);
b2.setBase(1);
b3.setBase(3);
b4.setBase(3);
b5.setBase(2);
b6.setBase(2);
b1.setPop(10);
b2.setPop(10);
b3.setPop(20);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(10);
goTexting(6);
}
function frame58(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
b1.SetLink(new Array(b5, b8));
b2.SetLink(new Array(b5, b6));
b3.SetLink(new Array(b6, b7));
b4.SetLink(new Array(b8, b7));
b5.SetLink(new Array(b1, b2, b6, b7, b8));
b6.SetLink(new Array(b2, b3, b5, b7, b8));
b7.SetLink(new Array(b3, b4, b5, b6, b8));
b8.SetLink(new Array(b1, b4, b5, b6, b7));
b1.createUnit(2);
b2.createUnit(2);
b3.createUnit(2);
b4.createUnit(2);
b5.createUnit(1);
b6.createUnit(1);
b7.createUnit(1);
b8.createUnit(1);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b1.setPop(5);
b2.setPop(5);
b3.setPop(5);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(10);
b8.setPop(10);
goTexting(8);
}
public function releaseKey(_arg1:KeyboardEvent):void{
var _local2:uint;
var _local3:*;
_local2 = _arg1.keyCode;
switch (_local2){
case Keyboard.RIGHT:
rightKeyIsDown = false;
break;
case Keyboard.LEFT:
leftKeyIsDown = false;
break;
case Keyboard.UP:
upKeyIsDown = false;
break;
case Keyboard.DOWN:
downKeyIsDown = false;
break;
case keyA:
aKeyIsDown = false;
break;
case keyD:
dKeyIsDown = false;
break;
case keyQ:
qKeyIsDown = false;
break;
case keyE:
eKeyIsDown = false;
break;
case keyW:
wKeyIsDown = false;
break;
case keyS:
sKeyIsDown = false;
break;
case keyR:
rKeyIsDown = false;
break;
case keyT:
break;
case keyY:
break;
case keyU:
break;
case keyI:
break;
case key1:
key1IsDown = false;
break;
case key2:
key2IsDown = false;
break;
case key3:
key3IsDown = false;
break;
case key4:
key4IsDown = false;
break;
case key6:
break;
case key5:
break;
case key7:
break;
case key8:
break;
case keyF:
fKeyIsDown = false;
break;
case keyf2:
break;
case keyH:
break;
case keyG:
gKeyIsDown = false;
break;
case keyM:
break;
case keyP:
break;
case Keyboard.SPACE:
DOSP();
spaceKeyIsDown = false;
break;
case Keyboard.SHIFT:
isSHIFT = false;
break;
};
}
function frame65(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
b1.SetLink(new Array(b4, b6));
b2.SetLink(new Array(b5, b7));
b3.SetLink(new Array(b4, b5, b6, b7));
b4.SetLink(new Array(b1, b3, b5));
b5.SetLink(new Array(b2, b3, b4));
b6.SetLink(new Array(b1, b3, b7));
b7.SetLink(new Array(b2, b3, b6));
b1.createUnit(2);
b2.createUnit(2);
b3.createUnit(2);
b4.createUnit(1);
b5.createUnit(1);
b6.createUnit(1);
b7.createUnit(1);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b1.setPop(10);
b2.setPop(10);
b3.setPop(20);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(10);
goTexting(10);
}
function frame72(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
b1.SetLink(new Array(b4, b5));
b2.SetLink(new Array(b4, b5, b6, b7));
b3.SetLink(new Array(b6, b7));
b4.SetLink(new Array(b1, b2, b5, b7, b8));
b5.SetLink(new Array(b1, b2, b4, b6, b9));
b6.SetLink(new Array(b2, b3, b5, b7, b9));
b7.SetLink(new Array(b2, b3, b4, b6, b8));
b8.SetLink(new Array(b4, b7));
b9.SetLink(new Array(b5, b6));
b1.createUnit(2);
b2.createUnit(3);
b3.createUnit(2);
b4.createUnit(1);
b5.createUnit(1);
b6.createUnit(1);
b7.createUnit(1);
b8.createUnit(2);
b9.createUnit(2);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b1.setPop(5);
b2.setPop(5);
b3.setPop(5);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(10);
b8.setPop(10);
b9.setPop(10);
INIT();
}
public function scUp(_arg1:Boolean=false):void{
}
public function INIT():void{
var _local1:*;
preInit();
addEventListener(Event.ENTER_FRAME, loopMain);
menuInit();
spesial.addEventListener(MouseEvent.CLICK, spesialCLICK);
for (_local1 in BUILDINGarray) {
BUILDINGarray[_local1].addEventListener(MouseEvent.MOUSE_DOWN, downBuilding);
BUILDINGarray[_local1].addEventListener(MouseEvent.MOUSE_UP, upBuilding);
BUILDINGarray[_local1].addEventListener(MouseEvent.MOUSE_OVER, overBuilding);
BUILDINGarray[_local1].addEventListener(MouseEvent.MOUSE_OUT, outBuilding);
BUILDINGarray[_local1].addEventListener(MouseEvent.CLICK, klikBuilding);
};
if (par.STAGE == 0){
mapTUTOR.ready();
} else {
mapTUTOR.visible = false;
};
}
public function DEINIT(_arg1:String=""):void{
var _local2:*;
var _local3:Array;
var _local4:Array;
var _local5:Array;
removeEventListener(Event.ENTER_FRAME, loopMain);
kettext.visible = false;
menuDeInit();
spesial.removeEventListener(MouseEvent.CLICK, spesialCLICK);
cway.wayDraw.graphics.clear();
cway2.wayDraw.graphics.clear();
cway3.wayDraw.graphics.clear();
cbl.buletDraw.graphics.clear();
for (_local2 in BUILDINGarray) {
BUILDINGarray[_local2].removeEventListener(MouseEvent.MOUSE_DOWN, downBuilding);
BUILDINGarray[_local2].removeEventListener(MouseEvent.MOUSE_UP, upBuilding);
BUILDINGarray[_local2].removeEventListener(MouseEvent.MOUSE_OVER, overBuilding);
BUILDINGarray[_local2].removeEventListener(MouseEvent.MOUSE_OUT, outBuilding);
BUILDINGarray[_local2].removeEventListener(MouseEvent.CLICK, klikBuilding);
};
unit = new Array();
unit = getAllUnit();
enemyunit = new Array();
enemyunit = getAllEnemy();
_local3 = new Array();
_local3 = getAllRoket();
_local4 = new Array();
_local4 = getAllStone();
_local5 = new Array();
_local5 = getAllPanahSemua();
for (_local2 in unit) {
if (unit[_local2] != null){
removeChild(unit[_local2]);
};
};
for (_local2 in enemyunit) {
if (enemyunit[_local2] != null){
removeChild(enemyunit[_local2]);
};
};
for (_local2 in _local3) {
if (_local3[_local2] != null){
removeChild(_local3[_local2]);
};
};
for (_local2 in _local4) {
removeChild(_local4[_local2]);
};
for (_local2 in _local5) {
removeChild(_local5[_local2]);
};
if (_arg1 != "retry"){
if (_arg1 == "win"){
if (par.STAGE == par.FARSTAGE){
par.FARSTAGE = (par.FARSTAGE + 1);
};
win.waktu = Math.round((timeR / 24));
if (((((((((((((((((!((par.STAGE == 5))) && (!((par.STAGE == 6))))) && (!((par.STAGE == 6))))) && (!((par.STAGE == 7))))) && (!((par.STAGE == 8))))) && (!((par.STAGE == 20))))) && (!((par.STAGE == 0))))) && (!((par.STAGE == 29))))) && (!((par.STAGE == 30))))){
YESWIN();
} else {
if (par.STAGE == 5){
goTexting(5, 1);
};
if (par.STAGE == 6){
goTexting(7, 1);
};
if (par.STAGE == 7){
goTexting(9, 1);
};
if (par.STAGE == 8){
goTexting(11, 1);
};
if (par.STAGE == 20){
goTexting(13, 1);
};
if (par.STAGE == 29){
goTexting(17, 1);
};
if (par.STAGE == 30){
goTexting(19, 1);
};
if (par.STAGE == 0){
goTexting(15, 1);
};
};
};
if (_arg1 == "lose"){
lose.visible = true;
lose.play();
stage.addEventListener(MouseEvent.CLICK, waitCLICK);
};
if (_arg1 == ""){
gotoAndStop(1);
};
} else {
gotoAndStop("retry");
};
}
public function waitCLICK(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.CLICK, waitCLICK);
if (par.STAGE != 30){
gotoAndStop(1);
} else {
par.gotoAndStop("ending");
};
}
function frame80(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
BUILDINGarray.push(b14);
BUILDINGarray.push(b15);
BUILDINGarray.push(b16);
BUILDINGarray.push(b17);
BUILDINGarray.push(b18);
BUILDINGarray.push(b19);
BUILDINGarray.push(b20);
BUILDINGarray.push(b21);
BUILDINGarray.push(b22);
BUILDINGarray.push(b23);
BUILDINGarray.push(b24);
b1.SetLink(new Array(b2, b5, b6));
b2.SetLink(new Array(b1, b5, b6));
b3.SetLink(new Array(b4, b7, b8));
b4.SetLink(new Array(b3, b7, b8));
b5.SetLink(new Array(b1, b2, b6, b9, b10));
b6.SetLink(new Array(b1, b2, b5, b9, b11));
b7.SetLink(new Array(b3, b4, b8, b12, b13));
b8.SetLink(new Array(b3, b4, b7, b12, b19));
b9.SetLink(new Array(b5, b6, b10, b11, b14, b15));
b10.SetLink(new Array(b5, b9, b23));
b11.SetLink(new Array(b6, b9, b16));
b12.SetLink(new Array(b7, b8, b13, b14, b15, b19));
b13.SetLink(new Array(b7, b12, b24));
b14.SetLink(new Array(b9, b12, b16, b17));
b15.SetLink(new Array(b9, b12, b23, b24));
b16.SetLink(new Array(b11, b14, b17, b18, b20));
b17.SetLink(new Array(b14, b16, b18, b19, b20));
b18.SetLink(new Array(b16, b17, b20));
b19.SetLink(new Array(b8, b12, b17));
b20.SetLink(new Array(b16, b17, b18));
b21.SetLink(new Array(b22, b23, b24));
b22.SetLink(new Array(b21, b23, b24));
b23.SetLink(new Array(b10, b15, b21, b22, b24));
b24.SetLink(new Array(b13, b15, b21, b22, b23));
b1.createUnit(4);
b2.createUnit(2);
b3.createUnit(4);
b4.createUnit(1);
b5.createUnit(1);
b6.createUnit(1);
b7.createUnit(1);
b8.createUnit(1);
b9.createUnit(1);
b10.createUnit(1);
b11.createUnit(1);
b12.createUnit(1);
b13.createUnit(1);
b14.createUnit(1);
b15.createUnit(1);
b16.createUnit(1);
b17.createUnit(1);
b18.createUnit(1);
b19.createUnit(1);
b20.createUnit(1);
b21.createUnit(1);
b22.createUnit(1);
b23.createUnit(1);
b24.createUnit(1);
b1.setBase(1);
b2.setBase(1);
b3.setBase(2);
b1.setPop(10);
b2.setPop(15);
b3.setPop(5);
b4.setPop(5);
b5.setPop(5);
b6.setPop(5);
b7.setPop(5);
b8.setPop(5);
b9.setPop(5);
b10.setPop(5);
b11.setPop(5);
b12.setPop(5);
b13.setPop(5);
b14.setPop(5);
b15.setPop(5);
b16.setPop(5);
b17.setPop(5);
b18.setPop(5);
b19.setPop(5);
b20.setPop(5);
b21.setPop(5);
b22.setPop(5);
b23.setPop(5);
b24.setPop(5);
boss.setUnit(2, 1, 5);
boss.setNextDestination(b3, b3);
INIT();
}
public function Efek(_arg1:String="", _arg2:Number=0, _arg3:Number=0):void{
var _local4:*;
switch (_arg1){
case "blow":
switch (randRange(1, 3)){
case 1:
_local4 = new Blow2();
par.playEfek("explo1");
break;
case 2:
_local4 = new Blow3();
par.playEfek("explo3");
break;
case 3:
_local4 = new Blow4();
par.playEfek("explo2");
break;
};
_local4.x = _arg2;
_local4.y = _arg3;
_local4.rotation = randRange(0, 360);
break;
case "hit":
_local4 = new Blow1();
_local4.x = (_arg2 + randRange(-5, 5));
_local4.y = (_arg3 + randRange(-5, 5));
_local4.rotation = randRange(0, 360);
par.playEfek("laser");
Efek("hitcont", _arg2, _arg3);
break;
case "hitcont":
_local4 = new BlowCont();
_local4.x = _arg2;
_local4.y = _arg3;
_local4.rotation = randRange(0, 360);
break;
case "hitb":
_local4 = new HitB();
_local4.x = (_arg2 + randRange(-5, 5));
_local4.y = (_arg3 + randRange(-5, 5));
_local4.rotation = randRange(0, 360);
break;
case "spesialRoket":
_local4 = new BlowSpRoket();
_local4.x = _arg2;
_local4.y = _arg3;
_local4.rotation = randRange(0, 360);
break;
case "bossDead":
_local4 = new BlowBoss();
_local4.x = _arg2;
_local4.y = _arg3;
_local4.rotation = randRange(0, 360);
break;
};
_local4.mouseEnabled = false;
_local4.mouseChildren = false;
addChild(_local4);
}
function frame88(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
b1.SetLink(new Array(b2));
b2.SetLink(new Array(b1, b7, b12));
b3.SetLink(new Array(b4));
b4.SetLink(new Array(b3, b9, b10));
b5.SetLink(new Array(b8));
b6.SetLink(new Array(b11));
b7.SetLink(new Array(b2, b8, b9, b12));
b8.SetLink(new Array(b5, b7, b9));
b9.SetLink(new Array(b4, b7, b8, b10));
b10.SetLink(new Array(b4, b9, b11, b12));
b11.SetLink(new Array(b6, b10, b12));
b12.SetLink(new Array(b2, b7, b10, b11));
b1.createUnit(3);
b2.createUnit(1);
b3.createUnit(3);
b4.createUnit(1);
b5.createUnit(3);
b6.createUnit(3);
b7.createUnit(2);
b8.createUnit(1);
b9.createUnit(2);
b10.createUnit(2);
b11.createUnit(1);
b12.createUnit(2);
b1.setBase(1);
b2.setBase(1);
b3.setBase(2);
b4.setBase(2);
b5.setBase(3);
b6.setBase(3);
b1.setPop(5);
b2.setPop(10);
b3.setPop(5);
b4.setPop(10);
b5.setPop(5);
b6.setPop(5);
b7.setPop(15);
b8.setPop(10);
b9.setPop(15);
b10.setPop(15);
b11.setPop(10);
b12.setPop(15);
INIT();
}
function frame208(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
b1.SetLink(new Array(b7, b9));
b2.SetLink(new Array(b8, b10));
b3.SetLink(new Array(b5, b6, b8), new Array(0, 0, 3));
b4.SetLink(new Array(b5, b6, b9), new Array(0, 0, 3));
b5.SetLink(new Array(b3, b4, b7), new Array(0, 0, 3));
b6.SetLink(new Array(b3, b4, b10), new Array(0, 0, 3));
b7.SetLink(new Array(b1, b5, b8, b9, b10), new Array(0, 3, 0, 0, 0));
b8.SetLink(new Array(b2, b3, b7, b9, b10), new Array(0, 3, 0, 0, 0));
b9.SetLink(new Array(b1, b4, b7, b8, b10), new Array(0, 3, 0, 0, 0));
b10.SetLink(new Array(b2, b6, b7, b8, b9), new Array(0, 3, 0, 0, 0));
b1.createUnit(4);
b2.createUnit(4);
b3.createUnit(2);
b4.createUnit(2);
b5.createUnit(1);
b6.createUnit(1);
b7.createUnit(5);
b8.createUnit(5);
b9.createUnit(5);
b10.createUnit(5);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b4.setBase(3);
b1.setPop(10);
b2.setPop(10);
b3.setPop(15);
b4.setPop(15);
b5.setPop(15);
b6.setPop(15);
b7.setPop(10);
b8.setPop(10);
b9.setPop(10);
b10.setPop(10);
INIT();
}
function frame200(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
b1.SetLink(new Array(b3, b4, b5, b6, b7));
b2.SetLink(new Array(b3, b4, b5, b9, b10));
b3.SetLink(new Array(b1, b2, b5));
b4.SetLink(new Array(b1, b2, b5));
b5.SetLink(new Array(b1, b2, b3, b4));
b6.SetLink(new Array(b1, b7, b8, b13), new Array(0, 0, 0, 3));
b7.SetLink(new Array(b1, b6, b8, b12), new Array(0, 0, 0, 3));
b8.SetLink(new Array(b6, b7));
b9.SetLink(new Array(b2, b10, b11, b13));
b10.SetLink(new Array(b2, b9, b11, b12));
b11.SetLink(new Array(b9, b10));
b12.SetLink(new Array(b7, b10), new Array(3, 3));
b13.SetLink(new Array(b6, b9), new Array(3, 3));
b1.createUnit(3);
b2.createUnit(3);
b3.createUnit(5);
b4.createUnit(5);
b5.createUnit(5);
b6.createUnit(1);
b7.createUnit(1);
b8.createUnit(2);
b9.createUnit(1);
b10.createUnit(1);
b11.createUnit(2);
b12.createUnit(4);
b13.createUnit(4);
b1.setBase(1);
b2.setBase(2);
b1.setPop(15);
b2.setPop(15);
b3.setPop(10);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(5);
b8.setPop(10);
b9.setPop(10);
b10.setPop(10);
b11.setPop(5);
b12.setPop(5);
b13.setPop(5);
INIT();
}
function frame96(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
b1.SetLink(new Array(b3, b7, b9));
b2.SetLink(new Array(b6, b8, b10));
b3.SetLink(new Array(b1, b4, b9));
b4.SetLink(new Array(b3, b5, b9));
b5.SetLink(new Array(b4, b6, b10));
b6.SetLink(new Array(b2, b5, b10));
b7.SetLink(new Array(b1, b8, b9));
b8.SetLink(new Array(b2, b7, b10));
b9.SetLink(new Array(b1, b3, b4, b7, b10));
b10.SetLink(new Array(b2, b5, b6, b8, b9));
b1.createUnit(2);
b2.createUnit(2);
b3.createUnit(2);
b4.createUnit(3);
b5.createUnit(2);
b6.createUnit(3);
b7.createUnit(2);
b8.createUnit(2);
b9.createUnit(4);
b10.createUnit(4);
b1.setBase(1);
b2.setBase(1);
b3.setBase(2);
b4.setBase(2);
b5.setBase(3);
b6.setBase(3);
b1.setPop(10);
b2.setPop(10);
b3.setPop(10);
b4.setPop(5);
b5.setPop(10);
b6.setPop(5);
b7.setPop(10);
b8.setPop(10);
b9.setPop(10);
b10.setPop(10);
INIT();
}
function frame216(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
BUILDINGarray.push(b14);
BUILDINGarray.push(b15);
BUILDINGarray.push(b16);
b1.SetLink(new Array(b5, b6));
b2.SetLink(new Array(b7, b8));
b3.SetLink(new Array(b11, b12));
b4.SetLink(new Array(b9, b10));
b5.SetLink(new Array(b1, b6, b11, b16));
b6.SetLink(new Array(b1, b5, b9, b13), new Array(0, 0, 3, 0));
b7.SetLink(new Array(b2, b8, b10, b14));
b8.SetLink(new Array(b2, b7, b12, b15), new Array(0, 0, 3, 0));
b9.SetLink(new Array(b4, b10, b6, b13), new Array(0, 0, 3, 0));
b10.SetLink(new Array(b4, b9, b7, b14));
b11.SetLink(new Array(b3, b12, b5, b16));
b12.SetLink(new Array(b3, b11, b8, b15), new Array(0, 0, 3, 0));
b13.SetLink(new Array(b6, b9, b14, b16));
b14.SetLink(new Array(b7, b10, b13, b15));
b15.SetLink(new Array(b8, b12, b14, b16));
b16.SetLink(new Array(b5, b11, b13, b15));
b1.createUnit(4);
b2.createUnit(4);
b3.createUnit(4);
b4.createUnit(4);
b5.createUnit(2);
b6.createUnit(2);
b7.createUnit(2);
b8.createUnit(2);
b9.createUnit(2);
b10.createUnit(2);
b11.createUnit(2);
b12.createUnit(2);
b13.createUnit(5);
b14.createUnit(5);
b15.createUnit(5);
b16.createUnit(5);
b1.setBase(1);
b2.setBase(2);
b1.setPop(10);
b2.setPop(10);
b3.setPop(10);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(10);
b8.setPop(10);
b9.setPop(15);
b10.setPop(15);
b11.setPop(15);
b12.setPop(15);
b13.setPop(15);
b14.setPop(15);
b15.setPop(15);
b16.setPop(15);
INIT();
}
public function drawWayStatis(_arg1:MovieClip, _arg2:MovieClip):void{
cway2.drawWay(_arg1.x, _arg1.y, _arg2.x, _arg2.y);
}
public function goBREED(_arg1:MovieClip):Number{
if (_arg1.whosBase() == 1){
if (breedBoolean == true){
return ((1 + par.levelBreed));
};
};
return (1);
}
public function downBuilding(_arg1:MouseEvent):void{
if (pauseGame == false){
buildingFrom = _arg1.currentTarget;
lagiDown = true;
stage.addEventListener(MouseEvent.MOUSE_UP, stageUP);
};
}
public function getAllPanah2():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((_local3 is PANAH2)){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
function frame224(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
BUILDINGarray.push(b14);
b1.SetLink(new Array(b7, b10));
b2.SetLink(new Array(b11, b14));
b3.SetLink(new Array(b4, b7, b11));
b4.SetLink(new Array(b3, b5, b8, b12));
b5.SetLink(new Array(b4, b6, b9, b13));
b6.SetLink(new Array(b5, b10, b14));
b7.SetLink(new Array(b1, b3, b8));
b8.SetLink(new Array(b7, b9, b4));
b9.SetLink(new Array(b8, b10, b5));
b10.SetLink(new Array(b1, b6, b9));
b11.SetLink(new Array(b2, b3, b12));
b12.SetLink(new Array(b11, b13, b4));
b13.SetLink(new Array(b12, b14, b5));
b14.SetLink(new Array(b2, b13, b6));
b1.createUnit(4);
b2.createUnit(4);
b3.createUnit(5);
b4.createUnit(5);
b5.createUnit(5);
b6.createUnit(5);
b7.createUnit(1);
b8.createUnit(1);
b9.createUnit(1);
b10.createUnit(1);
b11.createUnit(1);
b12.createUnit(1);
b13.createUnit(1);
b14.createUnit(1);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b6.setBase(3);
b1.setPop(10);
b2.setPop(15);
b3.setPop(15);
b4.setPop(15);
b5.setPop(15);
b6.setPop(15);
b7.setPop(15);
b8.setPop(15);
b9.setPop(15);
b10.setPop(15);
b11.setPop(15);
b12.setPop(15);
b13.setPop(15);
b14.setPop(15);
INIT();
}
function frame112(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
BUILDINGarray.push(b14);
b1.SetLink(new Array(b9, b10, b12));
b2.SetLink(new Array(b7, b8, b11));
b3.SetLink(new Array(b8));
b4.SetLink(new Array(b9));
b5.SetLink(new Array(b7, b8));
b6.SetLink(new Array(b9, b10));
b7.SetLink(new Array(b2, b5, b8), new Array(0, 0, 3));
b8.SetLink(new Array(b2, b3, b5, b7, b9, b11, b13, b14), new Array(0, 0, 0, 3, 0, 0, 0, 0));
b9.SetLink(new Array(b1, b4, b6, b10, b8, b12, b13, b14), new Array(0, 0, 0, 3, 0, 0, 0, 0));
b10.SetLink(new Array(b1, b6, b9), new Array(0, 0, 3));
b11.SetLink(new Array(b2, b8));
b12.SetLink(new Array(b1, b9));
b13.SetLink(new Array(b8, b9));
b14.SetLink(new Array(b8, b9));
b1.createUnit(3);
b2.createUnit(3);
b3.createUnit(3);
b4.createUnit(3);
b5.createUnit(2);
b6.createUnit(2);
b7.createUnit(2);
b8.createUnit(3);
b9.createUnit(3);
b10.createUnit(2);
b11.createUnit(2);
b12.createUnit(2);
b13.createUnit(4);
b14.createUnit(4);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b4.setBase(3);
b1.setPop(10);
b2.setPop(10);
b3.setPop(10);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(10);
b8.setPop(15);
b9.setPop(15);
b10.setPop(10);
b11.setPop(10);
b12.setPop(10);
b13.setPop(15);
b14.setPop(15);
INIT();
}
public function initSpecial():void{
ctrSpesial = 0;
speedyCTR = 0;
breedCTR = 0;
spesial.pic.gotoAndStop(par.spesialWhat);
spesial.ket.visible = false;
switch (par.spesialWhat){
case "roket":
fullCTR = (24 * 50);
break;
case "speed":
fullCTR = (24 * 20);
break;
case "breed":
fullCTR = (24 * 40);
break;
case "invur":
fullCTR = (24 * 60);
break;
};
}
function frame104(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
b1.SetLink(new Array(b6, b7));
b2.SetLink(new Array(b8, b9));
b3.SetLink(new Array(b6, b7));
b4.SetLink(new Array(b8, b9));
b5.SetLink(new Array(b7, b8));
b6.SetLink(new Array(b1, b3, b7));
b7.SetLink(new Array(b1, b3, b5, b6));
b8.SetLink(new Array(b2, b4, b5, b9));
b9.SetLink(new Array(b2, b4, b8));
b1.createUnit(2);
b2.createUnit(2);
b3.createUnit(2);
b4.createUnit(2);
b5.createUnit(4);
b6.createUnit(3);
b7.createUnit(2);
b8.createUnit(2);
b9.createUnit(3);
b1.setBase(1);
b2.setBase(1);
b3.setBase(2);
b4.setBase(2);
b5.setBase(3);
b1.setPop(10);
b2.setPop(10);
b3.setPop(10);
b4.setPop(10);
b5.setPop(10);
b6.setPop(15);
b7.setPop(15);
b8.setPop(10);
b9.setPop(10);
INIT();
}
function frame232(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
BUILDINGarray.push(b14);
BUILDINGarray.push(b15);
BUILDINGarray.push(b16);
BUILDINGarray.push(b17);
BUILDINGarray.push(b18);
BUILDINGarray.push(b19);
BUILDINGarray.push(b20);
b1.SetLink(new Array(b3, b4, b5));
b2.SetLink(new Array(b3, b4, b20));
b3.SetLink(new Array(b1, b2, b17));
b4.SetLink(new Array(b1, b2, b8));
b5.SetLink(new Array(b1, b6, b9, b10), new Array(0, 3, 3, 3));
b6.SetLink(new Array(b5, b7, b9, b10, b11), new Array(3, 3, 3, 3, 3));
b7.SetLink(new Array(b6, b8, b10, b11, b12), new Array(3, 3, 3, 3, 3));
b8.SetLink(new Array(b4, b7, b11, b12), new Array(0, 3, 3, 3));
b9.SetLink(new Array(b5, b6, b10, b13, b14), new Array(3, 3, 3, 3, 3));
b10.SetLink(new Array(b5, b6, b7, b9, b11, b13, b14, b15), new Array(3, 3, 3, 3, 3, 3, 3, 3));
b11.SetLink(new Array(b6, b7, b8, b10, b12, b14, b15, b16), new Array(3, 3, 3, 3, 3, 3, 3, 3));
b12.SetLink(new Array(b7, b8, b11, b15, b16), new Array(3, 3, 3, 3, 3));
b13.SetLink(new Array(b9, b10, b14, b17, b18), new Array(3, 3, 3, 3, 3));
b14.SetLink(new Array(b9, b10, b11, b13, b15, b17, b18, b19), new Array(3, 3, 3, 3, 3, 3, 3, 3));
b15.SetLink(new Array(b10, b11, b12, b14, b16, b18, b19, b20), new Array(3, 3, 3, 3, 3, 3, 3, 3));
b16.SetLink(new Array(b11, b12, b15, b19, b20));
b17.SetLink(new Array(b13, b14, b18, b3), new Array(3, 3, 3, 0));
b18.SetLink(new Array(b13, b14, b15, b17, b19), new Array(3, 3, 3, 3, 3));
b19.SetLink(new Array(b14, b15, b16, b18, b20), new Array(3, 3, 3, 3, 3));
b20.SetLink(new Array(b15, b16, b19, b2), new Array(3, 3, 3, 0));
b1.createUnit(4);
b2.createUnit(4);
b3.createUnit(4);
b4.createUnit(4);
b5.createUnit(3);
b6.createUnit(2);
b7.createUnit(2);
b8.createUnit(3);
b9.createUnit(2);
b10.createUnit(5);
b11.createUnit(5);
b12.createUnit(2);
b13.createUnit(2);
b14.createUnit(5);
b15.createUnit(5);
b16.createUnit(2);
b17.createUnit(3);
b18.createUnit(2);
b19.createUnit(2);
b20.createUnit(3);
b1.setBase(1);
b2.setBase(2);
b10.setBase(3);
b15.setBase(3);
b1.setPop(10);
b2.setPop(10);
b3.setPop(10);
b4.setPop(10);
b5.setPop(10);
b6.setPop(15);
b7.setPop(15);
b8.setPop(10);
b9.setPop(15);
b10.setPop(15);
b11.setPop(15);
b12.setPop(15);
b13.setPop(15);
b14.setPop(15);
b15.setPop(15);
b16.setPop(15);
b17.setPop(10);
b18.setPop(15);
b19.setPop(15);
b20.setPop(10);
goTexting(16);
}
public function goTexting(_arg1:Number=0, _arg2:Number=0):void{
preInit();
modeTEXT = _arg2;
if (((!((par.STAGE == 0))) && (!((modeTEXT == 1))))){
skipbtn.visible = true;
};
stage.addEventListener(MouseEvent.CLICK, klikText);
switch (_arg1){
case 1:
theTEXT = 1;
maxTEXT = 3;
break;
case 2:
theTEXT = 4;
maxTEXT = 5;
break;
case 3:
theTEXT = 6;
maxTEXT = 8;
break;
case 4:
theTEXT = 9;
maxTEXT = 10;
break;
case 5:
theTEXT = 11;
maxTEXT = 11;
break;
case 6:
theTEXT = 12;
maxTEXT = 14;
break;
case 7:
theTEXT = 15;
maxTEXT = 17;
break;
case 8:
theTEXT = 18;
maxTEXT = 19;
break;
case 9:
theTEXT = 20;
maxTEXT = 21;
break;
case 10:
theTEXT = 22;
maxTEXT = 22;
break;
case 11:
theTEXT = 23;
maxTEXT = 23;
break;
case 12:
theTEXT = 24;
maxTEXT = 26;
break;
case 13:
theTEXT = 27;
maxTEXT = 29;
break;
case 14:
theTEXT = 30;
maxTEXT = 30;
break;
case 15:
theTEXT = 36;
maxTEXT = 36;
break;
case 16:
theTEXT = 37;
maxTEXT = 38;
break;
case 17:
theTEXT = 39;
maxTEXT = 39;
break;
case 18:
theTEXT = 40;
maxTEXT = 41;
break;
case 19:
theTEXT = 42;
maxTEXT = 43;
break;
};
tex.showTextThis(theTEXT);
theTEXT++;
}
function frame240(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
BUILDINGarray.push(b14);
BUILDINGarray.push(b15);
BUILDINGarray.push(b16);
b1.SetLink(new Array(b5, b6));
b2.SetLink(new Array(b7, b8));
b3.SetLink(new Array(b9, b10));
b4.SetLink(new Array(b11, b12));
b5.SetLink(new Array(b1, b6, b9, b13));
b6.SetLink(new Array(b1, b5, b11, b13));
b7.SetLink(new Array(b2, b8, b12, b16));
b8.SetLink(new Array(b2, b7, b10, b16));
b9.SetLink(new Array(b3, b10, b5, b15));
b10.SetLink(new Array(b3, b9, b8, b15));
b11.SetLink(new Array(b4, b12, b6, b14));
b12.SetLink(new Array(b4, b11, b14, b7));
b13.SetLink(new Array(b5, b6, b14, b15));
b14.SetLink(new Array(b11, b12, b13, b16));
b15.SetLink(new Array(b9, b10, b13, b16));
b16.SetLink(new Array(b7, b8, b14, b15));
b1.createUnit(3);
b2.createUnit(3);
b3.createUnit(4);
b4.createUnit(4);
b5.createUnit(2);
b6.createUnit(2);
b7.createUnit(2);
b8.createUnit(2);
b9.createUnit(3);
b10.createUnit(3);
b11.createUnit(3);
b12.createUnit(3);
b13.createUnit(5);
b14.createUnit(5);
b15.createUnit(5);
b16.createUnit(5);
b1.setBase(1);
b2.setBase(2);
b1.setPop(15);
b2.setPop(10);
b3.setPop(10);
b4.setPop(10);
b5.setPop(15);
b6.setPop(15);
b7.setPop(15);
b8.setPop(15);
b9.setPop(15);
b10.setPop(15);
b11.setPop(15);
b12.setPop(15);
b13.setPop(15);
b14.setPop(15);
b15.setPop(15);
b16.setPop(15);
boss.setUnit(2, 1, 6);
boss.setNextDestination(b2, b2);
goTexting(18);
}
public function drawBuletStatis(_arg1:MovieClip, _arg2:MovieClip):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:DisplayObject;
var _local13:Number;
trace("erase");
eraseBuletStatis(_arg1);
trace("countsudut");
_local3 = (_arg2.x - _arg1.x);
_local4 = (_arg2.y - _arg1.y);
_local5 = Math.atan2(_local4, _local3);
_local6 = ((_local5 * 180) / Math.PI);
_local7 = Math.round(Math.sqrt((Math.pow((_arg2.x - _arg1.x), 2) + Math.pow((_arg2.y - _arg1.y), 2))));
_local7 = Math.round((_local7 / 6));
_local8 = (Math.cos(((_local6 * Math.PI) / 180)) * 6);
_local9 = (Math.sin(((_local6 * Math.PI) / 180)) * 6);
trace("create bulet");
_local10 = 0;
while (_local10 < (_local7 - 1)) {
_local11 = new PANAH2();
_local11.rotation = _local6;
_local11.x = (_arg1.x + (_local8 * (_local10 + 1)));
_local11.y = (_arg1.y + (_local9 * (_local10 + 1)));
_local12 = getChildByName("pancon");
_local13 = getChildIndex(_local12);
_local11.id = _arg1;
addChildAt(_local11, _local13);
_local10++;
};
}
function frame128(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
b1.SetLink(new Array(b6, b7));
b2.SetLink(new Array(b12, b13));
b3.SetLink(new Array(b11, b13));
b4.SetLink(new Array(b7, b8));
b5.SetLink(new Array(b9, b10));
b6.SetLink(new Array(b1, b7, b11));
b7.SetLink(new Array(b1, b4, b6));
b8.SetLink(new Array(b4, b9, b12));
b9.SetLink(new Array(b5, b8));
b10.SetLink(new Array(b5, b11));
b11.SetLink(new Array(b10, b3));
b12.SetLink(new Array(b2, b8, b13));
b13.SetLink(new Array(b2, b3, b12));
b1.createUnit(4);
b2.createUnit(4);
b3.createUnit(3);
b4.createUnit(3);
b5.createUnit(5);
b6.createUnit(2);
b7.createUnit(2);
b8.createUnit(3);
b9.createUnit(3);
b10.createUnit(3);
b11.createUnit(3);
b12.createUnit(2);
b13.createUnit(2);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b4.setBase(3);
b5.setBase(3);
b1.setPop(20);
b2.setPop(20);
b3.setPop(10);
b4.setPop(10);
b5.setPop(5);
b6.setPop(15);
b7.setPop(15);
b8.setPop(10);
b9.setPop(10);
b10.setPop(10);
b11.setPop(10);
b12.setPop(15);
b13.setPop(15);
INIT();
}
public function scRight(_arg1:Boolean=false):void{
}
function frame120(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
b1.SetLink(new Array(b3, b4, b7, b8, b9), new Array(3, 3, 0, 0, 0));
b2.SetLink(new Array(b3, b4, b5, b6, b9), new Array(3, 3, 0, 0, 0));
b3.SetLink(new Array(b1, b2, b5), new Array(3, 3, 0));
b4.SetLink(new Array(b1, b2, b6), new Array(3, 3, 0));
b5.SetLink(new Array(b2, b3));
b6.SetLink(new Array(b2, b4));
b7.SetLink(new Array(b1, b9));
b8.SetLink(new Array(b1, b9));
b9.SetLink(new Array(b1, b2, b3, b4, b7, b8));
b1.createUnit(3);
b2.createUnit(3);
b3.createUnit(5);
b4.createUnit(5);
b5.createUnit(3);
b6.createUnit(3);
b7.createUnit(3);
b8.createUnit(3);
b9.createUnit(4);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b4.setBase(3);
b1.setPop(20);
b2.setPop(20);
b3.setPop(10);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(10);
b8.setPop(10);
b9.setPop(15);
INIT();
}
public function menuExitNo(_arg1:MouseEvent):void{
par.playEfek("btnklik");
ext.visible = false;
}
function frame251(){
stop();
gotoAndStop(("stage" + par.STAGE));
}
public function getAllPanahSemua():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((((_local3 is PANAH2)) || ((_local3 is PANAH)))){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
function frame144(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
BUILDINGarray.push(b14);
BUILDINGarray.push(b15);
BUILDINGarray.push(b16);
b1.SetLink(new Array(b5, b7, b15));
b2.SetLink(new Array(b6, b8, b16));
b3.SetLink(new Array(b5, b7, b11));
b4.SetLink(new Array(b6, b8, b12));
b5.SetLink(new Array(b1, b3, b13));
b6.SetLink(new Array(b2, b4, b10));
b7.SetLink(new Array(b1, b3, b9));
b8.SetLink(new Array(b2, b4, b14));
b9.SetLink(new Array(b7, b10, b16));
b10.SetLink(new Array(b6, b9, b11));
b11.SetLink(new Array(b3, b10, b12));
b12.SetLink(new Array(b4, b11, b13));
b13.SetLink(new Array(b5, b12, b14));
b14.SetLink(new Array(b8, b13, b15));
b15.SetLink(new Array(b1, b14, b16));
b16.SetLink(new Array(b2, b9, b15));
b1.createUnit(3);
b2.createUnit(2);
b3.createUnit(3);
b4.createUnit(2);
b5.createUnit(3);
b6.createUnit(2);
b7.createUnit(3);
b8.createUnit(2);
b9.createUnit(1);
b10.createUnit(1);
b11.createUnit(1);
b12.createUnit(1);
b13.createUnit(1);
b14.createUnit(1);
b15.createUnit(1);
b16.createUnit(1);
b1.setBase(1);
b2.setBase(1);
b3.setBase(2);
b4.setBase(2);
b5.setBase(3);
b6.setBase(3);
b1.setPop(10);
b2.setPop(10);
b3.setPop(10);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(10);
b8.setPop(10);
b9.setPop(15);
b10.setPop(15);
b11.setPop(15);
b12.setPop(15);
b13.setPop(15);
b14.setPop(15);
b15.setPop(15);
b16.setPop(15);
INIT();
}
public function getAllPanah():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((_local3 is PANAH)){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
public function mouseMOVE(_arg1:MouseEvent):void{
bg.x = (-54 + ((350 - mouseX) / 10));
bg.y = (-60 + ((240 - mouseY) / 8));
}
function frame136(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
b1.SetLink(new Array(b5));
b2.SetLink(new Array(b9));
b3.SetLink(new Array(b8));
b4.SetLink(new Array(b10));
b5.SetLink(new Array(b1, b6, b9));
b6.SetLink(new Array(b5, b7));
b7.SetLink(new Array(b6, b8));
b8.SetLink(new Array(b3, b7));
b9.SetLink(new Array(b2, b5, b10));
b10.SetLink(new Array(b4, b9, b11));
b11.SetLink(new Array(b10));
b1.createUnit(3);
b2.createUnit(3);
b3.createUnit(3);
b4.createUnit(3);
b5.createUnit(1);
b6.createUnit(2);
b7.createUnit(2);
b8.createUnit(2);
b9.createUnit(2);
b10.createUnit(2);
b11.createUnit(3);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b4.setBase(3);
b1.setPop(10);
b2.setPop(10);
b3.setPop(10);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(10);
b8.setPop(15);
b9.setPop(15);
b10.setPop(10);
b11.setPop(10);
INIT();
}
public function klikText(_arg1:MouseEvent):void{
if (tex.DONETYPE == true){
if (theTEXT <= maxTEXT){
if (par.STAGE != 0){
tex.showTextThis(theTEXT);
theTEXT++;
} else {
if (((!((theTEXT == 32))) && (!((theTEXT == 34))))){
tex.showTextThis(theTEXT);
theTEXT++;
};
};
} else {
skipbtn.visible = false;
tex.init();
stage.removeEventListener(MouseEvent.CLICK, klikText);
if (modeTEXT == 0){
INIT();
} else {
YESWIN();
};
};
};
}
public function showKet(_arg1:MovieClip):void{
var _local2:*;
var _local3:Number;
var _local4:Number;
_local2 = _arg1.whosBase();
_local3 = 100;
_local4 = 100;
if (_arg1.x > 450){
_local3 = (_local3 * -1);
};
if (_arg1.y > 250){
_local4 = (_local4 * -1);
if (_local2 == 0){
_local4 = 0;
};
};
kettext.theUNIT.visible = true;
if (_local2 == 0){
_local2 = 1;
kettext.theUNIT.visible = false;
};
switch (_arg1.whatUNIT()){
case 1:
kettext.nama.text = "FREEDOM IV";
kettext.unit.gotoAndStop((((_local2 * 4) - 4) + 1));
break;
case 2:
kettext.nama.text = "ORBITAL III";
kettext.unit.gotoAndStop((((_local2 * 4) - 4) + 2));
break;
case 3:
kettext.nama.text = "AEGIS IX";
kettext.unit.gotoAndStop((((_local2 * 4) - 4) + 3));
break;
case 4:
kettext.nama.text = "STAR DEATH II";
kettext.unit.gotoAndStop((((_local2 * 4) - 4) + 4));
break;
case 5:
kettext.nama.text = "ARK X";
kettext.unit.gotoAndStop((((_local2 * 4) - 4) + 2));
break;
};
kettext.Target = _arg1;
kettext.pope.text = _arg1.maxPop;
kettext.theUNIT.pop1.text = _arg1.UNIT1();
kettext.theUNIT.pop2.text = _arg1.UNIT2();
kettext.theUNIT.pop3.text = _arg1.UNIT3();
kettext.theUNIT.pop4.text = _arg1.UNIT4();
kettext.theUNIT.pic1.gotoAndStop((((_local2 * 4) - 4) + 1));
kettext.theUNIT.pic2.gotoAndStop((((_local2 * 4) - 4) + 2));
kettext.theUNIT.pic3.gotoAndStop((((_local2 * 4) - 4) + 3));
kettext.theUNIT.pic4.gotoAndStop((((_local2 * 4) - 4) + 4));
kettext.visible = true;
kettext.x = (_arg1.x + _local3);
kettext.y = (_arg1.y + _local4);
}
public function addCrit():void{
if (critBoolean == false){
critCTR++;
};
}
public function breedCek():void{
if (breedBoolean == false){
} else {
breedCTR--;
ctrSpesial = 0;
if (breedCTR <= 0){
breedBoolean = false;
};
};
}
function frame160(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
BUILDINGarray.push(b14);
BUILDINGarray.push(b15);
BUILDINGarray.push(b16);
BUILDINGarray.push(b17);
BUILDINGarray.push(b18);
BUILDINGarray.push(b19);
BUILDINGarray.push(b20);
BUILDINGarray.push(b21);
BUILDINGarray.push(b22);
BUILDINGarray.push(b23);
BUILDINGarray.push(b24);
BUILDINGarray.push(b25);
BUILDINGarray.push(b26);
BUILDINGarray.push(b27);
BUILDINGarray.push(b28);
BUILDINGarray.push(b29);
BUILDINGarray.push(b30);
b1.SetLink(new Array(b2, b25, b26));
b2.SetLink(new Array(b1, b25, b26));
b3.SetLink(new Array(b4, b17, b18));
b4.SetLink(new Array(b3, b17, b18));
b5.SetLink(new Array(b6, b13, b14));
b6.SetLink(new Array(b5, b13, b14));
b7.SetLink(new Array(b8, b15, b16));
b8.SetLink(new Array(b7, b15, b16));
b9.SetLink(new Array(b10, b27, b28));
b10.SetLink(new Array(b9, b27, b28));
b11.SetLink(new Array(b12, b29, b30));
b12.SetLink(new Array(b11, b29, b30));
b13.SetLink(new Array(b5, b6, b14, b19, b20));
b14.SetLink(new Array(b5, b6, b13, b15, b19, b20));
b15.SetLink(new Array(b7, b8, b14, b16, b21, b22));
b16.SetLink(new Array(b7, b8, b15, b17, b21, b22));
b17.SetLink(new Array(b3, b4, b16, b18, b23, b24));
b18.SetLink(new Array(b3, b4, b17, b23, b24));
b19.SetLink(new Array(b13, b14, b20, b25, b26));
b20.SetLink(new Array(b13, b14, b19, b25, b26, b21));
b21.SetLink(new Array(b15, b16, b22, b27, b28, b20));
b22.SetLink(new Array(b15, b16, b21, b27, b28, b23));
b23.SetLink(new Array(b17, b18, b24, b29, b30, b22));
b24.SetLink(new Array(b17, b18, b23, b29, b30));
b25.SetLink(new Array(b1, b2, b19, b20, b26));
b26.SetLink(new Array(b1, b2, b19, b20, b25, b27));
b27.SetLink(new Array(b9, b10, b21, b22, b28, b26));
b28.SetLink(new Array(b9, b10, b21, b22, b27, b29));
b29.SetLink(new Array(b11, b12, b23, b24, b30, b28));
b30.SetLink(new Array(b11, b12, b23, b24, b29));
b1.createUnit(3);
b2.createUnit(3);
b3.createUnit(3);
b4.createUnit(3);
b5.createUnit(3);
b6.createUnit(3);
b7.createUnit(3);
b8.createUnit(3);
b9.createUnit(3);
b10.createUnit(3);
b11.createUnit(3);
b12.createUnit(3);
b13.createUnit(1);
b14.createUnit(1);
b15.createUnit(1);
b16.createUnit(1);
b17.createUnit(1);
b18.createUnit(1);
b19.createUnit(5);
b20.createUnit(5);
b21.createUnit(5);
b22.createUnit(5);
b23.createUnit(5);
b24.createUnit(5);
b25.createUnit(1);
b26.createUnit(1);
b27.createUnit(1);
b28.createUnit(1);
b29.createUnit(1);
b30.createUnit(1);
b1.setBase(1);
b2.setBase(1);
b3.setBase(1);
b4.setBase(1);
b28.setBase(2);
b15.setBase(2);
b1.setPop(20);
b2.setPop(20);
b3.setPop(20);
b4.setPop(20);
b5.setPop(5);
b6.setPop(5);
b7.setPop(5);
b8.setPop(5);
b9.setPop(5);
b10.setPop(5);
b11.setPop(5);
b12.setPop(5);
b13.setPop(15);
b14.setPop(15);
b15.setPop(15);
b16.setPop(15);
b17.setPop(15);
b18.setPop(15);
b19.setPop(5);
b20.setPop(5);
b21.setPop(5);
b22.setPop(5);
b23.setPop(5);
b24.setPop(5);
b25.setPop(15);
b26.setPop(15);
b27.setPop(15);
b28.setPop(15);
b29.setPop(15);
b30.setPop(15);
boss.setUnit(2, 1, 5);
boss.setNextDestination(b28, b28);
boss2.setUnit(2, 1, 5);
boss2.setNextDestination(b15, b15);
goTexting(12);
}
public function stageUP(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
if (pauseGame == false){
cway.wayDraw.graphics.clear();
_local2 = getAllPanah();
for (_local3 in _local2) {
removeChild(_local2[_local3]);
};
stage.removeEventListener(MouseEvent.MOUSE_UP, stageUP);
lagiDown = false;
};
}
public function menuReplay(_arg1:MouseEvent):void{
par.playEfek("btnklik");
DEINIT("retry");
}
public function klikBuilding(_arg1:MouseEvent):void{
if (pauseGame == false){
buildingFrom = _arg1.currentTarget;
buildingFrom.cancelAttack();
if (mapTUTOR.currentFrame == 5){
countTutor = true;
};
};
}
public function getAllBuilding():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((_local3 is Building)){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
public function enemyDo():void{
var _local1:Array;
var _local2:Array;
var _local3:Boolean;
var _local4:*;
var _local5:Boolean;
var _local6:*;
var _local7:Array;
var _local8:Boolean;
var _local9:*;
var _local10:Number;
var _local11:Number;
var _local12:*;
var _local13:Array;
var _local14:*;
if (waitToCommand2 > 0){
waitToCommand2--;
} else {
waitToCommand2 = 24;
jumCommand2 = 0;
_local2 = new Array();
_local3 = false;
for (_local4 in building) {
if (building[_local4].whosBase() == 2){
_local2.push(building[_local4]);
};
};
for (_local4 in _local2) {
_local5 = false;
if (_local2[_local4].takeCom == false){
_local3 = true;
_local2[_local4].takeCom = true;
for (_local6 in _local2[_local4].link) {
if (_local2[_local4].link[_local6].whosBase() != 2){
if (_local2[_local4].Populasi() < _local2[_local4].maxPop){
if (Math.floor((_local2[_local4].Populasi() / 2)) > _local2[_local4].link[_local6].Populasi()){
if (jumCommand2 > MAXCOMMAND){
return;
};
_local7 = new Array();
_local7.push(_local2[_local4].name);
_local7.push(_local2[_local4].link[_local6].name);
_local7.sort(Array.CASEINSENSITIVE);
_local8 = true;
for (_local9 in enemyunit) {
if (_local7.toString() == enemyunit[_local9].Link){
_local8 = false;
};
};
if (_local8){
jumCommand2++;
_local2[_local4].MoveUnit(_local2[_local4].link[_local6]);
};
};
if (par.STAGE == 11){
if (_local2[_local4].Populasi() > 25){
if (jumCommand2 > MAXCOMMAND){
return;
};
_local7 = new Array();
_local7.push(_local2[_local4].name);
_local7.push(_local2[_local4].link[_local6].name);
_local7.sort(Array.CASEINSENSITIVE);
_local8 = true;
for (_local9 in enemyunit) {
if (_local7.toString() == enemyunit[_local9].Link){
_local8 = false;
};
};
if (_local8){
jumCommand2++;
_local2[_local4].MoveUnit(_local2[_local4].link[_local6]);
};
};
};
} else {
if (jumCommand2 > MAXCOMMAND){
return;
};
jumCommand2++;
_local2[_local4].MoveUnit(_local2[_local4].link[_local6]);
};
} else {
if (_local2[_local4].Populasi() > (_local2[_local4].maxPop - 3)){
if (_local2[_local4].cekLINK()){
_local5 = true;
};
};
};
};
if (_local5 == true){
_local10 = -1;
_local11 = -1;
for (_local6 in _local2[_local4].link) {
_local12 = (_local2[_local4].link[_local6].maxPop - _local2[_local4].link[_local6].Populasi());
if (_local12 > _local11){
_local11 = _local12;
_local10 = _local6;
};
};
if (_local10 != -1){
if (jumCommand2 > MAXCOMMAND){
return;
};
jumCommand2++;
_local2[_local4].MoveUnit(_local2[_local4].link[_local10]);
};
};
};
};
if (_local3 == false){
for (_local4 in _local2) {
_local2[_local4].takeCom = false;
};
};
};
if (waitToCommand3 > 0){
waitToCommand3--;
} else {
waitToCommand3 = 48;
jumCommand3 = 0;
_local13 = new Array();
for (_local4 in building) {
if (building[_local4].whosBase() == 3){
_local13.push(building[_local4]);
};
};
_local3 = false;
for (_local4 in _local13) {
_local5 = false;
if (_local13[_local4].takeCom == false){
_local3 = true;
_local13[_local4].takeCom = true;
for (_local6 in _local13[_local4].link) {
if (_local13[_local4].link[_local6].whosBase() != 3){
if (_local13[_local4].Populasi() < _local13[_local4].maxPop){
if (Math.floor((_local13[_local4].Populasi() / 2)) > _local13[_local4].link[_local6].Populasi()){
if (jumCommand3 > MAXCOMMAND){
return;
};
_local7 = new Array();
_local7.push(_local13[_local4].name);
_local7.push(_local13[_local4].link[_local6].name);
_local7.sort(Array.CASEINSENSITIVE);
_local8 = true;
for (_local9 in enemyunit) {
if (_local7.toString() == enemyunit[_local9].Link){
_local8 = false;
};
};
if (_local8){
jumCommand3++;
_local13[_local4].MoveUnit(_local13[_local4].link[_local6]);
};
};
if (par.STAGE == 11){
if (_local13[_local4].Populasi() > 25){
if (jumCommand3 > MAXCOMMAND){
return;
};
_local7 = new Array();
_local7.push(_local13[_local4].name);
_local7.push(_local13[_local4].link[_local6].name);
_local7.sort(Array.CASEINSENSITIVE);
_local8 = true;
for (_local9 in enemyunit) {
if (_local7.toString() == enemyunit[_local9].Link){
_local8 = false;
};
};
if (_local8){
jumCommand3++;
_local13[_local4].MoveUnit(_local13[_local4].link[_local6]);
};
};
};
} else {
if (jumCommand3 > MAXCOMMAND){
return;
};
jumCommand3++;
_local13[_local4].MoveUnit(_local13[_local4].link[_local6]);
};
} else {
if (_local13[_local4].Populasi() > (_local13[_local4].maxPop - 3)){
if (_local13[_local4].cekLINK()){
_local5 = true;
};
};
};
};
if (_local5 == true){
_local10 = -1;
_local11 = -1;
for (_local6 in _local13[_local4].link) {
_local12 = (_local13[_local4].link[_local6].maxPop - _local13[_local4].link[_local6].Populasi());
if (_local12 > _local11){
_local11 = _local12;
_local10 = _local6;
};
};
if (_local10 != -1){
if (jumCommand3 > MAXCOMMAND){
return;
};
jumCommand3++;
_local13[_local4].MoveUnit(_local13[_local4].link[_local10]);
};
};
};
};
if (_local3 == false){
for (_local4 in _local13) {
_local13[_local4].takeCom = false;
};
};
};
_local1 = new Array();
_local1 = getAllEnemy();
if ((((((par.STAGE == 10)) || ((par.STAGE == 20)))) || ((par.STAGE == 30)))){
_local14 = true;
for (_local4 in _local1) {
if ((_local1[_local4] is Boss)){
_local14 = false;
};
};
if (_local14 == true){
BOSSDEAD = true;
if (par.STAGE == 10){
par.getAchi(4);
};
if (par.STAGE == 20){
par.getAchi(5);
};
if (par.STAGE == 30){
par.getAchi(6);
};
};
};
}
public function redScren():void{
par.red.play();
}
public function preInit():void{
var _local1:*;
ringe.mouseEnabled = false;
ringe.mouseChildren = false;
if (musifFIRST == false){
par.playMusic("ingame");
musifFIRST = true;
};
countTutor = false;
ctrTUTOR = 96;
timeR = 0;
barcrit.gotoAndStop(1);
barcrit.ket.visible = false;
mainbg.gotoAndStop(Math.ceil((par.STAGE / 8)));
lose.gotoAndStop(1);
lose.visible = false;
win.gotoAndStop(1);
win.visible = false;
ps.visible = false;
pauseGame = false;
kettext.visible = false;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMOVE);
BOSSDEAD = false;
BOSSDEADDELAY = (24 * 3);
critCTR = 1;
delay = 0;
initSpecial();
for (_local1 in BUILDINGarray) {
BUILDINGarray[_local1].Check();
BUILDINGarray[_local1].InitBOBOT();
};
}
public function goINVUR(_arg1:MovieClip):Boolean{
if (_arg1.whosBase() == 1){
if (invurBoolean == true){
return (true);
};
};
return (false);
}
function frame168(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
BUILDINGarray.push(b14);
BUILDINGarray.push(b15);
b1.SetLink(new Array(b4, b8));
b2.SetLink(new Array(b5, b6, b9, b10));
b3.SetLink(new Array(b7, b11));
b4.SetLink(new Array(b1, b9, b12));
b5.SetLink(new Array(b2, b8, b13));
b6.SetLink(new Array(b2, b11, b12));
b7.SetLink(new Array(b3, b10, b13));
b8.SetLink(new Array(b1, b5, b14));
b9.SetLink(new Array(b2, b4, b15));
b10.SetLink(new Array(b2, b7, b14));
b11.SetLink(new Array(b3, b6, b15));
b12.SetLink(new Array(b4, b6));
b13.SetLink(new Array(b5, b7));
b14.SetLink(new Array(b8, b10));
b15.SetLink(new Array(b9, b11));
b1.createUnit(2);
b2.createUnit(2);
b3.createUnit(2);
b4.createUnit(3);
b5.createUnit(3);
b6.createUnit(3);
b7.createUnit(3);
b8.createUnit(3);
b9.createUnit(3);
b10.createUnit(3);
b11.createUnit(3);
b12.createUnit(4);
b13.createUnit(4);
b14.createUnit(4);
b15.createUnit(4);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b1.setPop(10);
b2.setPop(10);
b3.setPop(10);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(10);
b8.setPop(10);
b9.setPop(10);
b10.setPop(10);
b11.setPop(10);
b12.setPop(15);
b13.setPop(15);
b14.setPop(15);
b15.setPop(15);
INIT();
}
function frame184(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
BUILDINGarray.push(b14);
BUILDINGarray.push(b15);
BUILDINGarray.push(b16);
BUILDINGarray.push(b17);
BUILDINGarray.push(b18);
BUILDINGarray.push(b19);
BUILDINGarray.push(b20);
BUILDINGarray.push(b21);
BUILDINGarray.push(b22);
BUILDINGarray.push(b23);
BUILDINGarray.push(b24);
BUILDINGarray.push(b25);
BUILDINGarray.push(b26);
BUILDINGarray.push(b27);
BUILDINGarray.push(b28);
BUILDINGarray.push(b29);
BUILDINGarray.push(b30);
b1.SetLink(new Array(b2, b25, b26));
b2.SetLink(new Array(b1, b25, b26));
b3.SetLink(new Array(b4, b17, b18));
b4.SetLink(new Array(b3, b17, b18));
b5.SetLink(new Array(b6, b13, b14));
b6.SetLink(new Array(b5, b13, b14));
b7.SetLink(new Array(b8, b15, b16));
b8.SetLink(new Array(b7, b15, b16));
b9.SetLink(new Array(b10, b27, b28));
b10.SetLink(new Array(b9, b27, b28));
b11.SetLink(new Array(b12, b29, b30));
b12.SetLink(new Array(b11, b29, b30));
b13.SetLink(new Array(b5, b6, b14, b19, b20));
b14.SetLink(new Array(b5, b6, b13, b15, b19, b20, b27));
b15.SetLink(new Array(b7, b8, b14, b16, b21, b22, b26));
b16.SetLink(new Array(b7, b8, b15, b17, b21, b22, b29));
b17.SetLink(new Array(b3, b4, b16, b18, b23, b24, b28));
b18.SetLink(new Array(b3, b4, b17, b23, b24));
b19.SetLink(new Array(b13, b14, b20, b25, b26));
b20.SetLink(new Array(b13, b14, b19, b25, b26));
b21.SetLink(new Array(b15, b16, b22, b27, b28));
b22.SetLink(new Array(b15, b16, b21, b27, b28));
b23.SetLink(new Array(b17, b18, b24, b29, b30));
b24.SetLink(new Array(b17, b18, b23, b29, b30));
b25.SetLink(new Array(b1, b2, b19, b20, b26));
b26.SetLink(new Array(b1, b2, b19, b20, b25, b15, b27));
b27.SetLink(new Array(b9, b10, b21, b22, b28, b14, b26));
b28.SetLink(new Array(b9, b10, b21, b22, b27, b17, b29));
b29.SetLink(new Array(b11, b12, b23, b24, b30, b16, b28));
b30.SetLink(new Array(b11, b12, b23, b24, b29));
b1.createUnit(4);
b2.createUnit(2);
b3.createUnit(4);
b4.createUnit(2);
b5.createUnit(4);
b6.createUnit(2);
b7.createUnit(4);
b8.createUnit(2);
b9.createUnit(4);
b10.createUnit(2);
b11.createUnit(4);
b12.createUnit(2);
b13.createUnit(3);
b14.createUnit(3);
b15.createUnit(3);
b16.createUnit(3);
b17.createUnit(3);
b18.createUnit(3);
b19.createUnit(5);
b20.createUnit(5);
b21.createUnit(5);
b22.createUnit(5);
b23.createUnit(5);
b24.createUnit(5);
b25.createUnit(3);
b26.createUnit(3);
b27.createUnit(3);
b28.createUnit(3);
b29.createUnit(3);
b30.createUnit(3);
b1.setBase(1);
b2.setBase(1);
b3.setBase(1);
b4.setBase(1);
b5.setBase(2);
b6.setBase(2);
b7.setBase(2);
b8.setBase(2);
b9.setBase(3);
b10.setBase(3);
b11.setBase(3);
b12.setBase(3);
b1.setPop(5);
b2.setPop(10);
b3.setPop(5);
b4.setPop(10);
b5.setPop(5);
b6.setPop(10);
b7.setPop(5);
b8.setPop(10);
b9.setPop(5);
b10.setPop(10);
b11.setPop(5);
b12.setPop(10);
b13.setPop(15);
b14.setPop(15);
b15.setPop(15);
b16.setPop(15);
b17.setPop(15);
b18.setPop(15);
b19.setPop(5);
b20.setPop(5);
b21.setPop(5);
b22.setPop(5);
b23.setPop(5);
b24.setPop(5);
b25.setPop(15);
b26.setPop(15);
b27.setPop(15);
b28.setPop(15);
b29.setPop(15);
b30.setPop(15);
INIT();
}
public function OverE(_arg1:MouseEvent):void{
par.playEfek("mouseover");
}
public function getAll():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((_local3 is Unit)){
_local1.push(_local3);
};
if ((_local3 is Boss)){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
public function upBuilding(_arg1:MouseEvent):void{
var _local2:DisplayObject;
var _local3:Number;
var _local4:*;
if (pauseGame == false){
buildingDest = _arg1.currentTarget;
cway3.wayDraw.graphics.clear();
if (buildingDest != buildingFrom){
if (buildingFrom.whosBase() == 1){
if (isSHIFT == false){
buildingFrom.MoveUnit(buildingDest);
if ((((theTEXT == 32)) && ((tex.DONETYPE == true)))){
tex.showTextThis(theTEXT);
theTEXT++;
};
if (mapTUTOR.currentFrame == 3){
mapTUTOR.nextFrame();
};
} else {
buildingFrom.attackThis(buildingDest);
if ((((theTEXT == 34)) && ((tex.DONETYPE == true)))){
tex.showTextThis(theTEXT);
theTEXT++;
};
if (mapTUTOR.currentFrame == 4){
mapTUTOR.nextFrame();
};
};
_local2 = getChildByName("pancon");
_local3 = getChildIndex(_local2);
_local4 = new Sign();
_local4.x = buildingDest.x;
_local4.y = buildingDest.y;
addChildAt(_local4, _local3);
};
};
};
}
public function scLeft(_arg1:Boolean=false):void{
}
public function klikStage(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
_local2 = _arg1.currentTarget.name;
_local3 = _local2.substr(1);
gotoAndStop(("stage" + _local3));
par.playEfek("btnklik");
par.STAGE = _local3;
}
public function klikMedal(_arg1:MouseEvent):void{
par.playEfek("btnklik");
if ((((achie.currentFrame == 1)) || ((achie.currentFrame == 6)))){
achie.play();
};
}
public function loopMain(_arg1:Event):void{
var _local2:Array;
var _local3:*;
var _local4:Boolean;
var _local5:Array;
var _local6:Boolean;
var _local7:Boolean;
var _local8:*;
if (pauseGame == false){
timeR++;
goCrit();
cekSP();
cway2.wayDraw.graphics.clear();
unit = new Array();
unit = getAllUnit();
enemyunit = new Array();
enemyunit = getAllEnemy();
building = new Array();
building = getAllBuilding();
_local2 = new Array();
_local4 = false;
_local5 = new Array();
_local5 = getAllRoket();
for (_local3 in _local5) {
_local5[_local3].moveRoket();
};
for (_local3 in unit) {
unit[_local3].Move(enemyunit);
if (unit[_local3].isDead == true){
removeChild(unit[_local3]);
_local4 = true;
};
};
if (_local4){
unit = new Array();
unit = getAllUnit();
};
_local2 = new Array();
_local2 = getAll();
_local4 = false;
for (_local3 in enemyunit) {
enemyunit[_local3].Move(_local2);
if (enemyunit[_local3].isDead == true){
if ((enemyunit[_local3] is Boss)){
if (enemyunit[_local3].Model == 6){
_local8 = new Boss();
addChild(_local8);
_local8.x = enemyunit[_local3].x;
_local8.y = enemyunit[_local3].y;
_local8.setUnit(2, 1, 5);
_local8.setNextDestinationNew(enemyunit[_local3].tujuanBuild);
_local8 = new Boss();
addChild(_local8);
_local8.x = enemyunit[_local3].x;
_local8.y = enemyunit[_local3].y;
_local8.setUnit(2, 1, 5);
_local8.setNextDestinationNew(enemyunit[_local3].tujuanBuild);
};
};
_local4 = true;
par.destroyShip++;
removeChild(enemyunit[_local3]);
};
};
if (_local4){
enemyunit = new Array();
enemyunit = getAllUnit();
_local2 = new Array();
_local2 = getAll();
};
if (lagiDown == true){
if (buildingFrom.whosBase() == 1){
ringe.x = buildingFrom.x;
ringe.y = buildingFrom.y;
ringe.visible = true;
};
} else {
ringe.visible = false;
};
_local6 = true;
_local7 = true;
for (_local3 in building) {
building[_local3].Check(_local2);
if (building[_local3].whosBase() == 1){
_local7 = false;
};
if ((((building[_local3].whosBase() == 2)) || ((building[_local3].whosBase() == 3)))){
_local6 = false;
};
};
if (delay > 0){
if (cbl.drawed){
delay--;
};
} else {
delay = 5;
cbl.drawed = true;
cbl.buletDraw.graphics.clear();
};
if (goQuake){
Quake();
};
if (par.STAGE != 0){
enemyDo();
if (((((!((par.STAGE == 10))) && (!((par.STAGE == 20))))) && (!((par.STAGE == 30))))){
if (_local6 == true){
DEINIT("win");
};
};
if (_local7 == true){
DEINIT("lose");
};
if (BOSSDEAD == true){
BOSSDEADDELAY--;
if (BOSSDEADDELAY <= 0){
DEINIT("win");
};
};
} else {
if (countTutor == true){
ctrTUTOR--;
if (ctrTUTOR <= 0){
mapTUTOR.endTutor();
};
};
};
};
if (par.picachi.currentFrame == 1){
par.cekACHI();
};
}
function frame152(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
b1.SetLink(new Array(b2, b3, b6));
b2.SetLink(new Array(b1, b3, b4, b5));
b3.SetLink(new Array(b1, b2, b7));
b4.SetLink(new Array(b2, b6, b8));
b5.SetLink(new Array(b2, b7, b9));
b6.SetLink(new Array(b1, b4, b10));
b7.SetLink(new Array(b3, b5, b11));
b8.SetLink(new Array(b4));
b9.SetLink(new Array(b5));
b10.SetLink(new Array(b6));
b11.SetLink(new Array(b7));
b1.createUnit(5);
b2.createUnit(5);
b3.createUnit(5);
b4.createUnit(3);
b5.createUnit(3);
b6.createUnit(3);
b7.createUnit(3);
b8.createUnit(4);
b9.createUnit(4);
b10.createUnit(4);
b11.createUnit(4);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b1.setPop(20);
b2.setPop(20);
b3.setPop(20);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(10);
b8.setPop(10);
b9.setPop(10);
b10.setPop(10);
b11.setPop(10);
INIT();
}
public function overStage(_arg1:MouseEvent):void{
par.playEfek("mouseover");
}
public function getAllUnit():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((_local3 is Unit)){
if (_local3.whoUnit == 1){
_local1.push(_local3);
};
};
_local2++;
};
return (_local1);
}
public function speedCek():void{
if (speedyBoolean == false){
} else {
speedyCTR--;
ctrSpesial = 0;
if (speedyCTR <= 0){
speedyBoolean = false;
};
};
}
function frame192(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
b1.SetLink(new Array(b4, b5));
b2.SetLink(new Array(b8, b9));
b3.SetLink(new Array(b5, b8));
b4.SetLink(new Array(b1));
b5.SetLink(new Array(b1, b3, b6));
b6.SetLink(new Array(b5, b7));
b7.SetLink(new Array(b6));
b8.SetLink(new Array(b2, b3, b10));
b9.SetLink(new Array(b2));
b10.SetLink(new Array(b8, b11));
b11.SetLink(new Array(b10));
b1.createUnit(2);
b2.createUnit(2);
b3.createUnit(4);
b4.createUnit(2);
b5.createUnit(5);
b6.createUnit(2);
b7.createUnit(4);
b8.createUnit(5);
b9.createUnit(2);
b10.createUnit(2);
b11.createUnit(4);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b1.setPop(15);
b2.setPop(15);
b3.setPop(10);
b4.setPop(10);
b5.setPop(10);
b6.setPop(10);
b7.setPop(5);
b8.setPop(10);
b9.setPop(10);
b10.setPop(10);
b11.setPop(5);
INIT();
}
public function klikMenu(_arg1:MouseEvent):void{
par.playEfek("btnklik");
par.SaveGame();
par.fades.fadeIN("menu");
}
function frame176(){
BUILDINGarray = new Array();
BUILDINGarray.push(b1);
BUILDINGarray.push(b2);
BUILDINGarray.push(b3);
BUILDINGarray.push(b4);
BUILDINGarray.push(b5);
BUILDINGarray.push(b6);
BUILDINGarray.push(b7);
BUILDINGarray.push(b8);
BUILDINGarray.push(b9);
BUILDINGarray.push(b10);
BUILDINGarray.push(b11);
BUILDINGarray.push(b12);
BUILDINGarray.push(b13);
BUILDINGarray.push(b14);
BUILDINGarray.push(b15);
BUILDINGarray.push(b16);
BUILDINGarray.push(b17);
BUILDINGarray.push(b18);
b1.SetLink(new Array(b6, b9, b10, b11, b15));
b2.SetLink(new Array(b6, b7, b12, b13));
b3.SetLink(new Array(b7, b8, b13));
b4.SetLink(new Array(b6, b7, b16, b17));
b5.SetLink(new Array(b7, b8, b17));
b6.SetLink(new Array(b1, b2, b4, b9, b10));
b7.SetLink(new Array(b2, b3, b4, b5, b8));
b8.SetLink(new Array(b3, b5, b7, b14, b18));
b9.SetLink(new Array(b1, b6, b12));
b10.SetLink(new Array(b1, b6, b16));
b11.SetLink(new Array(b1, b12));
b12.SetLink(new Array(b2, b9, b11, b13));
b13.SetLink(new Array(b2, b3, b12, b14));
b14.SetLink(new Array(b8, b13));
b15.SetLink(new Array(b1, b16));
b16.SetLink(new Array(b4, b10, b15, b17));
b17.SetLink(new Array(b4, b5, b16, b18));
b18.SetLink(new Array(b8, b17));
b1.createUnit(2);
b2.createUnit(5);
b3.createUnit(3);
b4.createUnit(5);
b5.createUnit(3);
b6.createUnit(2);
b7.createUnit(2);
b8.createUnit(2);
b9.createUnit(3);
b10.createUnit(3);
b11.createUnit(4);
b12.createUnit(2);
b13.createUnit(2);
b14.createUnit(4);
b15.createUnit(4);
b16.createUnit(2);
b17.createUnit(2);
b18.createUnit(4);
b1.setBase(1);
b2.setBase(2);
b3.setBase(3);
b1.setPop(15);
b2.setPop(5);
b3.setPop(10);
b4.setPop(5);
b5.setPop(10);
b6.setPop(15);
b7.setPop(15);
b8.setPop(15);
b9.setPop(10);
b10.setPop(10);
b11.setPop(10);
b12.setPop(15);
b13.setPop(15);
b14.setPop(10);
b15.setPop(10);
b16.setPop(15);
b17.setPop(15);
b18.setPop(10);
INIT();
}
public function menuExitYes(_arg1:MouseEvent):void{
par.playEfek("btnklik");
ext.visible = true;
}
public function theDOMINATE():void{
par.dominateBase++;
}
public function goCrit():void{
barcrit.gotoAndStop(Math.round(((critCTR / 100) * 50)));
if (critBoolean == false){
barcrit.ket.visible = false;
if (critCTR >= 100){
critBoolean = true;
};
} else {
barcrit.ket.visible = true;
critCTR = (critCTR - 0.2);
if (critCTR <= 0){
critBoolean = false;
};
};
}
public function menuSound(_arg1:MouseEvent):void{
par.playEfek("btnklik");
par.MuteSoundAll();
if (par.muteON == false){
menupanel.teks.text = "on";
} else {
menupanel.teks.text = "off";
};
}
public function cekWaktunya(_arg1:Number):Number{
var _local2:*;
_local2 = par.myStar[par.STAGE];
if (par.myStar[par.STAGE] < 3){
if (par.GoldTime[par.STAGE] >= _arg1){
par.myStar[par.STAGE] = 3;
par.upgradeSkill++;
_local2 = 3;
};
};
if (par.myStar[par.STAGE] < 2){
if ((par.GoldTime[par.STAGE] + (24 * 30)) >= _arg1){
par.myStar[par.STAGE] = 2;
_local2 = 2;
};
};
if (par.myStar[par.STAGE] < 1){
if ((par.GoldTime[par.STAGE] + (24 * 60)) >= _arg1){
par.myStar[par.STAGE] = 1;
_local2 = 1;
};
};
if (_local2 == 0){
_local2 = 4;
};
return (_local2);
}
public function eraseBuletStatis(_arg1:MovieClip):void{
var _local2:Array;
var _local3:*;
_local2 = new Array();
_local2 = getAllPanah2();
for (_local3 in _local2) {
if (_local2[_local3].id == _arg1){
removeChild(_local2[_local3]);
};
};
}
public function scDown(_arg1:Boolean=false):void{
}
public function menuInit():void{
ext.visible = false;
ext.yes.addEventListener(MouseEvent.CLICK, menuExit);
ext.no.addEventListener(MouseEvent.CLICK, menuExitNo);
menupanel.exi.addEventListener(MouseEvent.CLICK, menuExitYes);
menupanel.pau.addEventListener(MouseEvent.CLICK, menuPause);
menupanel.sou.addEventListener(MouseEvent.CLICK, menuSound);
menupanel.rep.addEventListener(MouseEvent.CLICK, menuReplay);
ext.yes.addEventListener(MouseEvent.MOUSE_OVER, OverE);
ext.no.addEventListener(MouseEvent.MOUSE_OVER, OverE);
menupanel.exi.addEventListener(MouseEvent.MOUSE_OVER, OverE);
menupanel.pau.addEventListener(MouseEvent.MOUSE_OVER, OverE);
menupanel.sou.addEventListener(MouseEvent.MOUSE_OVER, OverE);
menupanel.rep.addEventListener(MouseEvent.MOUSE_OVER, OverE);
}
public function invurCek():void{
if (invurBoolean == false){
} else {
invurCTR--;
ctrSpesial = 0;
if (invurCTR <= 0){
invurBoolean = false;
};
};
}
public function pressKey(_arg1:KeyboardEvent):void{
keyPressed = _arg1.keyCode;
switch (keyPressed){
case Keyboard.RIGHT:
rightKeyIsDown = true;
break;
case Keyboard.LEFT:
leftKeyIsDown = true;
break;
case Keyboard.UP:
upKeyIsDown = true;
break;
case Keyboard.DOWN:
downKeyIsDown = true;
break;
case keyQ:
qKeyIsDown = true;
break;
case keyE:
eKeyIsDown = true;
break;
case keyW:
wKeyIsDown = true;
break;
case keyR:
rKeyIsDown = true;
break;
case keyA:
aKeyIsDown = true;
break;
case keyS:
sKeyIsDown = true;
break;
case keyD:
dKeyIsDown = true;
break;
case keyF:
fKeyIsDown = true;
break;
case keyG:
gKeyIsDown = true;
break;
case key1:
key1IsDown = true;
break;
case key2:
key2IsDown = true;
break;
case key3:
key3IsDown = true;
break;
case key4:
key4IsDown = true;
break;
case keyX:
xKeyIsDown = true;
break;
case keyZ:
zKeyIsDown = true;
break;
case keyC:
cKeyIsDown = true;
break;
case keyV:
vKeyIsDown = true;
break;
case Keyboard.SPACE:
spaceKeyIsDown = true;
break;
case Keyboard.SHIFT:
isSHIFT = true;
break;
};
}
public function menuExit(_arg1:MouseEvent):void{
par.playEfek("btnklik");
DEINIT();
}
public function getAllRoket():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((_local3 is Roket)){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
public function menuDeInit():void{
ext.yes.removeEventListener(MouseEvent.CLICK, menuExit);
ext.no.removeEventListener(MouseEvent.CLICK, menuExitNo);
menupanel.exi.removeEventListener(MouseEvent.CLICK, menuExitYes);
menupanel.pau.removeEventListener(MouseEvent.CLICK, menuPause);
menupanel.sou.removeEventListener(MouseEvent.CLICK, menuSound);
menupanel.rep.removeEventListener(MouseEvent.CLICK, menuReplay);
ext.yes.removeEventListener(MouseEvent.MOUSE_OVER, OverE);
ext.no.removeEventListener(MouseEvent.MOUSE_OVER, OverE);
menupanel.exi.removeEventListener(MouseEvent.MOUSE_OVER, OverE);
menupanel.pau.removeEventListener(MouseEvent.MOUSE_OVER, OverE);
menupanel.sou.removeEventListener(MouseEvent.MOUSE_OVER, OverE);
menupanel.rep.removeEventListener(MouseEvent.MOUSE_OVER, OverE);
}
public function YESWIN():void{
cway.wayDraw.graphics.clear();
cway2.wayDraw.graphics.clear();
cway3.wayDraw.graphics.clear();
cbl.buletDraw.graphics.clear();
win.visible = true;
win.play();
stage.addEventListener(MouseEvent.CLICK, waitCLICK);
par.cekACHI();
par.SaveGame();
}
public function skipALL(_arg1:MouseEvent):void{
SKIPDUNG();
}
public function overBuilding(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:DisplayObject;
var _local14:Number;
var _local15:*;
if (pauseGame == false){
_local2 = _arg1.currentTarget;
if (lagiDown == false){
for (_local3 in _local2.link) {
cway.drawWay(_local2.x, _local2.y, _local2.link[_local3].x, _local2.link[_local3].y);
_local4 = (_local2.link[_local3].x - _local2.x);
_local5 = (_local2.link[_local3].y - _local2.y);
_local6 = Math.atan2(_local5, _local4);
_local7 = ((_local6 * 180) / Math.PI);
_local8 = Math.round(Math.sqrt((Math.pow((_local2.link[_local3].x - _local2.x), 2) + Math.pow((_local2.link[_local3].y - _local2.y), 2))));
_local8 = Math.round((_local8 / 6));
_local9 = (Math.cos(((_local7 * Math.PI) / 180)) * 6);
_local10 = (Math.sin(((_local7 * Math.PI) / 180)) * 6);
_local11 = 0;
while (_local11 < (_local8 - 1)) {
_local12 = new PANAH();
_local12.rotation = _local7;
_local12.x = (_local2.x + (_local9 * (_local11 + 1)));
_local12.y = (_local2.y + (_local10 * (_local11 + 1)));
_local13 = getChildByName("pancon");
_local14 = getChildIndex(_local13);
addChildAt(_local12, _local14);
_local11++;
};
};
};
if (lagiDown == true){
_local15 = false;
for (_local3 in buildingFrom.link) {
if (buildingFrom.link[_local3] == _local2){
cway3.drawWay(_local2.x, _local2.y, buildingFrom.x, buildingFrom.y);
_local15 = true;
};
};
if (_local15){
par.mouseChange(1);
} else {
par.mouseChange(2);
};
};
showKet(_local2);
};
}
public function menuPause(_arg1:MouseEvent):void{
par.playEfek("btnklik");
pauseGame = true;
ps.visible = true;
ps.play();
}
public function getAllEnemy():Array{
var _local1:Array;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = 0;
while (_local2 < this.numChildren) {
_local3 = this.getChildAt(_local2);
if ((_local3 is Unit)){
if ((((_local3.whoUnit == 2)) || ((_local3.whoUnit == 3)))){
_local1.push(_local3);
};
};
if ((_local3 is Boss)){
_local1.push(_local3);
};
_local2++;
};
return (_local1);
}
public function klikUPG(_arg1:MouseEvent):void{
par.playEfek("btnklik");
if ((((upg.currentFrame == 1)) || ((upg.currentFrame == 6)))){
upg.play();
};
}
}
}//package
Section 80
//MainMenu (MainMenu)
package {
import flash.media.*;
public dynamic class MainMenu extends Sound {
}
}//package
Section 81
//MainMenuMC (MainMenuMC)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainMenuMC extends MovieClip {
public var addgame:SimpleButton;
public var logosf:MovieClip;
public var btnplay:SimpleButton;
public var btncont:SimpleButton;
public var par;
public var logoab2:SimpleButton;
public var warn:MovieClip;
public var btnmore:SimpleButton;
public var btncred:SimpleButton;
public function MainMenuMC(){
addFrameScript(32, frame33);
}
public function thisCRED(_arg1:MouseEvent):void{
par.playEfek("btnklik");
par.credittext.play();
}
public function thisMORE(_arg1:MouseEvent):void{
var _local2:URLRequest;
par.playEfek("btnklik");
_local2 = new URLRequest("http://www.arcadebomb.com");
navigateToURL(_local2, "_blank");
}
public function thisADD(_arg1:MouseEvent):void{
var _local2:URLRequest;
par.playEfek("btnklik");
_local2 = new URLRequest("http://www.arcadebomb.com/free_website_games.html");
navigateToURL(_local2, "_blank");
}
public function thisYES(_arg1:MouseEvent):void{
par.playEfek("btnklik");
par.ResetGame();
par.fades.fadeIN("intro");
}
public function thisSF(_arg1:MouseEvent):void{
var _local2:URLRequest;
par.playEfek("btnklik");
_local2 = new URLRequest("http://www.smallfarmstudio.com");
navigateToURL(_local2, "_blank");
}
function frame33(){
stop();
par = this.parent;
warn.visible = false;
btncont.enabled = false;
if (par.so.data.FARSTAGE != null){
if (par.so.data.FARSTAGE > 1){
btncont.enabled = true;
btncont.addEventListener(MouseEvent.CLICK, thisCONT);
};
};
btnplay.addEventListener(MouseEvent.CLICK, thisPLAY);
warn.yes.addEventListener(MouseEvent.CLICK, thisYES);
warn.no.addEventListener(MouseEvent.CLICK, thisNO);
btncred.addEventListener(MouseEvent.CLICK, thisCRED);
btnmore.addEventListener(MouseEvent.CLICK, thisMORE);
logoab2.addEventListener(MouseEvent.CLICK, thisMORE);
logosf.addEventListener(MouseEvent.CLICK, thisSF);
addgame.addEventListener(MouseEvent.CLICK, thisADD);
}
public function thisCONT(_arg1:MouseEvent):void{
par.playEfek("btnklik");
par.LoadGame();
par.fades.fadeIN("main");
}
public function thisPLAY(_arg1:MouseEvent):void{
if (btncont.enabled == true){
warn.visible = true;
} else {
par.playEfek("btnklik");
par.ResetGame();
par.fades.fadeIN("intro");
};
}
public function thisNO(_arg1:MouseEvent):void{
warn.visible = false;
}
}
}//package
Section 82
//Map (Map)
package {
import flash.media.*;
public dynamic class Map extends Sound {
}
}//package
Section 83
//MouseOver (MouseOver)
package {
import flash.media.*;
public dynamic class MouseOver extends Sound {
}
}//package
Section 84
//NukeSound (NukeSound)
package {
import flash.media.*;
public dynamic class NukeSound extends Sound {
}
}//package
Section 85
//PANAH (PANAH)
package {
import flash.display.*;
public dynamic class PANAH extends MovieClip {
}
}//package
Section 86
//PANAH2 (PANAH2)
package {
import flash.display.*;
public dynamic class PANAH2 extends MovieClip {
public var id;
public function PANAH2(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package
Section 87
//Roket (Roket)
package {
import flash.events.*;
import flash.display.*;
public class Roket extends MovieClip {
var ySpeed:Number;
public var speed:Number;
public var yStart:Number;
var damage:Number;
var tx:Number;
var target;
var ty:Number;
var xSpeed:Number;
public var xStart:Number;
var lifeTime:Number;
public function Roket(_arg1:Number, _arg2:Number, _arg3:MovieClip):void{
addFrameScript(0, frame1);
speed = 1;
x = _arg1;
y = _arg2;
xStart = _arg1;
yStart = _arg2;
target = _arg3;
}
function frame1(){
mouseEnabled = false;
mouseChildren = false;
}
public function setDamage(_arg1:Number):void{
damage = _arg1;
}
public function moveRoket():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:*;
if (target != null){
_local1 = (target.x - x);
_local2 = (target.y - y);
_local3 = Math.atan2(_local2, _local1);
_local4 = ((_local3 * 180) / Math.PI);
rotation = _local4;
if (target.hitTestObject(this)){
delBulet();
};
} else {
_local5 = this.parent;
_local5.removeChild(this);
return;
};
speed = (speed * 1.1);
if (speed > 10){
speed = 10;
};
xSpeed = (Math.cos(((rotation * Math.PI) / 180)) * speed);
ySpeed = (Math.sin(((rotation * Math.PI) / 180)) * speed);
x = (x + xSpeed);
y = (y + ySpeed);
}
function delBulet():void{
var _local1:*;
target.Damage(damage);
_local1 = this.parent;
_local1.removeChild(this);
}
}
}//package
Section 88
//RoketSound (RoketSound)
package {
import flash.media.*;
public dynamic class RoketSound extends Sound {
}
}//package
Section 89
//RoketSpesial (RoketSpesial)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class RoketSpesial extends MovieClip {
public var roke:MovieClip;
public var damage:Number;
public var par;
public function RoketSpesial(){
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, 15, frame16, 16, frame17, 17, frame18, 18, frame19, 19, frame20);
}
function frame10(){
goBLOW();
cekthis();
}
function frame14(){
goBLOW();
}
function frame18(){
goBLOW();
}
function frame12(){
goBLOW();
}
function frame3(){
goBLOW();
}
function frame6(){
goBLOW();
}
function frame7(){
goBLOW();
}
function frame1(){
par = this.parent;
damage = (200 * par.par.levelRoket);
trace(damage);
goBLOW();
}
function frame19(){
goBLOW();
}
function frame13(){
goBLOW();
}
function frame17(){
goBLOW();
}
function frame5(){
goBLOW();
}
public function cekthis():void{
var _local1:Array;
var _local2:Array;
var _local3:*;
_local1 = new Array();
_local2 = new Array();
_local1 = par.getAllEnemy();
_local2 = par.getAllBuilding();
for (_local3 in _local1) {
if (roke.hitTestObject(_local1[_local3])){
_local1[_local3].Damage(damage);
};
};
for (_local3 in _local2) {
if (_local2[_local3].whosBase() != 1){
if (roke.hitTestObject(_local2[_local3].over)){
_local2[_local3].hitSProket(damage);
};
};
};
}
function frame8(){
goBLOW();
}
function frame9(){
goBLOW();
}
function frame2(){
goBLOW();
}
function frame15(){
goBLOW();
}
function frame16(){
goBLOW();
}
public function goBLOW():void{
par = this.parent;
par.Efek("spesialRoket", (x + par.randRange(-27, 27)), (y + par.randRange(-27, 27)));
}
function frame4(){
goBLOW();
}
function frame11(){
goBLOW();
}
function frame20(){
stop();
par.removeChild(this);
}
}
}//package
Section 90
//SendFailed (SendFailed)
package {
import flash.media.*;
public dynamic class SendFailed extends Sound {
}
}//package
Section 91
//SendOk (SendOk)
package {
import flash.media.*;
public dynamic class SendOk extends Sound {
}
}//package
Section 92
//Sign (Sign)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
import flash.ui.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.geom.*;
import flash.printing.*;
import flash.system.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Sign extends MovieClip {
public var par;
public function Sign(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
par = this.parent;
par.removeChild(this);
}
}
}//package
Section 93
//Stone (Stone)
package {
import flash.display.*;
public dynamic class Stone extends MovieClip {
}
}//package
Section 94
//Unit (Unit)
package {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import flash.filters.*;
public class Unit extends MovieClip {
var aniIN:Boolean;// = false
public var Model:Number;// = 1
public var Link:String;
public var jumUnit:Number;// = 0
var tujuanBuild:MovieClip;
public var thePath:String;
var range:Number;// = 100
var speed:Number;// = 1
public var whoUnit:Number;// = 0
var damage:Number;// = 10
public var critico:MovieClip;
public var Health:Number;// = 10
public var jumAwal:Number;// = 0
var ket;
public var pic:MovieClip;
var par;
public var isDead:Boolean;// = false
var tujuanX;
var tujuanY;
var fireCoolDown:Number;// = 0
public var speedico:MovieClip;
public function Unit():void{
Health = 10;
damage = 10;
speed = 1;
jumUnit = 0;
whoUnit = 0;
Model = 1;
isDead = false;
range = 100;
fireCoolDown = 0;
aniIN = false;
jumAwal = 0;
super();
mouseEnabled = false;
mouseChildren = false;
addEventListener(Event.ADDED_TO_STAGE, TheInit);
addEventListener(Event.REMOVED_FROM_STAGE, TheDeInit);
}
function TheInit(_arg1:Event):void{
par = this.parent;
removeEventListener(Event.ADDED_TO_STAGE, TheInit);
ket = new UnitText();
par.addChild(ket);
critico.visible = false;
speedico.visible = false;
}
public function setUnit(_arg1:MovieClip, _arg2:MovieClip, _arg3:Number, _arg4:Number):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Array;
tujuanBuild = _arg2;
x = (_arg1.x + randRange(-10, 10));
y = (_arg1.y + randRange(-10, 10));
jumUnit = _arg3;
jumAwal = _arg3;
Model = _arg4;
Health = ((_arg4 * 10) * _arg3);
whoUnit = _arg1.whosBase();
this.gotoAndStop((((whoUnit * 4) - 4) + Model));
tujuanX = (tujuanBuild.x + randRange(-5, 5));
tujuanY = (tujuanBuild.y + randRange(-5, 5));
_local5 = (tujuanX - x);
_local6 = (tujuanY - y);
_local7 = Math.atan2(_local6, _local5);
_local8 = ((_local7 * 180) / Math.PI);
rotation = _local8;
_local9 = new Array();
_local9.push(_arg1.name);
_local9.push(_arg2.name);
_local9.sort(Array.CASEINSENSITIVE);
Link = _local9.toString();
if (Model == 1){
speed = 3;
};
if (Model == 2){
speed = 2;
};
if (Model == 3){
speed = 2;
};
if (Model == 4){
speed = 1;
};
}
function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number;
_local3 = (Math.floor((((Math.random() * _arg2) - _arg1) + 1)) + _arg1);
return (_local3);
}
public function Attack():Number{
var _local1:Number;
_local1 = 0;
_local1 = (((jumUnit * Model) * 10) * par.dealCrit(this));
return (_local1);
}
public function Damage(_arg1:Number=0):void{
Health = (Health - _arg1);
par.Efek("hit", this.x, this.y);
if (Health <= 0){
par.Efek("blow", this.x, this.y);
isDead = true;
} else {
jumUnit = Math.ceil((Health / (10 * Model)));
};
}
function TheDeInit(_arg1:Event):void{
removeEventListener(Event.REMOVED_FROM_STAGE, TheDeInit);
par.removeChild(ket);
}
public function Move(_arg1:Array=null):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:Boolean;
var _local6:*;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
if (aniIN == false){
ket.ket.text = String(jumUnit);
ket.x = x;
ket.y = y;
if (whoUnit == 1){
critico.visible = par.critBoolean;
};
if (pic != null){
if ((((Model == 1)) || ((Model == 2)))){
if (pic.currentFrame != (Math.floor((jumUnit / 10)) + 1)){
pic.gotoAndStop((Math.floor((jumUnit / 10)) + 1));
};
};
if (Model == 3){
if (pic.currentFrame != (Math.floor((jumUnit / 15)) + 1)){
pic.gotoAndStop((Math.floor((jumUnit / 15)) + 1));
};
};
if (Model == 4){
if (pic.currentFrame != (Math.floor((jumUnit / 20)) + 1)){
pic.gotoAndStop((Math.floor((jumUnit / 20)) + 1));
};
};
};
if (fireCoolDown > 0){
fireCoolDown--;
};
_local5 = false;
for (_local4 in _arg1) {
if (_arg1[_local4].whoUnit != whoUnit){
if (_arg1[_local4].Link == Link){
_local6 = Math.round(Math.sqrt((Math.pow((_arg1[_local4].x - x), 2) + Math.pow((_arg1[_local4].y - y), 2))));
if (_local6 <= range){
_local5 = true;
if (fireCoolDown <= 0){
_arg1[_local4].Damage((damage * par.dealCrit(this)));
par.efekBulet(this, _arg1[_local4]);
fireCoolDown = 6;
};
};
};
};
};
if (_local5 == false){
_local7 = (tujuanX - x);
_local8 = (tujuanY - y);
_local9 = Math.atan2(_local8, _local7);
_local10 = ((_local9 * 180) / Math.PI);
rotation = _local10;
_local2 = ((Math.cos(((rotation * Math.PI) / 180)) * speed) * par.goSPEED(this));
_local3 = ((Math.sin(((rotation * Math.PI) / 180)) * speed) * par.goSPEED(this));
x = (x + _local2);
y = (y + _local3);
if (tujuanBuild.body.hitTestObject(this)){
if (tujuanBuild.whoBase != whoUnit){
tujuanBuild.unitIN(this);
if (isDead == false){
par.removeChild(this);
};
} else {
aniIN = true;
};
};
};
} else {
_local2 = ((Math.cos(((rotation * Math.PI) / 180)) * speed) * par.goSPEED(this));
_local3 = ((Math.sin(((rotation * Math.PI) / 180)) * speed) * par.goSPEED(this));
_local7 = (tujuanX - x);
_local8 = (tujuanY - y);
_local9 = Math.atan2(_local8, _local7);
_local10 = ((_local9 * 180) / Math.PI);
rotation = _local10;
x = (x + _local2);
y = (y + _local3);
scaleX = (scaleX - 0.1);
scaleY = (scaleY - 0.1);
if (scaleX < 0.6){
tujuanBuild.unitIN(this);
if (isDead == false){
par.removeChild(this);
};
};
};
}
}
}//package
Section 95
//UnitText (UnitText)
package {
import flash.display.*;
import flash.text.*;
public dynamic class UnitText extends MovieClip {
public var ket:TextField;
}
}//package