Frame 1
stop();
Stage.showMenu = false;
fscommand ("showmenu", false);
fscommand ("allowscale", true);
this.onEnterFrame = function () {
persen = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
xpersen = persen + " %";
bar_mc._xscale = persen;
if (persen >= 100) {
delete this.onEnterFrame;
gotoAndStop ("completed");
}
};
Frame 10
function ygDiSave() {
keLevel = 0;
}
function simpanData(dataKe) {
_root["t2datSimp" + dataKe] = simpanSemua[dataKe];
Cookies = SharedObject.getLocal(_root["t2datSimp" + dataKe], "/");
Cookies.data["t2soData" + dataKe] = eval (simpanSemua[dataKe]);
Cookies.flush();
}
function loadData(dataKe) {
_root["t2datSimp" + dataKe] = simpanSemua[dataKe];
Cookies = SharedObject.getLocal(_root["t2datSimp" + dataKe], "/");
_root[simpanSemua[dataKe]] = Cookies.data["t2soData" + dataKe];
}
function backMusic() {
myMusic.stop();
myMusic = new Sound(music);
myMusic.attachSound("backMusic");
myMusic.setVolume(volum1);
myMusic.start(1, 1);
myMusic.onSoundComplete = function () {
backMusic();
};
}
function klik() {
mySound = new Sound(sound);
mySound.attachSound("klik");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backWin() {
mySound = new Sound(sound);
mySound.attachSound("backWin");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backLose() {
mySound = new Sound(sound);
mySound.attachSound("backLose");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backKena() {
mySound = new Sound(sound);
mySound.attachSound("backKena");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backTembak() {
mySound = new Sound(sound);
mySound.attachSound("backTembak");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backPantul() {
mySound = new Sound(sound);
mySound.attachSound("backPantul");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backLedak() {
mySound = new Sound(sound);
mySound.attachSound("backLedak");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backHalang() {
mySound = new Sound(sound);
mySound.attachSound("backHalang");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backMuncul() {
mySound = new Sound(sound);
mySound.attachSound("backMuncul");
mySound.setVolume(volum2);
mySound.start(0, 1);
mySound = new Sound(sound);
mySound.attachSound("backMuncul2");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backPanah() {
mySound = new Sound(sound);
mySound.attachSound("backPanah");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backMesin() {
mySound = new Sound(sound);
mySound.attachSound("backMesin");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
function backMax() {
mySound = new Sound(sound);
mySound.attachSound("backMax");
mySound.setVolume(volum2);
mySound.start(0, 1);
}
stop();
xsound = attachMovie("sound_mc", "sound", 4);
xmusic = attachMovie("sound_mc", "music", 5);
volum1 = 75;
volum2 = 100;
qualityGame = 1;
simpanSemua = new Array("keLevel");
play_btn.onRelease = function () {
klik();
gotoAndPlay (21);
};
loadData(0);
if (keLevel == undefined) {
ygDiSave();
}
Instance of Symbol 30 MovieClip in Frame 10
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 35
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 150) {
this._y = 150;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 320) {
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
this._rotation = this._rotation + 90;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backLedak();
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backLedak();
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backLedak();
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
backWin();
clearSemua();
cekTrans("lanjut");
}
function cekLose() {
backWin();
clearSemua();
cekTrans("lanjut");
}
backTembak();
tekanCanon = true;
bullet_mc._visible = false;
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = canon_mc._x;
bullet_mc._y = canon_mc._y;
bullet_mc.speedPeluru = 15;
if (canon_mc._currentframe == 1) {
bullet_mc._rotation = canon_mc._rotation;
} else if (canon_mc._currentframe == 10) {
bullet_mc._rotation = canon_mc._rotation - 90;
} else if (canon_mc._currentframe == 20) {
bullet_mc._rotation = canon_mc._rotation - 180;
} else if (canon_mc._currentframe == 30) {
bullet_mc._rotation = canon_mc._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
function cekTrans(indi) {
trans_mc.gotoAndPlay(2);
xkemana = indi;
}
function kemana() {
gotoAndStop ("lanjut");
}
stop();
bykBall = 4;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if (i <= 3) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 6) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow";
_root["ball" + i].ke = i;
} else if (i <= 9) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i <= 11) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
} else if (i == 12) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else if (i == 13) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
}
i++;
}
initSemua();
Frame 40
play();
Frame 245
backMax();
Frame 410
gotoAndPlay (411);
Frame 550
backMusic();
gotoAndStop (551);
Frame 551
function cekLevel() {
delete myListener.onKeyDown;
removeListener(myListener);
if (xkemana != "gagal") {
if (keLevel <= xlevel) {
keLevel = xlevel;
simpanData(0);
}
}
if (xlevel == 0) {
gotoAndStop ("zlevel0");
} else if (xlevel == 1) {
gotoAndStop ("zlevel1");
} else if (xlevel == 2) {
gotoAndStop ("zlevel2");
} else if (xlevel == 3) {
gotoAndStop ("zlevel3");
} else if (xlevel == 4) {
gotoAndStop ("zlevel4");
} else if (xlevel == 5) {
gotoAndStop ("zlevel5");
} else if (xlevel == 6) {
gotoAndStop ("zlevel6");
} else if (xlevel == 7) {
gotoAndStop ("zlevel7");
} else if (xlevel == 8) {
gotoAndStop ("zlevel8");
} else if (xlevel == 9) {
gotoAndStop ("zlevel9");
} else if (xlevel == 10) {
gotoAndStop ("zlevel10");
} else if (xlevel == 11) {
gotoAndStop ("zlevel11");
} else if (xlevel == 12) {
gotoAndStop ("zlevel12");
} else if (xlevel == 13) {
gotoAndStop ("zlevel13");
} else if (xlevel == 14) {
gotoAndStop ("zlevel14");
} else if (xlevel == 15) {
gotoAndStop ("zlevel15");
} else if (xlevel == 16) {
gotoAndStop ("zlevel16");
} else if (xlevel == 17) {
gotoAndStop ("zlevel17");
} else if (xlevel == 18) {
gotoAndStop ("zlevel18");
} else if (xlevel == 19) {
gotoAndStop ("zlevel19");
} else if (xlevel == 20) {
gotoAndStop ("zlevel20");
} else if (xlevel == 21) {
gotoAndStop ("zlevel21");
} else if (xlevel == 22) {
gotoAndStop ("zlevel22");
} else if (xlevel == 23) {
gotoAndStop ("zlevel23");
} else if (xlevel == 24) {
gotoAndStop ("zlevel24");
} else if (xlevel == 25) {
gotoAndStop ("zlevel25");
} else if (xlevel == 26) {
gotoAndStop ("zlevel26");
} else if (xlevel == 27) {
gotoAndStop ("zlevel27");
} else if (xlevel == 28) {
gotoAndStop ("zlevel28");
} else if (xlevel == 29) {
gotoAndStop ("zlevel29");
} else if (xlevel == 30) {
gotoAndStop ("zlevel30");
} else if (xlevel == 31) {
gotoAndStop ("zlevel31");
} else if (xlevel == 32) {
gotoAndStop ("zlevel32");
} else if (xlevel == 33) {
gotoAndStop ("zlevel33");
} else if (xlevel == 34) {
gotoAndStop ("zlevel34");
} else if (xlevel == 35) {
gotoAndStop ("zlevel35");
} else if (xlevel == 36) {
gotoAndStop ("zlevel36");
} else if (xlevel == 37) {
gotoAndStop ("zlevel37");
} else if (xlevel == 38) {
gotoAndStop ("zlevel38");
} else if (xlevel == 39) {
gotoAndStop ("zlevel39");
} else if (xlevel == 40) {
gotoAndStop ("zlevel40");
} else if (xlevel == 41) {
gotoAndStop ("zlevel41");
} else if (xlevel == 42) {
gotoAndStop ("zlevel42");
} else if (xlevel == 43) {
gotoAndStop ("zlevel43");
} else if (xlevel == 44) {
gotoAndStop ("zlevel44");
} else if (xlevel == 45) {
gotoAndStop ("zlevel45");
} else if (xlevel == 46) {
gotoAndStop ("zlevel46");
} else if (xlevel == 47) {
gotoAndStop ("zlevel47");
} else if (xlevel == 48) {
gotoAndStop ("zlevel48");
} else if (xlevel == 49) {
gotoAndStop ("zlevel49");
} else if (xlevel == 50) {
gotoAndStop ("zlevel50");
} else if (xlevel == 51) {
gotoAndStop ("zlevel51");
} else if (xlevel == 52) {
gotoAndStop ("zlevel52");
} else if (xlevel == 53) {
gotoAndStop ("zlevel53");
} else if (xlevel == 54) {
gotoAndStop ("zlevel54");
} else if (xlevel == 55) {
gotoAndStop ("zlevel55");
} else if (xlevel == 56) {
gotoAndStop ("zlevel56");
} else if (xlevel == 57) {
gotoAndStop ("zlevel57");
} else if (xlevel == 58) {
gotoAndStop ("zlevel58");
} else if (xlevel == 59) {
gotoAndStop ("zlevel59");
} else if (xlevel == 60) {
gotoAndStop ("zlevel60");
} else if (xlevel == 61) {
gotoAndStop ("zlevel61");
} else if (xlevel == 62) {
gotoAndStop ("zlevel62");
} else if (xlevel == 63) {
gotoAndStop ("zlevel63");
} else if (xlevel == 64) {
gotoAndStop ("zlevel64");
} else if (xlevel == 65) {
gotoAndStop ("zlevel65");
} else if (xlevel == 66) {
gotoAndStop ("zlevel66");
} else if (xlevel == 67) {
gotoAndStop ("zlevel67");
} else if (xlevel == 68) {
gotoAndStop ("zlevel68");
} else if (xlevel == 69) {
gotoAndStop ("zlevel69");
} else if (xlevel == 70) {
gotoAndStop ("zlevel70");
} else if (xlevel == 71) {
gotoAndStop ("zlevel71");
} else if (xlevel == 72) {
gotoAndStop ("congratulations");
}
if (xlevel == 71) {
zlevel = "LAST BALL";
} else if (xlevel == 72) {
zlevel = "TROPHY";
} else {
zlevel = "Level " + xlevel;
}
if (xkemana != "gagal") {
backWin();
}
}
function semuaLink() {
myListener = new Object();
myListener.onKeyDown = function () {
if (Key.getCode() == 81) {
if (missx == false) {
delete myListener.onKeyDown;
removeListener(myListener);
clearSemua();
gotoAndStop (551);
}
}
if (Key.getCode() == 82) {
if (missx == false) {
delete myListener.onKeyDown;
removeListener(myListener);
clearSemua();
cekTrans();
}
}
if (Key.getCode() == 77) {
if (volum1 > 0) {
posisix = myMusic.position / 1000;
simpanVolum1 = volum1;
volum1 = 0;
myMusic.setVolume(volum1);
} else {
if (volum1 == 0) {
simpanVolum1 = 75;
}
volum1 = simpanVolum1;
myMusic.setVolume(volum1);
}
}
if (Key.getCode() == 83) {
if (volum2 > 0) {
simpanVolum2 = volum2;
volum2 = 0;
mySound.stop();
mySound.setVolume(volum2);
} else {
if (volum2 == 0) {
simpanVolum2 = 75;
}
volum2 = simpanVolum2;
mySound.stop();
mySound.setVolume(volum2);
}
}
};
Key.addListener(myListener);
}
function cekTrans(indi) {
trans_mc.gotoAndPlay(2);
xkemana = indi;
}
function kemana() {
if (xkemana == "failed") {
gotoAndStop ("failed");
} else if (xkemana == "lanjut") {
gotoAndStop (1305);
} else {
cekLevel();
}
}
stop();
missx = false;
xlevel = 0;
new_btn.onRelease = function () {
klik();
cekLevel();
};
select_btn.onRelease = function () {
klik();
gotoAndStop (554);
};
options_btn.onRelease = function () {
klik();
gotoAndStop (552);
};
credit_btn.onRelease = function () {
klik();
gotoAndStop (553);
};
walk_btn.onRelease = function () {
klik();
gotoAndStop (2080);
};
play_btn.onRelease = function () {
klik();
getURL ("http://www.maxgames.com", "_blank");
};
Instance of Symbol 30 MovieClip in Frame 551
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 552
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();
menu_btn.onRelease = function () {
klik();
gotoAndStop (551);
};
bar1_mc.bar_mc._x = Math.ceil((_root.volum1 / 0.434782608695652) - 115);
bar1_mc.bar_mc.onEnterFrame = function () {
_root.volum1 = int(0.434782608695652 * (this._x + 115));
_root.myMusic.setVolume(_root.volum1);
bar1_mc.persen1 = _root.volum1 + " %";
};
bar1_mc.indi_mc.onPress = function () {
klik();
startDrag (bar1_mc.bar_mc, true, -115, 0, 115, 0);
};
bar1_mc.bar_mc.onRollOver = function () {
klik();
};
bar1_mc.indi_mc.onRelease = (bar1_mc.indi_mc.onReleaseOutside = function () {
klik();
stopDrag();
});
bar2_mc.bar_mc._x = Math.ceil((_root.volum2 / 0.434782608695652) - 115);
bar2_mc.bar_mc.onEnterFrame = function () {
_root.volum2 = int(0.434782608695652 * (this._x + 115));
_root.volum3 = int(0.434782608695652 * (this._x + 115));
_root.mySound.setVolume(_root.volum2);
_root.mySound2.setVolume(_root.volum3);
bar2_mc.persen2 = _root.volum2 + " %";
};
bar2_mc.indi_mc.onPress = function () {
klik();
startDrag (bar2_mc.bar_mc, true, -115, 0, 115, 0);
};
bar2_mc.bar_mc.onRollOver = function () {
klik();
};
bar2_mc.indi_mc.onRelease = (bar2_mc.indi_mc.onReleaseOutside = function () {
klik();
stopDrag();
});
cekSpeedQuality();
Frame 553
stop();
menu_btn.onRelease = function () {
klik();
gotoAndStop (551);
};
Frame 554
function cekLevelAll() {
i = 0;
while (i <= 71) {
_root["level" + i].nomor = i;
_root["level" + i]._alpha = 30;
_root["level" + i].enabled = false;
_root["level" + i].kotak._visible = false;
delete _root["level" + i].onRollOver;
delete _root["level" + i].onRollOut;
delete _root["level" + i].onRelease;
i++;
}
i = 0;
while (i <= keLevel) {
_root["level" + i].nomor = i;
_root["level" + i].kotak._visible = false;
_root["level" + i]._alpha = 100;
_root["level" + i].enabled = true;
_root["level" + i].onRollOver = overLevel;
_root["level" + i].onRollOut = outLevel;
_root["level" + i].onRelease = klikLevel;
i++;
}
if (keLevel > 0) {
clear_btn._alpha = 100;
clear_btn.enabled = true;
} else {
clear_btn._alpha = 30;
clear_btn.enabled = false;
}
}
function overLevel() {
this.kotak._visible = true;
}
function outLevel() {
this.kotak._visible = false;
}
function klikLevel() {
klik();
myStr = new String(this);
if (myStr.length == 14) {
indi = myStr.substr(myStr.length - 1, 1);
} else if (myStr.length == 15) {
indi = myStr.substr(myStr.length - 2, 2);
} else if (myStr.length == 16) {
indi = myStr.substr(myStr.length - 3, 3);
}
xlevel = indi;
cekTrans("gagal");
}
stop();
cekLevelAll();
warn_mc._visible = false;
warn_mc.yes_btn.onRelease = function () {
klik();
keLevel = 0;
simpanData(0);
cekLevelAll();
warn_mc._visible = false;
};
warn_mc.no_btn.onRelease = function () {
klik();
cekLevelAll();
warn_mc._visible = false;
};
clear_btn.onRelease = function () {
klik();
warn_mc._visible = true;
i = 0;
while (i <= 71) {
_root["level" + i].enabled = false;
i++;
}
};
menu_btn.onRelease = function () {
klik();
gotoAndStop (551);
};
Frame 555
stop();
backLose();
missx = true;
if (xlevel >= 1) {
tryNumber++;
if (tryNumber == 1) {
tryKe = tryNumber + " MISS";
} else {
tryKe = tryNumber + " MISSES";
}
} else {
tryKe = "";
}
_root.onMouseDown = function () {
klik();
missx = false;
delete _root.onMouseDown;
cekTrans("gagal");
};
Instance of Symbol 30 MovieClip in Frame 555
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 559
semuaLink();
play();
Instance of Symbol 30 MovieClip in Frame 559
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 560
function enterBall() {
this._y = this._y + this.speed;
if (this._y > 270) {
this._y = 270;
this.speed = -this.speed;
} else if (this._y < 190) {
this._y = 190;
this.speed = -this.speed;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
if (this.hitTest(ball_mc)) {
backKena();
ball_mc._visible = false;
cekWin();
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
ball_mc.speed = 1;
ball_mc.onEnterFrame = enterBall;
initSemua();
Frame 568
semuaLink();
play();
Instance of Symbol 194 MovieClip in Frame 568
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 569
function enterBall() {
this._y = this._y + this.speed;
if (this._y > 350) {
this._y = 350;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
if (this.hitTest(ball_mc)) {
backKena();
ball_mc._visible = false;
cekWin();
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
ball_mc._visible = true;
ball_mc.speed = 3;
ball_mc.onEnterFrame = enterBall;
initSemua();
Frame 578
semuaLink();
play();
Frame 579
function enterBall() {
this._y = this._y + this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 2) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 2;
i = 1;
while (i <= 2) {
_root["ball" + i].visible = true;
if (i == 1) {
_root["ball" + i].speed = 2;
} else if (i == 2) {
_root["ball" + i].speed = -2;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 588
semuaLink();
play();
Frame 589
function enterBall() {
this._x = this._x + this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 100) {
this._x = 100;
this.speed = -this.speed;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
if (this.hitTest(ball_mc)) {
backKena();
ball_mc._visible = false;
cekWin();
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
ball_mc.speed = 6;
ball_mc.onEnterFrame = enterBall;
initSemua();
Frame 598
semuaLink();
play();
Frame 599
function enterBall() {
this._x = this._x + this.speed;
if (this._x > 300) {
this._x = 300;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 2) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 2;
i = 1;
while (i <= 2) {
if (i == 1) {
_root["ball" + i].speed = 2;
} else if (i == 2) {
_root["ball" + i].speed = -2;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 609
semuaLink();
play();
Frame 610
function enterBall() {
if (this.gerak == true) {
this._y = this._y + this.speed;
if (this._y > 380) {
this._y = 380;
this.speed = -this.speed;
} else if (this._y < 80) {
this._y = 80;
this.speed = -this.speed;
}
} else {
this._x = this._x + this.speed;
if (this._x > 430) {
this._x = 430;
this.speed = -this.speed;
} else if (this._x < 70) {
this._x = 70;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 3) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
i = 1;
while (i <= 5) {
delete _root["ball" + i].onEnterFrame;
i++;
}
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 3;
i = 1;
while (i <= 3) {
_root["ball" + i]._visible = true;
if (i == 1) {
_root["ball" + i].speed = 1.5;
} else if (i == 2) {
_root["ball" + i].speed = -1.5;
} else if (i == 3) {
_root["ball" + i].speed = -2;
_root["ball" + i].gerak = true;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 619
semuaLink();
play();
Frame 620
function enterBall() {
this._x = this._x + this.speed;
if (this._x > this.batasX1) {
this._x = this.batasX1;
this.speed = -this.speed;
} else if (this._x < this.batasX2) {
this._x = this.batasX2;
this.speed = -this.speed;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 4) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
i = 1;
while (i <= 4) {
_root["ball" + i]._visible = true;
if (i == 1) {
_root["ball" + i].batasX1 = 400;
_root["ball" + i].batasX2 = 50;
_root["ball" + i].speed = -1;
} else if (i == 2) {
_root["ball" + i].batasX1 = 400;
_root["ball" + i].batasX2 = 50;
_root["ball" + i].speed = 1;
} else if (i == 3) {
_root["ball" + i].batasX1 = 400;
_root["ball" + i].batasX2 = 50;
_root["ball" + i].speed = -1;
} else if (i == 4) {
_root["ball" + i].batasX1 = 400;
_root["ball" + i].batasX2 = 50;
_root["ball" + i].speed = 1;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 629
semuaLink();
play();
Frame 630
function enterBall() {
this._y = this._y + this.speed;
this.speed = this.speed + 0.5;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 0) {
this._y = 0;
this.speed = -this.speed;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
if (this.hitTest(ball_mc)) {
backKena();
ball_mc._visible = false;
cekWin();
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
ball_mc._visible = true;
ball_mc.speed = 18;
ball_mc.onEnterFrame = enterBall;
initSemua();
Frame 639
semuaLink();
play();
Frame 640
function enterBall() {
this._y = this._y + this.speed;
this.speed = this.speed + 0.5;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 0) {
this._y = 0;
this.speed = -this.speed;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 2) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 2;
i = 1;
while (i <= 2) {
if (i == 1) {
_root["ball" + i].speed = -7;
} else if (i == 2) {
_root["ball" + i].speed = 7;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 649
semuaLink();
play();
Frame 650
function enterBall() {
if (this.delay <= 1) {
this._y = this._y + this.speed;
this.speed = this.speed + 0.5;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 150) {
this._y = 150;
this.delay = 30;
this.speed = -this.speed;
}
} else {
this.delay--;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 4) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
i = 1;
while (i <= 4) {
_root["ball" + i].speed = 7;
_root["ball" + i].delay = 1;
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 659
semuaLink();
play();
Frame 660
function enterBall() {
if (this.delay <= 1) {
this._y = this._y + this.speed;
this.speed = this.speed + 0.5;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 150) {
this._y = 150;
this.delay = 40;
this.speed = -this.speed;
}
} else {
this.delay--;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 4) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
i = 1;
while (i <= 4) {
_root["ball" + i].speed = 7;
if ((i == 1) || (i == 3)) {
_root["ball" + i].delay = 1;
} else {
_root["ball" + i].delay = 20;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 669
semuaLink();
play();
Frame 670
function enterBall() {
if (this.tipe == "kubus") {
this._x = this._x + this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 2) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].tipe == "bulet") {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (_root["ball" + i].kena != false) {
backPantul();
if (this.hitTest(_root["ball" + i].kanan)) {
this._rotation = this._rotation - 90;
} else if (this.hitTest(_root["ball" + i].atas)) {
this._rotation = this._rotation + 90;
}
_root["ball" + i].kena = false;
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
i = 1;
while (i <= 2) {
if (i == 1) {
_root["ball" + i].speed = -2;
_root["ball" + i].tipe = "kubus";
} else {
_root["ball" + i].tipe = "bulet";
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 679
semuaLink();
play();
Frame 680
function enterBall() {
if (this.tipe == "kubus") {
this._x = this._x + this.speed;
if (this._x > 350) {
this._x = 350;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
} else if (this.tipe == "bulet") {
this._y = this._y + this.speed;
if (this._y > 250) {
this._y = 250;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 2) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].tipe == "bulet") {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (_root["ball" + i].kena != false) {
backPantul();
if (this.hitTest(_root["ball" + i].kiri)) {
this._rotation = this._rotation + 90;
} else if (this.hitTest(_root["ball" + i].atas)) {
this._rotation = -this._rotation;
}
_root["ball" + i].kena = false;
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
i = 1;
while (i <= 2) {
if (i == 1) {
_root["ball" + i].speed = -2;
_root["ball" + i].tipe = "kubus";
} else {
_root["ball" + i].speed = -2;
_root["ball" + i].tipe = "bulet";
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 689
semuaLink();
play();
Frame 690
function enterBall() {
if (this.tipe == "bulet") {
this._y = this._y + this.speed;
if (this._y > 360) {
this._y = 360;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 4) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].tipe == "bulet") {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
if (this.hitTest(_root["ball" + i].kiri)) {
this._rotation = this._rotation - 180;
}
_root["ball" + i].kena = false;
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if (canon_mc._currentframe == 1) {
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 3;
zpetama = true;
i = 1;
while (i <= 4) {
if (i == 2) {
_root["ball" + i].speed = -4;
_root["ball" + i].tipe = "bulet";
} else if (i == 1) {
_root["ball" + i].tipe = "kubus";
} else if (i == 3) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "bulet";
} else if (i == 4) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 699
semuaLink();
play();
Frame 700
function enterBall() {
if (this.ke == 1) {
this._x = this._x + this.speed;
if (this._x > 360) {
this._x = 360;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._y = this._y + this.speed;
if (this._y > 360) {
this._y = 360;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
} else if (this.ke == 3) {
this._x = this._x + this.speed;
if (this._x > 360) {
this._x = 360;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 3) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].tipe == "bulet") {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (_root["ball" + i].kena != false) {
backPantul();
if (this.hitTest(_root["ball" + i].bawah)) {
this._rotation = -this._rotation;
} else if (this.hitTest(_root["ball" + i].kiri)) {
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
} else if (this.hitTest(_root["ball" + i].atas)) {
this._rotation = -this._rotation;
}
_root["ball" + i].kena = false;
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
i = 1;
while (i <= 3) {
if (i == 2) {
_root["ball" + i].speed = -4;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 1) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 3) {
_root["ball" + i].speed = -5;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 709
semuaLink();
play();
Frame 710
function enterBall() {
if (this.ke == 1) {
this._x = this._x + this.speed;
if (this._x > 360) {
this._x = 360;
this.speed = -this.speed;
} else if (this._x < 100) {
this._x = 100;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._x = this._x + this.speed;
if (this._x > 360) {
this._x = 360;
this.speed = -this.speed;
} else if (this._x < 100) {
this._x = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 3) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].tipe == "bulet") {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (_root["ball" + i].kena != false) {
backPantul();
if (this.hitTest(_root["ball" + i].atas)) {
if (this._rotation < 0) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation - 90;
}
} else if (this.hitTest(_root["ball" + i].bawah)) {
if (this._rotation < 0) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation - 90;
}
}
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 8;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
i = 1;
while (i <= 3) {
if (i == 2) {
_root["ball" + i].speed = -7;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 1) {
_root["ball" + i].speed = 6;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 3) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 719
semuaLink();
play();
Frame 720
function enterBall() {
if (this.ke == 1) {
this._x = this._x + this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._x = this._x + this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
} else if (this.ke == 3) {
this._x = this._x + this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 3) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].tipe == "bulet") {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (_root["ball" + i].kena != false) {
backPantul();
if (this.hitTest(_root["ball" + i].bawah)) {
if (this._rotation < 0) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation - 90;
}
} else if (this.hitTest(_root["ball" + i].atas)) {
if (this._rotation < 0) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation - 90;
}
} else if (this.hitTest(_root["ball" + i].kiri)) {
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
} else if (this.hitTest(_root["ball" + i].kanan)) {
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
}
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 23;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 2;
i = 1;
while (i <= 3) {
if (i == 1) {
_root["ball" + i].speed = -10;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = 6;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 3) {
_root["ball" + i].speed = 6;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 729
semuaLink();
play();
Frame 730
function enterBall() {
if (this.ke == 2) {
this._y = this._y + this.speed;
if (this._y > 380) {
this._y = 380;
this.speed = -this.speed;
} else if (this._y < 180) {
this._y = 180;
this.speed = -this.speed;
}
} else if (this.ke == 3) {
this._y = this._y + this.speed;
if (this._y > 380) {
this._y = 380;
this.speed = -this.speed;
} else if (this._y < 180) {
this._y = 180;
this.speed = -this.speed;
}
} else if (this.ke == 5) {
this._y = this._y + this.speed;
if (this._y > 380) {
this._y = 380;
this.speed = -this.speed;
} else if (this._y < 180) {
this._y = 180;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 5) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 8;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 3;
i = 1;
while (i <= 5) {
if (i == 1) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = 3;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 3) {
_root["ball" + i].speed = 3;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 4) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 5) {
_root["ball" + i].speed = 3;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 739
semuaLink();
play();
Frame 740
function enterBall() {
if (this.ke == 1) {
this._x = this._x + this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 100) {
this._x = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 5) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
this._rotation = this._rotation + 90;
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
i = 1;
while (i <= 5) {
if (i == 1) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 749
semuaLink();
play();
Frame 750
function enterBall() {
if (this.tipe == "bulet") {
this._y = this._y + this.speed;
if (this._y > 310) {
this._y = 310;
this.speed = -this.speed;
} else if (this._y < 160) {
this._y = 160;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 7) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
this._rotation = this._rotation - 90;
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 2;
i = 1;
while (i <= 7) {
if (i == 1) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 759
semuaLink();
play();
Frame 760
function enterBall() {
if (this.tipe == "bulet") {
this._y = this._y + this.speed;
if (this._y > 380) {
this._y = 380;
this.speed = -this.speed;
} else if (this._y < 280) {
this._y = 280;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 9) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
this._rotation = this._rotation + 90;
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
i = 1;
while (i <= 9) {
if (i == 1) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
i++;
}
initSemua();
Frame 769
semuaLink();
play();
Frame 770
function enterBall() {
if (this.tipe == "bulet") {
this._y = this._y + this.speed;
if (this._y > 380) {
this._y = 380;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 9) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
this._rotation = this._rotation + 90;
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
i = 1;
while (i <= 9) {
if (i == 1) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 779
semuaLink();
play();
Frame 780
function enterBall() {
if (this.tipe == "bulet") {
this._y = this._y + this.speed;
if (this._y > 200) {
this._y = 200;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 9) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
this._rotation = this._rotation + 90;
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
i = 1;
while (i <= 9) {
if (i == 1) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 789
semuaLink();
play();
Frame 790
function enterBall() {
if (this.tipe == "bulet") {
this._y = this._y + this.speed;
if (this._y > 350) {
this._y = 350;
this.speed = -this.speed;
} else if (this._y < 150) {
this._y = 150;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 8) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (((_root["ball" + i].ke == 6) || (_root["ball" + i].ke == 7)) || (_root["ball" + i].ke == 8)) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 23;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 2;
i = 1;
while (i <= 8) {
if ((i == 1) || (i == 2)) {
if (i == 1) {
_root["ball" + i].speed = 3;
} else {
_root["ball" + i].speed = -3;
}
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if ((i == 3) || (i == 4)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 799
semuaLink();
play();
Frame 800
function enterBall() {
if (this.tipe == "bulet") {
this._y = this._y + this.speed;
if (this._y > 350) {
this._y = 350;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 10) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
if (this.hitTest(_root["ball" + i].kiri)) {
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
}
i++;
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if (canon_mc._currentframe == 1) {
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 2;
zpetama = true;
i = 1;
while (i <= 10) {
if (i == 1) {
_root["ball" + i].speed = -4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 9) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 10) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 809
semuaLink();
play();
Frame 810
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._y = this._y + this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 70) {
this._y = 70;
this.speed = -this.speed;
}
} else {
this._x = this._x + this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 150) {
this._x = 150;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 9) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
this._rotation = this._rotation + 90;
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 2;
i = 1;
while (i <= 9) {
if (i == 1) {
_root["ball" + i].speed = -4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 5) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 819
semuaLink();
play();
Frame 820
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._x = this._x + this.speed;
this._y = this._y + this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
} else {
this._x = this._x - this.speed;
this._y = this._y + this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 9) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
this._rotation = this._rotation + 90;
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if (tekanCanon == true) {
backTembak();
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc._rotation = this._rotation;
bullet_mc.onEnterFrame = enterBullet;
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 2;
i = 1;
while (i <= 9) {
if (i == 1) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 3) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 829
semuaLink();
play();
Frame 830
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._x = this._x + this.speed;
this._y = this._y + this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
} else {
this._x = this._x - this.speed;
this._y = this._y + this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if (canon_mc._currentframe == 1) {
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
zpetama = true;
i = 1;
while (i <= 12) {
if (i == 1) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if ((i == 2) || (i == 12)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
i++;
}
initSemua();
Frame 839
semuaLink();
play();
Frame 840
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._x = this._x + this.speed;
this._y = this._y + this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
} else {
this._x = this._x - this.speed;
this._y = this._y + this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
zpetama = true;
i = 1;
while (i <= 12) {
if (i <= 4) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 8) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
}
i++;
}
initSemua();
Frame 849
semuaLink();
play();
Frame 850
function enterBall() {
if (this.tipe == "bulet") {
if ((this.ke == 1) || (this.ke == 2)) {
this._x = this._x + this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 20) {
this._x = 20;
this.speed = -this.speed;
}
} else {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
zpetama = true;
i = 1;
while (i <= 12) {
if (i <= 4) {
if (i == 1) {
_root["ball" + i].speed = 5;
} else if (i == 2) {
_root["ball" + i].speed = -5;
} else if (i == 3) {
_root["ball" + i].speed = 3;
} else if (i == 4) {
_root["ball" + i].speed = -3;
}
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 6) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 859
semuaLink();
play();
Frame 860
function enterBall() {
if (this.ke == 1) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 20) {
this._x = 20;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._x = this._x + this.speed;
if (this._x > 150) {
this._x = 150;
this.speed = -this.speed;
} else if (this._x < 20) {
this._x = 20;
this.speed = -this.speed;
}
} else if (this.ke == 4) {
this._x = this._x + this.speed;
if (this._x > 250) {
this._x = 250;
this.speed = -this.speed;
} else if (this._x < 20) {
this._x = 20;
this.speed = -this.speed;
}
} else if ((this.ke == 3) || (this.ke == 5)) {
this._x = this._x + this.speed;
if (this._x > 450) {
this._x = 450;
this.speed = -this.speed;
} else if (this._x < 250) {
this._x = 250;
this.speed = -this.speed;
}
} else {
this._y = this._y - this.speed;
if (this._y > 260) {
this._y = 260;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
if (this.hitTest(_root["ball" + i].kanan)) {
this._rotation = this._rotation - 90;
} else if (this.hitTest(_root["ball" + i].kiri)) {
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
} else if (this.hitTest(_root["ball" + i].bawah)) {
this._rotation = -this._rotation;
} else if (this.hitTest(_root["ball" + i].atas)) {
this._rotation = -this._rotation;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
zpetama = true;
i = 1;
while (i <= 12) {
if (i == 1) {
_root["ball" + i].speed = -3;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = -2;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 3) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 4) {
_root["ball" + i].speed = 5;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 5) {
_root["ball" + i].speed = -3;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 869
semuaLink();
play();
Frame 870
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._x = this._x + this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 15) {
this._x = 15;
this.speed = -this.speed;
}
} else {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 200) {
this._y = 200;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
this._rotation = this._rotation - 180;
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 2;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 12) {
if (i == 1) {
_root["ball" + i].speed = 1;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 3) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 4) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 879
semuaLink();
play();
Frame 880
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._x = this._x + this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 15) {
this._x = 15;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 250) {
this._y = 250;
this.speed = -this.speed;
}
} else if (this.ke == 3) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 200) {
this._y = 200;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
this._rotation = this._rotation - 180;
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 23;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 3;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 12) {
if (i == 1) {
_root["ball" + i].speed = 3;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = -2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 3) {
_root["ball" + i].speed = -2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if ((i == 4) || (i == 5)) {
_root["ball" + i].speed = 3;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 6) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 889
semuaLink();
play();
Frame 890
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 15) {
this._x = 15;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._x = this._x - this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 15) {
this._x = 15;
this.speed = -this.speed;
}
} else if (this.ke == 3) {
this._x = this._x - this.speed;
if (this._x > 450) {
this._x = 450;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
} else if (this.ke == 4) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 12) {
if (i == 1) {
_root["ball" + i].speed = 1;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = -2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 3) {
_root["ball" + i].speed = -2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 4) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if ((i == 5) || (i == 6)) {
_root["ball" + i].speed = 3;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
} else if (i == 10) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 899
semuaLink();
play();
Frame 900
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 15) {
this._x = 15;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 200) {
this._y = 200;
this.speed = -this.speed;
}
} else if (this.ke == 3) {
this._y = this._y - this.speed;
if (this._y > 200) {
this._y = 200;
this.speed = -this.speed;
} else if (this._y < 15) {
this._y = 15;
this.speed = -this.speed;
}
} else if (this.ke == 4) {
this._x = this._x - this.speed;
if (this._x > 450) {
this._x = 450;
this.speed = -this.speed;
} else if (this._x < 300) {
this._x = 300;
this.speed = -this.speed;
}
}
} else if (this.tipe == "dinamit") {
this._x = this._x - this.speed;
if (this._x > 420) {
this._x = 420;
this.speed = -this.speed;
} else if (this._x < 100) {
this._x = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 12) {
if (i == 1) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 3) {
_root["ball" + i].speed = -2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 4) {
_root["ball" + i].speed = -2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if ((((i == 5) || (i == 6)) || (i == 7)) || (i == 8)) {
_root["ball" + i].speed = i - 3;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
} else if (i == 9) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 909
semuaLink();
play();
Frame 910
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 15) {
this._x = 15;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 200) {
this._y = 200;
this.speed = -this.speed;
}
} else if (this.ke == 3) {
this._y = this._y - this.speed;
if (this._y > 200) {
this._y = 200;
this.speed = -this.speed;
} else if (this._y < 15) {
this._y = 15;
this.speed = -this.speed;
}
} else if (this.ke == 4) {
this._x = this._x - this.speed;
if (this._x > 450) {
this._x = 450;
this.speed = -this.speed;
} else if (this._x < 300) {
this._x = 300;
this.speed = -this.speed;
}
}
} else if (this.tipe == "dinamit") {
this._x = this._x - this.speed;
if (this._x > 420) {
this._x = 420;
this.speed = -this.speed;
} else if (this._x < 100) {
this._x = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 21) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 12;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 21) {
if (i <= 12) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 18) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit2";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
}
i++;
}
initSemua();
Frame 919
semuaLink();
play();
Frame 920
function enterBall() {
if (this.tipe == "bulet") {
if ((this.ke == 1) || (this.ke == 3)) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 15) {
this._x = 15;
this.speed = -this.speed;
}
} else if ((this.ke == 2) || (this.ke == 4)) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
} else if (this.tipe == "dinamit") {
this._x = this._x - this.speed;
if (this._x > 420) {
this._x = 420;
this.speed = -this.speed;
} else if (this._x < 100) {
this._x = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 5;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 12) {
if (i <= 5) {
_root["ball" + i].speed = 3;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 7) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit2";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 929
semuaLink();
play();
Frame 930
function enterBall() {
if (this.tipe == "bulet") {
if ((this.ke == 1) || (this.ke == 3)) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
} else if ((this.ke == 2) || (this.ke == 4)) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
} else if (this.tipe == "kubus") {
if ((this.ke == 6) || (this.ke == 7)) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 70) {
this._x = 70;
this.speed = -this.speed;
}
} else if ((this.ke == 8) || (this.ke == 9)) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
} else if (this.tipe == "dinamit") {
this._x = this._x - this.speed;
if (this._x > 420) {
this._x = 420;
this.speed = -this.speed;
} else if (this._x < 100) {
this._x = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
if (this._rotation < 0) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation - 90;
}
} else if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
if (this._rotation < 0) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation - 90;
}
}
z = 1;
while (z <= 3) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 5;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 12) {
if (i <= 5) {
_root["ball" + i].speed = 3;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 9) {
if ((i == 8) || (i == 9)) {
_root["ball" + i].speed = 3;
} else {
_root["ball" + i].speed = -3;
}
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i <= 11) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 939
semuaLink();
play();
Frame 940
function enterBall() {
if (this.tipe == "bulet") {
if ((this.ke == 1) || (this.ke == 3)) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
} else if ((this.ke == 2) || (this.ke == 4)) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
} else if (this.tipe == "kubus") {
if ((this.ke == 6) || (this.ke == 7)) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 70) {
this._x = 70;
this.speed = -this.speed;
}
} else if ((this.ke == 8) || (this.ke == 9)) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
} else if (this.tipe == "dinamit") {
this._x = this._x - this.speed;
if (this._x > 420) {
this._x = 420;
this.speed = -this.speed;
} else if (this._x < 100) {
this._x = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 6;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 12) {
if (i <= 6) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 7) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
} else if (i == 8) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit2";
_root["ball" + i].ke = i;
} else if (i == 9) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit3";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
i++;
}
initSemua();
Frame 949
semuaLink();
play();
Frame 950
function enterBall() {
if (this.tipe == "bulet") {
if ((this.ke == 1) || (this.ke == 3)) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
} else if ((this.ke == 2) || (this.ke == 4)) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
} else if (this.tipe == "kubus") {
if ((this.ke == 6) || (this.ke == 7)) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 70) {
this._x = 70;
this.speed = -this.speed;
}
} else if ((this.ke == 8) || (this.ke == 9)) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
} else if (this.tipe == "dinamit") {
this._x = this._x - this.speed;
if (this._x > 420) {
this._x = 420;
this.speed = -this.speed;
} else if (this._x < 100) {
this._x = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 8;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 3;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 12) {
if (i <= 3) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 4) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit3";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb";
_root["ball" + i].ke = i;
}
i++;
}
initSemua();
Frame 959
semuaLink();
play();
Frame 960
function enterBall() {
if (this.tipe == "bulet") {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
} else if (this.tipe == "kubus") {
if ((this.ke == 6) || (this.ke == 7)) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 70) {
this._x = 70;
this.speed = -this.speed;
}
} else if ((this.ke == 8) || (this.ke == 9)) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
} else if (this.tipe == "dinamit") {
this._x = this._x - this.speed;
if (this._x > 420) {
this._x = 420;
this.speed = -this.speed;
} else if (this._x < 100) {
this._x = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if ((_root["ball" + i]._currentframe == 40) || (_root["ball" + i]._currentframe == 120)) {
backPantul();
if (i == 6) {
zpetama = true;
} else {
zpetama = false;
}
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 3;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 12) {
if (i <= 3) {
_root["ball" + i].speed = 4 - i;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 5) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 969
semuaLink();
play();
Frame 970
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._x = this._x - this.speed;
if (this._x > 270) {
this._x = 270;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 200) {
this._y = 200;
this.speed = -this.speed;
}
} else if (this.ke == 3) {
this._y = this._y - this.speed;
if (this._y > 250) {
this._y = 250;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
} else if (this.ke == 4) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(6);
}
if (_root["ball" + i]._currentframe == 240) {
bcakPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 8;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if (i <= 4) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 8) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i <= 12) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 979
semuaLink();
play();
Frame 980
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._x = this._x - this.speed;
if (this._x > 270) {
this._x = 270;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 200) {
this._y = 200;
this.speed = -this.speed;
}
} else if (this.ke == 3) {
this._y = this._y - this.speed;
if (this._y > 250) {
this._y = 250;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
} else if (this.ke == 4) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 320) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 8;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if (i <= 4) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 8) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i <= 12) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 989
semuaLink();
play();
Frame 990
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 150) {
this._y = 150;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 320) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if (i == 1) {
_root["ball" + i].speed = 1;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 4) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 999
semuaLink();
play();
Frame 1000
function enterBall() {
if (this.tipe == "arrow") {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
} else if (this.tipe == "bulet") {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 120) {
this._y = 120;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 320) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if (i == 1) {
_root["ball" + i].speed = 3;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else {
if (i == 2) {
_root["ball" + i].speed = 2.25;
} else if (i == 3) {
_root["ball" + i].speed = 1.75;
} else if (i == 4) {
_root["ball" + i].speed = 2;
} else if (i == 5) {
_root["ball" + i].speed = 1.5;
}
_root["ball" + i].tipe = "arrow";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1009
semuaLink();
play();
Frame 1010
function enterBall() {
if (this.tipe == "arrow") {
if (this.ke <= 4) {
this._y = this._y - this.speed;
if (this._y > 350) {
this._y = 350;
this.speed = -this.speed;
} else if (this._y < 200) {
this._y = 200;
this.speed = -this.speed;
}
} else {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
} else if (this.tipe == "bulet") {
this._x = this._x - this.speed;
if (this._x > 450) {
this._x = 450;
this.speed = -this.speed;
} else if (this._x < 150) {
this._x = 150;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 320) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if (i == 1) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else {
if (i == 2) {
_root["ball" + i].speed = 2.25;
} else if (i == 3) {
_root["ball" + i].speed = 1.75;
} else if (i == 4) {
_root["ball" + i].speed = 1.25;
} else if (i == 5) {
_root["ball" + i].speed = 1.5;
} else if (i == 6) {
_root["ball" + i].speed = 2;
}
_root["ball" + i].tipe = "arrow";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1019
semuaLink();
play();
Frame 1020
function enterBall() {
if (this.tipe == "arrow") {
if (this.ke <= 3) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 250) {
this._y = 250;
this.speed = -this.speed;
}
} else if (this.ke <= 5) {
this._y = this._y - this.speed;
if (this._y > 350) {
this._y = 350;
this.speed = -this.speed;
} else if (this._y < 150) {
this._y = 150;
this.speed = -this.speed;
}
} else if (this.ke <= 7) {
this._y = this._y - this.speed;
if (this._y > 200) {
this._y = 200;
this.speed = -this.speed;
} else if (this._y < 75) {
this._y = 75;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 320) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if (i == 1) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else {
if (i == 2) {
_root["ball" + i].speed = 2.25;
} else if (i == 3) {
_root["ball" + i].speed = 1.75;
} else if (i == 4) {
_root["ball" + i].speed = 1.25;
} else if (i == 5) {
_root["ball" + i].speed = 1.5;
} else if (i == 6) {
_root["ball" + i].speed = 2;
} else if (i == 7) {
_root["ball" + i].speed = 3;
}
_root["ball" + i].tipe = "arrow";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1029
semuaLink();
play();
Frame 1030
function enterBall() {
if (this.tipe == "arrow") {
if (this.ke <= 3) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 250) {
this._y = 250;
this.speed = -this.speed;
}
} else if (this.ke <= 5) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 150) {
this._y = 150;
this.speed = -this.speed;
}
} else if (this.ke <= 7) {
this._y = this._y - this.speed;
if (this._y > 200) {
this._y = 200;
this.speed = -this.speed;
} else if (this._y < 75) {
this._y = 75;
this.speed = -this.speed;
}
} else if (this.ke <= 9) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
}
} else if (this.tipe == "bulet") {
this._x = this._x - this.speed;
if (this._x > 100) {
this._x = 100;
this.speed = -this.speed;
} else if (this._x < 15) {
this._x = 15;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 320) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if (i == 1) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else {
if (i == 2) {
_root["ball" + i].speed = 2.25;
} else if (i == 3) {
_root["ball" + i].speed = 1.75;
} else if (i == 4) {
_root["ball" + i].speed = 1.25;
} else if (i == 5) {
_root["ball" + i].speed = 1.5;
} else if (i == 6) {
_root["ball" + i].speed = 2;
} else if (i == 7) {
_root["ball" + i].speed = 2.5;
} else if (i == 8) {
_root["ball" + i].speed = 1.75;
} else if (i == 9) {
_root["ball" + i].speed = 1;
}
_root["ball" + i].tipe = "arrow";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1039
semuaLink();
play();
Frame 1040
function enterBall() {
if (this.tipe == "arrow") {
if (this.ke <= 3) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 250) {
this._y = 250;
this.speed = -this.speed;
}
} else if (this.ke <= 5) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 150) {
this._y = 150;
this.speed = -this.speed;
}
} else if (this.ke <= 7) {
this._y = this._y - this.speed;
if (this._y > 200) {
this._y = 200;
this.speed = -this.speed;
} else if (this._y < 75) {
this._y = 75;
this.speed = -this.speed;
}
} else if (this.ke <= 9) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
}
} else if (this.tipe == "arrow2") {
this._rotation = this._rotation - 2;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 320) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i])) {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
if (canon_mc._currentframe == 1) {
this._rotation = this._rotation - 180;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].ke == 10) {
if (_root["ball" + i].kena != false) {
backPantul();
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
g++;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 8;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 5;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if ((i <= 4) || (i == 11)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if ((i <= 8) || (i == 10)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1049
semuaLink();
play();
Frame 1050
function enterBall() {
if (this.tipe == "arrow") {
if (this.ke <= 3) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 250) {
this._y = 250;
this.speed = -this.speed;
}
} else if (this.ke <= 5) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 150) {
this._y = 150;
this.speed = -this.speed;
}
} else if (this.ke <= 7) {
this._y = this._y - this.speed;
if (this._y > 200) {
this._y = 200;
this.speed = -this.speed;
} else if (this._y < 75) {
this._y = 75;
this.speed = -this.speed;
}
} else if (this.ke <= 9) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
}
} else if (this.tipe == "arrow2") {
this._rotation = this._rotation - 3;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 20) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i])) {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
if (canon_mc._currentframe == 1) {
this._rotation = this._rotation - 180;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (((_root["ball" + i].ke == 10) || (_root["ball" + i].ke == 6)) || (_root["ball" + i].ke == 5)) {
if (_root["ball" + i].kena != false) {
backPantul();
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
g++;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y - 25;
bullet_mc.speedPeluru = 8;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 5;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if ((i <= 4) || (i == 11)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if ((i <= 8) || (i == 10)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 12) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1059
semuaLink();
play();
Frame 1060
function enterBall() {
if (this.tipe == "arrow") {
if (this.ke <= 3) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 250) {
this._y = 250;
this.speed = -this.speed;
}
} else if (this.ke <= 5) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 150) {
this._y = 150;
this.speed = -this.speed;
}
} else if (this.ke <= 7) {
this._y = this._y - this.speed;
if (this._y > 200) {
this._y = 200;
this.speed = -this.speed;
} else if (this._y < 75) {
this._y = 75;
this.speed = -this.speed;
}
} else if (this.ke <= 9) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
}
} else if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 20) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i])) {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
if (canon_mc._currentframe == 1) {
this._rotation = this._rotation - 180;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (((_root["ball" + i].ke == 10) || (_root["ball" + i].ke == 6)) || (_root["ball" + i].ke == 5)) {
if (_root["ball" + i].kena != false) {
backPantul();
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
g++;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if (i <= 5) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else {
if (i == 6) {
_root["ball" + i].speed = 2.5;
} else if (i == 7) {
_root["ball" + i].speed = 1;
} else if (i == 8) {
_root["ball" + i].speed = 1.5;
} else if (i == 9) {
_root["ball" + i].speed = 2;
}
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1069
semuaLink();
play();
Frame 1070
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 150) {
this._y = 150;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
backKena();
_root["ball" + i]._visible = false;
bykBall--;
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 320) {
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
this._rotation = this._rotation + 90;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if (i <= 3) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 6) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow";
_root["ball" + i].ke = i;
} else if (i <= 9) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i <= 11) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
} else if (i == 12) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else if (i == 13) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
}
i++;
}
initSemua();
Frame 1079
semuaLink();
play();
Frame 1080
function enterBall() {
if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 20) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 5;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if ((i <= 4) || (i == 15)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if ((i <= 8) || (i == 14)) {
if ((i == 6) || (i == 14)) {
if (i == 6) {
_root["ball" + i].speed = 2;
} else {
_root["ball" + i].speed = 3;
}
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow";
_root["ball" + i].ke = i;
}
} else if ((i <= 10) || (i == 14)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else if (i <= 13) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1089
semuaLink();
play();
Frame 1090
function enterBall() {
if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 20) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 180;
} else {
this._rotation = -this._rotation;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 180;
} else {
this._rotation = -this._rotation;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 8;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 3;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i <= 5) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 10) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb";
_root["ball" + i].ke = i;
} else if (i <= 14) {
if (i == 11) {
_root["ball" + i].speed = 2;
} else if (i == 12) {
_root["ball" + i].speed = 2.5;
} else if (i == 13) {
_root["ball" + i].speed = 1.5;
} else if (i == 14) {
_root["ball" + i].speed = 3;
}
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1099
semuaLink();
play();
Frame 1100
function enterBall() {
if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 23;
this.delay = this.delayAwal;
delete this.onEnterFrame;
}
}
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 20) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 23;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i == 1) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 6) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else if (i == 7) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
} else if (i == 8) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1109
semuaLink();
play();
Frame 1110
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke <= 4) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 150) {
this._x = 150;
this.speed = -this.speed;
}
}
} else if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
this.delay = this.delayAwal;
delete this.onEnterFrame;
}
}
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 20) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 5;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i <= 5) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 6) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
} else if (i == 7) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit3";
_root["ball" + i].ke = i;
} else if (i <= 9) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if (i == 10) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1119
semuaLink();
play();
Frame 1120
function enterBall() {
if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
this.delay = this.delayAwal;
delete this.onEnterFrame;
}
}
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 40) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i == 1) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 5) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if (i <= 7) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
} else if (i <= 9) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow";
_root["ball" + i].ke = i;
} else if (i <= 12) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 13) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb";
_root["ball" + i].ke = i;
} else if (i == 14) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1129
semuaLink();
play();
Frame 1130
function enterBall() {
if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
this.delay = this.delayAwal;
delete this.onEnterFrame;
}
}
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 40) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i == 1) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 4) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if (i <= 7) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1139
semuaLink();
play();
Frame 1140
function enterBall() {
if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
this.delay = this.delayAwal;
delete this.onEnterFrame;
}
}
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 40) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 3;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i <= 4) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 8) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if (i <= 12) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1149
semuaLink();
play();
Frame 1150
function enterBall() {
if (this.tipe == "delayer") {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
} else if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
this.delay = this.delayAwal;
this.onEnterFrame = enterBall;
}
}
function enterBullet() {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
bullet_mc.speed = _root["ball" + i].speed;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 40) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i <= 2) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 6) {
_root["ball" + i].speed = i - 2;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1159
semuaLink();
play();
Frame 1160
function enterBall() {
if (this.tipe == "delayer") {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
} else if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
this.delay = this.delayAwal;
this.onEnterFrame = enterBall;
}
}
function enterBullet() {
if (this.speed != 0) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
this.speed = _root["ball" + i].speed;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 40) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i <= 2) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 6) {
_root["ball" + i].speed = i - 2;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 3.5;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1169
semuaLink();
play();
Frame 1170
function enterBall() {
if (this.ke == 1) {
this._x = this._x + this.speed;
if (this._x > 430) {
this._x = 430;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._x = this._x + this.speed;
if (this._x > 150) {
this._x = 150;
this.speed = -this.speed;
} else if (this._x < 20) {
this._x = 20;
this.speed = -this.speed;
}
} else if (this.ke == 4) {
this._x = this._x + this.speed;
if (this._x > 250) {
this._x = 250;
this.speed = -this.speed;
} else if (this._x < 20) {
this._x = 20;
this.speed = -this.speed;
}
} else if ((this.ke == 3) || (this.ke == 5)) {
this._x = this._x + this.speed;
if (this._x > 450) {
this._x = 450;
this.speed = -this.speed;
} else if (this._x < 250) {
this._x = 250;
this.speed = -this.speed;
}
} else if (this.ke == 8) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 20) {
this._x = 20;
this.speed = -this.speed;
}
} else if (this.ke != 9) {
this._y = this._y - this.speed;
if (this._y > 260) {
this._y = 260;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 12) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (_root["ball" + i].ke == 9) {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
zpetama = false;
backPantul();
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
if (this.hitTest(_root["ball" + i].kanan)) {
if (this._rotation < 0) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation - 90;
}
} else if (this.hitTest(_root["ball" + i].kiri)) {
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
} else if (this.hitTest(_root["ball" + i].bawah)) {
this._rotation = -this._rotation;
} else if (this.hitTest(_root["ball" + i].atas)) {
this._rotation = -this._rotation;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 2;
zpetama = true;
i = 1;
while (i <= 12) {
if ((i == 1) || (i == 8)) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 2) {
_root["ball" + i].speed = -2;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 3) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 4) {
_root["ball" + i].speed = 5;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 5) {
_root["ball" + i].speed = -3;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i == 9) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1179
semuaLink();
play();
Frame 1180
function enterBall() {
if (this.ke == 1) {
this._x = this._x + this.speed;
if (this._x > 430) {
this._x = 430;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._x = this._x + this.speed;
if (this._x > 150) {
this._x = 150;
this.speed = -this.speed;
} else if (this._x < 20) {
this._x = 20;
this.speed = -this.speed;
}
} else if (this.ke == 4) {
this._x = this._x + this.speed;
if (this._x > 250) {
this._x = 250;
this.speed = -this.speed;
} else if (this._x < 20) {
this._x = 20;
this.speed = -this.speed;
}
} else if ((this.ke == 3) || (this.ke == 5)) {
this._x = this._x + this.speed;
if (this._x > 450) {
this._x = 450;
this.speed = -this.speed;
} else if (this._x < 250) {
this._x = 250;
this.speed = -this.speed;
}
} else if (this.ke == 8) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 20) {
this._x = 20;
this.speed = -this.speed;
}
} else if (this.ke != 9) {
this._y = this._y - this.speed;
if (this._y > 260) {
this._y = 260;
this.speed = -this.speed;
} else if (this._y < 100) {
this._y = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 11) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
z = 1;
while (z <= 16) {
_root["ball" + z].kena = true;
z++;
}
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
zpetama = true;
i = 1;
while (i <= 16) {
if (i <= 4) {
_root["ball" + i].speed = 3;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 11) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else if (i <= 16) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
i++;
}
initSemua();
Frame 1189
semuaLink();
play();
Frame 1190
function enterBall() {
if (this.tipe == "bulet") {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
} else if (this.tipe == "kubus") {
if ((this.ke == 6) || (this.ke == 7)) {
this._x = this._x + this.speed;
if (this._x > 200) {
this._x = 200;
this.speed = -this.speed;
} else if (this._x < 70) {
this._x = 70;
this.speed = -this.speed;
}
} else if ((this.ke == 8) || (this.ke == 9)) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
} else if (this.tipe == "dinamit") {
this._x = this._x - this.speed;
if (this._x > 420) {
this._x = 420;
this.speed = -this.speed;
} else if (this._x < 100) {
this._x = 100;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 35) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if ((_root["ball" + i]._currentframe == 40) || (_root["ball" + i]._currentframe == 120)) {
backPantul();
if (i == 6) {
zpetama = true;
} else {
zpetama = false;
}
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((_root["ball" + i].ke == 31) || (_root["ball" + i].ke == 33)) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 18;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 35) {
if (i <= 18) {
_root["ball" + i].speed = 4 - i;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if ((((i == 19) || (i == 22)) || (i == 25)) || (i == 28)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
} else if ((((i == 20) || (i == 23)) || (i == 26)) || (i == 29)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit2";
_root["ball" + i].ke = i;
} else if ((((i == 21) || (i == 24)) || (i == 27)) || (i == 30)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit3";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1199
semuaLink();
play();
Frame 1200
function enterBall() {
if (this.tipe == "bulet") {
if (this.ke == 1) {
this._x = this._x - this.speed;
if (this._x > 270) {
this._x = 270;
this.speed = -this.speed;
} else if (this._x < 50) {
this._x = 50;
this.speed = -this.speed;
}
} else if (this.ke == 2) {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 200) {
this._y = 200;
this.speed = -this.speed;
}
} else if (this.ke == 3) {
this._y = this._y - this.speed;
if (this._y > 250) {
this._y = 250;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
} else if (this.ke == 4) {
this._x = this._x - this.speed;
if (this._x > 400) {
this._x = 400;
this.speed = -this.speed;
} else if (this._x < 200) {
this._x = 200;
this.speed = -this.speed;
}
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 24) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 24) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 400) {
backPantul();
zpetama = true;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 24) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i])) {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == true) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation - 90;
}
z = 1;
while (z <= 24) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if ((((_root["ball" + i].ke == 6) || (_root["ball" + i].ke == 8)) || (_root["ball" + i].ke == 20)) || (_root["ball" + i].ke == 22)) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 24) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 24) {
if (i <= 4) {
_root["ball" + i].speed = 4;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 8) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i <= 12) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb";
_root["ball" + i].ke = i;
} else if (i <= 16) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1209
semuaLink();
play();
Frame 1210
function enterBall() {
if (this.tipe == "arrow") {
this._y = this._y - this.speed;
if (this._y > 400) {
this._y = 400;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
}
function initSemua() {
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 16) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 320) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
if (this.hitTest(_root["ball" + i].indi)) {
if (_root["ball" + i].kena != false) {
backPantul();
if (zpetama == false) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 12) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 16) {
if ((i == 1) || (i >= 10)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else {
if (i == 2) {
_root["ball" + i].speed = 2.25;
} else if (i == 3) {
_root["ball" + i].speed = 1.75;
} else if (i == 4) {
_root["ball" + i].speed = 1.25;
} else if (i == 5) {
_root["ball" + i].speed = 1.5;
} else if (i == 6) {
_root["ball" + i].speed = 2;
} else if (i == 7) {
_root["ball" + i].speed = 2.5;
} else if (i == 8) {
_root["ball" + i].speed = 1.75;
} else if (i == 9) {
_root["ball" + i].speed = 1;
}
_root["ball" + i].tipe = "arrow";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1219
semuaLink();
play();
Frame 1220
function enterBall() {
if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
this.delay = this.delayAwal;
delete this.onEnterFrame;
}
}
function enterBullet() {
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 40) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 4;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i <= 4) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 8) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if (i <= 12) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1229
semuaLink();
play();
Frame 1230
function enterBall() {
if (this.tipe == "delayer") {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
} else if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
this.delay = this.delayAwal;
this.onEnterFrame = enterBall;
}
}
function enterBullet() {
if (this.speed != 0) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
this.speed = _root["ball" + i].speed;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 40) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i <= 2) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 8) {
_root["ball" + i].speed = i - 2;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 3.5;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1239
semuaLink();
play();
Frame 1240
function enterBall() {
if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
this.delay = this.delayAwal;
this.onEnterFrame = enterBall;
}
}
function enterBullet() {
if (this.speed != 0) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
this.speed = _root["ball" + i].speed;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 40) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i <= 1) {
_root["ball" + i].speed = 2;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i <= 5) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else {
_root["ball" + i].speed = 3.5;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1249
semuaLink();
play();
Frame 1250
function enterBall() {
if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
this.delay = this.delayAwal;
this.onEnterFrame = enterBall;
}
}
function enterBullet() {
if (this.speed != 0) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
this.speed = _root["ball" + i].speed;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 20) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if (_root["ball" + i].ke == 8) {
if (zpetama == true) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation - 90;
}
} else if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 180;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 6;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i <= 6) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 7) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else if (i <= 11) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i <= 8) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if ((i == 12) || (i == 14)) {
if (i == 13) {
_root["ball" + i].speed = 3;
} else {
_root["ball" + i].speed = 4;
}
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
} else if ((i == 13) || (i == 20)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
} else if ((i == 15) || (i == 21)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if (i == 16) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
} else if (i == 16) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
} else if (i == 17) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit2";
_root["ball" + i].ke = i;
} else if (i == 18) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
} else if (i == 19) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit3";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1259
semuaLink();
play();
Frame 1260
function enterBall() {
if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
this.delay = this.delayAwal;
this.onEnterFrame = enterBall;
}
}
function enterBullet() {
if (this.speed != 0) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
this.speed = _root["ball" + i].speed;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 100) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 7;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if ((i <= 6) || (i == 22)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 7) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else if (i <= 11) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i <= 8) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if ((i == 12) || (i == 14)) {
if (i == 13) {
_root["ball" + i].speed = 3;
} else {
_root["ball" + i].speed = 4;
}
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
} else if ((i == 13) || (i == 20)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow";
_root["ball" + i].ke = i;
} else if ((i == 15) || (i == 21)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if (i == 16) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
} else if (i == 16) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
} else if (i == 17) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit2";
_root["ball" + i].ke = i;
} else if (i == 18) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
} else if (i == 19) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit3";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1269
semuaLink();
play();
Frame 1270
function enterBall() {
if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
this.delay = this.delayAwal;
this.onEnterFrame = enterBall;
}
}
function enterBullet() {
if (this.speed != 0) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
this.speed = _root["ball" + i].speed;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 40) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans();
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i <= 6) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 7) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else if (i <= 11) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i <= 8) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if ((i == 12) || (i == 14)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
} else if ((i == 13) || (i == 20)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
} else if ((i == 15) || (i == 21)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if (i == 16) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
} else if (i == 16) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
} else if (i == 17) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit2";
_root["ball" + i].ke = i;
} else if (i == 18) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
} else if (i == 19) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit3";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1279
semuaLink();
play();
Frame 1280
function enterBall() {
if (this.tipe == "arrow2") {
this._rotation = this._rotation - this.speed;
}
}
function initSemua() {
function enterDelayer() {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
this.delay--;
if (this.delay <= 0) {
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
this.delay = this.delayAwal;
this.onEnterFrame = enterBall;
}
}
function enterBullet() {
if (this.speed != 0) {
this._y = this._y - this.speed;
if (this._y > 300) {
this._y = 300;
this.speed = -this.speed;
} else if (this._y < 50) {
this._y = 50;
this.speed = -this.speed;
}
}
this._x = this._x + (this.speedPeluru * Math.cos((-this._rotation) * 0.017453));
this._y = this._y - (this.speedPeluru * Math.sin((-this._rotation) * 0.017453));
i = 1;
while (i <= 27) {
if (_root["ball" + i].tipe == "bulet") {
if (this.hitTest(_root["ball" + i])) {
if (this.hitTest(_root["ball" + i].indix)) {
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "delayer") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this.speedPeluru = 0;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
this.speed = _root["ball" + i].speed;
_root["ball" + i].onEnterFrame = enterDelayer;
}
}
} else if (_root["ball" + i].tipe == "arrow") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "arrow2") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].indi)) {
backPanah();
zpetama = false;
this._x = _root["ball" + i]._x;
this._y = _root["ball" + i]._y;
this._rotation = _root["ball" + i]._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb") {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
zpetama = false;
this._rotation = this._rotation - 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
} else if (_root["ball" + i].tipe == "bomb2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._currentframe == 1) {
backHalang();
_root["ball" + i].gotoAndPlay(2);
}
if (_root["ball" + i]._currentframe == 40) {
backPantul();
zpetama = false;
this._rotation = this._rotation - 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (_root["ball" + i].tipe == "kubus") {
g = 1;
while (g <= 5) {
if (this.hitTest(_root["ball" + i]["indi" + g])) {
if (_root["ball" + i].kena != false) {
backPantul();
if ((((this._rotation == 0) || (this._rotation == 180)) || (this._rotation == 90)) || (this._rotation == 360)) {
this._rotation = this._rotation + 90;
} else {
this._rotation = this._rotation + 180;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
} else if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i].kena != false) {
if (this.hitTest(_root["ball" + i].bawah)) {
backPantul();
zpetama = false;
this._rotation = this._rotation + 180;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kiri)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].atas)) {
backPantul();
zpetama = false;
this._rotation = -this._rotation;
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
} else if (this.hitTest(_root["ball" + i].kanan)) {
backPantul();
zpetama = false;
if (this._rotation < 0) {
this._rotation = this._rotation - 90;
} else {
this._rotation = this._rotation + 90;
}
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
_root["ball" + i].kena = false;
}
}
}
g++;
}
} else if (_root["ball" + i].tipe == "gate") {
if (this.hitTest(_root["ball" + i].gate)) {
cekLose();
}
} else if (_root["ball" + i].tipe == "dinamit") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit2") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
} else if (_root["ball" + i].tipe == "dinamit3") {
if (this.hitTest(_root["ball" + i])) {
if (_root["ball" + i]._visible == true) {
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc2._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc2._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc2.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
ambilLedak = 1;
j = 1;
while (j <= bykBall2) {
if (j != i) {
_root["ball" + j].range = 10000;
if (_root["ball" + j]._visible == true) {
_root["ball" + j].range = Math.sqrt(Math.pow(_root["ball" + i]._x - _root["ball" + j]._x, 2) + Math.pow(_root["ball" + i]._y - _root["ball" + j]._y, 2));
}
}
j++;
}
w = 1;
while (w <= bykBall2) {
wi = 1;
while (wi <= bykBall2) {
if ((w != i) && (wi != i)) {
if (_root["ball" + ambilLedak].range > _root["ball" + wi].range) {
ambilLedak = w;
}
}
wi++;
}
w++;
}
_root.ledak_mc3._x = _root["ball" + ambilLedak]._x;
_root.ledak_mc3._y = _root["ball" + ambilLedak]._y;
_root.ledak_mc3.gotoAndPlay(2);
_root["ball" + ambilLedak]._visible = false;
_root["ball" + i]._visible = false;
bykBall--;
backKena();
if (bykBall <= 0) {
cekWin();
}
}
}
}
i++;
}
if ((((this._x > 600) || (this._x < -100)) || (this._y > 500)) || (this._y < -100)) {
cekLose();
}
if (this.hitTest(canon_mc)) {
if (zpetama == false) {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
zpetama = true;
tekanCanon = true;
bullet_mc._visible = false;
bullet_mc.speedPeluru = 0;
canon_mc.gotoAndPlay(canon_mc._currentframe + 1);
z = 1;
while (z <= 27) {
_root["ball" + z].kena = true;
z++;
}
}
}
}
}
function cekWin() {
clearSemua();
xlevel++;
cekTrans("lanjut");
}
function cekLose() {
clearSemua();
cekTrans("failed");
}
tekanCanon = true;
bullet_mc._visible = false;
canon_mc.onPress = function () {
if ((((canon_mc._currentframe == 1) || (canon_mc._currentframe == 10)) || (canon_mc._currentframe == 20)) || (canon_mc._currentframe == 30)) {
if (tekanCanon == true) {
backTembak();
zpetama = true;
tekanCanon = false;
bullet_mc._visible = true;
bullet_mc._x = this._x;
bullet_mc._y = this._y;
bullet_mc.speedPeluru = 15;
bullet_mc.speed = 0;
if (this._currentframe == 1) {
bullet_mc._rotation = this._rotation;
} else if (this._currentframe == 10) {
bullet_mc._rotation = this._rotation - 90;
} else if (this._currentframe == 20) {
bullet_mc._rotation = this._rotation - 180;
} else if (this._currentframe == 30) {
bullet_mc._rotation = this._rotation - 270;
}
bullet_mc.onEnterFrame = enterBullet;
}
}
};
}
function clearSemua() {
delete bullet_mc.onEnterFrame;
}
stop();
bykBall = 1;
bykBall2 = bykBall;
zpetama = true;
i = 1;
while (i <= 27) {
if (i <= 6) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bulet";
_root["ball" + i].ke = i;
} else if (i == 7) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "gate";
_root["ball" + i].ke = i;
} else if (i <= 11) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "kubus";
_root["ball" + i].ke = i;
} else if (i <= 8) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if ((i == 12) || (i == 14)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
} else if ((i == 13) || (i == 20)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "arrow2";
_root["ball" + i].ke = i;
} else if ((i == 15) || (i == 21)) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "delayer";
_root["ball" + i].delayAwal = 100;
_root["ball" + i].delay = _root["ball" + i].delayAwal;
_root["ball" + i].ke = i;
} else if (i == 16) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
} else if (i == 16) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "bomb2";
_root["ball" + i].ke = i;
} else if (i == 17) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit2";
_root["ball" + i].ke = i;
} else if (i == 18) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit";
_root["ball" + i].ke = i;
} else if (i == 19) {
_root["ball" + i].speed = 0;
_root["ball" + i].tipe = "dinamit3";
_root["ball" + i].ke = i;
}
_root["ball" + i].onEnterFrame = enterBall;
i++;
}
initSemua();
Frame 1305
play();
klik();
Instance of Symbol 30 MovieClip in Frame 1305
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Frame 1484
stop();
backMusic();
gotoAndStop (551);
Frame 2080
function cekLevelAll() {
i = 0;
while (i <= 71) {
_root["level" + i].nomor = i;
_root["level" + i].kotak._visible = false;
_root["level" + i]._alpha = 100;
_root["level" + i].enabled = true;
_root["level" + i].onRollOver = overLevel;
_root["level" + i].onRollOut = outLevel;
_root["level" + i].onRelease = klikLevel;
i++;
}
if (keLevel > 0) {
clear_btn._alpha = 100;
clear_btn.enabled = true;
} else {
clear_btn._alpha = 30;
clear_btn.enabled = false;
}
tips = "";
}
function overLevel() {
this.kotak._visible = true;
}
function outLevel() {
this.kotak._visible = false;
}
function klikLevel() {
klik();
myStr = new String(this);
if (myStr.length == 14) {
indi = myStr.substr(myStr.length - 1, 1);
} else if (myStr.length == 15) {
indi = myStr.substr(myStr.length - 2, 2);
} else if (myStr.length == 16) {
indi = myStr.substr(myStr.length - 3, 3);
}
tips = (("Level " + indi) + " : \n") + tipsKe[indi];
}
stop();
tipsKe = new Array("", "Very Easy", "Easy", "Wait a momment till 2 ball same line with cannon.", "Easy", "Wait a momment till 3 ball same line with cannon.", "Wait a momment till 4 ball same line with cannon.", "Ok", "Shoot the left ball at first time shoot.", "Ok", "Shoot quickly the right ball when it move to up.", "Shoot to the rectange.", "Wait a momment till the rectangle come near the cannon at second time.", "Shoot the right ball first.", "Equalize the ball and the lower rectangle before you take a shoot, take 13-15 seconds.", "Shoot quickly when the lower rectangle come near the cannon at first time.", " Shoot the lower ball when it come near the cannon at first time.", "Shoot at 2-3 seconds.", "Shoot at 5-7 seconds.", "Shoot at 2-4 seconds.", "Shoot at 4 seconds.", "Wait a momment till the gate is open.", "Wait a momment till the gate is open.", "Wait a momment till the gate is open.", "Shoot after the gate 3 times move, take 19-21 seconds.", "Shoot at 10-12 seconds.", "Wait a momment till the gate is open.", "Easy", "Easy", "Wait a momment till the gate is open.", "Shoot at 10 seconds, 21 seconds, 27 seconds and 31 seconds.", "Shoot when the moving ball near the dynamite.", "Shoot when the upper ball near the dynamite.", "Shoot at 20-22 seconds, after it shoot when the upper ball near the dynamite.", "Wait a momment till the gate is long open and shoot all dynamite.", "Easy. Wait a momment till the gate is open.", "Shoot when the 4 moving balls near the dynamite.", "Shoot at 6 seconds.", "Extremely Easy", "Easy", "Shoot whatever the time.", "Quickly clicking your cannon.", "Shoot at 3 seconds and quickly clicking your cannon after it.", "Shoot when the ball near the lower arrow.", "Shoot an arrow number 2 from left.", "Shoot at 9-11 seconds.", "Shoot at 3-5 seconds.", "Shoot at 11-13 seconds, shoot left ball.", "Shoot the ball when the arrow show to down and hit your cannon.", "Shoot at 1 seconds to upper rectangle.", "Shoot at 3 seconds, 8 seconds, 12 seconds, 14 seconds and 27.5 seconds. ", "Wait a momment till the gate is open.", "Shoot when the red arrow show the directions to upper black arrow.", "Shoot 3 blocker wall first, than shoot 3 ball by bouncing to upper or lower rectangle.", "Shoot at 6-7 seconds.", "Shoot when the red arrow show the directions to left at the second time.", "Shoot at 1-2 seconds and 12-13 seconds.", "Many ways to go to rome, choose which one way.", "Shoot at 0-1 seconds and 7-9 seconds.", "Shoot right delayer mechine.", "Shoot an arrow when it directions to the ball.", "I'm sorry, there is no more hint here, use all your intuitions to clear the ball.", "Wait a momment till the gate is open.", "Shoot..", "Good Timing..", "Shoot at zero seconds.", "Use your intuitions..", "Shoot delayer mechine number 3 from right.", "Shoot when an arrow show the directions to the ball.", "Shoot at 0-1 seconds at first time, and shoot to directions to timer wall at second time.", "Shoot your cannon to change the directions, shoot again your cannon to change the directions, shoot the red arrow and bounce the ball to left diagonal rectangle, shoot your cannon to change the directions and shoot to the right ball.");
cekLevelAll();
menu_btn.onRelease = function () {
klik();
gotoAndStop (551);
};
Symbol 36 MovieClip Frame 1
_root.backMesin();
Symbol 36 MovieClip Frame 50
_root.backMesin();
Symbol 36 MovieClip Frame 100
_root.backMesin();
Symbol 36 MovieClip Frame 150
_root.backMesin();
Symbol 36 MovieClip Frame 200
_root.backMesin();
Symbol 36 MovieClip Frame 230
_root.backMesin();
Symbol 59 MovieClip Frame 1
stop();
Symbol 59 MovieClip Frame 3
_root.backMuncul();
Symbol 59 MovieClip Frame 11
stop();
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 15
_root.kemana();
Symbol 62 MovieClip Frame 30
gotoAndStop (1);
Symbol 62 MovieClip Frame 40
stop();
Symbol 66 Button
on (release) {
getURL ("http://www.maxgames.com", "_blank");
}
Symbol 69 MovieClip Frame 60
stop();
Symbol 82 MovieClip Frame 14
stop();
Symbol 83 MovieClip Frame 364
stop();
Symbol 92 MovieClip Frame 185
stop();
Symbol 94 MovieClip Frame 11
gotoAndPlay(random(30) + 11);
Symbol 96 MovieClip Frame 11
gotoAndPlay(random(30) + 11);
Symbol 100 MovieClip Frame 10
gotoAndPlay(random(30) + 10);
Symbol 102 MovieClip Frame 10
gotoAndPlay(random(30) + 10);
Symbol 104 MovieClip Frame 10
gotoAndPlay(random(30) + 10);
Symbol 106 MovieClip Frame 10
gotoAndPlay(random(30) + 10);
Symbol 108 MovieClip Frame 10
gotoAndPlay(random(30) + 10);
Symbol 109 MovieClip Frame 15
stop();
Symbol 111 MovieClip Frame 1
play();
Symbol 149 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 10
stop();
Symbol 203 MovieClip Frame 20
stop();
Symbol 203 MovieClip Frame 30
stop();
Symbol 217 MovieClip Frame 245
gotoAndPlay (110);
Symbol 219 MovieClip Frame 1
_root.backMesin();
Symbol 219 MovieClip Frame 150
_root.backMesin();
Symbol 220 MovieClip Frame 1
_root.backMesin();
Symbol 220 MovieClip Frame 150
_root.backMesin();
Symbol 221 MovieClip Frame 1
this.count = 1;
_root.backMesin();
Symbol 221 MovieClip Frame 100
this.count++;
if (this.count > 3) {
gotoAndPlay (150);
this.count = 1;
}
Symbol 221 MovieClip Frame 150
_root.backMesin();
Symbol 221 MovieClip Frame 230
gotoAndPlay (2);
Symbol 239 MovieClip Frame 1
_root.backMesin();
Symbol 239 MovieClip Frame 64
_root.backMesin();
Symbol 239 MovieClip Frame 100
_root.backMesin();
Symbol 239 MovieClip Frame 150
_root.backMesin();
Symbol 239 MovieClip Frame 214
_root.backMesin();
Symbol 245 MovieClip Frame 1
stop();
Symbol 245 MovieClip Frame 10
stop();
Symbol 245 MovieClip Frame 20
stop();
Symbol 245 MovieClip Frame 30
stop();
Symbol 251 MovieClip Frame 1
_root.backMuncul();
Symbol 251 MovieClip Frame 11
stop();
Symbol 252 MovieClip Frame 1
stop();
Symbol 252 MovieClip Frame 40
stop();
Symbol 258 MovieClip Frame 1
stop();
Symbol 258 MovieClip Frame 40
stop();
Symbol 259 MovieClip Frame 1
stop();
Symbol 259 MovieClip Frame 120
stop();
Symbol 261 MovieClip Frame 1
stop();
Symbol 261 MovieClip Frame 240
stop();
Symbol 264 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 320
stop();
Symbol 277 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 20
stop();
Symbol 287 MovieClip Frame 1
stop();
Symbol 287 MovieClip Frame 10
stop();
Symbol 287 MovieClip Frame 20
stop();
Symbol 287 MovieClip Frame 30
stop();
Symbol 292 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 120
stop();
Symbol 293 MovieClip Frame 1
stop();
Symbol 293 MovieClip Frame 400
stop();
Symbol 296 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 100
stop();