Frame 1
function simpanData() {
i = 1;
while (i <= simpanSemua.length) {
_root["gsdatSimp" + i] = simpanSemua[i];
Cookies = SharedObject.getLocal(_root["gsdatSimp" + i], "/");
Cookies.data["gssoData" + i] = eval (simpanSemua[i]);
Cookies.flush();
i++;
}
}
function loadData() {
i = 1;
while (i <= simpanSemua.length) {
_root["gsdatSimp" + i] = simpanSemua[i];
Cookies = SharedObject.getLocal(_root["gsdatSimp" + i], "/");
_root[simpanSemua[i]] = Cookies.data["gssoData" + i];
i++;
}
}
function initAwal() {
score = 0;
xpoint = 0;
xlevel = 1;
posisiGun = 0;
posisiSatelit = 0;
unitLevel1 = 1;
unitLevel2 = 1;
unitLevel3 = 1;
unitLevel4 = 1;
unitLevel5 = 0;
nyawaPerfect = 0;
pakeBomb = 0;
hancurLawan = 0;
}
function initData() {
achievements1 = 0;
achievements2 = 0;
achievements3 = 0;
achievements4 = 0;
achievements5 = 0;
achievements6 = 0;
achievements7 = 0;
achievements8 = 0;
achievements9 = 0;
achievements10 = 0;
achievements11 = 0;
achievements12 = 0;
achievements13 = 0;
achievements14 = 0;
achievements15 = 0;
}
function backMusic() {
myMusic.stop();
myMusic = new Sound(zmusik);
myMusic.attachSound("backMusic");
myMusic.start(0, 1);
myMusic.setVolume(volume1);
myMusic.onSoundComplete = function () {
backMusic();
};
}
function backMusic2() {
myMusic.stop();
myMusic = new Sound(zmusik);
myMusic.attachSound("backMusic2");
myMusic.start(0, 1);
myMusic.setVolume(volume1);
myMusic.onSoundComplete = function () {
backMusic2();
};
}
function backMusic3() {
myMusic.stop();
myMusic = new Sound(zmusik);
myMusic.attachSound("backMusic3");
myMusic.start(0, 1);
myMusic.setVolume(volume1);
myMusic.onSoundComplete = function () {
backMusic3();
};
}
function backBos() {
myMusic = new Sound(zmusik);
myMusic.attachSound("backBos");
myMusic.start(0, 999);
myMusic.setVolume(volume1);
}
function backGun() {
mySound = new Sound(zsound);
mySound.attachSound("backGun");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backGun2() {
mySound = new Sound(zsound);
mySound.attachSound("backGun2");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backDestroy() {
mySound = new Sound(zsound);
mySound.attachSound("backDestroy");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backDestroy2() {
mySound = new Sound(zsound);
mySound.attachSound("backDestroy2");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backMisil() {
mySound = new Sound(zsound);
mySound.attachSound("backMisil");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backKena() {
mySound = new Sound(zsound);
mySound.attachSound("backKena");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backKena2() {
mySound = new Sound(zsound);
mySound.attachSound("backKena2");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backKena3() {
mySound = new Sound(zsound);
mySound.attachSound("backKena3");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backBonus1() {
mySound = new Sound(zsound);
mySound.attachSound("backBonus1");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backBonus2() {
mySound = new Sound(zsound);
mySound.attachSound("backBonus2");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backBonus3() {
mySound = new Sound(zsound);
mySound.attachSound("backBonus3");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
function backBomb() {
mySound = new Sound(zsound);
mySound.attachSound("backBomb");
mySound.start(0, 1);
mySound.setVolume(volume2);
}
stop();
fscommand ("showmenu", false);
fscommand ("fullscreen", false);
fscommand ("allowscale", false);
Stage.showMenu = false;
this.onEnterFrame = function () {
persen = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
xpersen = persen + " %";
bar_mc.gotoAndStop(persen);
if (persen >= 100) {
delete this.onEnterFrame;
gotoAndStop ("completed");
}
};
volume1 = 70;
volume2 = 100;
qualityGame = 1;
_quality = "HIGH";
gameID = "1354";
simpanSemua = new Array("", "score", "xpoint", "xlevel", "posisiGun", "posisiSatelit", "unitLevel1", "unitLevel2", "unitLevel3", "unitLevel4", "unitLevel5", "achievements1", "achievements2", "achievements3", "achievements4", "achievements5", "achievements6", "achievements7", "achievements8", "achievements9", "achievements10", "achievements11", "achievements12", "achievements13", "achievements14", "achievements15", "nyawaPerfect", "pakeBomb", "hancurLawan");
loadData();
if (xlevel == undefined) {
initAwal();
initData();
}
Instance of Symbol 17 MovieClip in Frame 1
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Instance of Symbol 24 MovieClip "logo_mc" in Frame 1
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=preloader", "_blank");
}
Frame 10
stop();
musik = attachMovie("xsound", "zmusik", 2);
sound = attachMovie("xsound", "zsound", 3);
bar_mc.bar._xscale = 100;
enter_btn.onRelease = function () {
_urlStart = _url.indexOf("://") + 3;
_urlEnd = _url.indexOf("/", _urlStart);
domain = _url.substring(_urlStart, _urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain == "bubblebox.com") {
gotoAndPlay (21);
} else {
gotoAndPlay (21);
}
};
Instance of Symbol 17 MovieClip in Frame 10
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Instance of Symbol 24 MovieClip "logo_mc" in Frame 10
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=preloader", "_blank");
}
Frame 14
nextFrame();
Frame 15
stop();
Frame 16
prevFrame();
Frame 261
play();
Instance of Symbol 545 MovieClip in Frame 261
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Frame 490
stop();
gotoAndStop (491);
Frame 491
function cekBisa(indi) {
play_btn.enabled = indi;
options_btn.enabled = indi;
credits_btn.enabled = indi;
achievements_btn.enabled = indi;
high_btn.enabled = indi;
more_btn.enabled = indi;
}
stop();
myMusic.stop();
continue_mc._visible = false;
cekBisa(true);
play_btn.onRelease = function () {
if (xlevel > 1) {
cekBisa(false);
continue_mc._visible = true;
continue_mc.yes_btn.onRelease = function () {
backMusic();
gotoAndStop (531);
};
continue_mc.no_btn.onRelease = function () {
initAwal();
simpanData();
backMusic2();
gotoAndStop (492);
};
continue_mc.cancel_btn.onRelease = function () {
cekBisa(true);
continue_mc._visible = false;
};
} else {
initAwal();
simpanData();
backMusic2();
gotoAndStop (492);
}
};
options_btn.onRelease = function () {
gotoAndStop (522);
};
credits_btn.onRelease = function () {
gotoAndStop (523);
};
achievements_btn.onRelease = function () {
gotoAndStop (524);
};
high_btn.onRelease = function () {
getURL (("http://www.bubblebox.com/highscores/" + gameID) + ".htm", "_blank");
};
more_btn.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=moregames", "_blank");
};
Instance of Symbol 17 MovieClip in Frame 491
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Instance of Symbol 24 MovieClip "logo_mc" in Frame 491
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=mainmenu", "_blank");
}
Frame 492
stop();
next_btn.onRelease = function () {
nextFrame();
};
skip_btn.onRelease = function () {
gotoAndStop (525);
};
Frame 493
stop();
next_btn.onRelease = function () {
nextFrame();
};
prev_btn.onRelease = function () {
prevFrame();
};
skip_btn.onRelease = function () {
gotoAndStop (525);
};
Frame 512
stop();
next_btn.onRelease = function () {
nextFrame();
};
prev_btn.onRelease = function () {
prevFrame();
};
skip_btn.onRelease = function () {
gotoAndStop (525);
};
Frame 513
stop();
prev_btn.onRelease = function () {
prevFrame();
};
skip_btn.onRelease = function () {
gotoAndStop (525);
};
Frame 522
function cekSpeedQuality() {
i = 1;
while (i <= 3) {
this["speed" + i].angka = i;
this["quality" + i].angka = i;
this["speed" + i].gotoAndStop(1);
this["quality" + i].gotoAndStop(1);
this["speed" + i].onRelease = klikSpeed;
this["quality" + i].onRelease = klikQuality;
this["speed" + i].onRollOver = function () {
over();
};
this["quality" + i].onRollOver = function () {
over();
};
i++;
}
this["speed" + _root.speedGame].gotoAndStop(2);
this["quality" + _root.qualityGame].gotoAndStop(2);
}
function klikSpeed() {
klik();
indi = new String(this);
_root.speedGame = Number(indi.substr(indi.length - 1, 1));
cekSpeedQuality();
}
function klikQuality() {
klik();
indi = new String(this);
_root.qualityGame = Number(indi.substr(indi.length - 1, 1));
if (_root.qualityGame == 1) {
_quality = "HIGH";
} else if (_root.qualityGame == 2) {
_quality = "MEDIUM";
} else if (_root.qualityGame == 3) {
_quality = "LOW";
}
cekSpeedQuality();
}
stop();
reset_mc._visible = false;
quit_btn.onRelease = function () {
removeMovieClip(infoBox);
gotoAndStop (491);
};
reset_btn.onRelease = function () {
reset_mc._visible = true;
reset_mc.yes_btn.onRelease = function () {
initAwal();
initData();
simpanData();
reset_mc._visible = false;
};
reset_mc.no_btn.onRelease = function () {
reset_mc._visible = false;
};
};
bar1_mc.bar_mc._x = Math.ceil((_root.volume1 / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volume1 = int(0.434782608695652 * (this._x + 115));
_root.myMusic.setVolume(_root.volume1);
bar1_mc.persen1 = _root.volume1 + " %";
};
bar1_mc.indi_mc.onPress = function () {
klik();
startDrag (bar1_mc.bar_mc, true, -115, 0, 115, 0);
};
bar1_mc.indi_mc.onRelease = (bar1_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
bar2_mc.bar_mc._x = Math.ceil((_root.volume2 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volume2 = int(0.434782608695652 * (this._x + 115));
_root.volum3 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volume2);
_root.mySound2.setVolume(_root.volum3);
bar2_mc.persen2 = _root.volume2 + " %";
};
bar2_mc.indi_mc.onPress = function () {
klik();
startDrag (bar2_mc.bar_mc, true, -115, 0, 115, 0);
};
bar2_mc.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
cekSpeedQuality();
Instance of Symbol 17 MovieClip in Frame 522
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Instance of Symbol 24 MovieClip "logo_mc" in Frame 522
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=credits", "_blank");
}
Frame 523
stop();
quit_btn.onRelease = function () {
gotoAndStop (491);
};
Instance of Symbol 17 MovieClip in Frame 523
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Instance of Symbol 24 MovieClip "logo_mc" in Frame 523
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=credits", "_blank");
}
Frame 524
function overMedal() {
myStr = new String(this);
if (myStr.length == 14) {
indi = Number(myStr.substr(myStr.length - 1, 1));
} else if (myStr.length == 15) {
indi = Number(myStr.substr(myStr.length - 2, 2));
}
if (_root["achievements" + indi] == 0) {
if (indi >= 7) {
informasi = "Secret Medals (Locked)";
} else {
informasi = infoArray[indi] + " (Locked)";
}
} else {
informasi = infoArray[indi] + " (Unlocked)";
}
}
function outMedal() {
informasi = "";
}
stop();
quit_btn.onRelease = function () {
gotoAndStop (491);
};
infoArray = new Array("", "First time destroying an enemy vessel.", "Perfect health in 1 level.", "Clearing 4 levels without using a bomb.", "Destroying 50 enemy vessels without using a bomb.", "Clearing 10 levels.", "Defeating the last boss.", "Collecting at least 500000 bonus scores in 1 level.", "Collecting at least 50 green orbs in 1 level.", "Perfect health in 2 levels.", "Perfect health in 3 levels.", "Clearing 6 levels without using a bomb.", "Clearing 8 levels without using a bomb.", "Destroying 100 enemy vessels without using a bomb.", "Destroying 200 enemy vessels without using a bomb.", "Defeating the boss without using a bomb.");
i = 1;
while (i <= 15) {
if (_root["achievements" + i] == 0) {
_root["medal" + i].gotoAndStop(1);
} else {
_root["medal" + i].gotoAndStop(2);
}
_root["medal" + i].onRollOver = overMedal;
_root["medal" + i].onRollOut = outMedal;
i++;
}
Instance of Symbol 17 MovieClip in Frame 524
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Instance of Symbol 24 MovieClip "logo_mc" in Frame 524
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=credits", "_blank");
}
Frame 525
stop();
next_btn.onRelease = function () {
nextFrame();
};
Instance of Symbol 17 MovieClip in Frame 525
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Instance of Symbol 24 MovieClip "logo_mc" in Frame 525
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=instructions", "_blank");
}
Frame 526
stop();
play_btn.onRelease = function () {
backMusic();
gotoAndStop (530);
};
Frame 530
function enterSatelit1() {
if (masihMain == true) {
if (sedangPause == false) {
this.xdelay++;
if (this.xdelay >= this.totDelay) {
this.xdelay = 0;
gun = attachMovie("lonjong_mc", "gun_mc" + gunKe, gunKe);
gun.xdamage = 10;
gun._x = this._x;
gun._y = this._y;
gun._rotation = this._rotation - 180;
gun.speedKe = 10;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
}
}
}
function enterSatelit2() {
if (masihMain == true) {
if (sedangPause == false) {
this.xdelay++;
if (this.xdelay >= this.totDelay) {
this.xdelay = 0;
gun = attachMovie("sabit_mc", "gun_mc" + gunKe, gunKe);
gun.xdamage = 10;
gun._x = this._x;
gun._y = this._y;
gun._rotation = this._rotation + 90;
gun.speedKe = 10;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
}
}
}
function enterSatelit3() {
if (masihMain == true) {
if (sedangPause == false) {
this.xdelay++;
if (this.xdelay >= this.totDelay) {
this.xdelay = 0;
gun = attachMovie("sabit_mc", "gun_mc" + gunKe, gunKe);
gun.xdamage = 12.5;
gun._x = this._x;
gun._y = this._y;
gun._rotation = this._rotation - 90;
gun.speedKe = 10;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
}
}
}
function enterBeams() {
this._x = keranjang_mc._x;
this._y = keranjang_mc._y;
this._rotation = keranjang_mc._rotation;
}
function init() {
munculKe1 = 500;
munculKe2 = 2500;
munculKe3 = 4000;
dalamBola = 3000;
perubahan = 0.5;
dalamEfek = 100001 /* 0x0186A1 */;
musuhKe = 2201;
gunKe = 2101;
banyakPeluru = 250;
nyawaJagoan = (100 * _root.unitLevel1) * 1.5;
totNyawaJagoan = nyawaJagoan;
barTambah = 20;
barKurang = 50;
waktu = 0;
tambahanSpeed = 1;
scorePenambah = 1;
dalamBeam = 10901;
keranjangSpeed = 5 + (2 * _root.unitLevel2);
sudahKedua = false;
sudahKetiga = false;
semuaHijau = false;
shieldAda = false;
masihMain = true;
sedangPause = false;
sedangBar = true;
klikBeams = false;
gerakKiri = false;
gerakKanan = false;
gerakAtas = false;
gerakBawah = false;
atas_mc.info_mc.info = "";
atas_mc.info_mc.gotoAndStop(1);
barPower = 0;
if (xlevel == 7) {
waves = Math.ceil(2 * ((xlevel + 1) / 2));
} else if (xlevel == 13) {
waves = 1;
} else {
waves = Math.ceil(5 * ((xlevel + 1) / 2));
}
xscore = 0;
tembakKe = -90;
jumlahMusuh = waves;
atas_mc.zone_mc.zone = "ZONE " + xlevel;
if (xlevel == 1) {
xmunculMusuh = 3000;
ymunculMusuh = 5000;
zmunculMusuh = 7000;
} else if (xlevel == 2) {
xmunculMusuh = 1500;
ymunculMusuh = 2500;
zmunculMusuh = 3500;
} else if (xlevel == 3) {
xmunculMusuh = 2500;
ymunculMusuh = 4500;
zmunculMusuh = 6500;
} else if (xlevel == 4) {
xmunculMusuh = 1250;
ymunculMusuh = 2250;
zmunculMusuh = 6500;
} else if (xlevel == 5) {
xmunculMusuh = 2250;
ymunculMusuh = 4250;
zmunculMusuh = 6250;
} else if (xlevel == 6) {
xmunculMusuh = 2000;
ymunculMusuh = 3000;
zmunculMusuh = 4000;
} else if (xlevel == 7) {
xmunculMusuh = 2000;
ymunculMusuh = 4000;
zmunculMusuh = 6000;
} else if (xlevel == 8) {
xmunculMusuh = 4000;
ymunculMusuh = 6000;
zmunculMusuh = 8000;
} else if (xlevel == 9) {
xmunculMusuh = 3500;
ymunculMusuh = 5500;
zmunculMusuh = 7500;
} else if (xlevel == 10) {
xmunculMusuh = 3000;
ymunculMusuh = 5000;
zmunculMusuh = 7000;
} else if (xlevel >= 11) {
xmunculMusuh = 2000;
ymunculMusuh = 4000;
zmunculMusuh = 6000;
amunculMusuh = 8000;
bmunculMusuh = 10000;
}
if (xlevel <= 3) {
xmunculMusuh = xmunculMusuh * 1.5;
ymunculMusuh = ymunculMusuh * 1.5;
zmunculMusuh = zmunculMusuh * 1.5;
amunculMusuh = amunculMusuh * 1.5;
bmunculMusuh = bmunculMusuh * 1.5;
} else if (xlevel <= 6) {
xmunculMusuh = xmunculMusuh * 1.25;
ymunculMusuh = ymunculMusuh * 1.25;
zmunculMusuh = zmunculMusuh * 1.25;
amunculMusuh = amunculMusuh * 1.25;
bmunculMusuh = bmunculMusuh * 1.25;
} else if (xlevel >= 9) {
xmunculMusuh = xmunculMusuh * 1;
ymunculMusuh = ymunculMusuh * 1;
zmunculMusuh = zmunculMusuh * 1;
amunculMusuh = amunculMusuh * 1;
bmunculMusuh = bmunculMusuh * 1;
} else if (xlevel <= 12) {
xmunculMusuh = xmunculMusuh * 0.75;
ymunculMusuh = ymunculMusuh * 0.75;
zmunculMusuh = zmunculMusuh * 0.75;
amunculMusuh = amunculMusuh * 0.75;
bmunculMusuh = bmunculMusuh * 0.75;
}
banyakDamage = _root.unitLevel3;
if (_root.unitLevel4 == 1) {
jumlahBomb = 1;
atas_mc.bomb1._visible = true;
atas_mc.bomb2._visible = false;
atas_mc.bomb3._visible = false;
} else if (_root.unitLevel4 == 2) {
jumlahBomb = 2;
atas_mc.bomb1._visible = true;
atas_mc.bomb2._visible = true;
atas_mc.bomb3._visible = false;
} else if (_root.unitLevel4 == 3) {
jumlahBomb = 3;
atas_mc.bomb1._visible = true;
atas_mc.bomb2._visible = true;
atas_mc.bomb3._visible = true;
}
delayMisil = 0;
delayPeluru1 = 0;
delayPeluru2 = 0;
delayPeluru3 = 0;
bombGuna = 0;
kumpulOrbs = 0;
simpanScore = score;
}
function cekWaktu() {
if (sedangPause == false) {
waktu++;
}
}
function kurangBar() {
if (sedangPause == false) {
barPower = barPower - 2;
if (barPower <= 0) {
atas_mc.power_mc.gotoAndStop(1);
sedangBar = true;
barPower = 0;
atas_mc.power_mc.bar._xscale = barPower;
satelit1.totDelay = 10;
satelit2.totDelay = 10;
satelit3.totDelay = 10;
clearInterval(idPeluru);
clearInterval(idBerkurang);
banyakPeluru = 250;
idPeluru = setInterval(munculPeluru, banyakPeluru);
}
}
}
function munculBoss() {
musuh = attachMovie("boss3", "musuh_mc" + musuhKe, musuhKe + 5);
zbanyakNaik = 12;
musuh.nyawa = Math.ceil(1000 * ((xlevel * (zbanyakNaik - 1)) / 2));
musuh._x = 350;
musuh._y = -300 - random(300);
musuh.awalMuncul = false;
musuh.aksinya = 1;
musuh.speed = 1;
musuh.xdelay = 0;
musuh.targetDelay = 25;
musuh.xdelay2 = 0;
musuh.targetDelay2 = 15;
musuh.xdelay3 = 0;
musuh.targetDelay3 = 75;
musuh.delayKe = 0;
delayAkhir = 300;
zbos = musuh;
musuh.onEnterFrame = enterBoss;
musuhKe++;
if (musuhKe >= 2250) {
musuhKe = 2201;
}
i = 1;
while (i <= 2) {
musuh = attachMovie("gunbos1", "gunbos" + i, musuhKe);
if (i == 1) {
musuh._x = zbos._x - 183;
musuh._y = zbos._y - 30;
} else if (i == 2) {
musuh._x = zbos._x + 175;
musuh._y = zbos._y - 30;
}
musuhKe++;
if (musuhKe >= 2250) {
musuhKe = 2201;
}
i++;
}
}
function enterBoss() {
if (sedangPause == false) {
if (masihMain == true) {
deltaX = gunbos1._x - keranjang_mc._x;
deltaY = gunbos1._y - keranjang_mc._y;
gunbos1._rotation = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
deltaX = gunbos2._x - keranjang_mc._x;
deltaY = gunbos2._y - keranjang_mc._y;
gunbos2._rotation = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
if (this.awalMuncul == false) {
if (this._y < 125) {
this._y = this._y + (this.speed * 2);
i = 1;
while (i <= 2) {
_root["gunbos" + i]._y = _root["gunbos" + i]._y + (this.speed * 2);
i++;
}
} else {
this.awalMuncul = true;
}
} else {
this._x = this._x - this.speed;
i = 1;
while (i <= 2) {
_root["gunbos" + i]._x = _root["gunbos" + i]._x - this.speed;
i++;
}
if (this._x < 0) {
this._x = 0;
this.speed = -this.speed;
} else if (this._x > 700) {
this._x = 700;
this.speed = -this.speed;
}
this.delayKe++;
if (this.delayKe >= delayAkhir) {
this.delayKe = 0;
if (this.aksinya == 1) {
this.aksinya = 2;
} else {
this.aksinya = 1;
}
}
if (this.aksinya == 1) {
this.xdelay++;
if (this.xdelay >= this.targetDelay) {
backGun2();
this.xdelay = 0;
w = 1;
while (w <= 4) {
gun = attachMovie("gun_mc2", "xgun_mc" + gunKe, gunKe);
if (w == 1) {
gun._x = this._x - 105;
gun._y = this._y + 141;
} else if (w == 2) {
gun._x = this._x - 82;
gun._y = this._y + 141;
} else if (w == 3) {
gun._x = this._x + 78;
gun._y = this._y + 141;
} else if (w == 4) {
gun._x = this._x + 99;
gun._y = this._y + 141;
}
gun._y = gun._y + 10;
gun._rotation = 180;
gun.speedKe = 5 + (xlevel / 3);
gun.onEnterFrame = enterGun2;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
w++;
}
}
this.xdelay2++;
if (this.xdelay2 >= this.targetDelay2) {
backGun3();
this.xdelay2 = 0;
w = 1;
while (w <= 2) {
gun = attachMovie("gun_mc5", "xgun_mc" + gunKe, gunKe);
if (w == 1) {
gun._x = gunbos1._x;
gun._y = gunbos1._y;
} else if (w == 2) {
gun._x = gunbos2._x;
gun._y = gunbos2._y;
}
deltaX = gun._x - keranjang_mc._x;
deltaY = gun._y - keranjang_mc._y;
gun._rotation = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
gun._y = gun._y - (gun.speedKe * Math.cos(gun._rotation * (Math.PI/180)));
gun._x = gun._x + (gun.speedKe * Math.sin(gun._rotation * (Math.PI/180)));
gun.speedKe = 5 + (xlevel / 3);
gun.onEnterFrame = enterGun2;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
w++;
}
}
} else if (this.aksinya == 2) {
this.xdelay3++;
if (this.xdelay3 >= this.targetDelay3) {
this.xdelay3 = 0;
musuhKe++;
if (musuhKe >= 2245) {
musuhKe = 2215;
}
if (waves < 20) {
xindi = random(3) + 1;
munculMusuh(xindi, "khusus");
jumlahMusuh++;
waves++;
}
}
}
}
i = 2101;
while (i <= 2150) {
if (_root["gun_mc" + i] != undefined) {
if (this.indi.hitTest(_root["gun_mc" + i])) {
backKena();
if (_root["gun_mc" + i].kena != true) {
_root["gun_mc" + i].kena = true;
setEfek(_root["gun_mc" + i]);
}
if (_root["gun_mc" + i].xjenis == "misil") {
this.nyawa = this.nyawa - (50 * banyakDamage);
setDahsyat3(_root["gun_mc" + i]);
setDahsyat4(_root["gun_mc" + i]);
} else {
this.nyawa = this.nyawa - ((1 * banyakDamage) * _root["gun_mc" + i].xdamage);
if (_root["gun_mc" + i].xdamage == 7.5) {
setDahsyat3(_root["gun_mc" + i]);
} else if (_root["gun_mc" + i].xdamage == 15) {
setDahsyat4(_root["gun_mc" + i]);
} else if (_root["gun_mc" + i].xdamage == 10) {
setDahsyat10(_root["gun_mc" + i]);
} else if (_root["gun_mc" + i].xdamage == 12.5) {
setDahsyat11(_root["gun_mc" + i]);
}
}
removeMovieClip(_root["gun_mc" + i]);
score = score + 10;
xscore = xscore + 10;
if (this.nyawa <= 0) {
setDahsyat5(this);
backDestroy();
backDestroy();
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
score = score + 100;
xscore = xscore + 100;
achievements1 = 1;
jumlahMusuh--;
hancurLawan++;
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
removeMovieClip(this);
}
}
}
i++;
}
if (this.indi.hitTest(keranjang_mc.indi)) {
backDestroy();
backDestroy();
score = score - 50;
xscore = xscore - 50;
nyawaJagoan = nyawaJagoan - (25 * ((xlevel + 2) / 3));
this.nyawa = this.nyawa - 25;
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (nyawaJagoan <= 0) {
setDahsyat6(keranjang_mc);
xi = 1;
while (xi <= 3) {
setEfek2(keranjang_mc);
nyawaJagoan = 0;
atas_mc.life_mc.bar._xscale = nyawaJagoan;
keranjang_mc._visible = false;
selesaiGame("kalah");
xi++;
}
keranjang_mc._x = -100;
keranjang_mc._y = -100;
}
setEfek2(keranjang_mc);
} else if (this.indi.hitTest(beam_mc)) {
backKena3();
score = score + 10;
xscore = xscore + 10;
achievements1 = 1;
setEfek2(this);
this.nyawa = this.nyawa - ((banyakDamage * 10) * _root.unitLevel5);
if (this.nyawa <= 0) {
jumlahMusuh--;
hancurLawan++;
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
}
} else if (this.indi.hitTest(satelit_mc1)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
satelit_mc1.nyawa = satelit_mc1.nyawa - (25 * ((xlevel + 2) / 3));
this.nyawa = this.nyawa - 25;
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc1.nyawa <= 0) {
setDahsyat6(satelit_mc1);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc1.nyawa = 0;
xi++;
}
removeMovieClip(satelit_mc1);
}
setEfek2(this);
} else if (this.indi.hitTest(satelit_mc2)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
satelit_mc2.nyawa = satelit_mc2.nyawa - (25 * ((xlevel + 2) / 3));
this.nyawa = this.nyawa - 25;
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc2.nyawa <= 0) {
setDahsyat6(satelit_mc2);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc2.nyawa = 0;
xi++;
}
removeMovieClip(satelit_mc2);
}
setEfek2(this);
} else if (this.indi.hitTest(satelit_mc3)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
satelit_mc3.nyawa = satelit_mc3.nyawa - (25 * ((xlevel + 2) / 3));
this.nyawa = this.nyawa - 25;
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc3.nyawa <= 0) {
setDahsyat6(satelit_mc3);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc3.nyawa = 0;
xi++;
}
removeMovieClip(satelit_mc3);
}
setEfek2(this);
}
i = 3000;
while (i <= 3100) {
if (_root["bola_mc" + i] != undefined) {
if (this.indi.hitTest(_root["bola_mc" + i])) {
if (_root["bola_mc" + i].jenis == "jagoan") {
if (this._xscale <= 110) {
this.nyawa = this.nyawa + 2;
this.damage = this.damage + 2;
this._xscale = this._xscale + 1.5;
this._yscale = this._yscale + 1.5;
}
cekEfek(1, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "musuh") {
cekEfek(2, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "bonus") {
if (this._xscale <= 110) {
this.nyawa = this.nyawa + 10;
this.damage = this.damage + 10;
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
}
cekEfek(3, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "bonus2") {
score = score - 1000;
xscore = xscore - 1000;
cekEfek(4, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "bonus3") {
scorePenambah--;
if (scorePenambah <= 1) {
scorePenambah = 1;
}
atas_mc.info_mc.info = ("Score Boost " + scorePenambah) + "x";
cekEfek(5, _root["bola_mc" + i], this);
}
removeMovieClip(_root["bola_mc" + i]);
}
}
i++;
}
}
}
}
function munculMusuh(indi, special) {
if (sedangPause == false) {
if (masihMain == true) {
if (waves > 0) {
if (indi == 1) {
musuh = attachMovie("musuh_mc2", "musuh_mc" + musuhKe, musuhKe);
} else if (indi == 2) {
musuh = attachMovie("musuh_mc3", "musuh_mc" + musuhKe, musuhKe);
} else if (indi == 3) {
musuh = attachMovie("musuh_mc4", "musuh_mc" + musuhKe, musuhKe);
} else if (indi == 4) {
musuh = attachMovie("boss1", "musuh_mc" + musuhKe, musuhKe);
} else if (indi == 5) {
musuh = attachMovie("boss2", "musuh_mc" + musuhKe, musuhKe);
}
rand = random(4);
if (rand == 0) {
musuh._x = random(700);
musuh._y = -random(200);
} else if (rand == 1) {
musuh._x = random(700);
musuh._y = 500 + random(200);
} else if (rand == 2) {
musuh._x = -random(200);
musuh._y = random(500);
} else if (rand == 3) {
musuh._x = 700 + random(200);
musuh._y = random(500);
}
if (special == "khusus") {
musuh._x = zbos._x;
musuh._y = zbos._y;
}
if (indi == 1) {
musuh.speedKe = ((xlevel / 2.5) + random(3)) + 3;
} else if (indi == 2) {
musuh.speedKe = ((xlevel / 1.5) + random(2)) + 2;
} else if (indi == 3) {
musuh.speedKe = ((xlevel / 3) + random(2)) + 1;
} else if (indi == 4) {
musuh.speedKe = (xlevel / 3.5) + 2;
} else if (indi == 5) {
musuh.speedKe = (xlevel / 3.5) + 1;
}
if (xlevel <= 2) {
zbanyakNaik = 2;
} else if (xlevel <= 4) {
zbanyakNaik = 3;
} else if (xlevel <= 6) {
zbanyakNaik = 5;
} else if (xlevel <= 8) {
zbanyakNaik = 8;
} else if (xlevel <= 10) {
zbanyakNaik = 12;
} else if (xlevel <= 12) {
zbanyakNaik = 17;
} else {
zbanyakNaik = 23;
}
if (xlevel == 7) {
zbanyakNaik = 5;
}
if (indi == 1) {
musuh.nyawa = Math.ceil(10 * ((xlevel * (zbanyakNaik - 1)) / 2));
musuh.onEnterFrame = enterMusuh;
} else if (indi == 2) {
musuh.nyawa = Math.ceil(25 * ((xlevel * (zbanyakNaik - 1)) / 2));
musuh.posTargetX = random(400) + 100;
musuh.posTargetY = random(300) + 100;
musuh.sudahSampai = false;
musuh.xdelay = 0;
musuh.targetDelay = 90;
musuh.onEnterFrame = enterMusuh2;
} else if (indi == 3) {
musuh.nyawa = Math.ceil(40 * ((xlevel * (zbanyakNaik - 1)) / 2));
musuh.xdelay = 0;
musuh.targetDelay = 65;
musuh.sudahArea = false;
deltaX = musuh._x - keranjang_mc._x;
deltaY = musuh._y - keranjang_mc._y;
musuh._rotation = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
musuh.onEnterFrame = enterMusuh3;
} else if (indi == 4) {
musuh.nyawa = Math.ceil(100 * ((xlevel * (zbanyakNaik - 1)) / 2));
musuh.xgede = true;
musuh.posTargetX = random(400) + 100;
musuh.posTargetY = random(300) + 100;
musuh.sudahSampai = false;
musuh.xdelay = 0;
musuh.targetDelay = 35;
musuh.tipeTembakan = "galak";
musuh.onEnterFrame = enterMusuh2;
} else if (indi == 5) {
musuh.nyawa = Math.ceil(100 * ((xlevel * (zbanyakNaik - 1)) / 2));
musuh.xgede = true;
musuh.xdelay = 0;
musuh.targetDelay = 30;
musuh.sudahArea = false;
deltaX = musuh._x - keranjang_mc._x;
deltaY = musuh._y - keranjang_mc._y;
musuh._rotation = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
musuh.tipeTembakan = "galak";
musuh.onEnterFrame = enterMusuh3;
}
musuhKe++;
if (musuhKe >= 2250) {
musuhKe = 2201;
}
waves--;
}
}
}
}
function enterMusuh() {
if (sedangPause == false) {
if (masihMain == true) {
deltaX = this._x - keranjang_mc._x;
deltaY = this._y - keranjang_mc._y;
this._rotation = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
this._y = this._y - (this.speedKe * Math.cos(this._rotation * (Math.PI/180)));
this._x = this._x + (this.speedKe * Math.sin(this._rotation * (Math.PI/180)));
i = 2101;
while (i <= 2150) {
if (_root["gun_mc" + i] != undefined) {
if (this.indi.hitTest(_root["gun_mc" + i])) {
backKena();
if (_root["gun_mc" + i].kena != true) {
_root["gun_mc" + i].kena = true;
setEfek(_root["gun_mc" + i]);
}
if (_root["gun_mc" + i].xjenis == "misil") {
this.nyawa = this.nyawa - (50 * banyakDamage);
setDahsyat3(_root["gun_mc" + i]);
setDahsyat4(_root["gun_mc" + i]);
} else {
this.nyawa = this.nyawa - ((1 * banyakDamage) * _root["gun_mc" + i].xdamage);
if (_root["gun_mc" + i].xdamage == 7.5) {
setDahsyat3(_root["gun_mc" + i]);
} else if (_root["gun_mc" + i].xdamage == 15) {
setDahsyat4(_root["gun_mc" + i]);
} else if (_root["gun_mc" + i].xdamage == 10) {
setDahsyat10(_root["gun_mc" + i]);
} else if (_root["gun_mc" + i].xdamage == 12.5) {
setDahsyat11(_root["gun_mc" + i]);
}
}
removeMovieClip(_root["gun_mc" + i]);
score = score + 10;
xscore = xscore + 10;
if (this.nyawa <= 0) {
setDahsyat5(this);
backDestroy();
backDestroy();
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
score = score + 100;
xscore = xscore + 100;
achievements1 = 1;
jumlahMusuh--;
hancurLawan++;
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
removeMovieClip(this);
}
}
}
i++;
}
if (this.indi.hitTest(keranjang_mc.indi)) {
backDestroy();
backDestroy();
score = score - 50;
xscore = xscore - 50;
achievements1 = 1;
jumlahMusuh--;
hancurLawan++;
if (shieldAda == false) {
nyawaJagoan = nyawaJagoan - (25 * ((xlevel + 2) / 3));
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (nyawaJagoan <= 0) {
setDahsyat6(keranjang_mc);
xi = 1;
while (xi <= 3) {
setEfek2(keranjang_mc);
nyawaJagoan = 0;
atas_mc.life_mc.bar._xscale = nyawaJagoan;
keranjang_mc._visible = false;
selesaiGame("kalah");
xi++;
}
keranjang_mc._x = -100;
keranjang_mc._y = -100;
} else if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(keranjang_mc);
removeMovieClip(this);
} else if (beam_mc.hitTest(this._x, this._y, true)) {
backKena3();
score = score + 10;
xscore = xscore + 10;
achievements1 = 1;
setEfek2(this);
this.nyawa = this.nyawa - ((banyakDamage * 10) * _root.unitLevel5);
if (this.nyawa <= 0) {
jumlahMusuh--;
hancurLawan++;
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
}
} else if (this.hitTest(satelit_mc1)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
achievements1 = 1;
jumlahMusuh--;
hancurLawan++;
if (shieldAda == false) {
satelit_mc1.nyawa = satelit_mc1.nyawa - (25 * ((xlevel + 2) / 3));
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc1.nyawa <= 0) {
setDahsyat6(satelit_mc1);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc1.nyawa = 0;
xi++;
}
removeMovieClip(satelit_mc1);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
} else if (this.hitTest(satelit_mc2)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
achievements1 = 1;
jumlahMusuh--;
hancurLawan++;
if (shieldAda == false) {
satelit_mc2.nyawa = satelit_mc2.nyawa - (25 * ((xlevel + 2) / 3));
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc2.nyawa <= 0) {
setDahsyat6(satelit_mc2);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc2.nyawa = 0;
xi++;
}
removeMovieClip(satelit_mc2);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
} else if (this.hitTest(satelit_mc3)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
achievements1 = 1;
jumlahMusuh--;
hancurLawan++;
if (shieldAda == false) {
satelit_mc3.nyawa = satelit_mc3.nyawa - (25 * ((xlevel + 2) / 3));
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc3.nyawa <= 0) {
setDahsyat6(satelit_mc3);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc3.nyawa = 0;
xi++;
}
removeMovieClip(satelit_mc3);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
}
i = 3000;
while (i <= 3100) {
if (_root["bola_mc" + i] != undefined) {
if (this.hitTest(_root["bola_mc" + i])) {
if (_root["bola_mc" + i].jenis == "jagoan") {
if (this._xscale <= 125) {
this.nyawa = this.nyawa + 5;
this.damage = this.damage + 5;
this._xscale = this._xscale + 7.5;
this._yscale = this._yscale + 7.5;
}
cekEfek(1, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "musuh") {
cekEfek(2, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "bonus") {
if (this._xscale <= 150) {
this.nyawa = this.nyawa + 10;
this.damage = this.damage + 10;
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
}
cekEfek(3, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "bonus2") {
score = score - 1000;
xscore = xscore - 1000;
cekEfek(4, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "bonus3") {
scorePenambah--;
if (scorePenambah <= 1) {
scorePenambah = 1;
}
atas_mc.info_mc.info = ("Score Boost " + scorePenambah) + "x";
cekEfek(5, _root["bola_mc" + i], this);
}
removeMovieClip(_root["bola_mc" + i]);
}
}
i++;
}
}
}
}
function enterMusuh2() {
if (sedangPause == false) {
if (masihMain == true) {
if (this.sudahSampai == false) {
deltaX = this._x - this.posTargetX;
deltaY = this._y - this.posTargetY;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
this._rotation = angle;
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speedKe) {
this._y = this._y - (this.speedKe * Math.cos(angle * (Math.PI/180)));
this._x = this._x + (this.speedKe * Math.sin(angle * (Math.PI/180)));
} else {
this.sudahSampai = true;
}
} else if (this.sudahSampai == true) {
deltaX = this._x - keranjang_mc._x;
deltaY = this._y - keranjang_mc._y;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
this._rotation = angle;
this.xdelay++;
if (this.xdelay >= this.targetDelay) {
backGun2();
this.xdelay = 0;
if (this.tipeTembakan == "galak") {
gun = attachMovie("gun_mc5", "xgun_mc" + gunKe, gunKe);
gun.tipeTembakan = "galak";
} else {
gun = attachMovie("gun_mc2", "xgun_mc" + gunKe, gunKe);
}
gun._x = this._x;
gun._y = this._y;
gun._rotation = angle;
gun.speedKe = 5 + (xlevel / 3);
gun.onEnterFrame = enterGun2;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
}
i = 2101;
while (i <= 2150) {
if (_root["gun_mc" + i] != undefined) {
if (this.indi.hitTest(_root["gun_mc" + i])) {
backKena2();
if (_root["gun_mc" + i].kena != true) {
_root["gun_mc" + i].kena = true;
setEfek(_root["gun_mc" + i]);
}
if (_root["gun_mc" + i].xjenis == "misil") {
this.nyawa = this.nyawa - (50 * banyakDamage);
setDahsyat3(_root["gun_mc" + i]);
setDahsyat4(_root["gun_mc" + i]);
} else {
this.nyawa = this.nyawa - ((1 * banyakDamage) * _root["gun_mc" + i].xdamage);
if (_root["gun_mc" + i].xdamage == 7.5) {
setDahsyat3(_root["gun_mc" + i]);
} else if (_root["gun_mc" + i].xdamage == 15) {
setDahsyat4(_root["gun_mc" + i]);
} else if (_root["gun_mc" + i].xdamage == 10) {
setDahsyat10(_root["gun_mc" + i]);
} else if (_root["gun_mc" + i].xdamage == 12.5) {
setDahsyat11(_root["gun_mc" + i]);
}
}
removeMovieClip(_root["gun_mc" + i]);
score = score + 10;
xscore = xscore + 10;
if (this.nyawa <= 0) {
setDahsyat5(this);
backDestroy2();
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
score = score + 100;
xscore = xscore + 100;
jumlahMusuh--;
hancurLawan++;
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
removeMovieClip(this);
}
}
}
i++;
}
if (this.indi.hitTest(keranjang_mc.indi)) {
backDestroy2();
score = score - 50;
xscore = xscore - 50;
jumlahMusuh--;
hancurLawan++;
if (shieldAda == false) {
if (this.xgede == true) {
nyawaJagoan = nyawaJagoan - (250 * ((xlevel + 2) / 3));
} else {
nyawaJagoan = nyawaJagoan - (50 * ((xlevel + 2) / 3));
}
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (nyawaJagoan <= 0) {
setDahsyat6(keranjang_mc);
xi = 1;
while (xi <= 3) {
setEfek2(keranjang_mc);
nyawaJagoan = 0;
atas_mc.life_mc.bar._xscale = nyawaJagoan;
keranjang_mc._visible = false;
selesaiGame("kalah");
xi++;
}
keranjang_mc._x = -100;
keranjang_mc._y = -100;
} else if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(keranjang_mc);
removeMovieClip(this);
} else if (beam_mc.hitTest(this._x, this._y, true)) {
backKena3();
score = score + 10;
xscore = xscore + 10;
achievements1 = 1;
setEfek2(this);
this.nyawa = this.nyawa - ((banyakDamage * 10) * _root.unitLevel5);
if (this.nyawa <= 0) {
jumlahMusuh--;
hancurLawan++;
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
}
} else if (this.hitTest(satelit_mc1)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
jumlahMusuh--;
hancurLawan++;
if (shieldAda == false) {
satelit_mc1.nyawa = satelit_mc1.nyawa - (50 * ((xlevel + 2) / 3));
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc1.nyawa <= 0) {
setDahsyat6(satelit_mc1);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc1.nyawa = 0;
xi++;
}
removeMovieClip(satelit_mc1);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
} else if (this.hitTest(satelit_mc2)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
jumlahMusuh--;
hancurLawan++;
if (shieldAda == false) {
satelit_mc2.nyawa = satelit_mc2.nyawa - (50 * ((xlevel + 2) / 3));
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc2.nyawa <= 0) {
setDahsyat6(satelit_mc2);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc2.nyawa = 0;
xi++;
}
removeMovieClip(satelit_mc2);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
} else if (this.hitTest(satelit_mc3)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
jumlahMusuh--;
hancurLawan++;
if (shieldAda == false) {
satelit_mc3.nyawa = satelit_mc3.nyawa - (50 * ((xlevel + 2) / 3));
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc3.nyawa <= 0) {
setDahsyat6(satelit_mc3);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc3.nyawa = 0;
xi++;
}
removeMovieClip(satelit_mc3);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
}
i = 3000;
while (i <= 3100) {
if (_root["bola_mc" + i] != undefined) {
if (this.hitTest(_root["bola_mc" + i])) {
if (_root["bola_mc" + i].jenis == "jagoan") {
if (this._xscale <= 125) {
this.nyawa = this.nyawa + 5;
this.damage = this.damage + 5;
this._xscale = this._xscale + 7.5;
this._yscale = this._yscale + 7.5;
}
cekEfek(1, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "musuh") {
cekEfek(2, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "bonus") {
if (this._xscale <= 150) {
this.nyawa = this.nyawa + 10;
this.damage = this.damage + 10;
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
}
cekEfek(3, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "bonus2") {
score = score - 1000;
xscore = xscore - 1000;
cekEfek(4, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "bonus3") {
scorePenambah--;
if (scorePenambah <= 1) {
scorePenambah = 1;
}
atas_mc.info_mc.info = ("Score Boost " + scorePenambah) + "x";
cekEfek(5, _root["bola_mc" + i], this);
}
removeMovieClip(_root["bola_mc" + i]);
}
}
i++;
}
}
}
}
function enterMusuh3() {
if (sedangPause == false) {
if (masihMain == true) {
if (this.sudahArea == false) {
if ((((this._x >= -50) && (this._x <= 750)) && (this._y >= -50)) && (this._y <= 550)) {
this.sudahArea = true;
}
}
if (this.sudahArea == true) {
if ((((this._x <= -100) || (this._x >= 800)) || (this._y <= -100)) || (this._y >= 600)) {
this.sudahArea = false;
rand = random(4);
if (rand == 0) {
this._x = random(700);
this._y = -random(200);
} else if (rand == 1) {
this._x = random(700);
this._y = 500 + random(200);
} else if (rand == 2) {
this._x = -random(200);
this._y = random(500);
} else if (rand == 3) {
this._x = 700 + random(200);
this._y = random(500);
}
deltaX = this._x - keranjang_mc._x;
deltaY = this._y - keranjang_mc._y;
this._rotation = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
}
}
this._y = this._y - (this.speedKe * Math.cos(this._rotation * (Math.PI/180)));
this._x = this._x + (this.speedKe * Math.sin(this._rotation * (Math.PI/180)));
this.xdelay++;
if (this.xdelay >= this.targetDelay) {
backGun2();
this.xdelay = 0;
if (this.tipeTembakan == "galak") {
gun = attachMovie("gun_mc5", "xgun_mc" + gunKe, gunKe);
gun.tipeTembakan = "galak";
} else {
gun = attachMovie("gun_mc2", "xgun_mc" + gunKe, gunKe);
}
gun._x = this._x;
gun._y = this._y;
deltaX = this._x - keranjang_mc._x;
deltaY = this._y - keranjang_mc._y;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
gun._rotation = angle;
gun.speedKe = 7 + (xlevel / 3);
gun.onEnterFrame = enterGun3;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
i = 2101;
while (i <= 2150) {
if (_root["gun_mc" + i] != undefined) {
if (this.indi.hitTest(_root["gun_mc" + i])) {
backKena3();
if (_root["gun_mc" + i].kena != true) {
_root["gun_mc" + i].kena = true;
setEfek(_root["gun_mc" + i]);
}
if (_root["gun_mc" + i].xjenis == "misil") {
this.nyawa = this.nyawa - (50 * banyakDamage);
setDahsyat3(_root["gun_mc" + i]);
setDahsyat4(_root["gun_mc" + i]);
} else {
this.nyawa = this.nyawa - ((1 * banyakDamage) * _root["gun_mc" + i].xdamage);
if (_root["gun_mc" + i].xdamage == 7.5) {
setDahsyat3(_root["gun_mc" + i]);
} else if (_root["gun_mc" + i].xdamage == 15) {
setDahsyat4(_root["gun_mc" + i]);
} else if (_root["gun_mc" + i].xdamage == 10) {
setDahsyat10(_root["gun_mc" + i]);
} else if (_root["gun_mc" + i].xdamage == 12.5) {
setDahsyat11(_root["gun_mc" + i]);
}
}
removeMovieClip(_root["gun_mc" + i]);
score = score + 10;
xscore = xscore + 10;
if (this.nyawa <= 0) {
setDahsyat5(this);
backDestroy2();
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
score = score + 100;
xscore = xscore + 100;
jumlahMusuh--;
hancurLawan++;
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
removeMovieClip(this);
}
}
}
i++;
}
if (this.indi.hitTest(keranjang_mc.indi)) {
backDestroy2();
score = score - 50;
xscore = xscore - 50;
jumlahMusuh--;
hancurLawan++;
if (shieldAda == false) {
if (this.xgede == true) {
nyawaJagoan = nyawaJagoan - (375 * ((xlevel + 2) / 3));
} else {
nyawaJagoan = nyawaJagoan - (75 * ((xlevel + 2) / 3));
}
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (nyawaJagoan <= 0) {
setDahsyat6(keranjang_mc);
xi = 1;
while (xi <= 3) {
setEfek2(keranjang_mc);
nyawaJagoan = 0;
atas_mc.life_mc.bar._xscale = nyawaJagoan;
keranjang_mc._visible = false;
selesaiGame("kalah");
xi++;
}
keranjang_mc._x = -100;
keranjang_mc._y = -100;
} else if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(keranjang_mc);
removeMovieClip(this);
} else if (beam_mc.hitTest(this._x, this._y, true)) {
backKena3();
score = score + 10;
xscore = xscore + 10;
achievements1 = 1;
setEfek2(this);
this.nyawa = this.nyawa - ((banyakDamage * 10) * _root.unitLevel5);
if (this.nyawa <= 0) {
jumlahMusuh--;
hancurLawan++;
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
}
} else if (this.indi.hitTest(satelit_mc1)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
jumlahMusuh--;
hancurLawan++;
if (shieldAda == false) {
satelit_mc1.nyawa = satelit_mc1.nyawa - (75 * ((xlevel + 2) / 3));
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc1.nyawa <= 0) {
setDahsyat6(satelit_mc1);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc1.nyawa = 0;
xi++;
}
removeMovieClip(satelit_mc1);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
} else if (this.hitTest(satelit_mc2)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
jumlahMusuh--;
hancurLawan++;
if (shieldAda == false) {
satelit_mc2.nyawa = satelit_mc2.nyawa - (75 * ((xlevel + 2) / 3));
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc2.nyawa <= 0) {
setDahsyat6(satelit_mc2);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc2.nyawa = 0;
xi++;
}
removeMovieClip(satelit_mc2);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
} else if (this.hitTest(satelit_mc3)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
jumlahMusuh--;
hancurLawan++;
if (shieldAda == false) {
satelit_mc3.nyawa = satelit_mc3.nyawa - (75 * ((xlevel + 2) / 3));
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc3.nyawa <= 0) {
setDahsyat6(satelit_mc3);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc3.nyawa = 0;
xi++;
}
removeMovieClip(satelit_mc3);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
setEfek2(this);
removeMovieClip(this);
}
i = 3000;
while (i <= 3100) {
if (_root["bola_mc" + i] != undefined) {
if (this.hitTest(_root["bola_mc" + i])) {
if (_root["bola_mc" + i].jenis == "jagoan") {
if (this._xscale <= 125) {
this.nyawa = this.nyawa + 5;
this.damage = this.damage + 5;
this._xscale = this._xscale + 7.5;
this._yscale = this._yscale + 7.5;
}
cekEfek(1, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "musuh") {
cekEfek(2, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "bonus") {
if (this._xscale <= 150) {
this.nyawa = this.nyawa + 10;
this.damage = this.damage + 10;
this._xscale = this._xscale + 15;
this._yscale = this._yscale + 15;
}
cekEfek(3, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "bonus2") {
score = score - 1000;
xscore = xscore - 1000;
cekEfek(4, _root["bola_mc" + i], this);
} else if (_root["bola_mc" + i].jenis == "bonus3") {
scorePenambah--;
if (scorePenambah <= 1) {
scorePenambah = 1;
}
atas_mc.info_mc.info = ("Score Boost " + scorePenambah) + "x";
cekEfek(5, _root["bola_mc" + i], this);
}
removeMovieClip(_root["bola_mc" + i]);
}
}
i++;
}
}
}
}
function setDahsyat3(indi) {
backKena3();
efek = attachMovie("dahsyat3", "efek" + dalamEfek, dalamEfek);
efek._x = (indi._x + random(10)) - 5;
efek._y = (indi._y + random(10)) - 5;
efek._width = indi._width / 2;
efek._height = indi._height / 2;
efek._rotation = random(360);
efek.speedKe = random(20) + 10;
dalamEfek++;
if (dalamEfek >= 100101) {
dalamEfek = 100001 /* 0x0186A1 */;
}
}
function setDahsyat4(indi) {
backKena3();
backKena3();
efek = attachMovie("dahsyat4", "efek" + dalamEfek, dalamEfek);
efek._x = (indi._x + random(10)) - 5;
efek._y = (indi._y + random(10)) - 5;
efek._width = indi._width / 2;
efek._height = indi._height / 2;
efek._rotation = random(360);
efek.speedKe = random(20) + 10;
dalamEfek++;
if (dalamEfek >= 100101) {
dalamEfek = 100001 /* 0x0186A1 */;
}
}
function setDahsyat5(indi) {
efek = attachMovie("dahsyat2", "efek" + dalamEfek, dalamEfek);
efek._x = (indi._x + random(10)) - 5;
efek._y = (indi._y + random(10)) - 5;
efek._width = indi._width / 2;
efek._height = indi._height / 2;
efek._rotation = random(360);
efek.speedKe = random(20) + 10;
dalamEfek++;
if (dalamEfek >= 100101) {
dalamEfek = 100001 /* 0x0186A1 */;
}
}
function setDahsyat6(indi) {
efek = attachMovie("dahsyat2", "efek" + dalamEfek, dalamEfek);
efek._x = (indi._x + random(10)) - 5;
efek._y = (indi._y + random(10)) - 5;
efek._width = indi._width / 2;
efek._height = indi._height / 2;
efek._rotation = random(360);
efek._xscale = (efek._yscale = 100 + (posisiGun * 20));
efek.speedKe = random(20) + 10;
dalamEfek++;
if (dalamEfek >= 100101) {
dalamEfek = 100001 /* 0x0186A1 */;
}
}
function setDahsyat10(indi) {
backKena3();
backKena3();
efek = attachMovie("dahsyat10", "efek" + dalamEfek, dalamEfek);
efek._x = (indi._x + random(10)) - 5;
efek._y = (indi._y + random(10)) - 5;
efek._width = indi._width / 2;
efek._height = indi._height / 2;
efek._rotation = random(360);
efek.speedKe = random(20) + 10;
dalamEfek++;
if (dalamEfek >= 100101) {
dalamEfek = 100001 /* 0x0186A1 */;
}
}
function setDahsyat11(indi) {
backKena3();
backKena3();
efek = attachMovie("dahsyat11", "efek" + dalamEfek, dalamEfek);
efek._x = (indi._x + random(10)) - 5;
efek._y = (indi._y + random(10)) - 5;
efek._width = indi._width / 2;
efek._height = indi._height / 2;
efek._rotation = random(360);
efek.speedKe = random(20) + 10;
dalamEfek++;
if (dalamEfek >= 100101) {
dalamEfek = 100001 /* 0x0186A1 */;
}
}
function setEfek(indi) {
if (sedangPause == false) {
z = 1;
while (z <= 3) {
if (indi.nyawa == 0) {
if (indi == keranjang_mc) {
efek = attachMovie("dahsyat", "efek" + dalamEfek, dalamEfek);
} else {
efek = attachMovie("dahsyat2", "efek" + dalamEfek, dalamEfek);
}
efek._xscale = (efek._yscale = random(50) + 50);
} else {
if (indi == keranjang_mc) {
efek = attachMovie("ledakan", "efek" + dalamEfek, dalamEfek);
} else {
efek = attachMovie("ledakan2", "efek" + dalamEfek, dalamEfek);
}
efek._xscale = (efek._yscale = random(25) + 25);
}
efek._x = (indi._x + random(10)) - 5;
efek._y = (indi._y + random(10)) - 5;
efek._rotation = random(360);
efek.speedKe = random(20) + 10;
dalamEfek++;
if (dalamEfek >= 100101) {
dalamEfek = 100001 /* 0x0186A1 */;
}
z++;
}
}
}
function setEfek2(indi) {
if (sedangPause == false) {
z = 1;
while (z <= 3) {
if (indi == keranjang_mc) {
efek = attachMovie("dahsyat", "efek" + dalamEfek, dalamEfek);
} else {
efek = attachMovie("dahsyat2", "efek" + dalamEfek, dalamEfek);
}
efek._x = indi._x;
efek._y = indi._y;
if (indi == keranjang_mc) {
efek._xscale = (efek._yscale = random(50) + 50);
} else {
efek._xscale = (efek._yscale = random(100) + 100);
}
efek._rotation = random(360);
efek.speedKe = random(20) + 10;
efek.onEnterFrame = enterEfek2;
dalamEfek++;
if (dalamEfek >= 100101) {
dalamEfek = 100001 /* 0x0186A1 */;
}
z++;
}
}
}
function setEfek3(indi) {
if (sedangPause == false) {
z = 1;
while (z <= 3) {
efek = attachMovie("ledakan2", "efek" + dalamEfek, dalamEfek);
efek._x = (indi._x - 5) + random(10);
efek._y = (indi._y - 5) + random(10);
if (indi == keranjang_mc) {
efek._xscale = (efek._yscale = random(50) + 50);
} else {
efek._xscale = (efek._yscale = random(100) + 100);
}
efek._rotation = random(360);
efek.speedKe = random(20) + 10;
dalamEfek++;
if (dalamEfek >= 100101) {
dalamEfek = 100001 /* 0x0186A1 */;
}
z++;
}
}
}
function enterEfek2() {
}
function munculPeluru() {
if (sedangPause == false) {
if (masihMain == true) {
backGun();
if (posisiGun == 0) {
gun = attachMovie("gun_mc", "gun_mc" + gunKe, gunKe);
gun._x = keranjang_mc._x;
gun._y = keranjang_mc._y;
gun.xdamage = 1;
gun._rotation = keranjang_mc._rotation;
gun.speedKe = 10;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
} else if (posisiGun == 1) {
i = 1;
while (i <= 2) {
gun = attachMovie("gun_mc", "gun_mc" + gunKe, gunKe);
gun._x = keranjang_mc._x;
gun._y = keranjang_mc._y;
gun.xdamage = 1;
if (i == 1) {
gun._rotation = keranjang_mc._rotation - 3;
} else if (i == 2) {
gun._rotation = keranjang_mc._rotation + 3;
}
gun.speedKe = 10;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
i++;
}
} else if (posisiGun == 2) {
i = 1;
while (i <= 3) {
if (i == 2) {
delayPeluru1++;
if (delayPeluru1 >= 5) {
gun = attachMovie("gun_mc3", "gun_mc" + gunKe, gunKe);
gun.xdamage = 7.5;
delayPeluru1 = 0;
gun._x = keranjang_mc._x;
gun._y = keranjang_mc._y;
if (i == 1) {
gun._rotation = keranjang_mc._rotation - 5;
} else if (i == 2) {
gun._rotation = keranjang_mc._rotation;
} else if (i == 3) {
gun._rotation = keranjang_mc._rotation + 5;
}
gun.speedKe = 15;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
} else {
gun = attachMovie("gun_mc", "gun_mc" + gunKe, gunKe);
gun.xdamage = 1;
gun._x = keranjang_mc._x;
gun._y = keranjang_mc._y;
if (i == 1) {
gun._rotation = keranjang_mc._rotation - 5;
} else if (i == 2) {
gun._rotation = keranjang_mc._rotation;
} else if (i == 3) {
gun._rotation = keranjang_mc._rotation + 5;
}
gun.speedKe = 10;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
i++;
}
} else if (posisiGun == 3) {
i = 1;
while (i <= 4) {
if (i == 1) {
delayPeluru1++;
if (delayPeluru1 >= 5) {
gun = attachMovie("gun_mc3", "gun_mc" + gunKe, gunKe);
gun.xdamage = 7.5;
delayPeluru1 = 0;
gun._x = keranjang_mc._x;
gun._y = keranjang_mc._y;
if (i == 1) {
gun._rotation = keranjang_mc._rotation - 7;
} else if (i == 2) {
gun._rotation = keranjang_mc._rotation - 3;
} else if (i == 3) {
gun._rotation = keranjang_mc._rotation + 3;
} else if (i == 4) {
gun._rotation = keranjang_mc._rotation + 7;
}
tembakKe = tembakKe + 15;
if (tembakKe >= 90) {
tembakKe = -90;
}
gun.speedKe = 15;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
} else if (i == 3) {
delayPeluru2++;
if (delayPeluru2 >= 5) {
gun = attachMovie("gun_mc3", "gun_mc" + gunKe, gunKe);
gun.xdamage = 7.5;
delayPeluru2 = 0;
gun._x = keranjang_mc._x;
gun._y = keranjang_mc._y;
if (i == 1) {
gun._rotation = keranjang_mc._rotation - 7;
} else if (i == 2) {
gun._rotation = keranjang_mc._rotation - 3;
} else if (i == 3) {
gun._rotation = keranjang_mc._rotation + 3;
} else if (i == 4) {
gun._rotation = keranjang_mc._rotation + 7;
}
tembakKe = tembakKe + 15;
if (tembakKe >= 90) {
tembakKe = -90;
}
gun.speedKe = 15;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
} else {
gun = attachMovie("gun_mc", "gun_mc" + gunKe, gunKe);
gun.xdamage = 1;
gun._x = keranjang_mc._x;
gun._y = keranjang_mc._y;
if (i == 1) {
gun._rotation = keranjang_mc._rotation - 7;
} else if (i == 2) {
gun._rotation = keranjang_mc._rotation - 3;
} else if (i == 3) {
gun._rotation = keranjang_mc._rotation + 3;
} else if (i == 4) {
gun._rotation = keranjang_mc._rotation + 7;
}
tembakKe = tembakKe + 15;
if (tembakKe >= 90) {
tembakKe = -90;
}
gun.speedKe = 10;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
i++;
}
} else if (posisiGun >= 4) {
i = 1;
while (i <= 5) {
if (i == 2) {
delayPeluru1++;
if (delayPeluru1 >= 5) {
gun = attachMovie("gun_mc3", "gun_mc" + gunKe, gunKe);
gun.xdamage = 7.5;
delayPeluru1 = 0;
gun._x = keranjang_mc._x;
gun._y = keranjang_mc._y;
if (i == 1) {
gun._rotation = keranjang_mc._rotation - 7;
} else if (i == 2) {
gun._rotation = keranjang_mc._rotation - 3;
} else if (i == 3) {
gun._rotation = keranjang_mc._rotation + 3;
} else if (i == 4) {
gun._rotation = keranjang_mc._rotation + 7;
} else if (i == 5) {
gun._rotation = keranjang_mc._rotation;
}
gun.speedKe = 15;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
} else if (i == 5) {
delayPeluru3++;
if (delayPeluru3 >= 10) {
gun = attachMovie("gun_mc4", "gun_mc" + gunKe, gunKe);
gun.xdamage = 12.5;
delayPeluru3 = 0;
gun._x = keranjang_mc._x;
gun._y = keranjang_mc._y;
if (i == 1) {
gun._rotation = keranjang_mc._rotation - 7;
} else if (i == 2) {
gun._rotation = keranjang_mc._rotation - 3;
} else if (i == 3) {
gun._rotation = keranjang_mc._rotation + 3;
} else if (i == 4) {
gun._rotation = keranjang_mc._rotation + 7;
} else if (i == 5) {
gun._rotation = keranjang_mc._rotation;
}
gun.speedKe = 20;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
} else if (i == 3) {
delayPeluru2++;
if (delayPeluru2 >= 5) {
gun = attachMovie("gun_mc3", "gun_mc" + gunKe, gunKe);
gun.xdamage = 7.5;
delayPeluru2 = 0;
gun._x = keranjang_mc._x;
gun._y = keranjang_mc._y;
if (i == 1) {
gun._rotation = keranjang_mc._rotation - 7;
} else if (i == 2) {
gun._rotation = keranjang_mc._rotation - 3;
} else if (i == 3) {
gun._rotation = keranjang_mc._rotation + 3;
} else if (i == 4) {
gun._rotation = keranjang_mc._rotation + 7;
} else if (i == 5) {
gun._rotation = keranjang_mc._rotation;
}
gun.speedKe = 15;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
} else {
gun = attachMovie("gun_mc", "gun_mc" + gunKe, gunKe);
gun.xdamage = 1;
gun._x = keranjang_mc._x;
gun._y = keranjang_mc._y;
if (i == 1) {
gun._rotation = keranjang_mc._rotation - 7;
} else if (i == 2) {
gun._rotation = keranjang_mc._rotation - 3;
} else if (i == 3) {
gun._rotation = keranjang_mc._rotation + 3;
} else if (i == 4) {
gun._rotation = keranjang_mc._rotation + 7;
} else if (i == 5) {
gun._rotation = keranjang_mc._rotation;
}
gun.speedKe = 10;
gun.onEnterFrame = enterGun;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
}
i++;
}
if (posisiGun >= 5) {
delayMisil++;
if (delayMisil >= 20) {
delayMisil = 0;
gun = attachMovie("misil_mc", "gun_mc" + gunKe, gunKe);
gun.speedKe = 5;
gun.speedPlus = 1;
gun.speed = 10;
gun._x = keranjang_mc._x;
gun._y = keranjang_mc._y;
gun.xjenis = "misil";
adaMisil = false;
gunKe++;
if (gunKe >= 2150) {
gunKe = 2101;
}
i = 2201;
while (i <= 2250) {
if (_root["musuh_mc" + i] != undefined) {
backMisil();
gun.targeted = _root["musuh_mc" + i];
adaMisil = true;
}
i++;
}
if (adaMisil == true) {
gun.onEnterFrame = enterGun4;
} else {
removeMovieClip(gun);
}
}
}
}
}
}
}
function enterGun() {
if (sedangPause == false) {
this._y = this._y - (this.speedKe * Math.cos(this._rotation * (Math.PI/180)));
this._x = this._x + (this.speedKe * Math.sin(this._rotation * (Math.PI/180)));
if ((((this._x <= 0) || (this._x >= 700)) || (this._y <= 0)) || (this._y >= 500)) {
removeMovieClip(this);
}
}
}
function enterGun4() {
if (sedangPause == false) {
if (((this.targeted == undefined) || (this.speedKe <= 0)) || (this.speedPlus <= 0)) {
removeMovieClip(this);
} else {
deltaX = this._x - this.targeted._x;
deltaY = this._y - this.targeted._y;
this._rotation = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
this.speedKe = this.speedKe + this.speedPlus;
this._y = this._y - (this.speedKe * Math.cos(this._rotation * (Math.PI/180)));
this._x = this._x + (this.speedKe * Math.sin(this._rotation * (Math.PI/180)));
}
if ((((this._x <= 0) || (this._x >= 700)) || (this._y <= 0)) || (this._y >= 500)) {
removeMovieClip(this);
}
}
}
function enterGun2() {
if (sedangPause == false) {
this._y = this._y - (this.speedKe * Math.cos(this._rotation * (Math.PI/180)));
this._x = this._x + (this.speedKe * Math.sin(this._rotation * (Math.PI/180)));
if ((((this._x <= 0) || (this._x >= 700)) || (this._y <= 0)) || (this._y >= 500)) {
removeMovieClip(this);
} else if (this.hitTest(keranjang_mc.indi)) {
backKena();
backKena2();
score = score - 50;
xscore = xscore - 50;
if (shieldAda == false) {
if (this.tipeTembakan == "galak") {
nyawaJagoan = nyawaJagoan - (2 + (xlevel * 4));
} else {
nyawaJagoan = nyawaJagoan - (2 + (xlevel * 2));
}
}
if (nyawaJagoan <= 0) {
backDestroy2();
setDahsyat6(keranjang_mc);
xi = 1;
while (xi <= 3) {
setEfek2(keranjang_mc);
nyawaJagoan = 0;
atas_mc.life_mc.bar._xscale = nyawaJagoan;
keranjang_mc._visible = false;
selesaiGame("kalah");
xi++;
}
keranjang_mc._x = -100;
keranjang_mc._y = -100;
} else if (jumlahMusuh <= 0) {
backDestroy2();
selesaiGame("menang");
}
setEfek2(keranjang_mc);
removeMovieClip(this);
} else if (this.hitTest(satelit_mc1)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
if (shieldAda == false) {
if (this.tipeTembakan == "galak") {
satelit_mc1.nyawa = satelit_mc1.nyawa - (2 + (xlevel * 4));
} else {
satelit_mc1.nyawa = satelit_mc1.nyawa - (2 + (xlevel * 2));
}
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc1.nyawa <= 0) {
setDahsyat6(satelit_mc1);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc1.nyawa = 0;
xi++;
}
setEfek2(this);
removeMovieClip(this);
removeMovieClip(satelit_mc1);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
} else if (this.hitTest(satelit_mc2)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
if (shieldAda == false) {
if (this.tipeTembakan == "galak") {
satelit_mc2.nyawa = satelit_mc2.nyawa - (2 + (xlevel * 4));
} else {
satelit_mc2.nyawa = satelit_mc2.nyawa - (2 + (xlevel * 2));
}
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc2.nyawa <= 0) {
setDahsyat6(satelit_mc2);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc2.nyawa = 0;
xi++;
}
setEfek2(this);
removeMovieClip(this);
removeMovieClip(satelit_mc2);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
} else if (this.hitTest(satelit_mc3)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
if (shieldAda == false) {
if (this.tipeTembakan == "galak") {
satelit_mc3.nyawa = satelit_mc3.nyawa - (2 + (xlevel * 4));
} else {
satelit_mc3.nyawa = satelit_mc3.nyawa - (2 + (xlevel * 2));
}
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc3.nyawa <= 0) {
setDahsyat6(satelit_mc3);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc3.nyawa = 0;
xi++;
}
setEfek2(this);
removeMovieClip(this);
removeMovieClip(satelit_mc3);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
}
}
}
function enterGun3() {
if (sedangPause == false) {
this._y = this._y - (this.speedKe * Math.cos(this._rotation * (Math.PI/180)));
this._x = this._x + (this.speedKe * Math.sin(this._rotation * (Math.PI/180)));
if ((((this._x <= 0) || (this._x >= 700)) || (this._y <= 0)) || (this._y >= 500)) {
removeMovieClip(this);
} else if (this.hitTest(keranjang_mc.indi)) {
backKena();
backKena2();
score = score - 50;
xscore = xscore - 50;
if (shieldAda == false) {
if (this.tipeTembakan == "galak") {
nyawaJagoan = nyawaJagoan - (4 + (xlevel * 4));
} else {
nyawaJagoan = nyawaJagoan - (4 + (xlevel * 2));
}
}
if (nyawaJagoan <= 0) {
setDahsyat6(keranjang_mc);
backDestroy2();
xi = 1;
while (xi <= 3) {
setEfek3(keranjang_mc);
nyawaJagoan = 0;
atas_mc.life_mc.bar._xscale = nyawaJagoan;
keranjang_mc._visible = false;
selesaiGame("kalah");
xi++;
}
keranjang_mc._x = -100;
keranjang_mc._y = -100;
}
if (jumlahMusuh <= 0) {
backDestroy2();
selesaiGame("menang");
}
setEfek3(keranjang_mc);
removeMovieClip(this);
} else if (this.hitTest(satelit_mc1)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
if (shieldAda == false) {
if (this.tipeTembakan == "galak") {
satelit_mc1.nyawa = satelit_mc1.nyawa - (4 + (xlevel * 4));
} else {
satelit_mc1.nyawa = satelit_mc1.nyawa - (4 + (xlevel * 2));
}
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc1.nyawa <= 0) {
setDahsyat6(satelit_mc1);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc1.nyawa = 0;
xi++;
}
setEfek2(this);
removeMovieClip(this);
removeMovieClip(satelit_mc1);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
} else if (this.hitTest(satelit_mc2)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
if (shieldAda == false) {
if (this.tipeTembakan == "galak") {
satelit_mc2.nyawa = satelit_mc2.nyawa - (4 + (xlevel * 4));
} else {
satelit_mc2.nyawa = satelit_mc2.nyawa - (4 + (xlevel * 2));
}
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc2.nyawa <= 0) {
setDahsyat6(satelit_mc2);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc2.nyawa = 0;
xi++;
}
setEfek2(this);
removeMovieClip(this);
removeMovieClip(satelit_mc2);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
} else if (this.hitTest(satelit_mc3)) {
backKena3();
score = score - 50;
xscore = xscore - 50;
if (shieldAda == false) {
if (this.tipeTembakan == "galak") {
satelit_mc3.nyawa = satelit_mc3.nyawa - (4 + (xlevel * 4));
} else {
satelit_mc3.nyawa = satelit_mc3.nyawa - (4 + (xlevel * 2));
}
}
i = 1;
while (i <= 3) {
setEfek(this);
i++;
}
if (satelit_mc3.nyawa <= 0) {
setDahsyat6(satelit_mc3);
xi = 1;
while (xi <= 3) {
setEfek2(this);
satelit_mc3.nyawa = 0;
xi++;
}
setEfek2(this);
removeMovieClip(this);
removeMovieClip(satelit_mc3);
}
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
}
}
}
function kedua() {
if (sedangPause == false) {
clearInterval(idBola);
sudahKedua = true;
perubahan = 0.75;
idMuncul2 = setInterval(munculBola1, munculKe2 / perubahan, 2);
}
}
function ketiga() {
if (sedangPause == false) {
clearInterval(idBola2);
sudahKetiga = true;
perubahan = 1;
idMuncul3 = setInterval(munculBola1, munculKe3 / perubahan, 3);
}
}
function selesaiGame(indi) {
if (masihMain == true) {
waves = 0;
hasil = attachMovie("hasil_mc", "hasil_mc", 100000);
hasil._x = 350;
hasil._y = 250;
hasil_mc._visible = false;
masihMain = false;
clearInterval(idBola);
clearInterval(idBola2);
clearInterval(idMuncul);
clearInterval(idMuncul2);
clearInterval(idMuncul3);
clearInterval(idDelay);
clearInterval(idDelay2);
clearInterval(idDelay3);
clearInterval(idDelay4);
clearInterval(idGun);
clearInterval(idWaktu);
clearInterval(idMusuh1);
clearInterval(idMusuh2);
clearInterval(idMusuh3);
clearInterval(idMusuh4);
clearInterval(idMusuh5);
clearInterval(idPeluru);
clearInterval(idBerkurang);
removeMovieClip(efek);
removeMovieClip(gunbos1);
removeMovieClip(gunbos2);
delete _root.onMouseDown;
delete _root.onMouseUp;
i = 3000;
while (i <= 3100) {
_root["bola_mc" + i].jalanHilang = true;
i++;
}
if (atas_mc.life_mc.bar._xscale == 100) {
nyawaPerfect++;
} else {
nyawaPerfect = 0;
}
if (nyawaPerfect == 1) {
achievements2 = 1;
} else if (nyawaPerfect == 2) {
achievements2 = 1;
achievements9 = 1;
} else if (nyawaPerfect == 3) {
achievements2 = 1;
achievements9 = 1;
achievements10 = 1;
}
if (bombGuna == 0) {
pakeBomb++;
} else {
pakeBomb = 0;
}
if (pakeBomb == 4) {
achievements3 = 1;
} else if (pakeBomb == 6) {
achievements3 = 1;
achievements11 = 1;
} else if (pakeBomb == 8) {
achievements3 = 1;
achievements11 = 1;
achievements12 = 1;
}
if (hancurLawan >= 200) {
achievements4 = 1;
achievements13 = 1;
achievements14 = 1;
} else if (hancurLawan >= 100) {
achievements4 = 1;
achievements13 = 1;
} else if (hancurLawan >= 50) {
achievements4 = 1;
}
if (kumpulOrbs >= 50) {
achievements8 = 1;
}
if (indi == "menang") {
idSelesai = setInterval(selesai, 3000);
} else {
removeMovieClip(satelit_mc1);
removeMovieClip(satelit_mc2);
removeMovieClip(satelit_mc3);
idSelesai = setInterval(selesai2, 3000);
}
}
}
function selesai() {
keranjangSpeed = 0;
delete myListener.onKeyDown;
delete myListener.onKeyUp;
Key.removeListener(myListener);
i = 2201;
while (i <= 2250) {
removeMovieClip(_root["musuh_mc" + i]);
i++;
}
removeMovieClip(_root.gunbos1);
removeMovieClip(_root.gunbos2);
clearInterval(idSelesai);
if (xscore <= 1) {
xscore = 1;
} else if (score <= 1) {
score = 1;
}
hasil_mc.gotoAndStop(1);
hasil_mc._visible = true;
hasil_mc.xwaktu = waktu + " Scnds";
hasil_mc.waktu = waktu;
hasil_mc.lifes = Math.floor(atas_mc.life_mc.bar._xscale);
hasil_mc.bombs = bombGuna;
hasil_mc.info = "Mission Accomplished,\nGo to the next zone";
zwaktu = Number(720 - hasil_mc.waktu);
if (zwaktu <= 0) {
zwaktu = 0;
}
zlifes = Number(hasil_mc.lifes * 10);
zbomb = 6 - (hasil_mc.bombs * 2);
hasil_mc.scored = Math.ceil((xscore * (zbomb + 1)) * xlevel);
if (xlevel <= 3) {
naikLevel = 2;
} else if (xlevel <= 6) {
naikLevel = 3;
} else if (xlevel <= 9) {
naikLevel = 4;
} else if (xlevel <= 12) {
naikLevel = 5;
} else {
naikLevel = 6;
}
hasil_mc.pointed = Math.ceil((((zwaktu + zlifes) + (zbomb * 125)) * ((naikLevel * (xlevel + 1)) / 2.5)) / (bombGuna + 1));
xpoint = xpoint + Number(hasil_mc.pointed);
score = score + hasil_mc.scored;
xlevel++;
if (xlevel >= 14) {
achievements6 = 1;
} else if (xlevel >= 11) {
achievements5 = 1;
}
if (hasil_mc.scored >= 500000) {
achievements7 = 1;
}
if (xlevel >= 14) {
if (bombGuna == 0) {
achievements15 = 1;
}
}
if (xlevel >= 14) {
xlevel = 1;
wxlevel = 1;
simpanData();
} else {
wxlevel = 0;
simpanData();
}
hasil_mc.next_btn.onRelease = function () {
removeMovieClip(keranjang_mc);
removeMovieClip(hasil_mc);
removeMovieClip(satelit_mc1);
removeMovieClip(satelit_mc2);
removeMovieClip(satelit_mc3);
removeMovieClip(xbackground);
removeMovieClip(atas_mc);
delete _root.onEnterFrame;
delete _root.onMouseDown;
delete _root.onMouseUp;
removeMovieClip(beam_mc);
if (wxlevel == 1) {
gotoAndStop (532);
} else {
gotoAndStop (531);
}
};
}
function selesai2() {
keranjangSpeed = 0;
delete myListener.onKeyDown;
delete myListener.onKeyUp;
Key.removeListener(myListener);
i = 2201;
while (i <= 2250) {
removeMovieClip(_root["musuh_mc" + i]);
i++;
}
removeMovieClip(_root.gunbos1);
removeMovieClip(_root.gunbos2);
clearInterval(idSelesai);
if (xscore <= 1) {
xscore = 1;
} else if (score <= 1) {
score = 1;
}
hasil_mc.gotoAndStop(2);
hasil_mc._visible = true;
hasil_mc.xwaktu = waktu + " Scnds";
hasil_mc.waktu = waktu;
hasil_mc.lifes = Math.floor(atas_mc.life_mc.bar._xscale);
hasil_mc.bombs = bombGuna;
zbomb = 6 - (hasil_mc.bombs * 2);
hasil_mc.scored = Math.ceil((xscore * (zbomb + 1)) * xlevel);
score = score + Number(hasil_mc.scored);
hasil_mc.info = "Mission Failed,\nSubmit your scores?";
zwaktu = 10 * Number(hasil_mc.waktu);
if (zwaktu <= 0) {
zwaktu = 0;
}
zlifes = Number(hasil_mc.lifes * 10);
if (xlevel <= 3) {
naikLevel = 10;
} else if (xlevel <= 6) {
naikLevel = 15;
} else if (xlevel <= 9) {
naikLevel = 20;
} else if (xlevel <= 12) {
naikLevel = 25;
} else {
naikLevel = 30;
}
hasil_mc.pointed = Math.ceil(((((zwaktu + zlifes) + (zbomb * 125)) + ((xlevel * 50) * naikLevel)) / (bombGuna + 1)) * 2);
xpoint = xpoint + Number(hasil_mc.pointed);
hasil_mc.next_btn.onRelease = function () {
score = 0;
removeMovieClip(keranjang_mc);
removeMovieClip(hasil_mc);
removeMovieClip(satelit_mc1);
removeMovieClip(satelit_mc2);
removeMovieClip(satelit_mc3);
removeMovieClip(xbackground);
removeMovieClip(atas_mc);
delete _root.onEnterFrame;
delete _root.onMouseDown;
delete _root.onMouseUp;
removeMovieClip(beam_mc);
simpanData();
gotoAndStop (531);
};
hasil_mc.submit_btn.onRelease = function () {
removeMovieClip(keranjang_mc);
removeMovieClip(hasil_mc);
removeMovieClip(satelit_mc1);
removeMovieClip(satelit_mc2);
removeMovieClip(satelit_mc3);
removeMovieClip(xbackground);
removeMovieClip(atas_mc);
delete _root.onEnterFrame;
delete _root.onMouseDown;
delete _root.onMouseUp;
removeMovieClip(beam_mc);
gotoAndStop (552);
};
hasil_mc.quit_btn.onRelease = function () {
score = 0;
removeMovieClip(keranjang_mc);
removeMovieClip(hasil_mc);
removeMovieClip(satelit_mc1);
removeMovieClip(satelit_mc2);
removeMovieClip(satelit_mc3);
removeMovieClip(xbackground);
removeMovieClip(atas_mc);
delete _root.onEnterFrame;
delete _root.onMouseDown;
delete _root.onMouseUp;
removeMovieClip(beam_mc);
simpanData();
gotoAndStop (491);
};
}
function munculBola1(indi) {
if (sedangPause == false) {
if (masihMain == true) {
if (indi == 3) {
i = 1;
while (i <= 4) {
rand = random(20);
if (rand <= 3) {
bola = attachMovie("musuh_mc", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "musuh";
} else if (rand == 5) {
if (sudahKedua == true) {
bola = attachMovie("bonus_mc2", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "bonus2";
} else {
bola = attachMovie("bola_mc", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "jagoan";
}
} else if (rand == 6) {
randx = random(2);
if (randx == 0) {
bola = attachMovie("bonus_mc", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "bonus";
} else {
bola = attachMovie("bola_mc", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "jagoan";
}
} else {
randx = random(81);
if (randx == 9) {
bola = attachMovie("bonus_mc3", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "bonus3";
} else {
bola = attachMovie("bola_mc", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "jagoan";
}
}
if (semuaHijau == true) {
bola = attachMovie("bola_mc", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "jagoan";
}
bola._x = 50 + random(650);
bola._y = 450 + random(50);
bola.speedX = 0;
bola.speedY = random(10) + 10;
bola.perlambatan = Math.random() * 1;
bola.speedKe = 10;
bola.speedPlus = 1;
bola.onEnterFrame = enterBola2;
dalamBola++;
if (dalamBola >= 3050) {
dalamBola = 3000;
}
i++;
}
} else {
rand = random(20);
if (rand <= 3) {
bola = attachMovie("musuh_mc", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "musuh";
} else if (rand == 5) {
if (sudahKedua == true) {
bola = attachMovie("bonus_mc2", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "bonus2";
} else {
bola = attachMovie("bola_mc", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "jagoan";
}
} else if (rand == 6) {
randx = random(2);
if (randx == 0) {
bola = attachMovie("bonus_mc", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "bonus";
} else {
bola = attachMovie("bola_mc", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "jagoan";
}
} else {
randx = random(81);
if (randx == 9) {
bola = attachMovie("bonus_mc3", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "bonus3";
} else {
bola = attachMovie("bola_mc", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "jagoan";
}
}
if (semuaHijau == true) {
bola = attachMovie("bola_mc", "bola_mc" + dalamBola, dalamBola);
bola.jenis = "jagoan";
}
if (indi == 1) {
bola._x = 50 + random(650);
bola._y = -random(200);
bola.speed = random(2) + 1;
bola.percepatan = Math.random() * 1;
bola.onEnterFrame = enterBola;
} else if (indi == 2) {
rand = random(2);
if (rand == 0) {
bola._x = -random(50);
bola._y = 200 + random(100);
bola.speedX = random(5) + 10;
} else if (rand == 1) {
bola._x = 650 + random(50);
bola._y = 200 + random(100);
bola.speedX = (-random(5)) - 10;
}
bola.speedY = random(10) + 10;
bola.perlambatan = 1 + (Math.random() * 1);
bola.onEnterFrame = enterBola2;
}
bola.speedKe = 10;
bola.speedPlus = 1;
dalamBola++;
if (dalamBola >= 3050) {
dalamBola = 3000;
}
}
}
}
}
function cekEfek(indi, indi2, indi3) {
if (sedangPause == false) {
efek = attachMovie("efek" + indi, "efek_mc" + dalamEfek, dalamEfek);
efek._x = indi2._x;
efek._y = indi2._y;
efek.keArah = indi3;
efek.onEnterFrame = enterEfek;
dalamEfek++;
if (dalamEfek >= 100101) {
dalamEfek = 100001 /* 0x0186A1 */;
}
}
}
function enterEfek() {
if (sedangPause == false) {
moveX = (this.keArah._x - this._x) / 2;
moveY = (this.keArah._y - this._y) / 2;
this._x = this._x + moveX;
this._y = this._y + moveY;
}
}
function enterBola() {
if (sedangPause == false) {
if (this.jalanHilang == true) {
this._alpha = this._alpha - 2;
if (this._alpha <= 0) {
removeMovieClip(this);
}
}
if (this.gerakMaju == true) {
deltaX = this._x - keranjang_mc._x;
deltaY = this._y - keranjang_mc._y;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speedKe) {
this.speedKe = this.speedKe + this.speedPlus;
this._y = this._y - (this.speedKe * Math.cos(angle * (Math.PI/180)));
this._x = this._x + (this.speedKe * Math.sin(angle * (Math.PI/180)));
} else if (this.jenis == "jagoan") {
kumpulOrbs++;
backBonus1();
keranjang_mc._xscale = keranjang_mc._xscale + 0.5;
keranjang_mc._yscale = keranjang_mc._yscale + 0.5;
score = score + (100 * scorePenambah);
xscore = xscore + (100 * scorePenambah);
barPower = barPower + barTambah;
cekEfek(1, this, keranjang_mc);
removeMovieClip(this);
} else if (this.jenis == "musuh") {
if (shieldAda == false) {
backBonus2();
keranjang_mc._xscale = keranjang_mc._xscale - 10;
keranjang_mc._yscale = keranjang_mc._yscale - 10;
if (keranjang_mc._xscale <= 75) {
keranjang_mc._xscale = 75;
}
if (keranjang_mc._yscale <= 75) {
keranjang_mc._yscale = 75;
}
cekEfek(2, this, keranjang_mc);
score = score - 50;
xscore = xscore - 50;
barPower = barPower - barKurang;
scorePenambah = 1;
if (score <= 0) {
score = 0;
}
if (xscore <= 0) {
xscore = 0;
}
cekIlang();
removeMovieClip(this);
}
} else if (this.jenis == "bonus") {
cekEfek(3, this, keranjang_mc);
backBonus3();
cekBonus();
removeMovieClip(this);
} else if (this.jenis == "bonus2") {
cekEfek(4, this, keranjang_mc);
backBonus3();
cekBonus2();
removeMovieClip(this);
} else if (this.jenis == "bonus3") {
cekEfek(5, this, keranjang_mc);
backBonus3();
score = score + (1000 * scorePenambah);
xscore = xscore + (1000 * scorePenambah);
barPower = barPower + barTambah;
scorePenambah++;
atas_mc.info_mc.info = ("Score Boost " + scorePenambah) + "x";
atas_mc.info_mc.gotoAndPlay(2);
removeMovieClip(this);
}
} else {
this._y = this._y + (this.speed * tambahanSpeed);
this.speed = this.speed + ((this.percepatan / 2) * tambahanSpeed);
if (this.hitTest(keranjang_mc)) {
if (this.jenis == "jagoan") {
kumpulOrbs++;
backBonus1();
keranjang_mc._xscale = keranjang_mc._xscale + 0.5;
keranjang_mc._yscale = keranjang_mc._yscale + 0.5;
score = score + (100 * scorePenambah);
xscore = xscore + (100 * scorePenambah);
barPower = barPower + barTambah;
cekEfek(1, this, keranjang_mc);
removeMovieClip(this);
} else if (this.jenis == "musuh") {
if (shieldAda == false) {
backBonus2();
keranjang_mc._xscale = keranjang_mc._xscale - 10;
keranjang_mc._yscale = keranjang_mc._yscale - 10;
if (keranjang_mc._xscale <= 75) {
keranjang_mc._xscale = 75;
}
if (keranjang_mc._yscale <= 75) {
keranjang_mc._yscale = 75;
}
cekEfek(2, this, keranjang_mc);
score = score - 50;
xscore = xscore - 50;
barPower = barPower - barKurang;
scorePenambah = 1;
if (score <= 0) {
score = 0;
}
cekIlang();
removeMovieClip(this);
}
} else if (this.jenis == "bonus") {
cekEfek(3, this, keranjang_mc);
backBonus3();
cekBonus();
removeMovieClip(this);
} else if (this.jenis == "bonus2") {
cekEfek(4, this, keranjang_mc);
backBonus3();
cekBonus2();
removeMovieClip(this);
} else if (this.jenis == "bonus3") {
cekEfek(5, this, keranjang_mc);
backBonus3();
score = score + (1000 * scorePenambah);
xscore = xscore + (1000 * scorePenambah);
barPower = barPower + barTambah;
scorePenambah++;
atas_mc.info_mc.info = ("Score Boost " + scorePenambah) + "x";
atas_mc.info_mc.gotoAndPlay(2);
removeMovieClip(this);
}
} else if (this._y >= 550) {
removeMovieClip(this);
}
}
}
}
function enterBola2() {
if (sedangPause == false) {
if (this.jalanHilang == true) {
this._alpha = this._alpha - 2;
if (this._alpha <= 0) {
removeMovieClip(this);
}
}
if (this.gerakMaju == true) {
deltaX = this._x - keranjang_mc._x;
deltaY = this._y - keranjang_mc._y;
angle = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > this.speedKe) {
this.speedKe = this.speedKe + this.speedPlus;
this._y = this._y - (this.speedKe * Math.cos(angle * (Math.PI/180)));
this._x = this._x + (this.speedKe * Math.sin(angle * (Math.PI/180)));
} else if (this.jenis == "jagoan") {
kumpulOrbs++;
backBonus1();
keranjang_mc._xscale = keranjang_mc._xscale + 0.5;
keranjang_mc._yscale = keranjang_mc._yscale + 0.5;
score = score + (200 * scorePenambah);
xscore = xscore + (200 * scorePenambah);
barPower = barPower + barTambah;
cekEfek(1, this, keranjang_mc);
removeMovieClip(this);
} else if (this.jenis == "musuh") {
if (shieldAda == false) {
backBonus2();
keranjang_mc._xscale = keranjang_mc._xscale - 20;
keranjang_mc._yscale = keranjang_mc._yscale - 20;
if (keranjang_mc._xscale <= 75) {
keranjang_mc._xscale = 75;
}
if (keranjang_mc._yscale <= 75) {
keranjang_mc._yscale = 75;
}
cekEfek(2, this, keranjang_mc);
cekIlang();
score = score - 100;
xscore = xscore - 100;
barPower = barPower - barKurang;
scorePenambah = 1;
if (score <= 0) {
score = 0;
}
if (xscore <= 0) {
xscore = 0;
}
removeMovieClip(this);
}
} else if (this.jenis == "bonus") {
cekEfek(3, this, keranjang_mc);
backBonus3();
cekBonus();
removeMovieClip(this);
} else if (this.jenis == "bonus2") {
cekEfek(4, this, keranjang_mc);
backBonus3();
cekBonus2();
removeMovieClip(this);
} else if (this.jenis == "bonus3") {
cekEfek(5, this, keranjang_mc);
backBonus3();
score = score + (2000 * scorePenambah);
xscore = xscore + (2000 * scorePenambah);
barPower = barPower + barTambah;
scorePenambah++;
atas_mc.info_mc.info = ("Score Boost " + scorePenambah) + "x";
atas_mc.info_mc.gotoAndPlay(2);
removeMovieClip(this);
}
} else {
this._x = this._x + (this.speedX * tambahanSpeed);
this._y = this._y - (this.speedY * tambahanSpeed);
this.speedY = this.speedY - this.perlambatan;
if (this.hitTest(keranjang_mc)) {
if (this.jenis == "jagoan") {
kumpulOrbs++;
backBonus1();
keranjang_mc._xscale = keranjang_mc._xscale + 0.5;
keranjang_mc._yscale = keranjang_mc._yscale + 0.5;
score = score + (200 * scorePenambah);
xscore = xscore + (200 * scorePenambah);
barPower = barPower + barTambah;
cekEfek(1, this, keranjang_mc);
removeMovieClip(this);
} else if (this.jenis == "musuh") {
if (shieldAda == false) {
backBonus2();
keranjang_mc._xscale = keranjang_mc._xscale - 20;
keranjang_mc._yscale = keranjang_mc._yscale - 20;
if (keranjang_mc._xscale <= 75) {
keranjang_mc._xscale = 75;
}
if (keranjang_mc._yscale <= 75) {
keranjang_mc._yscale = 75;
}
cekEfek(2, this, keranjang_mc);
cekIlang();
score = score - 100;
xscore = xscore - 100;
barPower = barPower - barKurang;
scorePenambah = 1;
if (score <= 0) {
score = 0;
}
if (xscore <= 0) {
xscore = 0;
}
removeMovieClip(this);
}
} else if (this.jenis == "bonus") {
cekEfek(3, this, keranjang_mc);
backBonus3();
cekBonus();
removeMovieClip(this);
} else if (this.jenis == "bonus2") {
cekEfek(4, this, keranjang_mc);
backBonus3();
cekBonus2();
removeMovieClip(this);
} else if (this.jenis == "bonus3") {
cekEfek(5, this, keranjang_mc);
backBonus3();
score = score + (2000 * scorePenambah);
xscore = xscore + (2000 * scorePenambah);
barPower = barPower + barTambah;
scorePenambah++;
atas_mc.info_mc.info = ("Score Boost " + scorePenambah) + "x";
atas_mc.info_mc.gotoAndPlay(2);
removeMovieClip(this);
}
} else if (this._y >= 550) {
removeMovieClip(this);
}
}
}
}
function cekIlang() {
if (sedangPause == false) {
if (masihMain == true) {
if (sedangPause == false) {
atas_mc.zone_mc.gotoAndPlay(70);
atas_mc.info_mc.info = "Power Loss";
atas_mc.info_mc.gotoAndPlay(2);
i = 1;
while (i <= 3) {
bola = attachMovie("bola_mc", "bola_mc" + dalamBola, dalamBola);
rand = random(2);
bola._x = keranjang_mc._x;
bola._y = keranjang_mc._y - 75;
rand = random(2);
if (rand == 0) {
bola.speedX = (-random(10)) - 10;
} else {
bola.speedX = random(10) + 10;
}
bola.speedY = random(10) + 10;
bola.jenis = "jagoan";
bola.perlambatan = 1 + (Math.random() * 1);
bola.onEnterFrame = enterBola2;
dalamBola++;
if (dalamBola >= 3050) {
dalamBola = 3000;
}
i++;
}
}
}
}
}
function cekBonus() {
if (sedangPause == false) {
if (masihMain == true) {
if (sedangPause == false) {
rand = random(2);
if (rand == 0) {
atas_mc.info_mc.info = "Fastly Madness";
atas_mc.info_mc.gotoAndPlay(2);
tambahanSpeed = 1.75;
munculKe1 = 250;
munculKe2 = 1500;
munculKe3 = 3000;
clearInterval(idMuncul);
clearInterval(idDelay);
idMuncul = setInterval(munculBola1, munculKe1 / perubahan, 1);
if (sudahKedua == true) {
clearInterval(idMuncul2);
idMuncul2 = setInterval(munculBola1, munculKe2 / perubahan, 2);
}
if (sudahKetiga == true) {
clearInterval(idMuncul3);
idMuncul3 = setInterval(munculBola1, munculKe3 / perubahan, 3);
}
idDelay = setInterval(delayNormal, 20000);
} else if (rand == 1) {
atas_mc.info_mc.info = "Slowly Madness";
atas_mc.info_mc.gotoAndPlay(2);
tambahanSpeed = 0.25;
munculKe1 = 300;
munculKe2 = 2500;
munculKe3 = 4000;
clearInterval(idMuncul);
clearInterval(idDelay);
idMuncul = setInterval(munculBola1, munculKe1 / perubahan, 1);
if (sudahKedua == true) {
clearInterval(idMuncul2);
idMuncul2 = setInterval(munculBola1, munculKe2 / perubahan, 2);
}
if (sudahKetiga == true) {
clearInterval(idMuncul3);
idMuncul3 = setInterval(munculBola1, munculKe3 / perubahan, 3);
}
idDelay = setInterval(delayNormal, 20000);
}
}
}
}
}
function cekBonus2() {
if (masihMain == true) {
if (sedangPause == false) {
rand = random(7);
if (rand <= 3) {
clearInterval(idDelay2);
atas_mc.info_mc.info = "Green Madness";
atas_mc.info_mc.gotoAndPlay(2);
semuaHijau = true;
i = 3000;
while (i <= 3100) {
if (_root["bola_mc" + i].jenis != "jagoan") {
_root["bola_mc" + i].jalanHilang = true;
}
i++;
}
idDelay2 = setInterval(delayNormal2, 15000);
} else if (rand <= 5) {
clearInterval(idGun);
clearInterval(idDelay4);
atas_mc.info_mc.info = "Sucking Madness";
atas_mc.info_mc.gotoAndPlay(2);
idGun = setInterval(munculGun3, 250);
idDelay4 = setInterval(delayNormal4, 10000);
} else if (rand == 6) {
clearInterval(idDelay3);
atas_mc.info_mc.info = "Shield Madness";
atas_mc.info_mc.gotoAndPlay(2);
shieldAda = true;
keranjang_mc.shield_mc._visible = true;
idDelay3 = setInterval(delayNormal3, 5000);
}
}
}
}
function munculGun3() {
if (sedangPause == false) {
i = 3000;
while (i <= 3100) {
if (_root["bola_mc" + i].jenis == "jagoan") {
_root["bola_mc" + i].gerakMaju = true;
} else {
_root["bola_mc" + i].gerakMaju = false;
}
i++;
}
}
}
function delayNormal() {
if (sedangPause == false) {
tambahanSpeed = 1;
munculKe1 = 500;
munculKe2 = 3000;
munculKe3 = 5000;
if (sudahKedua == true) {
clearInterval(idMuncul2);
idMuncul2 = setInterval(munculBola1, munculKe2 / perubahan, 2);
}
if (sudahKetiga == true) {
clearInterval(idMuncul3);
idMuncul3 = setInterval(munculBola1, munculKe3 / perubahan, 3);
}
clearInterval(idMuncul);
idMuncul = setInterval(munculBola1, munculKe1 / perubahan, 1);
clearInterval(idDelay);
}
}
function delayNormal2() {
if (sedangPause == false) {
semuaHijau = false;
clearInterval(idDelay2);
}
}
function delayNormal3() {
if (sedangPause == false) {
shieldAda = false;
keranjang_mc.shield_mc._visible = false;
clearInterval(idDelay3);
}
}
function delayNormal4() {
if (sedangPause == false) {
clearInterval(idGun);
clearInterval(idDelay4);
i = 3000;
while (i <= 3100) {
_root["bola_mc" + i].gerakMaju = false;
i++;
}
}
}
function cekBomb() {
atas_mc.info_mc.info = "Bomb Madness";
atas_mc.info_mc.gotoAndPlay(2);
backBomb();
bombGuna++;
jumlahBomb--;
bomb = attachMovie("bombx", "bombx", 900000);
bomb._x = 350;
bomb._y = 250;
zi = 2201;
while (zi <= 2250) {
if (_root["musuh_mc" + zi] != undefined) {
if (_root["musuh_mc" + zi].nyawa > 0) {
backKena();
setEfek(_root["musuh_mc" + zi]);
berkurang = 90 * banyakDamage;
_root["musuh_mc" + zi].nyawa = _root["musuh_mc" + zi].nyawa - berkurang;
score = score + (10 * scorePenambah);
xscore = xscore + (10 * scorePenambah);
if (_root["musuh_mc" + zi].nyawa <= 0) {
backDestroy();
backDestroy();
ww = 1;
while (ww <= 3) {
setEfek(_root["musuh_mc" + zi]);
ww++;
}
score = score + (100 * scorePenambah);
xscore = xscore + (100 * scorePenambah);
jumlahMusuh--;
hancurLawan++;
if (jumlahMusuh <= 0) {
selesaiGame("menang");
}
removeMovieClip(_root["musuh_mc" + zi]);
}
}
}
zi++;
}
}
stop();
if (xlevel <= 2) {
back = attachMovie("background1", "xbackground", 4);
} else if (xlevel <= 4) {
back = attachMovie("background2", "xbackground", 4);
} else if (xlevel <= 6) {
back = attachMovie("background3", "xbackground", 4);
} else if (xlevel <= 8) {
back = attachMovie("background4", "xbackground", 4);
} else if (xlevel <= 10) {
back = attachMovie("background5", "xbackground", 4);
} else if (xlevel >= 11) {
back = attachMovie("background6", "xbackground", 4);
}
back._x = 350;
back._y = 250;
atas_mc = attachMovie("atas_mc", "atas_mc", 999999);
atas_mc._x = 350;
atas_mc._y = 250;
init();
keranjang = attachMovie("keranjang_mc" + posisiGun, "keranjang_mc", 99999);
keranjang_mc._x = 350;
keranjang_mc._y = 250;
keranjang_mc.shield_mc._visible = false;
if (posisiSatelit == 1) {
satelit = attachMovie("satelit" + posisiGun, "satelit_mc1", 99998);
satelit._x = keranjang_mc._x;
satelit._y = keranjang_mc._y;
satelit.nyawa = 100 * ((posisiGun + _root.unitLevel1) / 2);
satelit.xdelay = 0;
satelit.totDelay = 10;
satelit.onEnterFrame = enterSatelit1;
} else if (posisiSatelit == 2) {
satelit = attachMovie(("satelit" + posisiGun) + "x", "satelit_mc1", 99998);
satelit._x = keranjang_mc._x;
satelit._y = keranjang_mc._y;
satelit.nyawa = 100 * ((posisiGun + _root.unitLevel1) / 2);
satelit.xdelay = 0;
satelit.totDelay = 10;
satelit.onEnterFrame = enterSatelit2;
satelit2 = attachMovie(("satelit" + posisiGun) + "y", "satelit_mc2", 99997);
satelit2._x = keranjang_mc._x;
satelit2._y = keranjang_mc._y;
satelit2.nyawa = 100 * ((posisiGun + _root.unitLevel1) / 2);
satelit2.xdelay = 0;
satelit2.totDelay = 10;
satelit2.onEnterFrame = enterSatelit3;
} else if (posisiSatelit == 3) {
satelit = attachMovie("satelit" + posisiGun, "satelit_mc1", 99998);
satelit._x = keranjang_mc._x;
satelit._y = keranjang_mc._y;
satelit.nyawa = 100 * ((posisiGun + _root.unitLevel1) / 2);
satelit.xdelay = 0;
satelit.totDelay = 10;
satelit.onEnterFrame = enterSatelit1;
satelit2 = attachMovie(("satelit" + posisiGun) + "x", "satelit_mc2", 99997);
satelit2._x = keranjang_mc._x;
satelit2._y = keranjang_mc._y;
satelit2.nyawa = 100 * ((posisiGun + _root.unitLevel1) / 2);
satelit2.xdelay = 0;
satelit2.totDelay = 10;
satelit2.onEnterFrame = enterSatelit2;
satelit3 = attachMovie(("satelit" + posisiGun) + "y", "satelit_mc3", 99996);
satelit3._x = keranjang_mc._x;
satelit3._y = keranjang_mc._y;
satelit3.nyawa = 100 * ((posisiGun + _root.unitLevel1) / 2);
satelit3.xdelay = 0;
satelit3.totDelay = 10;
satelit3.onEnterFrame = enterSatelit3;
}
hasil_mc._visible = false;
_root.onMouseDown = function () {
if (_root.unitLevel5 > 0) {
if (sedangBar == false) {
if (klikBeams == false) {
atas_mc.zone_mc.gotoAndPlay(2);
atas_mc.info_mc.info = "Laser Beam Madness";
atas_mc.info_mc.gotoAndPlay(2);
klikBeams = true;
if (_root.unitLevel5 == 1) {
barPower = 0;
beams = attachMovie("beam1", "beam_mc", dalamBeam);
beams._x = keranjang_mc._x;
beams._y = keranjang_mc._y;
beams._rotation = keranjang_mc._rotation;
beams.onEnterFrame = enterBeams;
} else if (_root.unitLevel5 == 2) {
barPower = 0;
beams = attachMovie("beam2", "beam_mc", dalamBeam);
beams._x = keranjang_mc._x;
beams._y = keranjang_mc._y;
beams._rotation = keranjang_mc._rotation;
beams.onEnterFrame = enterBeams;
}
}
} else {
atas_mc.info_mc.info = "Not enough power";
atas_mc.info_mc.gotoAndPlay(2);
}
}
};
_root.onMouseUp = function () {
klikBeams = false;
};
_root.onEnterFrame = function () {
if (sedangPause == false) {
if (zbos == undefined) {
removeMovieClip(_root.gunbos1);
removeMovieClip(_root.gunbos2);
}
if (gerakKiri) {
if (keranjang_mc._x >= 20) {
keranjang_mc._x = keranjang_mc._x - keranjangSpeed;
satelit_mc1._x = satelit_mc1._x - keranjangSpeed;
satelit_mc2._x = satelit_mc2._x - keranjangSpeed;
satelit_mc3._x = satelit_mc3._x - keranjangSpeed;
}
}
if (gerakKanan) {
if (keranjang_mc._x <= 680) {
keranjang_mc._x = keranjang_mc._x + keranjangSpeed;
satelit_mc1._x = satelit_mc1._x + keranjangSpeed;
satelit_mc2._x = satelit_mc2._x + keranjangSpeed;
satelit_mc3._x = satelit_mc3._x + keranjangSpeed;
}
}
if (gerakAtas) {
if (keranjang_mc._y >= 20) {
keranjang_mc._y = keranjang_mc._y - keranjangSpeed;
satelit_mc1._y = satelit_mc1._y - keranjangSpeed;
satelit_mc2._y = satelit_mc2._y - keranjangSpeed;
satelit_mc3._y = satelit_mc3._y - keranjangSpeed;
}
}
if (gerakBawah) {
if (keranjang_mc._y <= 480) {
keranjang_mc._y = keranjang_mc._y + keranjangSpeed;
satelit_mc1._y = satelit_mc1._y + keranjangSpeed;
satelit_mc2._y = satelit_mc2._y + keranjangSpeed;
satelit_mc3._y = satelit_mc3._y + keranjangSpeed;
}
}
deltaX = keranjang_mc._x - _root._xmouse;
deltaY = keranjang_mc._y - _root._ymouse;
keranjang_mc._rotation = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
deltaX = satelit_mc1._x - _root._xmouse;
deltaY = satelit_mc1._y - _root._ymouse;
satelit_mc1._rotation = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
deltaX = satelit_mc2._x - _root._xmouse;
deltaY = satelit_mc2._y - _root._ymouse;
satelit_mc2._rotation = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
deltaX = satelit_mc3._x - _root._xmouse;
deltaY = satelit_mc3._y - _root._ymouse;
satelit_mc3._rotation = (-Math.atan2(deltaX, deltaY)) / (Math.PI/180);
}
if (masihMain == true) {
if (sedangPause == false) {
if (keranjang_mc._xscale <= 90) {
keranjang_mc._xscale = 90;
}
if (keranjang_mc._yscale <= 90) {
keranjang_mc._yscale = 90;
}
if (keranjang_mc._xscale >= 125) {
keranjang_mc._xscale = 125;
}
if (keranjang_mc._yscale >= 125) {
keranjang_mc._yscale = 125;
}
if (barPower >= 100) {
barPower = 100;
} else if (barPower <= 0) {
barPower = 0;
}
if (score <= 0) {
score = 0;
}
if (xscore <= 0) {
xscore = 0;
}
atas_mc.life_mc.bar._xscale = (nyawaJagoan / totNyawaJagoan) * 100;
atas_mc.power_mc.bar._xscale = barPower;
if (sedangBar == true) {
if (barPower >= 100) {
atas_mc.zone_mc.gotoAndPlay(2);
atas_mc.info_mc.info = "Power Ups Madness";
atas_mc.info_mc.gotoAndPlay(2);
barPower = 100;
sedangBar = false;
atas_mc.power_mc.gotoAndStop(2);
banyakPeluru = 100;
satelit1.totDelay = 5;
satelit2.totDelay = 5;
satelit3.totDelay = 5;
clearInterval(idPeluru);
clearInterval(idBerkurang);
idPeluru = setInterval(munculPeluru, banyakPeluru);
idBerkurang = setInterval(kurangBar, 200);
}
}
}
}
atas_mc.score = score;
atas_mc.waves = waves;
};
idBola = setInterval(kedua, 60000);
idBola2 = setInterval(ketiga, 120000);
idMuncul = setInterval(munculBola1, munculKe1 / perubahan, 1);
munculPeluru(banyakPeluru);
idPeluru = setInterval(munculPeluru, banyakPeluru);
if (xlevel <= 2) {
idMusuh1 = setInterval(munculMusuh, xmunculMusuh, 1);
} else if (xlevel <= 4) {
idMusuh2 = setInterval(munculMusuh, ymunculMusuh, 2);
} else if (xlevel <= 6) {
idMusuh1 = setInterval(munculMusuh, xmunculMusuh, 1);
idMusuh2 = setInterval(munculMusuh, ymunculMusuh, 2);
} else if (xlevel == 7) {
idMusuh3 = setInterval(munculMusuh, zmunculMusuh, 3);
} else if (xlevel == 8) {
idMusuh1 = setInterval(munculMusuh, xmunculMusuh, 1);
idMusuh3 = setInterval(munculMusuh, zmunculMusuh, 3);
} else if (xlevel == 9) {
idMusuh2 = setInterval(munculMusuh, ymunculMusuh, 2);
idMusuh3 = setInterval(munculMusuh, zmunculMusuh, 3);
} else if (xlevel == 10) {
idMusuh1 = setInterval(munculMusuh, xmunculMusuh, 1);
idMusuh2 = setInterval(munculMusuh, ymunculMusuh, 2);
idMusuh3 = setInterval(munculMusuh, zmunculMusuh, 3);
} else if (xlevel == 11) {
idMusuh1 = setInterval(munculMusuh, xmunculMusuh, 1);
idMusuh2 = setInterval(munculMusuh, ymunculMusuh, 2);
idMusuh3 = setInterval(munculMusuh, zmunculMusuh, 3);
idMusuh4 = setInterval(munculMusuh, amunculMusuh, 4);
} else if (xlevel == 12) {
idMusuh1 = setInterval(munculMusuh, xmunculMusuh, 1);
idMusuh2 = setInterval(munculMusuh, ymunculMusuh, 2);
idMusuh3 = setInterval(munculMusuh, zmunculMusuh, 3);
idMusuh4 = setInterval(munculMusuh, amunculMusuh, 4);
idMusuh5 = setInterval(munculMusuh, bmunculMusuh, 5);
} else if (xlevel == 13) {
munculBoss();
}
idWaktu = setInterval(cekWaktu, 1000);
myListener = new Object();
myListener.onKeyDown = function () {
if (Key.getCode() == 32) {
if (sedangPause == false) {
if (masihMain == true) {
if (jumlahBomb >= 1) {
cekBomb();
if (jumlahBomb == 2) {
atas_mc.bomb1._visible = true;
atas_mc.bomb2._visible = true;
atas_mc.bomb3._visible = false;
} else if (jumlahBomb == 1) {
atas_mc.bomb1._visible = true;
atas_mc.bomb2._visible = false;
atas_mc.bomb3._visible = false;
} else if (jumlahBomb == 0) {
atas_mc.bomb1._visible = false;
atas_mc.bomb2._visible = false;
atas_mc.bomb3._visible = false;
}
}
}
}
}
if ((Key.getCode() == 65) || (Key.getCode() == 37)) {
gerakKiri = true;
}
if ((Key.getCode() == 87) || (Key.getCode() == 38)) {
gerakAtas = true;
}
if ((Key.getCode() == 68) || (Key.getCode() == 39)) {
gerakKanan = true;
}
if ((Key.getCode() == 83) || (Key.getCode() == 40)) {
gerakBawah = true;
}
if (Key.getCode() == 80) {
if (masihMain == true) {
if (sedangPause == false) {
sedangPause = true;
lokasi = myMusic.position / 1000;
myMusic.stop();
options = attachMovie("option_mc", "option_mc", 100000);
options._x = 350;
options._y = 250;
options.next_btn.onRelease = function () {
removeMovieClip(option_mc);
sedangPause = false;
myMusic.start(lokasi, 1);
myMusic.onSoundComplete = function () {
if (xlevel == 13) {
backMusic2();
} else {
backMusic();
}
};
};
options.quit_btn.onRelease = function () {
masihMain = false;
clearInterval(idBola);
clearInterval(idBola2);
clearInterval(idMuncul);
clearInterval(idMuncul2);
clearInterval(idMuncul3);
clearInterval(idDelay);
clearInterval(idDelay2);
clearInterval(idDelay3);
clearInterval(idDelay4);
clearInterval(idGun);
clearInterval(idWaktu);
clearInterval(idMusuh1);
clearInterval(idMusuh2);
clearInterval(idMusuh3);
clearInterval(idMusuh4);
clearInterval(idMusuh5);
clearInterval(idPeluru);
clearInterval(idBerkurang);
removeMovieClip(efek);
i = 3000;
while (i <= 3100) {
removeMovieClip(_root["bola_mc" + i]);
i++;
}
keranjangSpeed = 0;
delete myListener.onKeyDown;
delete myListener.onKeyUp;
Key.removeListener(myListener);
i = 2201;
while (i <= 2250) {
removeMovieClip(_root["musuh_mc" + i]);
i++;
}
removeMovieClip(_root.gunbos1);
removeMovieClip(_root.gunbos2);
i = 2101;
while (i <= 2150) {
removeMovieClip(_root["gun_mc" + i]);
removeMovieClip(_root["xgun_mc" + i]);
i++;
}
clearInterval(idSelesai);
removeMovieClip(keranjang_mc);
removeMovieClip(hasil_mc);
removeMovieClip(satelit_mc1);
removeMovieClip(satelit_mc2);
removeMovieClip(satelit_mc3);
removeMovieClip(xbackground);
removeMovieClip(atas_mc);
removeMovieClip(option_mc);
delete _root.onEnterFrame;
delete _root.onMouseDown;
delete _root.onMouseUp;
removeMovieClip(beam_mc);
score = simpanScore;
gotoAndStop (491);
};
} else {
removeMovieClip(option_mc);
sedangPause = false;
myMusic.start(lokasi, 1);
myMusic.onSoundComplete = function () {
backMusic();
};
}
}
}
};
myListener.onKeyUp = function () {
if (Key.getCode() == 80) {
gerakKiri = false;
gerakAtas = false;
gerakKanan = false;
gerakBawah = false;
}
if ((Key.getCode() == 65) || (Key.getCode() == 37)) {
gerakKiri = false;
}
if ((Key.getCode() == 87) || (Key.getCode() == 38)) {
gerakAtas = false;
}
if ((Key.getCode() == 68) || (Key.getCode() == 39)) {
gerakKanan = false;
}
if ((Key.getCode() == 83) || (Key.getCode() == 40)) {
gerakBawah = false;
}
};
Key.addListener(myListener);
Frame 531
function cekUpgrade() {
i = 1;
while (i <= 5) {
_root["weapon" + i].onRelease = klikWeapon;
_root["weapon" + i].onRollOver = overWeapon;
_root["weapon" + i].onRollOut = outWeapon;
_root["weapon" + i].gotoAndStop(1);
i++;
}
i = 1;
while (i <= 5) {
_root["weapon" + i].enabled = false;
if (posisiGun >= i) {
_root["weapon" + i].gotoAndStop(2);
} else {
_root["weapon" + i].gotoAndStop(3);
}
i++;
}
if (posisiGun == 0) {
_root.weapon1.enabled = true;
_root.weapon1.gotoAndStop(1);
} else if (posisiGun == 1) {
_root.weapon2.enabled = true;
_root.weapon2.gotoAndStop(1);
} else if (posisiGun == 2) {
_root.weapon3.enabled = true;
_root.weapon3.gotoAndStop(1);
} else if (posisiGun == 3) {
_root.weapon4.enabled = true;
_root.weapon4.gotoAndStop(1);
} else if (posisiGun == 4) {
_root.weapon5.enabled = true;
_root.weapon5.gotoAndStop(1);
}
msgBox_mc._visible = false;
}
function klikWeapon() {
myStr = new String(this);
indi = Number(myStr.substr(myStr.length - 1, 1));
if (indi >= 1) {
if (posisiGun >= indi) {
msgBox_mc.info = "Weapon upgraded";
} else if (xpoint >= weaponPoin[indi]) {
xpoint = xpoint - weaponPoin[indi];
posisiGun = indi;
msgBox_mc.info = "Weapon upgraded";
_root["weapon" + indi].gotoAndStop(2);
cekUpgrade();
} else {
msgBox_mc.info = "Not enough point";
}
}
}
function overWeapon() {
jenisNya = "weapon";
msgBox_mc._visible = true;
msgBox_mc.gotoAndStop(1);
myStr = new String(this);
indi = Number(myStr.substr(myStr.length - 1, 1));
if (indi >= 1) {
msgBox_mc.judul = weaponNama[indi];
msgBox_mc.poin = ("Need " + weaponPoin[indi]) + " Pts";
if (posisiGun < indi) {
msgBox_mc.info = "Click to upgrade";
} else {
msgBox_mc.info = "Weapon upgraded";
}
}
}
function outWeapon() {
msgBox_mc._visible = false;
}
function cekUpgrade2() {
i = 1;
while (i <= 5) {
_root["unit" + i].onRelease = klikUnit;
_root["unit" + i].onRollOver = overUnit;
_root["unit" + i].onRollOut = outUnit;
if (_root["unitLevel" + i] >= maxUpgrade[i]) {
_root["unit" + i].gotoAndStop(2);
} else {
_root["unit" + i].gotoAndStop(1);
}
i++;
}
}
function klikUnit() {
myStr = new String(this);
indi = Number(myStr.substr(myStr.length - 1, 1));
if (indi >= 1) {
if (_root["unitLevel" + indi] >= maxUpgrade[indi]) {
msgBox_mc.info = "Maximum upgrade";
} else if (xpoint >= unitPoin[indi]) {
xpoint = xpoint - unitPoin[indi];
_root["unitLevel" + indi]++;
msgBox_mc.xlevel = (("Level " + _root["unitLevel" + indi]) + "/") + maxUpgrade[indi];
msgBox_mc.info = "Weapon upgraded";
if (_root["unitLevel" + indi] >= maxUpgrade[indi]) {
_root["unit" + indi].gotoAndStop(2);
}
cekUpgrade2();
if (indi == 5) {
if (_root["unitLevel" + indi] == 1) {
information_mc._visible = true;
information_mc.ok_btn.onRelease = function () {
information_mc._visible = false;
};
}
}
} else {
msgBox_mc.info = "Not enough point";
}
}
}
function overUnit() {
jenisNya = "unit";
msgBox_mc._visible = true;
msgBox_mc.gotoAndStop(2);
myStr = new String(this);
indi = Number(myStr.substr(myStr.length - 1, 1));
if (indi >= 1) {
msgBox_mc.judul = unitNama[indi];
msgBox_mc.poin = ("Need " + unitPoin[indi]) + " Pts";
msgBox_mc.xlevel = (("Level " + _root["unitLevel" + indi]) + "/") + maxUpgrade[indi];
if (_root["unitLevel" + indi] < maxUpgrade[indi]) {
msgBox_mc.info = "Click to upgrade";
} else {
msgBox_mc.info = "Maximum upgrade";
}
}
}
function outUnit() {
msgBox_mc._visible = false;
}
function cekUpgrade3() {
i = 1;
while (i <= 3) {
_root["zsatelit" + i].onRelease = klikSatelit;
_root["zsatelit" + i].onRollOver = overSatelit;
_root["zsatelit" + i].onRollOut = outSatelit;
_root["zsatelit" + i].gotoAndStop(1);
i++;
}
i = 1;
while (i <= 3) {
_root["zsatelit" + i].enabled = false;
if (posisiSatelit >= i) {
_root["zsatelit" + i].gotoAndStop(2);
} else {
_root["zsatelit" + i].gotoAndStop(3);
}
i++;
}
if (posisiSatelit == 0) {
_root.zsatelit1.enabled = true;
_root.zsatelit1.gotoAndStop(1);
} else if (posisiSatelit == 1) {
_root.zsatelit2.enabled = true;
_root.zsatelit2.gotoAndStop(1);
} else if (posisiSatelit == 2) {
_root.zsatelit3.enabled = true;
_root.zsatelit3.gotoAndStop(1);
}
msgBox_mc._visible = false;
}
function klikSatelit() {
myStr = new String(this);
indi = Number(myStr.substr(myStr.length - 1, 1));
if (indi >= 1) {
if (posisiSatelit >= indi) {
msgBox_mc.info = "Satellite upgraded";
} else if (xpoint >= satelitPoin[indi]) {
xpoint = xpoint - satelitPoin[indi];
posisiSatelit = indi;
msgBox_mc.info = "Satellite upgraded";
_root["zsatelit" + indi].gotoAndStop(2);
cekUpgrade3();
} else {
msgBox_mc.info = "Not enough point";
}
}
}
function overSatelit() {
jenisNya = "satelit";
msgBox_mc._visible = true;
msgBox_mc.gotoAndStop(1);
myStr = new String(this);
indi = Number(myStr.substr(myStr.length - 1, 1));
if (indi >= 1) {
msgBox_mc.judul = satelitNama[indi];
msgBox_mc.poin = ("Need " + satelitPoin[indi]) + " Pts";
if (posisiSatelit < indi) {
msgBox_mc.info = "Click to upgrade";
} else {
msgBox_mc.info = "Satellite upgraded";
}
}
}
function outSatelit() {
msgBox_mc._visible = false;
}
stop();
next_btn.onRelease = function () {
simpanData();
if (xlevel == 13) {
backMusic2();
}
gotoAndStop (530);
};
msgBox_mc._visible = false;
jenisNya = "";
zone_mc.zone = "ZONE " + xlevel;
weaponNama = new Array("", "2 guns", "3 guns", "4 guns", "5 guns", "missiles");
weaponPoin = new Array("", 5000, 10000, 15000, 20000, 25000);
cekUpgrade();
unitNama = new Array("", "Life", "Speed", "Damage", "Bomb", "Laser Beam");
unitPoin = new Array("", 6000, 5000, 7000, 10000, 25000);
maxUpgrade = new Array("", 14, 5, 13, 3, 2);
cekUpgrade2();
satelitNama = new Array("", "1 Satellite", "2 Satellites", "3 Satellites");
satelitPoin = new Array("", 15000, 20000, 25000);
cekUpgrade3();
_root.onEnterFrame = function () {
if (jenisNya == "weapon") {
msgBox_mc._x = _root._xmouse;
msgBox_mc._y = _root._ymouse + 125;
}
if (jenisNya == "unit") {
msgBox_mc._x = _root._xmouse;
msgBox_mc._y = _root._ymouse - 125;
}
if (jenisNya == "satelit") {
msgBox_mc._x = _root._xmouse;
msgBox_mc._y = _root._ymouse - 125;
}
};
information_mc._visible = false;
Instance of Symbol 17 MovieClip in Frame 531
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Instance of Symbol 24 MovieClip "logo_mc" in Frame 531
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=upgrades", "_blank");
}
Frame 532
stop();
next_btn.onRelease = function () {
nextFrame();
};
skip_btn.onRelease = function () {
gotoAndStop ("xsubmit");
};
Frame 533
stop();
next_btn.onRelease = function () {
nextFrame();
};
prev_btn.onRelease = function () {
prevFrame();
};
skip_btn.onRelease = function () {
gotoAndStop ("xsubmit");
};
Frame 534
stop();
next_btn.onRelease = function () {
nextFrame();
};
prev_btn.onRelease = function () {
prevFrame();
};
skip_btn.onRelease = function () {
gotoAndStop ("xsubmit");
};
Frame 535
stop();
prev_btn.onRelease = function () {
prevFrame();
};
skip_btn.onRelease = function () {
gotoAndStop ("xsubmit");
};
Frame 541
stop();
zone_mc.zone = "ZONE " + xlevel;
quit_btn.onRelease = function () {
gotoAndStop (491);
};
Instance of Symbol 17 MovieClip in Frame 541
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Instance of Symbol 24 MovieClip "logo_mc" in Frame 541
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=submitpage", "_blank");
}
Frame 552
stop();
zone_mc.zone = "ZONE " + xlevel;
next_btn.onRelease = function () {
score = 0;
simpanData();
gotoAndStop (531);
};
quit_btn.onRelease = function () {
score = 0;
simpanData();
gotoAndStop (491);
};
Instance of Symbol 17 MovieClip in Frame 552
on (release) {
getURL ("http://www.belugerinstudios.com/", "_blank");
}
Instance of Symbol 24 MovieClip "logo_mc" in Frame 552
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=submitpage", "_blank");
}
Symbol 24 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 32 MovieClip Frame 1
stop();
Symbol 54 MovieClip [efek1] Frame 20
removeMovieClip(this);
Symbol 62 MovieClip [ledak_mc] Frame 20
removeMovieClip(this);
Symbol 65 MovieClip [efek2] Frame 20
removeMovieClip(this);
Symbol 94 MovieClip [hasil_mc] Frame 1
stop();
Symbol 131 MovieClip [bombx] Frame 11
removeMovieClip(this);
Symbol 169 MovieClip [ledakan] Frame 10
removeMovieClip(this);
Symbol 188 MovieClip [ledakan2] Frame 10
removeMovieClip(this);
Symbol 214 MovieClip [dahsyat] Frame 10
removeMovieClip(this);
Symbol 242 MovieClip [dahsyat2] Frame 11
removeMovieClip(this);
Symbol 252 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 254 MovieClip Frame 10
removeMovieClip(_parent);
Symbol 258 MovieClip [efek3] Frame 20
removeMovieClip(this);
Symbol 261 MovieClip [efek4] Frame 20
removeMovieClip(this);
Symbol 264 MovieClip [efek5] Frame 20
removeMovieClip(this);
Symbol 357 MovieClip [dahsyat10] Frame 11
removeMovieClip(this);
Symbol 376 MovieClip [dahsyat11] Frame 10
removeMovieClip(this);
Symbol 384 MovieClip Frame 1
stop();
Symbol 395 MovieClip [option_mc] Frame 1
function cekSpeedQuality() {
i = 1;
while (i <= 3) {
this["speed" + i].angka = i;
this["quality" + i].angka = i;
this["speed" + i].gotoAndStop(1);
this["quality" + i].gotoAndStop(1);
this["speed" + i].onRelease = klikSpeed;
this["quality" + i].onRelease = klikQuality;
this["speed" + i].onRollOver = function () {
over();
};
this["quality" + i].onRollOver = function () {
over();
};
i++;
}
this["speed" + _root.speedGame].gotoAndStop(2);
this["quality" + _root.qualityGame].gotoAndStop(2);
}
function klikSpeed() {
klik();
indi = new String(this);
_root.speedGame = Number(indi.substr(indi.length - 1, 1));
cekSpeedQuality();
}
function klikQuality() {
klik();
indi = new String(this);
_root.qualityGame = Number(indi.substr(indi.length - 1, 1));
if (_root.qualityGame == 1) {
_quality = "HIGH";
} else if (_root.qualityGame == 2) {
_quality = "MEDIUM";
} else if (_root.qualityGame == 3) {
_quality = "LOW";
}
cekSpeedQuality();
}
stop();
bar1_mc.bar_mc._x = Math.ceil((_root.volume1 / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volume1 = int(0.434782608695652 * (this._x + 115));
_root.myMusic.setVolume(_root.volume1);
bar1_mc.persen1 = _root.volume1 + " %";
};
bar1_mc.indi_mc.onPress = function () {
klik();
startDrag (bar1_mc.bar_mc, true, -115, 0, 115, 0);
};
bar1_mc.indi_mc.onRelease = (bar1_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
bar2_mc.bar_mc._x = Math.ceil((_root.volume2 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volume2 = int(0.434782608695652 * (this._x + 115));
_root.volum3 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volume2);
_root.mySound2.setVolume(_root.volum3);
bar2_mc.persen2 = _root.volume2 + " %";
};
bar2_mc.indi_mc.onPress = function () {
klik();
startDrag (bar2_mc.bar_mc, true, -115, 0, 115, 0);
};
bar2_mc.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
over();
stopDrag();
});
cekSpeedQuality();
Symbol 411 MovieClip [beam1] Frame 30
removeMovieClip(this);
Symbol 427 MovieClip [beam2] Frame 30
removeMovieClip(this);
Symbol 429 MovieClip Frame 1
stop();
Symbol 443 MovieClip Frame 1
stop();
Symbol 443 MovieClip Frame 60
gotoAndStop (1);
Symbol 443 MovieClip Frame 130
gotoAndStop (1);
Symbol 451 MovieClip Frame 1
stop();
Symbol 451 MovieClip Frame 2
stop();
Symbol 455 MovieClip Frame 1
stop();
Instance of Symbol 24 MovieClip "logo_mc" in Symbol 466 MovieClip [atas_mc] Frame 1
on (release) {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=playing", "_blank");
}
Symbol 541 MovieClip Frame 1
stop();
Symbol 541 MovieClip Frame 10
stop();
Symbol 543 MovieClip Frame 1
this.link.onRelease = function () {
getURL ("http://www.bubblebox.com/clickreg.php?type=gamestats&id=1354&subid=splash", "_blank");
};
Symbol 543 MovieClip Frame 210
stop();
Symbol 555 MovieClip Frame 107
stop();
Symbol 587 MovieClip Frame 1
stop();
Symbol 645 MovieClip Frame 1
stop();
Symbol 662 MovieClip Frame 1
stop();
Symbol 666 MovieClip Frame 1
stop();
Symbol 670 MovieClip Frame 1
stop();
Symbol 674 MovieClip Frame 1
stop();
Symbol 678 MovieClip Frame 1
stop();
Symbol 682 MovieClip Frame 1
stop();
Symbol 686 MovieClip Frame 1
stop();
Symbol 690 MovieClip Frame 1
stop();
Symbol 694 MovieClip Frame 1
stop();
Symbol 699 MovieClip Frame 1
stop();
Symbol 719 MovieClip Frame 1
stop();
Symbol 740 MovieClip Frame 1
stop();
Symbol 745 MovieClip Frame 1
stop();
Symbol 756 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 762 MovieClip Frame 1
stop();
Symbol 765 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 768 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
Symbol 771 MovieClip Frame 1
function rhex(num) {
str = "";
j = 0;
while (j <= 3) {
str = str + (hex_chr.charAt(MathbitAND(num >> ((j * 8) + 4), 15)) + hex_chr.charAt(MathbitAND(num >> (j * 8), 15)));
j++;
}
return(str);
}
function str2blks_MD5(str) {
nblk = ((str.length + 8) >> 6) + 1;
blks = new Array(nblk * 16);
i = 0;
while (i < (nblk * 16)) {
blks[i] = 0;
i++;
}
i = 0;
while (i < str.length) {
blks[i >> 2] = blks[i >> 2] | (str.charCodeAt(i) << ((i % 4) * 8));
i++;
}
blks[i >> 2] = blks[i >> 2] | (128 << ((i % 4) * 8));
blks[(nblk * 16) - 2] = str.length * 8;
return(blks);
}
function addme(x, y) {
var _local1 = MathbitAND(x, 65535) + MathbitAND(y, 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | MathbitAND(_local1, 65535));
}
function rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function cmn(q, a, b, x, s, t) {
return(addme(rol(addme(addme(a, q), addme(x, t)), s), b));
}
function ff(a, b, c, d, x, s, t) {
return(cmn(MathbitAND(b, c) | MathbitAND(~b, d), a, b, x, s, t));
}
function gg(a, b, c, d, x, s, t) {
return(cmn(MathbitAND(b, d) | MathbitAND(c, ~d), a, b, x, s, t));
}
function hh(a, b, c, d, x, s, t) {
return(cmn((b ^ c) ^ d, a, b, x, s, t));
}
function ii(a, b, c, d, x, s, t) {
return(cmn(c ^ (b | (~d)), a, b, x, s, t));
}
MathbitAND = function (a, b) {
if ((a < 0) && (b < 0)) {
var _local3 = (a & 1) & (b & 1);
var _local4 = (a >>> 1) & (b >>> 1);
return((_local4 << 1) | _local3);
}
return(a & b);
};
var hex_chr = "0123456789abcdef";
String.prototype.MD5 = function () {
var _local2 = this;
x = str2blks_MD5(_local2);
a = 1732584193 /* 0x67452301 */;
b = -271733879;
c = -1732584194;
d = 271733878 /* 0x10325476 */;
i = 0;
while (i < x.length) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
a = ff(a, b, c, d, x[i + 0], 7, -680876936);
d = ff(d, a, b, c, x[i + 1], 12, -389564586);
c = ff(c, d, a, b, x[i + 2], 17, 606105819);
b = ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = ff(a, b, c, d, x[i + 4], 7, -176418897);
d = ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = ff(b, c, d, a, x[i + 7], 22, -45705983);
a = ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = ff(c, d, a, b, x[i + 10], 17, -42063);
b = ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = ff(d, a, b, c, x[i + 13], 12, -40341101);
c = ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = gg(a, b, c, d, x[i + 1], 5, -165796510);
d = gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = gg(c, d, a, b, x[i + 11], 14, 643717713);
b = gg(b, c, d, a, x[i + 0], 20, -373897302);
a = gg(a, b, c, d, x[i + 5], 5, -701558691);
d = gg(d, a, b, c, x[i + 10], 9, 38016083);
c = gg(c, d, a, b, x[i + 15], 14, -660478335);
b = gg(b, c, d, a, x[i + 4], 20, -405537848);
a = gg(a, b, c, d, x[i + 9], 5, 568446438);
d = gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = gg(c, d, a, b, x[i + 3], 14, -187363961);
b = gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = gg(d, a, b, c, x[i + 2], 9, -51403784);
c = gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = hh(a, b, c, d, x[i + 5], 4, -378558);
d = hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = hh(b, c, d, a, x[i + 14], 23, -35309556);
a = hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = hh(c, d, a, b, x[i + 7], 16, -155497632);
b = hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = hh(a, b, c, d, x[i + 13], 4, 681279174);
d = hh(d, a, b, c, x[i + 0], 11, -358537222);
c = hh(c, d, a, b, x[i + 3], 16, -722521979);
b = hh(b, c, d, a, x[i + 6], 23, 76029189);
a = hh(a, b, c, d, x[i + 9], 4, -640364487);
d = hh(d, a, b, c, x[i + 12], 11, -421815835);
c = hh(c, d, a, b, x[i + 15], 16, 530742520);
b = hh(b, c, d, a, x[i + 2], 23, -995338651);
a = ii(a, b, c, d, x[i + 0], 6, -198630844);
d = ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = ii(b, c, d, a, x[i + 5], 21, -57434055);
a = ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = ii(c, d, a, b, x[i + 10], 15, -1051523);
b = ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = ii(d, a, b, c, x[i + 15], 10, -30611744);
c = ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = ii(a, b, c, d, x[i + 4], 6, -145523070);
d = ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = ii(c, d, a, b, x[i + 2], 15, 718787259);
b = ii(b, c, d, a, x[i + 9], 21, -343485551);
a = addme(a, olda);
b = addme(b, oldb);
c = addme(c, oldc);
d = addme(d, oldd);
i = i + 16;
}
return(((rhex(a) + rhex(b)) + rhex(c)) + rhex(d));
};
stop();
this.bubbleboxGameID = _root.gameID;
scoreMc = this;
sendBubbleBoxScore = function (gameID) {
userData = new LoadVars();
var _local4 = (((bubbleboxGameID + "_") + _root.score) + "_") + _root.bubblebox_name;
var _local5 = (((((((((bubbleboxGameID + "_") + "4234232143214421") + "_") + _root.score) + "_") + "2537625476251") + "_") + _root.bubblebox_name) + "_") + "desleutelistessa";
var _local3 = _local5.MD5();
userData.datastring = _local4;
userData.hashstring = _local3;
var _local2 = new LoadVars();
_local2.onLoad = function (success) {
if (success) {
scoreMc.gotoAndStop("success");
} else {
scoreMc.gotoAndStop("tryagain");
}
};
userData.sendAndLoad("http://www.bubblebox.com/scripts/insertscore2008.php", _local2, "POST");
};
this.send_btn.onRelease = function () {
if ((_root.bubblebox_name != "YOUR NAME") && (_root.bubblebox_name.length > 0)) {
sendBubbleBoxScore(this._parent.bubbleboxGameID);
this._parent.gotoAndStop("saving");
}
};
Selection.setFocus("instertname");
Symbol 771 MovieClip Frame 2
stop();
_root.next_btn.enabled = false;
_root.quit_btn.enabled = false;
Symbol 771 MovieClip Frame 3
_root.next_btn.enabled = true;
_root.quit_btn.enabled = true;
this.bubblebox_view_score.onRelease = function () {
getURL (("http://www.bubblebox.com/highscores/" + this._parent.bubbleboxGameID) + ".htm", "_blank");
};
Symbol 771 MovieClip Frame 4
_root.next_btn.enabled = true;
_root.quit_btn.enabled = true;
this.try_again.onRelease = function () {
this._parent.gotoAndStop(1);
};