Frame 1
function openLink(obj, item) {
}
stop();
sound = true;
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
my_cm.customItems.push(new ContextMenuItem("Play more games by BOX10", openLink, true));
this.menu = my_cm;
_global.ipb_get_gname = function () {
var _local3 = _root._url;
var _loc5 = "";
var _local2 = "";
var _loc6 = (_local3.lastIndexOf("\\") + 1);
if ((_loc6 == -1) || (_loc6 == 0)) {
_loc6 = _local3.lastIndexOf("/") + 1;
}
var _local1 = _loc6;
var _loc7 = String(_local3).length;
while (_local1 < String(_local3).length) {
_local2 = _local3.charAt(_local1);
if (_local2 == ".") {
break;
}
_loc5 = _loc5 + _local2;
_local1++;
}
return(_loc5);
};
ipb_gname = _global.ipb_get_gname();
xx = new LoadVars();
xx.onLoad = function (success) {
if (success) {
_global.ipb_scoreVar = this.scoreVar;
}
};
fname = ((("arcade/gamedata/" + ipb_gname) + "/") + ipb_gname) + ".txt";
xx.load(fname);
Frame 7
function isLock() {
var _local2 = _root._url.split("/")[2].split(".");
_local2[_local2.length - 1];
_local2[_local2.length - 2];
return(false);
gotoAndStop ("siteLock");
return(true);
}
stop();
Mouse.show();
isLock();
Frame 13
function fireWeapon() {
ammo++;
if (ammo > 30) {
ammo = 0;
}
var _local1 = "bullet" + ammo;
duplicateMovieClip (game.bullet, _local1, game.getNextHighestDepth());
game[_local1]._x = game.char.wepx;
game[_local1]._y = game.char.wepy;
game[_local1].tipe = 1;
if (game.char._xscale > 0) {
game[_local1]._rotation = game.char.body.arm._rotation;
} else {
game[_local1]._rotation = 180 - game.char.body.arm._rotation;
}
game[_local1].speedx = (game.char._xscale / 2) * Math.cos(game.char.body.arm._rotation * (Math.PI/180));
game[_local1].speedy = 50 * Math.sin(game.char.body.arm._rotation * (Math.PI/180));
game[_local1].go = true;
wepSound1.start();
}
function fireWeapon2() {
ammo++;
if (ammo > 30) {
ammo = 0;
}
var _local1 = "bullet" + ammo;
duplicateMovieClip (game.fireball, _local1, game.getNextHighestDepth());
game[_local1]._x = game.char.wepx;
game[_local1]._y = game.char.wepy;
game[_local1].tipe = 2;
game[_local1]._rotation = (game.char.body.arm._rotation * game.char._xscale) / game.char.ukuran;
game[_local1].speedx = (game.char._xscale / 10) * Math.cos(game.char.body.arm._rotation * (Math.PI/180));
game[_local1].speedy = 10 * Math.sin(game.char.body.arm._rotation * (Math.PI/180));
game[_local1].go = true;
if (timer < 0) {
wepSound2.start();
timer = 2;
}
timer--;
}
function fireWeapon3() {
i = 0;
while (i < 4) {
ammo++;
if (ammo > 30) {
ammo = 0;
}
var _local2 = "bullet" + ammo;
duplicateMovieClip (game.revball, _local2, game.getNextHighestDepth());
game[_local2]._x = game.char.wepx;
game[_local2]._y = game.char.wepy;
game[_local2].rotation = (game.char.body.arm._rotation + 10) - random(20);
game[_local2].speedx = (game.char._xscale / 2) * Math.cos(game[_local2].rotation * (Math.PI/180));
game[_local2].speedy = 50 * Math.sin(game[_local2].rotation * (Math.PI/180));
game[_local2].go = true;
game[_local2].tipe = 3;
i++;
}
i = 0;
while (i < 5) {
ammo++;
if (ammo > 30) {
ammo = 0;
}
var _local2 = "bullet" + ammo;
duplicateMovieClip (_root.game.ground.revballpart, _local2, _root.game.ground.getNextHighestDepth());
_root.game.ground[_local2]._x = game.char.wepx - _root.game.ground._x;
_root.game.ground[_local2]._y = game.char.wepy - _root.game.ground._y;
_root.game.ground[_local2].grav = 0;
i++;
}
wepSound3.start();
}
function fireWeapon4() {
var _local1 = "bullet" + game.getNextHighestDepth();
duplicateMovieClip (game.laser, _local1, game.getNextHighestDepth());
game[_local1]._x = game.char.wepx;
game[_local1]._y = game.char.wepy;
game[_local1]._rotation = game.char.body.arm._rotation * (game.char._xscale / game.char.ukuran);
game[_local1].speedx = (game.char._xscale * 0.4) * Math.cos(game.char.body.arm._rotation * (Math.PI/180));
game[_local1].speedy = 40 * Math.sin(game.char.body.arm._rotation * (Math.PI/180));
game[_local1].go = true;
game[_local1].tipe = 4;
wepSound4.start();
}
stop();
Mouse.hide();
var pause = false;
var score = 0;
var fire = false;
var ammo = 0;
var totalwep = 1;
var specialAmmo = 200;
var timer = 0;
var execBoss = false;
var bossDead = false;
var wepSound1;
var wepSound2;
var wepSound3;
var wepSound4;
var stompSound;
var explodeSound;
var deadSound;
var siren;
var pickItem;
var wepSound1 = new Sound();
var wepSound2 = new Sound();
var wepSound3 = new Sound();
var wepSound4 = new Sound();
var stompSound = new Sound();
var deadSound = new Sound();
var explodeSound = new Sound();
var siren = new Sound();
var pickItem = new Sound();
wepSound1.attachSound("wepSound1");
wepSound2.attachSound("wepSound2");
wepSound3.attachSound("wepSound3");
wepSound4.attachSound("wepSound4");
stompSound.attachSound("stomp");
explodeSound.attachSound("explodeSound");
deadSound.attachSound("deadSound");
siren.attachSound("siren");
pickItem.attachSound("pickItem");
this.onMouseDown = function () {
fire = true;
};
this.onMouseUp = function () {
fire = false;
};
Instance of Symbol 1046 MovieClip in Frame 13
onClipEvent (enterFrame) {
_xscale = _parent.game.char.hp;
}
Instance of Symbol 1050 MovieClip "wep1" in Frame 13
onClipEvent (load) {
if (_root.totalwep > 1) {
gotoAndStop (2);
}
}
Instance of Symbol 1052 MovieClip "wep2" in Frame 13
onClipEvent (load) {
if (_root.totalwep > 2) {
gotoAndStop (2);
}
}
Instance of Symbol 1054 MovieClip "wep3" in Frame 13
onClipEvent (load) {
if (_root.totalwep > 3) {
gotoAndStop (2);
}
}
Instance of Symbol 1091 MovieClip in Frame 13
onClipEvent (enterFrame) {
_x = _parent._xmouse;
_y = _parent._ymouse;
}
Frame 17
stop();
var ammo = 0;
var totalwep = 2;
wep1.nextFrame();
var execBoss = false;
var bossDead = false;
Frame 22
stop();
var ammo = 0;
var totalwep = 3;
wep2.nextFrame();
var execBoss = false;
var bossDead = false;
var bossDead2 = false;
Frame 27
stop();
var ammo = 0;
var totalwep = 4;
var execBoss = false;
var bossDead = false;
Frame 34
Mouse.show();
delete this.onEnterFrame;
Frame 62
stopAllSounds();
Symbol 54 Button
on (release) {
}
Symbol 55 MovieClip Frame 155
_parent.play();
stop();
Symbol 60 Button
on (release) {
}
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 23
_parent._parent.startGame();
Symbol 72 MovieClip Frame 100
stop();
_parent.logored.play();
Instance of Symbol 72 MovieClip in Symbol 73 MovieClip Frame 1
onClipEvent (enterFrame) {
frame = int((_root.getBytesLoaded() * 100) / _root.getBytesTotal());
if (frame > _currentframe) {
play();
} else {
stop();
}
}
Symbol 74 MovieClip Frame 1
stop();
Symbol 74 MovieClip Frame 49
function startGame() {
_parent.play();
}
stop();
Symbol 1216 MovieClip Frame 1
if (yy.savescore == 1) {
if (ipb_score == undefined) {
ipb_score = eval (_global.ipb_scoreVar);
}
xx = new LoadVars();
xx.arcadegid = _root.ibpro_gameid;
xx.gscore = ipb_score;
xx.gname = _global.ipb_get_gname();
xx.enscore = (ipb_score * yy.randchar) ^ yy.randchar2;
xx.send("index.php?autocom=arcade&do=savescore", "_self", "POST");
stop();
}
_global.ipbSend = function (ipb_score) {
_root._visible = false;
_root.enabled = false;
xx = new LoadVars();
yy = new LoadVars();
xx.sendAndLoad("index.php?autocom=arcade&do=verifyscore", yy, "POST");
};
Symbol 84 MovieClip Frame 1
stop();
Symbol 102 Button
on (release) {
_parent.gotoAndStop("highScore");
}
Symbol 103 Button
on (release) {
_parent.gotoAndStop("instruction");
}
Symbol 104 Button
on (release) {
}
Symbol 105 Button
on (release) {
_root.gotoAndStop("level1");
}
Symbol 106 MovieClip Frame 74
stop();
Symbol 108 Button
on (release) {
gotoAndStop (1);
}
Symbol 132 Button
on (release) {
_parent.swapAll(this);
}
Symbol 137 MovieClip Frame 1
function swapAll(mc) {
for (m in this) {
if (this[m] != mc) {
this[m].swapDepths(depth++);
}
}
content.swapDepths(depth++);
mc.swapDepths(depth++);
trace(_parent[mc._name + "Scores"]);
_parent.populate("scores", _parent[mc._name + "Scores"], mc._name);
}
depth = 1;
Instance of Symbol 134 MovieClip "monthly" in Symbol 137 MovieClip Frame 1
onClipEvent (load) {
tx = "MONTHLY";
}
Instance of Symbol 134 MovieClip "weekly" in Symbol 137 MovieClip Frame 1
onClipEvent (load) {
tx = "WEEKLY";
}
Instance of Symbol 134 MovieClip "daily" in Symbol 137 MovieClip Frame 1
onClipEvent (load) {
tx = "DAILY";
_parent.swapAll(this);
}
Symbol 836 MovieClip Frame 1
stop();
Symbol 845 MovieClip Frame 1
function loadContent() {
}
Symbol 850 Button
on (press, dragOver) {
startDrag ("../ScrollSlider", false, _parent.SliderXPosition, _parent.HighestPoint, _parent.SliderXPosition, _parent.LowestPoint);
}
on (release, dragOut, releaseOutside) {
stopDrag();
}
Symbol 852 MovieClip Frame 1
ScrollPosition = _parent.ScrollSlider._y - _parent.HighestPoint;
ScrollPercent = ScrollPosition / _parent.ScrollRange;
MaskPercent = _parent.VisibleTextAreaHeight * ScrollPercent;
NewPosition = (_parent.TextMarginTop + MaskPercent) - (_parent.TextHeight * ScrollPercent);
setProperty("_parent.content", _y , int(NewPosition));
play();
Symbol 852 MovieClip Frame 2
prevFrame();
Symbol 853 MovieClip Frame 1
MovedOnce = false;
stop();
Symbol 853 MovieClip Frame 2
if (_parent.SliderYScale < 100) {
if (_parent.ScrollType == "UpPress") {
_parent.CurrentHeight = _parent.ScrollSlider._y;
if (_parent.CurrentHeight > (_parent.HighestPoint + _parent.ButtonClickSpeed)) {
_parent.NewHeight = _parent.CurrentHeight - _parent.ButtonClickSpeed;
play();
setProperty("_parent.ScrollSlider", _y , _parent.NewHeight);
} else {
stop();
setProperty("_parent.ScrollSlider", _y , _parent.HighestPoint);
}
} else if (_parent.ScrollType == "DownPress") {
_parent.CurrentHeight = _parent.ScrollSlider._y;
_parent.NewHeight = _parent.CurrentHeight + _parent.ButtonClickSpeed;
if (_parent.CurrentHeight < (_parent.LowestPoint - _parent.ButtonClickSpeed)) {
play();
setProperty("_parent.ScrollSlider", _y , _parent.NewHeight);
} else {
stop();
setProperty("_parent.ScrollSlider", _y , _parent.LowestPoint);
}
} else if (_parent.ScrollType == "UpHover") {
_parent.CurrentHeight = _parent.ScrollSlider._y;
if (_parent.CurrentHeight > (_parent.HighestPoint + _parent.ButtonHoverSpeed)) {
_parent.NewHeight = _parent.CurrentHeight - _parent.ButtonHoverSpeed;
play();
setProperty("_parent.ScrollSlider", _y , _parent.NewHeight);
} else {
stop();
setProperty("_parent.ScrollSlider", _y , _parent.HighestPoint);
}
} else if (_parent.ScrollType == "DownHover") {
_parent.CurrentHeight = _parent.ScrollSlider._y;
_parent.NewHeight = _parent.CurrentHeight + _parent.ButtonHoverSpeed;
if (_parent.CurrentHeight < (_parent.LowestPoint - _parent.ButtonHoverSpeed)) {
play();
setProperty("_parent.ScrollSlider", _y , _parent.NewHeight);
} else {
stop();
setProperty("_parent.ScrollSlider", _y , _parent.LowestPoint);
}
} else if (_parent.ScrollType == "ScrollBarClick") {
_parent.ClickHeight = _parent._ymouse;
_parent.CurrentHeight = _parent.ScrollSlider._y;
if (_parent.ClickHeight < _parent.CurrentHeight) {
if (_parent.CurrentHeight > (_parent.HighestPoint + _parent.ScrollBarClickSpeed)) {
_parent.NewHeight = _parent.CurrentHeight - _parent.ScrollBarClickSpeed;
play();
setProperty("_parent.ScrollSlider", _y , _parent.NewHeight);
} else {
stop();
setProperty("_parent.ScrollSlider", _y , _parent.HighestPoint);
}
} else if (_parent.ClickHeight > (_parent.CurrentHeight + _parent.SliderHeight)) {
if (_parent.CurrentHeight < (_parent.LowestPoint - _parent.ScrollBarClickSpeed)) {
_parent.NewHeight = _parent.CurrentHeight + _parent.ScrollBarClickSpeed;
play();
setProperty("_parent.ScrollSlider", _y , _parent.NewHeight);
} else {
stop();
setProperty("_parent.ScrollSlider", _y , _parent.LowestPoint);
}
}
}
} else {
stop();
}
Symbol 853 MovieClip Frame 3
if (_parent.ScrollType != "ScrollBarClick") {
gotoAndPlay (2);
}
Symbol 853 MovieClip Frame 4
if (MovedOnce) {
gotoAndPlay (2);
}
Symbol 853 MovieClip Frame 7
MovedOnce = true;
gotoAndPlay (2);
Symbol 853 MovieClip Frame 8
_parent.content._y = _parent.pos;
trace("new slider " + _parent.pos);
_parent.CurrentHeight = _parent.LowestPoint;
_parent.NewHeight = _parent.CurrentHeight + _parent.pos;
if (_parent.CurrentHeight < (_parent.LowestPoint - _parent.pos)) {
setProperty("_parent.ScrollSlider", _y , _parent.NewHeight);
} else {
setProperty("_parent.ScrollSlider", _y , _parent.LowestPoint);
}
stop();
Symbol 854 MovieClip Frame 1
ButtonHoverSpeed = 3;
ButtonClickSpeed = 6;
ScrollBarClickSpeed = 20;
VisibleTextAreaHeight = 155;
TotalScrollBarHeight = size._height;
ArrowButtonHeight = 0;
TextMarginLeft = 10;
TextMarginTop = 10;
MinimumScrollerHeight = 25;
SliderXPosition = ScrollSlider._x;
HighestPoint = 17;
LowestPoint = 195;
setProperty("content", _x , TextMarginLeft);
setProperty("ScrollSlider", _x , SliderXPosition);
setProperty("ScrollSlider", _y , HighestPoint);
TextHeight = content._height;
ScrollBarRange = VisibleTextAreaHeight - (ArrowButtonHeight * 2);
SliderYScale = (ScrollBarRange / content._height) * 100;
trace((("TEST HEIGHT " + content._height) + ", ") + VisibleTextAreaHeight);
if (SliderYScale < 100) {
} else {
setProperty("ScrollSlider", _visible , false);
}
SliderHeight = ScrollSlider._height;
LowestPoint = Math.floor(LowestPoint - SliderHeight);
ScrollRange = LowestPoint - HighestPoint;
trace("pos: " + pos);
setScrollPosition(pos);
TextMovingActions.play();
Symbol 854 MovieClip Frame 2
stop();
ScrollSlider._yscale = 100;
ScrollSlider._visible = true;
Symbol 860 MovieClip Frame 1
nextFrame();
Symbol 860 MovieClip Frame 2
_global.bitAND = function (a, b) {
if ((a < 0) && (b < 0)) {
var _local3 = (a & 1) & (b & 1);
var _local4 = (a >>> 1) & (b >>> 1);
return((_local4 << 1) | _local3);
}
return(a & b);
};
function rhex(num) {
str = "";
j = 0;
while (j <= 3) {
str = str + (hex_chr.charAt(bitAND(num >> ((j * 8) + 4), 15)) + hex_chr.charAt(bitAND(num >> (j * 8), 15)));
j++;
}
return(str);
}
function str2blks_MD5(str) {
nblk = ((str.length + 8) >> 6) + 1;
blks = new Array(nblk * 16);
i = 0;
while (i < (nblk * 16)) {
blks[i] = 0;
i++;
}
i = 0;
while (i < str.length) {
blks[i >> 2] = blks[i >> 2] | (str.charCodeAt(i) << ((i % 4) * 8));
i++;
}
blks[i >> 2] = blks[i >> 2] | (128 << ((i % 4) * 8));
blks[(nblk * 16) - 2] = str.length * 8;
return(blks);
}
function addme(x, y) {
var _local1 = bitAND(x, 65535) + bitAND(y, 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | bitAND(_local1, 65535));
}
function rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function cmn(q, a, b, x, s, t) {
return(addme(rol(addme(addme(a, q), addme(x, t)), s), b));
}
function ff(a, b, c, d, x, s, t) {
return(cmn(bitAND(b, c) | bitAND(~b, d), a, b, x, s, t));
}
function gg(a, b, c, d, x, s, t) {
return(cmn(bitAND(b, d) | bitAND(c, ~d), a, b, x, s, t));
}
function hh(a, b, c, d, x, s, t) {
return(cmn((b ^ c) ^ d, a, b, x, s, t));
}
function ii(a, b, c, d, x, s, t) {
return(cmn(c ^ (b | (~d)), a, b, x, s, t));
}
var hex_chr = "0123456789abcdef";
_global.MD5 = function (str) {
x = str2blks_MD5(str);
a = 1732584193 /* 0x67452301 */;
b = -271733879;
c = -1732584194;
d = 271733878 /* 0x10325476 */;
i = 0;
while (i < x.length) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
a = ff(a, b, c, d, x[i + 0], 7, -680876936);
d = ff(d, a, b, c, x[i + 1], 12, -389564586);
c = ff(c, d, a, b, x[i + 2], 17, 606105819);
b = ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = ff(a, b, c, d, x[i + 4], 7, -176418897);
d = ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = ff(b, c, d, a, x[i + 7], 22, -45705983);
a = ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = ff(c, d, a, b, x[i + 10], 17, -42063);
b = ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = ff(d, a, b, c, x[i + 13], 12, -40341101);
c = ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = gg(a, b, c, d, x[i + 1], 5, -165796510);
d = gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = gg(c, d, a, b, x[i + 11], 14, 643717713);
b = gg(b, c, d, a, x[i + 0], 20, -373897302);
a = gg(a, b, c, d, x[i + 5], 5, -701558691);
d = gg(d, a, b, c, x[i + 10], 9, 38016083);
c = gg(c, d, a, b, x[i + 15], 14, -660478335);
b = gg(b, c, d, a, x[i + 4], 20, -405537848);
a = gg(a, b, c, d, x[i + 9], 5, 568446438);
d = gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = gg(c, d, a, b, x[i + 3], 14, -187363961);
b = gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = gg(d, a, b, c, x[i + 2], 9, -51403784);
c = gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = hh(a, b, c, d, x[i + 5], 4, -378558);
d = hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = hh(b, c, d, a, x[i + 14], 23, -35309556);
a = hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = hh(c, d, a, b, x[i + 7], 16, -155497632);
b = hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = hh(a, b, c, d, x[i + 13], 4, 681279174);
d = hh(d, a, b, c, x[i + 0], 11, -358537222);
c = hh(c, d, a, b, x[i + 3], 16, -722521979);
b = hh(b, c, d, a, x[i + 6], 23, 76029189);
a = hh(a, b, c, d, x[i + 9], 4, -640364487);
d = hh(d, a, b, c, x[i + 12], 11, -421815835);
c = hh(c, d, a, b, x[i + 15], 16, 530742520);
b = hh(b, c, d, a, x[i + 2], 23, -995338651);
a = ii(a, b, c, d, x[i + 0], 6, -198630844);
d = ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = ii(b, c, d, a, x[i + 5], 21, -57434055);
a = ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = ii(c, d, a, b, x[i + 10], 15, -1051523);
b = ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = ii(d, a, b, c, x[i + 15], 10, -30611744);
c = ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = ii(a, b, c, d, x[i + 4], 6, -145523070);
d = ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = ii(c, d, a, b, x[i + 2], 15, 718787259);
b = ii(b, c, d, a, x[i + 9], 21, -343485551);
a = addme(a, olda);
b = addme(b, oldb);
c = addme(c, oldc);
d = addme(d, oldd);
i = i + 16;
}
return(((rhex(a) + rhex(b)) + rhex(c)) + rhex(d));
};
MD5("lll");
function positionScores(success) {
if (success) {
trace("Author.xml loaded. Contents are: " + this.toString());
i = 0;
while (((tempXml = this.firstChild.childNodes[i])) != undefined) {
_parent[g][this.firstChild.childNodes[i].nodeName + "Scores"] = this.firstChild.childNodes[i];
i++;
}
populate("scores", _parent[g].dailyScores, "daily");
initRank();
trace(rankScore.attributes.flag);
hideLoading();
} else {
trace("error: " + this);
}
}
function initRank() {
if (userName.toUpperCase() != "YOUR NAME") {
rankName = userName;
rankScore = userScore;
rankDate = getToday();
rankFlag.attachMovie(rankScores.attributes.country, "mc", 1);
}
if (countryScores.attributes.name != undefined) {
winnerCountryName = countryScores.attributes.name.toUpperCase() + " DOMINATES!";
winnerCountryFlag.attachMovie(countryScores.attributes.cc, "mc", 1);
}
_root.name = "YOUR NAME";
_root.score = 0;
}
function populate(mcName, xml, mode) {
trace("populate");
var _local3 = this[mcName].content;
var _local6 = xml.childNodes.length;
var _local5 = int(_local3.baseSpot._height) + 1;
clearAllMovieclips(_local3);
var _local2 = 0;
while (_local2 < _local6) {
_local3.baseSpot.duplicateMovieClip("spot" + _local2, _local2);
_local3["spot" + _local2]._y = _local2 * _local5;
_local3["spot" + _local2]._x = 0;
_local3["spot" + _local2].num = _local2 + 1;
_local3["spot" + _local2].name = xml.childNodes[_local2].attributes.name;
_local3["spot" + _local2].score = xml.childNodes[_local2].attributes.value;
_local3["spot" + _local2].date = xml.childNodes[_local2].attributes.date.toUpperCase();
_local3["spot" + _local2].flag.attachMovie(xml.childNodes[_local2].attributes.country, "mc", 1);
if ((_local2 % 2) == 1) {
_local3["spot" + _local2].back._visible = false;
}
_local2++;
}
resetScoresScroll(this[mcName]);
updateMyRank(mode);
}
function updateMyRank(mode) {
if (userName.toUpperCase() != "YOUR NAME") {
if (this.rankScores.attributes[mode] != undefined) {
rankNum = this.rankScores.attributes[mode];
}
}
}
function clearAllMovieclips(mc) {
trace("clearAllmovieClips");
for (var _local2 in mc) {
mc[_local2].removeMovieClip();
}
}
function resetScoresScroll(mc) {
mc.gotoAndPlay(1);
}
function getToday() {
var _local2 = new Date();
var _local3 = _local2.getMonth();
var _local1 = _local2.getMonth();
var _local4 = _local2.getDate();
trace("tempDay" + _local3);
switch (_local3) {
case 0 :
_local1 = "JAN";
break;
case 1 :
_local1 = "FEV";
break;
case 2 :
_local1 = "MAR";
break;
case 3 :
_local1 = "APR";
break;
case 4 :
_local1 = "MAI";
break;
case 5 :
_local1 = "JUN";
break;
case 6 :
_local1 = "JUL";
break;
case 7 :
_local1 = "AGO";
break;
case 8 :
_local1 = "SET";
break;
case 9 :
_local1 = "OUT";
break;
case 10 :
_local1 = "NOV";
break;
case 11 :
_local1 = "DEZ";
}
return((_local4 + " ") + _local1);
}
function hideLoading() {
loading._visible = false;
}
if (System.security) {
if (System.security.allowDomain) {
System.security;
System.security;
System.security;
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain("http://www.box10.com/");
System.security.allowInsecureDomain(null);
}
}
g = _name;
userName = _root.name;
userScore = _root.score;
var md5String = ((((g + "-box10-") + userName) + "-box10-") + userScore);
var scoreString = ((((((("g=" + g) + "&n=") + userName) + "&s=") + userScore) + "&k=") + MD5(md5String));
var xmlScores = new XML();
xmlScores.ignoreWhite = true;
xmlScores.onLoad = positionScores;
trace("add scores? " + _root.action);
(("http://www.box10.com/scores.php?a=" + _root.action) + "&") + scoreString;
trace((("http://www.box10.com/scores.php?a=" + _root.action) + "&") + scoreString);
Instance of Symbol 854 MovieClip "scores" in Symbol 860 MovieClip Frame 2
onClipEvent (load) {
function getScrollPosition() {
trace("getscorolposition");
return(ScrollSlider._y);
}
function setScrollPosition(p) {
if (isNaN(p)) {
return(undefined);
}
trace("setscrollPosition " + p);
this.pos = p;
ScrollSlider._y = p;
}
}
Symbol 861 MovieClip Frame 1
stop();
Symbol 863 Button
on (release) {
}
Instance of Symbol 881 MovieClip in Symbol 882 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.game.char.hit) && (_root.game.char.hp > 1)) {
_root.game.char.hp--;
_root.game.char.grav = 0;
_root.game.char.jumppower = 15;
}
}
Symbol 894 MovieClip Frame 4
removeMovieClip(_parent);
stop();
Symbol 912 MovieClip Frame 1
stop();
Symbol 936 MovieClip Frame 1
gotoAndStop(_parent._parent.warna);
Symbol 941 MovieClip Frame 1
stop();
Symbol 949 MovieClip Frame 1
gotoAndStop(_parent._parent.warna);
Symbol 954 MovieClip Frame 1
stop();
Symbol 962 MovieClip Frame 1
gotoAndStop(_parent._parent.warna);
Symbol 975 MovieClip Frame 1
gotoAndStop(_parent._parent.warna);
Symbol 978 MovieClip Frame 18
stop();
Symbol 979 MovieClip Frame 5
stop();
Symbol 981 MovieClip Frame 16
stop();
Instance of Symbol 898 MovieClip "revballpart" in Symbol 983 MovieClip Frame 1
onClipEvent (load) {
var _alpha = 100;
var speedx = (10 - random(20));
var speedy = random(20);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
if (_alpha < 0) {
removeMovieClip(this);
}
_alpha = (_alpha - 5);
grav++;
_x = (_x + speedx);
_y = (_y + (grav - speedy));
}
Instance of Symbol 901 MovieClip "smoke" in Symbol 983 MovieClip Frame 1
onClipEvent (load) {
var _alpha = (40 + random(60));
var ukuran = (25 + random(50));
_yscale = ukuran;
var _xscale = ukuran;
var ukuran = (100 + random(150));
var fly = 0;
speedx = 3 - random(7);
speedy = random(7);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
fly++;
if (_xscale < ukuran) {
_xscale = (_xscale + ((ukuran - _yscale) / 10));
_yscale = (_yscale + ((ukuran - _yscale) / 10));
}
if (_alpha < 0) {
removeMovieClip(this);
}
_alpha = (_alpha - 3);
_x = (_x + speedx);
_y = (_y + (speedy - fly));
}
Instance of Symbol 904 MovieClip "redatk" in Symbol 983 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_x = (_x + speedx);
_y = (_y + speedy);
_alpha = (_alpha-1);
if (_parent.hit.hitTest(_x + _parent._x, _y + _parent._y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redexplod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama]._alpha = 60 + random(40);
removeMovieClip(this);
}
if (_root.game.char.hitTest(_x + _parent._x, _y + _parent._y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redexplod, nama, _parent.getNextHighestDepth() + 10);
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama]._alpha = 60 + random(40);
_root.game.char.hp = _root.game.char.hp - 2;
removeMovieClip(this);
}
if (_alpha < 0) {
removeMovieClip(this);
}
}
onClipEvent (load) {
_alpha = 100;
}
Instance of Symbol 121 MovieClip "pick0" in Symbol 983 MovieClip Frame 1
onClipEvent (load) {
speedx = 7 - random(15);
speedy = random(10);
}
onClipEvent (enterFrame) {
_x = (_x + speedx);
_y = (_y + (grav - speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
grav++;
if (this.hitTest(_parent._parent.char.hit)) {
_root.specialAmmo = _root.specialAmmo + (50 + random(50));
_root.pickItem.start();
removeMovieClip(this);
}
if (_parent.hit.hitTest(_x + _parent._x, (_y + _parent._y) + (_height / 2), true)) {
grav = 0;
}
}
Instance of Symbol 123 MovieClip "pick1" in Symbol 983 MovieClip Frame 1
onClipEvent (load) {
speedx = 7 - random(15);
speedy = random(10);
}
onClipEvent (enterFrame) {
_x = (_x + speedx);
_y = (_y + (grav - speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
grav++;
if (this.hitTest(_parent._parent.char.hit)) {
_root.pickItem.start();
_parent._parent.char.hp = _parent._parent.char.hp + 20;
if (_parent._parent.char.hp > 100) {
_parent._parent.char.hp = 100;
}
removeMovieClip(this);
}
if (_parent.hit.hitTest(_x + _parent._x, (_y + _parent._y) + (_height / 2), true)) {
grav = 0;
}
}
Instance of Symbol 119 MovieClip "pickwep1" in Symbol 983 MovieClip Frame 1
onClipEvent (load) {
speedx = 7 - random(15);
speedy = random(10);
}
onClipEvent (enterFrame) {
_x = (_x + speedx);
_y = (_y + (grav - speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
grav++;
if (this.hitTest(_parent._parent.char.hit)) {
_parent._parent.nextlevel_mc.play();
_root.pickItem.start();
_root.totalwep = 2;
_root.wep1.gotoAndStop(2);
removeMovieClip(this);
}
if (_parent.hit.hitTest(_x + _parent._x, (_y + _parent._y) + (_height / 2), true)) {
grav = 0;
}
}
Instance of Symbol 913 MovieClip "boss" in Symbol 983 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
item = "pickwep1";
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
_root.bossHealth.hp._xscale = hp * divider;
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
var i;
var ex;
var ey;
var nama;
var tipe;
var jeda = 0;
hp = 50;
var divider = (150 / hp);
var firetime = random(70);
var moveAgain = 50;
var speedx = 0;
var speedy = 0;
var tujuanx = ((_x + 100) - random(200));
var tujuany = (-random(150));
var speedJatuh = (10 - random(20));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!_root.execBoss)) {
return(undefined);
}
if ((hp < 1) || (hp == undefined)) {
if (genItem) {
_root.bossHealth.play();
_root.deadSound.start();
_root.score = _root.score + 1000;
spawnItem();
_root.bossDead = true;
genItem = false;
}
_y = (_y + 10);
_x = (_x + speedJatuh);
_rotation = (_rotation + speedJatuh);
if (_y > 400) {
_visible = false;
}
return(undefined);
}
hitBullet();
_x = (_x + (((tujuanx - _x) / 10) + speedx));
_y = (_y + (((tujuany - _y) / 10) + speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
if (moveAgain < 0) {
tujuanx = ((_root.game.char._x - _parent._x) + 200) - random(400);
tujuany = -random(150);
moveAgain = random(100);
}
moveAgain--;
if (_root.game.char._x > (_parent._x + _x)) {
_xscale = -100;
} else {
_xscale = 100;
}
if (firetime < 0) {
var tembak = 3;
var firetime = (40 + random(30));
}
if ((tembak > 0) && (jeda < 0)) {
blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x;
_parent[namaatk]._y = _y;
_parent[namaatk].speedx = (-_xscale) / 10;
_parent[namaatk].speedy = random(10);
tembak--;
_root.wepSound1.start();
var jeda = 3;
}
jeda--;
if ((((_x + _parent._x) > 0) && ((_x + _parent._x) < 680)) && (_y > -250)) {
firetime--;
}
}
Instance of Symbol 919 MovieClip "enem0" in Symbol 983 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
var i;
var ex;
var ey;
var nama;
var tipe;
hp = 3;
var firetime = random(70);
var moveAgain = 50;
var speedx = 0;
var speedy = 0;
var tujuanx = ((_x + 100) - random(200));
var tujuany = (-random(150));
var speedJatuh = (10 - random(20));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
if ((hp < 1) || (hp == undefined)) {
if (genItem) {
_root.score = _root.score + 100;
_root.deadSound();
var chance = random(8);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
_y = (_y + 10);
_x = (_x + speedJatuh);
_rotation = (_rotation + speedJatuh);
if (_y > 400) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
_x = (_x + (((tujuanx - _x) / 10) + speedx));
_y = (_y + (((tujuany - _y) / 10) + speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
if (moveAgain < 0) {
tujuanx = (_x + 100) - random(200);
tujuany = -random(150);
moveAgain = random(100);
}
moveAgain--;
if (_root.game.char._x > (_parent._x + _x)) {
_xscale = -100;
} else {
_xscale = 100;
}
if (firetime < 0) {
_root.wepSound1.start();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x;
_parent[namaatk]._y = _y;
_parent[namaatk].speedx = (-_xscale) / 10;
_parent[namaatk].speedy = random(10);
blast.play;
firetime = 40 + random(30);
}
if (((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
if ((((_x + _parent._x) > 0) && ((_x + _parent._x) < 680)) && (_y > -250)) {
firetime--;
}
}
Instance of Symbol 925 MovieClip "enem1" in Symbol 983 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
stop();
var warna = (random(5) + 1);
var tujuanx = (-random(320));
var tujuany = random(240);
var timerAim = 100;
var movex = 0;
var movey = 0;
var hp = 5;
var wpex;
var wpey;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var jumppower = 0;
var grav = 0;
var movechar = false;
var aksi = 0;
var firetime = (40 + random(30));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
var bottomy = ((_y + (_height / 2)) + _parent._y);
var bottomx = (_x + _parent._x);
gotoAndStop(action);
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.hit.hitTest(bottomx, bottomy, true)) {
grav = 1;
_y = (_y-1);
}
_y = (_y + (grav - jumppower));
if (_parent.hit.hitTest(bottomx, bottomy, true) || (_parent.hit.hitTest(bottomx, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (hp < 1) {
if (genItem) {
_root.score = _root.score + 150;
_root.deadSound.start();
var chance = random(10);
if (chance == 1) {
spawnItem();
}
speed = speed - (((10 + random(20)) * _xscale) / 100);
jumppower = 10 + random(10);
genItem = false;
}
_x = (_x + speed);
_rotation = (_rotation + speed);
speed = speed * 0.9;
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
if (charx > _x) {
var _xscale = 100;
} else if (charx < _x) {
var _xscale = -100;
}
movex = movex + ((tujuanx - movex) / 10);
movey = movey + ((tujuany - movey) / 10);
timerAim--;
if (timerAim < 0) {
tujuanx = -50 - random(320);
tujuany = 120 - random(240);
timerAim = 50 + random(50);
}
var charx = (_parent._parent.char._x - _parent._x);
if (moveable == true) {
speed = ((charx - _xscale) - _x) / 10;
if (speed > 5) {
speed = 5;
} else if (speed < -5) {
speed = -5;
}
_x = (_x + speed);
}
if (Math.floor(Math.abs(speed)) == 1) {
var idle = random(2);
}
if (_parent.hit.hitTest(bottomx, bottomy - 2, true)) {
_y = (_y-1);
}
if (_parent.hit.hitTest(bottomx + 20, bottomy - 15, true)) {
_x = (_x - 5);
} else if (_parent.hit.hitTest(bottomx - 20, bottomy - 15, true)) {
_x = (_x + 5);
}
if (_parent.hit.hitTest(bottomx - 20, bottomy, true) || (_parent.hit.hitTest(bottomx + 20, bottomy, true))) {
var grav = 0;
} else {
grav++;
}
if (firetime < 0) {
_root.wepSound1.start();
blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x;
_parent[namaatk]._y = _y;
_parent[namaatk].speedx = _xscale / 10;
_parent[namaatk].speedy = random(10);
firetime = 40 + random(30);
}
firetime--;
if ((((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) || (_y > 400)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
}
Instance of Symbol 982 MovieClip "enem2" in Symbol 983 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
stop();
var warna = (random(5) + 1);
var tujuanx = (-random(320));
var tujuany = random(240);
var timerAim = 100;
var movex = 0;
var movey = 0;
var hp = 6;
var wpex;
var wpey;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var jumppower = 0;
var action = "stand";
var grav = 0;
var movechar = false;
var aksi = 0;
var firetime = (40 + random(30));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
var bottomy = ((_y + (_height / 2)) + _parent._y);
var bottomx = (_x + _parent._x);
gotoAndStop(action);
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.hit.hitTest(bottomx, bottomy, true)) {
grav = 1;
_y = (_y-1);
}
_y = (_y + (grav - jumppower));
if (_parent.hit.hitTest(bottomx, bottomy, true) || (_parent.hit.hitTest(bottomx, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (hp < 3) {
}
if (hp < 1) {
if (genItem) {
_root.score = _root.score + 300;
_root.deadSound.start();
var chance = random(5);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
action = "dead";
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
if (charx > _x) {
var _xscale = 100;
} else if (charx < _x) {
var _xscale = -100;
}
movex = movex + ((tujuanx - movex) / 10);
movey = movey + ((tujuany - movey) / 10);
timerAim--;
if (timerAim < 0) {
tujuanx = -50 - random(320);
tujuany = 120 - random(240);
timerAim = 50 + random(50);
}
tellTarget (body.arm) {
_rotation = ((Math.atan2(_parent._parent.movey - _y, _parent._parent.movex - _x) * 180) / Math.PI);
var wepPoint = {x:_x + 70, y:_y - tujuan};
localToGlobal(wepPoint);
_parent._parent.wepx = wepPoint.x;
_parent._parent.wepy = wepPoint.y;
_y = (_y + ((tujuan - _y) / 2));
if (_parent._parent.duck) {
var tujuan = 20;
} else {
var tujuan = 0;
}
};
var charx = (_parent._parent.char._x - _parent._x);
if (moveable == true) {
if (Math.floor(jumppower) == 0) {
var action = "run";
} else {
var action = "jump";
}
speed = ((charx - _xscale) - _x) / 10;
if (speed > 5) {
speed = 5;
} else if (speed < -5) {
speed = -5;
}
_x = (_x + speed);
}
if (Math.floor(Math.abs(speed)) == 1) {
var idle = random(2);
}
if ((moveable && (Math.floor(Math.abs(speed)) < 1)) && (jumppower == 0)) {
if (idle == 0) {
var action = "stand";
} else {
var action = "duck";
}
}
if (_parent.hit.hitTest(bottomx + 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x - 10);
} else if (_parent.hit.hitTest(bottomx - 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x + 10);
}
if (_parent.hit.hitTest(bottomx - 20, bottomy, true) || (_parent.hit.hitTest(bottomx + 20, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (firetime < 0) {
_root.wepSound1.start();
body.arm.blast.play();
body.core.blast.play();
body.leg.blast.play();
body.leg2.blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = wepx - _parent._x;
_parent[namaatk]._y = wepy - _parent._y;
_parent[namaatk]._rotation = body.arm._rotation;
_parent[namaatk].speedx = ((-_xscale) / 5) * Math.cos(_parent[namaatk]._rotation * (Math.PI/180));
_parent[namaatk].speedy = ((-_xscale) / 5) * Math.sin(_parent[namaatk]._rotation * (((Math.PI/180) * (-_xscale)) / 100));
firetime = 40 + random(30);
}
firetime--;
if ((((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) || (_y > 400)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
}
Symbol 1016 MovieClip Frame 1
stop();
Symbol 1026 MovieClip Frame 1
gotoAndStop(_root.game.char.wepselect);
Symbol 1029 MovieClip Frame 19
gotoAndPlay (1);
Symbol 1030 MovieClip Frame 26
stop();
_parent.action = "stand";
Symbol 1031 MovieClip Frame 1
_parent.duck = true;
Symbol 1031 MovieClip Frame 6
stop();
Symbol 1031 MovieClip Frame 7
_parent.duck = false;
Symbol 1031 MovieClip Frame 9
_parent.duck = false;
Symbol 1031 MovieClip Frame 12
_parent.moveable = true;
_parent.action = "stand";
Symbol 1032 MovieClip Frame 12
stop();
Symbol 1038 MovieClip Frame 1
stop();
Symbol 1038 MovieClip Frame 22
gotoAndPlay (2);
Instance of Symbol 983 MovieClip "ground" in Symbol 1039 MovieClip Frame 1
onClipEvent (load) {
var spawntimer = 0;
var jmlSpawn = 0;
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
spawntimer--;
if ((spawntimer < 0) && (jmlSpawn < 7)) {
var spawnname = ("enem" + random(3));
var namaMusuh = ("enemies" + this.getNextHighestDepth());
duplicateMovieClip (spawnname, namaMusuh, this.getNextHighestDepth() + 200);
this[namaMusuh].go = 1;
this[namaMusuh]._x = (-100 + (random(2) * 800)) - _x;
this[namaMusuh]._y = -50 - random(100);
jmlSpawn++;
spawntimer = 25;
}
}
Instance of Symbol 986 MovieClip "bullet" in Symbol 1039 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
_x = (_x + speedx);
_y = (_y + speedy);
_alpha = (_alpha - 5);
if (_parent.ground.hit.hitTest(_x, _y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.explod, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
_parent.ground[nama]._alpha = 60 + random(40);
_parent.ground[nama]._rotation = _rotation;
removeMovieClip(this);
}
if (((((_x < -15) || (_x > 665)) || (_y < -15)) || (_y > 415)) || (_alpha < 0)) {
removeMovieClip(this);
}
}
onClipEvent (load) {
_alpha = 100;
damage = 1;
}
Instance of Symbol 989 MovieClip "fireball" in Symbol 1039 MovieClip Frame 1
onClipEvent (load) {
var _alpha = (random(40) + 60);
var ukuran = (25 + random(50));
_yscale = ukuran;
var _xscale = ukuran;
var ukuran = (100 + random(150));
var fly = 0;
var damage = 2;
}
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
fly = fly + 0.5;
if (_xscale < ukuran) {
_xscale = (_xscale + ((ukuran - _yscale) / 10));
_yscale = (_yscale + ((ukuran - _yscale) / 10));
}
if (_alpha < 0) {
removeMovieClip(this);
}
_alpha = (_alpha - 3);
_x = (_x + speedx);
_y = (_y + (speedy - fly));
if (_parent.ground.hit.hitTest(_x, _y, true)) {
nama = "smoke" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.smoke, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
removeMovieClip(this);
}
}
Instance of Symbol 1002 MovieClip "revball" in Symbol 1039 MovieClip Frame 1
onClipEvent (load) {
var _alpha = 100;
var myspeedx = 0;
var myspeedy = 0;
var damage = 2;
var _rotation = random(360);
}
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
if (_alpha < 0) {
removeMovieClip(this);
}
if (((((_x < -15) || (_x > 665)) || (_y < -15)) || (_y > 415)) || (_alpha < 0)) {
removeMovieClip(this);
}
_alpha = (_alpha - 5);
myspeedx = myspeedx + ((speedx - myspeedx) / 10);
myspeedy = myspeedy + ((speedy - myspeedy) / 10);
_rotation = (_rotation + myspeedx);
_x = (_x + myspeedx);
_y = (_y + myspeedy);
if (_parent.ground.hit.hitTest(_x, _y, true)) {
_root.explodeSound.start();
i = 0;
while (i < 5) {
nama = "revballpart" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.revballpart, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
_parent.ground[nama].grav = 0;
i++;
}
removeMovieClip(this);
}
}
Instance of Symbol 1005 MovieClip "laser" in Symbol 1039 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
_x = (_x + speedx);
_y = (_y + speedy);
_alpha = (_alpha - 5);
if (_parent.ground.hit.hitTest(_x, _y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.explod2, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
_parent.ground[nama]._alpha = 60 + random(40);
_parent.ground[nama]._rotation = _rotation;
speedx = speedx * -1;
speedy = speedy * -1;
_rotation = (_rotation + 180);
}
if (((((_x < -15) || (_x > 665)) || (_y < -15)) || (_y > 415)) || (_alpha < 0)) {
removeMovieClip(this);
}
}
onClipEvent (load) {
_alpha = 100;
var damage = 3;
}
Instance of Symbol 1033 MovieClip "char" in Symbol 1039 MovieClip Frame 1
onClipEvent (load) {
stop();
var hp = 100;
var firerate = 0;
var wpex;
var posx = _x;
var wpey;
var ukuran = _xscale;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var movechar = true;
var sisi = false;
var jumppower = 0;
var action = "stand";
var grav = 0;
var movechar = false;
var keyListener = new Object();
var mouseListener = new Object();
var wepselect = 1;
mouseListener.onMouseWheel = function (scrollwep) {
wepselect = wepselect + (scrollwep / 3);
if (wepselect < 1) {
wepselect = _root.totalwep;
} else if (wepselect > _root.totalwep) {
wepselect = 1;
}
body.arm.weapon.gotoAndStop(wepselect);
};
Mouse.addListener(mouseListener);
keyListener.onKeyUp = function () {
jumpgo = true;
if ((Key.getCode() == 83) && (jump == false)) {
body.play();
}
};
Key.addListener(keyListener);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
gotoAndStop(action);
_y = (_y + (grav - jumppower));
if (((sisi == false) && (movechar)) && (_x > posx)) {
var movechar = false;
var posx = _x;
} else if ((sisi && (movechar)) && (_x < posx)) {
var movechar = false;
var posx = _x;
}
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.ground.hit.hitTest(_x, _y - 2, true)) {
_y = (_y-1);
}
if (_parent.ground.hit.hitTest(_x - 10, _y, true) || (_parent.ground.hit.hitTest(_x + 10, _y, true))) {
if (goSound) {
_root.stompSound.start();
var goSound = false;
}
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (_parent.gnung._x < -380) {
_parent.gnung._x = -380;
} else if (_parent.gnung._x > -70) {
_parent.gnung._x = -70;
}
if (_parent.ground._x > -10) {
_parent.ground._x = -10;
_parent.ground2._x = -10;
var movechar = true;
var sisi = false;
} else if (_parent.ground._x < -5346) {
if (_root.execBoss == false) {
_root.bossHealth.play();
_root.bossHealth.foto = 1;
_root.bossHealth.hp._xscale = 150;
_root.siren.start(0, 3);
}
_root.execBoss = true;
_parent.ground._x = -5346;
_parent.ground2._x = -5346;
var movechar = true;
var sisi = true;
}
if (_x < 50) {
var _x = 50;
} else if (_x > 640) {
var _x = 640;
if (_root.bossDead == true) {
_root.frameTujuan = "level2";
_root.fader.play();
}
}
if (hp < 1) {
action = "dead";
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_root.frameTujuan = "gameOver";
_root.fader.play();
}
return(undefined);
}
if (_root._xmouse > _x) {
var _xscale = ukuran;
} else if (_root._xmouse < _x) {
var _xscale = (-ukuran);
}
tellTarget (body.arm) {
_rotation = ((Math.atan2(_parent._ymouse - _y, _parent._xmouse - _x) * 180) / Math.PI);
var wepPoint = {x:70, y:-tujuan};
localToGlobal(wepPoint);
_parent._parent.wepx = wepPoint.x - _root.game._x;
_parent._parent.wepy = wepPoint.y - _root.game._y;
_y = (_y + ((tujuan - _y) / 2));
if (_parent._parent.duck) {
var tujuan = 20;
} else {
var tujuan = 0;
}
};
if (Key.isDown(49)) {
var wepselect = 1;
body.arm.weapon.gotoAndStop(wepselect);
} else if (Key.isDown(50) && (_root.totalwep > 1)) {
var wepselect = 2;
body.arm.weapon.gotoAndStop(wepselect);
} else if (Key.isDown(51) && (_root.totalwep > 2)) {
var wepselect = 3;
body.arm.weapon.gotoAndStop(wepselect);
} else if (Key.isDown(52) && (_root.totalwep > 3)) {
var wepselect = 4;
body.arm.weapon.gotoAndStop(wepselect);
}
if (Key.isDown(65) && (moveable == true)) {
if ((jumppower == 0) || (jump == false)) {
var action = "run";
} else {
var action = "jump";
}
if (movechar) {
_x = (_x - 10);
} else {
_parent.gnung._x = _parent.gnung._x + 0.1;
_parent.ground._x = _parent.ground._x + 10;
_parent.ground2._x = _parent.ground2._x + 10;
}
} else if (Key.isDown(68) && (moveable == true)) {
if ((jumppower == 0) || (jump == false)) {
var action = "run";
} else {
var action = "jump";
}
if (movechar) {
_x = (_x + 10);
} else {
_parent.gnung._x = _parent.gnung._x - 0.1;
_parent.ground._x = _parent.ground._x - 10;
_parent.ground2._x = _parent.ground2._x - 10;
}
}
if ((Key.isDown(87) && (jump == false)) && (moveable == true)) {
if (jumpgo) {
var jumppower = 30;
var action = "jump";
var goSound = true;
body.play();
var jumpgo = false;
}
var jump = true;
} else if (((Key.isDown(83) && (jump == false)) && (moveable)) && (duck == false)) {
var moveable = false;
var duck = true;
var action = "duck";
}
if ((((((!Key.isDown(65)) && (!Key.isDown(68))) && (!Key.isDown(87))) && (!Key.isDown(83))) && (moveable)) && (jump == false)) {
var action = "stand";
}
if (_parent.ground.hit.hitTest(_x + 10, _y - 12, true)) {
if (movechar) {
_x = (_x - 10);
} else {
_parent.gnung._x = _parent.gnung._x + 0.1;
_parent.ground._x = _parent.ground._x + 10;
_parent.ground2._x = _parent.ground2._x + 10;
}
} else if (_parent.ground.hit.hitTest(_x - 10, _y - 12, true)) {
if (movechar) {
_x = (_x + 10);
} else {
_parent.gnung._x = _parent.gnung._x - 0.1;
_parent.ground._x = _parent.ground._x - 10;
_parent.ground2._x = _parent.ground2._x - 10;
}
}
if (_parent.ground.hit.hitTest(_x, _y - 2, true)) {
_y = (_y-1);
}
if (_parent.ground.hit.hitTest(_x - 10, _y, true) || (_parent.ground.hit.hitTest(_x + 10, _y, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if ((_root.fire && (firerate < 0)) && (wepselect == 1)) {
_root.fireWeapon();
body.arm.blast.play();
body.head.blast.play();
var firerate = 2;
} else if (((_root.fire && (firerate < 0)) && (wepselect == 2)) && (_root.specialAmmo > 0)) {
_root.fireWeapon2();
body.head.blast.play();
_root.specialAmmo--;
var firerate = 0;
} else if (((_root.fire && (firerate < 0)) && (wepselect == 3)) && (_root.specialAmmo > 2)) {
_root.fireWeapon3();
body.head.blast.play();
_root.specialAmmo = _root.specialAmmo - 3;
var firerate = 8;
} else if (((_root.fire && (firerate < 0)) && (wepselect == 4)) && (_root.specialAmmo > 1)) {
_root.fireWeapon4();
body.arm.blast2.play();
body.head.blast.play();
_root.specialAmmo = _root.specialAmmo - 2;
var firerate = 8;
}
firerate--;
}
Symbol 1050 MovieClip Frame 1
stop();
Symbol 1052 MovieClip Frame 1
stop();
Symbol 1054 MovieClip Frame 1
stop();
Symbol 1066 MovieClip Frame 1
stop();
Symbol 1072 MovieClip Frame 1
gotoAndStop(_parent.foto);
stop();
Instance of Symbol 1058 MovieClip "turret0" in Symbol 1072 MovieClip Frame 2
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (Math.abs(_rotation) + speed);
timer--;
speed = speed * 0.9;
if (Math.abs(_rotation) < 90) {
_rotation = 90;
} else if (Math.abs(_rotation) > 179) {
_rotation = 179;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Instance of Symbol 1058 MovieClip "turret1" in Symbol 1072 MovieClip Frame 2
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (_rotation + speed);
timer--;
speed = speed * 0.9;
if (_rotation < 0) {
_rotation = 0;
} else if (_rotation > 90) {
_rotation = 90;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Instance of Symbol 1058 MovieClip "turret" in Symbol 1072 MovieClip Frame 3
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (_rotation + speed);
timer--;
speed = speed * 0.9;
if (_rotation < 0) {
_rotation = 0;
} else if (_rotation > 90) {
_rotation = 90;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Instance of Symbol 1058 MovieClip "turret2" in Symbol 1072 MovieClip Frame 4
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (Math.abs(_rotation) + speed);
timer--;
speed = speed * 0.9;
if (Math.abs(_rotation) < 90) {
_rotation = 90;
} else if (Math.abs(_rotation) > 179) {
_rotation = 179;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Instance of Symbol 1058 MovieClip "turret3" in Symbol 1072 MovieClip Frame 4
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (_rotation + speed);
timer--;
speed = speed * 0.9;
if (_rotation < 0) {
_rotation = 0;
} else if (_rotation > 90) {
_rotation = 90;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Instance of Symbol 1058 MovieClip "turret0" in Symbol 1072 MovieClip Frame 4
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (Math.abs(_rotation) + speed);
timer--;
speed = speed * 0.9;
if (Math.abs(_rotation) < 90) {
_rotation = 90;
} else if (Math.abs(_rotation) > 179) {
_rotation = 179;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Instance of Symbol 1058 MovieClip "turret1" in Symbol 1072 MovieClip Frame 4
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (_rotation + speed);
timer--;
speed = speed * 0.9;
if (_rotation < 0) {
_rotation = 0;
} else if (_rotation > 90) {
_rotation = 90;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Symbol 1073 MovieClip Frame 1
if (!moreBoss) {
stop();
}
Symbol 1073 MovieClip Frame 8
stop();
Symbol 1074 Button
on (release) {
if (sound) {
pickItem.setVolume(0);
volControl.gotoAndStop("off");
sound = false;
} else {
pickItem.setVolume(100);
volControl.gotoAndStop("on");
sound = true;
}
}
Symbol 1077 MovieClip Frame 1
stop();
Symbol 1081 Button
on (release, keyPress "p") {
_root.pause = true;
Mouse.show();
play();
}
Symbol 1084 Button
on (release) {
play();
}
Symbol 1085 Button
on (release) {
stopAllSounds();
delete _root.onEnterFrame;
_root.gotoAndStop("menu");
}
Symbol 1086 Button
on (release) {
if (_quality == "HIGH") {
_quality = "LOW";
} else {
_quality = "HIGH";
}
}
Symbol 1089 MovieClip Frame 1
stop();
Symbol 1089 MovieClip Frame 13
stop();
Symbol 1089 MovieClip Frame 20
_root.pause = false;
Mouse.hide();
Symbol 1092 MovieClip Frame 10
stop();
Symbol 1092 MovieClip Frame 22
_root.gotoAndStop(_root.frameTujuan);
Instance of Symbol 881 MovieClip in Symbol 1099 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.game.char.hit) && (_root.game.char.hp > 1)) {
_root.game.char.hp--;
_root.game.char.grav = 0;
_root.game.char.jumppower = 15;
}
}
Instance of Symbol 1058 MovieClip "turret0" in Symbol 1105 MovieClip Frame 1
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (Math.abs(_rotation) + speed);
timer--;
speed = speed * 0.9;
if (Math.abs(_rotation) < 90) {
_rotation = 90;
} else if (Math.abs(_rotation) > 179) {
_rotation = 179;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Instance of Symbol 1058 MovieClip "turret1" in Symbol 1105 MovieClip Frame 1
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (_rotation + speed);
timer--;
speed = speed * 0.9;
if (_rotation < 0) {
_rotation = 0;
} else if (_rotation > 90) {
_rotation = 90;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Instance of Symbol 898 MovieClip "revballpart" in Symbol 1108 MovieClip Frame 1
onClipEvent (load) {
var _alpha = 100;
var speedx = (10 - random(20));
var speedy = random(20);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
if (_alpha < 0) {
removeMovieClip(this);
}
_alpha = (_alpha - 5);
grav++;
_x = (_x + speedx);
_y = (_y + (grav - speedy));
}
Instance of Symbol 901 MovieClip "smoke" in Symbol 1108 MovieClip Frame 1
onClipEvent (load) {
var _alpha = (40 + random(60));
var ukuran = (25 + random(50));
_yscale = ukuran;
var _xscale = ukuran;
var ukuran = (100 + random(150));
var fly = 0;
speedx = 3 - random(7);
speedy = random(7);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
fly++;
if (_xscale < ukuran) {
_xscale = (_xscale + ((ukuran - _yscale) / 10));
_yscale = (_yscale + ((ukuran - _yscale) / 10));
}
if (_alpha < 0) {
removeMovieClip(this);
}
_alpha = (_alpha - 3);
_x = (_x + speedx);
_y = (_y + (speedy - fly));
}
Instance of Symbol 117 MovieClip "pickwep2" in Symbol 1108 MovieClip Frame 1
onClipEvent (load) {
speedx = 7 - random(15);
speedy = random(10);
}
onClipEvent (enterFrame) {
_x = (_x + speedx);
_y = (_y + (grav - speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
grav++;
if (this.hitTest(_parent._parent.char.hit)) {
_parent._parent.nextlevel_mc.play();
_root.pickItem.start();
_root.totalwep = 3;
_root.wep2.gotoAndStop(2);
removeMovieClip(this);
}
if (_parent.hit.hitTest(_x + _parent._x, (_y + _parent._y) + (_height / 2), true)) {
grav = 0;
}
}
Instance of Symbol 1105 MovieClip "boss" in Symbol 1108 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
item = "pickwep2";
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
_root.bossHealth.hp._xscale = hp * divider;
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
var i;
var ex;
var ey;
var nama;
var tipe;
var jeda = 0;
hp = 150;
var divider = (150 / hp);
var firetime = random(70);
var moveAgain = 50;
var speedx = 0;
var speedy = 0;
var tujuanx = ((_x + 100) - random(200));
var tujuany = (-random(150));
var speedJatuh = (10 - random(20));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!_root.execBoss)) {
return(undefined);
}
if ((hp < 1) || (hp == undefined)) {
if (genItem) {
_root.bossHealth.play();
_root.deadSound.start();
_root.score = _root.score + 3000;
spawnItem();
_root.bossDead = true;
genItem = false;
}
_y = (_y + 10);
_x = (_x + speedJatuh);
_rotation = (_rotation + speedJatuh);
if (_y > 400) {
_visible = false;
}
return(undefined);
}
hitBullet();
_x = (_x + (((tujuanx - _x) / 10) + speedx));
_y = (_y + (((tujuany - _y) / 10) + speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
if (moveAgain < 0) {
tujuanx = ((_root.game.char._x - _parent._x) + 200) - random(400);
tujuany = -random(150);
moveAgain = random(100);
}
moveAgain--;
if (firetime < 0) {
var tembak = 4;
var firetime = (60 + random(30));
}
if ((tembak > 0) && (jeda < 0)) {
_root.wepSound3.start();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = (_x - 61) + (122 * random(2));
_parent[namaatk]._y = (_y + 11) + (27 * random(2));
_parent[namaatk].speedx = 5 + random(5);
_parent[namaatk].speedy = random(10);
tembak--;
bl = 0;
while (bl < 2) {
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = (_x - 35) + (70 * bl);
_parent[namaatk]._y = _y + 78;
turret = "turret" + bl;
_parent[namaatk].speedx = 20 * Math.cos(this[turret]._rotation * (Math.PI/180));
_parent[namaatk].speedy = 20 * Math.sin(this[turret]._rotation * (Math.PI/180));
bl++;
}
var jeda = 5;
}
jeda--;
if ((((_x + _parent._x) > 0) && ((_x + _parent._x) < 680)) && (_y > -250)) {
firetime--;
}
}
Instance of Symbol 881 MovieClip in Symbol 1108 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.game.char.hit) && (_root.game.char.hp > 0)) {
_root.game.char.hp--;
_root.game.char.grav = 0;
_root.game.char.jumppower = 15;
}
}
Instance of Symbol 881 MovieClip in Symbol 1108 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.game.char.hit) && (_root.game.char.hp > 0)) {
_root.game.char.hp--;
_root.game.char.grav = 0;
_root.game.char.jumppower = 15;
}
}
Instance of Symbol 881 MovieClip in Symbol 1108 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.game.char.hit) && (_root.game.char.hp > 0)) {
_root.game.char.hp--;
_root.game.char.grav = 0;
_root.game.char.jumppower = 15;
}
}
Instance of Symbol 904 MovieClip "redatk" in Symbol 1108 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_x = (_x + speedx);
_y = (_y + speedy);
_alpha = (_alpha-1);
if (_parent.hit.hitTest(_x + _parent._x, _y + _parent._y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redexplod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama]._alpha = 60 + random(40);
removeMovieClip(this);
}
if (_root.game.char.hitTest(_x + _parent._x, _y + _parent._y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redexplod, nama, _parent.getNextHighestDepth() + 10);
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama]._alpha = 60 + random(40);
_root.game.char.hp = _root.game.char.hp - 2;
removeMovieClip(this);
}
if (_alpha < 0) {
removeMovieClip(this);
}
}
onClipEvent (load) {
_alpha = 100;
}
Instance of Symbol 919 MovieClip "enem0" in Symbol 1108 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
var i;
var ex;
var ey;
var nama;
var tipe;
hp = 3;
var firetime = random(70);
var moveAgain = 50;
var speedx = 0;
var speedy = 0;
var tujuanx = ((_x + 100) - random(200));
var tujuany = (-random(150));
var speedJatuh = (10 - random(20));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
if ((hp < 1) || (hp == undefined)) {
if (genItem) {
_root.score = _root.score + 100;
_root.deadSound();
var chance = random(8);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
_y = (_y + 10);
_x = (_x + speedJatuh);
_rotation = (_rotation + speedJatuh);
if (_y > 400) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
_x = (_x + (((tujuanx - _x) / 10) + speedx));
_y = (_y + (((tujuany - _y) / 10) + speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
if (moveAgain < 0) {
tujuanx = (_x + 100) - random(200);
tujuany = -random(150);
moveAgain = random(100);
}
moveAgain--;
if (_root.game.char._x > (_parent._x + _x)) {
_xscale = -100;
} else {
_xscale = 100;
}
if (firetime < 0) {
_root.wepSound1.start();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x;
_parent[namaatk]._y = _y;
_parent[namaatk].speedx = (-_xscale) / 10;
_parent[namaatk].speedy = random(10);
blast.play;
firetime = 40 + random(30);
}
if (((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
if ((((_x + _parent._x) > 0) && ((_x + _parent._x) < 680)) && (_y > -250)) {
firetime--;
}
}
Instance of Symbol 982 MovieClip "enem3" in Symbol 1108 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
stop();
var warna = (random(5) + 1);
var tujuanx = (-random(320));
var tujuany = random(240);
var timerAim = 100;
var movex = 0;
var movey = 0;
var hp = 6;
var wpex;
var wpey;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var jumppower = 0;
var action = "stand";
var grav = 0;
var movechar = false;
var aksi = 0;
var firetime = (40 + random(30));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
var bottomy = ((_y + (_height / 2)) + _parent._y);
var bottomx = (_x + _parent._x);
gotoAndStop(action);
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.hit.hitTest(bottomx, bottomy, true)) {
grav = 1;
_y = (_y-1);
}
_y = (_y + (grav - jumppower));
if (_parent.hit.hitTest(bottomx, bottomy, true) || (_parent.hit.hitTest(bottomx, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (hp < 3) {
}
if (hp < 1) {
if (genItem) {
_root.score = _root.score + 300;
_root.deadSound.start();
var chance = random(5);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
action = "dead";
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
if (charx > _x) {
var _xscale = 100;
} else if (charx < _x) {
var _xscale = -100;
}
movex = movex + ((tujuanx - movex) / 10);
movey = movey + ((tujuany - movey) / 10);
timerAim--;
if (timerAim < 0) {
tujuanx = -50 - random(320);
tujuany = 120 - random(240);
timerAim = 50 + random(50);
}
tellTarget (body.arm) {
_rotation = ((Math.atan2(_parent._parent.movey - _y, _parent._parent.movex - _x) * 180) / Math.PI);
var wepPoint = {x:_x + 70, y:_y - tujuan};
localToGlobal(wepPoint);
_parent._parent.wepx = wepPoint.x;
_parent._parent.wepy = wepPoint.y;
_y = (_y + ((tujuan - _y) / 2));
if (_parent._parent.duck) {
var tujuan = 20;
} else {
var tujuan = 0;
}
};
var charx = (_parent._parent.char._x - _parent._x);
if (moveable == true) {
if (Math.floor(jumppower) == 0) {
var action = "run";
} else {
var action = "jump";
}
speed = ((charx - _xscale) - _x) / 10;
if (speed > 5) {
speed = 5;
} else if (speed < -5) {
speed = -5;
}
_x = (_x + speed);
}
if (Math.floor(Math.abs(speed)) == 1) {
var idle = random(2);
}
if ((moveable && (Math.floor(Math.abs(speed)) < 1)) && (jumppower == 0)) {
if (idle == 0) {
var action = "stand";
} else {
var action = "duck";
}
}
if (_parent.hit.hitTest(bottomx + 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x - 10);
} else if (_parent.hit.hitTest(bottomx - 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x + 10);
}
if (_parent.hit.hitTest(bottomx - 20, bottomy, true) || (_parent.hit.hitTest(bottomx + 20, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (firetime < 0) {
_root.wepSound1.start();
body.arm.blast.play();
body.core.blast.play();
body.leg.blast.play();
body.leg2.blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = wepx - _parent._x;
_parent[namaatk]._y = wepy - _parent._y;
_parent[namaatk]._rotation = body.arm._rotation;
_parent[namaatk].speedx = ((-_xscale) / 5) * Math.cos(_parent[namaatk]._rotation * (Math.PI/180));
_parent[namaatk].speedy = ((-_xscale) / 5) * Math.sin(_parent[namaatk]._rotation * (((Math.PI/180) * (-_xscale)) / 100));
firetime = 40 + random(30);
}
firetime--;
if ((((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) || (_y > 400)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
}
Instance of Symbol 1107 MovieClip "enem1" in Symbol 1108 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
var i;
var ex;
var ey;
var nama;
var tipe;
hp = 3;
var firetime = random(70);
var moveAgain = 50;
var speedx = 0;
var speedy = 0;
var tujuanx = ((_x + 100) - random(200));
var tujuany = (-random(150));
var speedJatuh = (10 - random(20));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
if ((hp < 1) || (hp == undefined)) {
if (genItem) {
_root.deadSound.start();
_root.score = _root.score + 100;
var chance = random(8);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
_y = (_y + 10);
_x = (_x + speedJatuh);
_rotation = (_rotation + speedJatuh);
if (_y > 400) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
_x = (_x + (((tujuanx - _x) / 10) + speedx));
_y = (_y + (((tujuany - _y) / 10) + speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
if (moveAgain < 0) {
tujuanx = ((_root.game.char._x - _parent._x) + 200) - random(400);
tujuany = -random(150);
moveAgain = random(100);
}
moveAgain--;
if (_root.game.char._x > (_parent._x + _x)) {
_xscale = -100;
} else {
_xscale = 100;
}
if (firetime < 0) {
_root.wepSound1.start();
blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x;
_parent[namaatk]._y = _y;
_parent[namaatk].speedx = (-_xscale) / 10;
_parent[namaatk].speedy = random(10);
firetime = 40 + random(30);
}
if (((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
if ((((_x + _parent._x) > 0) && ((_x + _parent._x) < 680)) && (_y > -250)) {
firetime--;
}
}
Instance of Symbol 925 MovieClip "enem2" in Symbol 1108 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, namax, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
stop();
var warna = (random(5) + 1);
var tujuanx = (-random(320));
var tujuany = random(240);
var timerAim = 100;
var movex = 0;
var movey = 0;
var hp = 4;
var wpex;
var wpey;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var jumppower = 0;
var grav = 0;
var movechar = false;
var aksi = 0;
var firetime = (40 + random(30));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
var bottomy = ((_y + (_height / 2)) + _parent._y);
var bottomx = (_x + _parent._x);
gotoAndStop(action);
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.hit.hitTest(bottomx, bottomy, true)) {
grav = 1;
_y = (_y-1);
}
_y = (_y + (grav - jumppower));
if (_parent.hit.hitTest(bottomx, bottomy, true) || (_parent.hit.hitTest(bottomx, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (hp < 3) {
}
if (hp < 1) {
if (genItem) {
_root.score = _root.score + 150;
_root.deadSound.start();
var chance = random(10);
if (chance == 1) {
spawnItem();
}
speed = speed - (((10 + random(20)) * _xscale) / 100);
jumppower = 10 + random(10);
genItem = false;
}
_x = (_x + speed);
_rotation = (_rotation + speed);
speed = speed * 0.9;
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
if (charx > _x) {
var _xscale = 100;
} else if (charx < _x) {
var _xscale = -100;
}
movex = movex + ((tujuanx - movex) / 10);
movey = movey + ((tujuany - movey) / 10);
timerAim--;
if (timerAim < 0) {
tujuanx = -50 - random(320);
tujuany = 120 - random(240);
timerAim = 50 + random(50);
}
var charx = (_parent._parent.char._x - _parent._x);
if (moveable == true) {
speed = ((charx - _xscale) - _x) / 10;
if (speed > 5) {
speed = 5;
} else if (speed < -5) {
speed = -5;
}
_x = (_x + speed);
}
if (Math.floor(Math.abs(speed)) == 1) {
var idle = random(2);
}
if (_parent.hit.hitTest(bottomx, bottomy - 2, true)) {
_y = (_y-1);
}
if (_parent.hit.hitTest(bottomx + 20, bottomy - 15, true)) {
_x = (_x - 5);
} else if (_parent.hit.hitTest(bottomx - 20, bottomy - 15, true)) {
_x = (_x + 5);
}
if (_parent.hit.hitTest(bottomx - 20, bottomy, true) || (_parent.hit.hitTest(bottomx + 20, bottomy, true))) {
var grav = 0;
} else {
grav++;
}
if (firetime < 0) {
_root.wepSound1.start();
blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x;
_parent[namaatk]._y = _y;
_parent[namaatk].speedx = _xscale / 10;
_parent[namaatk].speedy = random(10);
firetime = 40 + random(30);
}
firetime--;
if ((((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) || (_y > 400)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
}
Instance of Symbol 121 MovieClip "pick0" in Symbol 1108 MovieClip Frame 1
onClipEvent (load) {
speedx = 7 - random(15);
speedy = random(10);
}
onClipEvent (enterFrame) {
_x = (_x + speedx);
_y = (_y + (grav - speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
grav++;
if (this.hitTest(_parent._parent.char.hit)) {
_root.specialAmmo = _root.specialAmmo + (50 + random(50));
_root.pickItem.start();
removeMovieClip(this);
}
if (_parent.hit.hitTest(_x + _parent._x, (_y + _parent._y) + (_height / 2), true)) {
grav = 0;
}
}
Instance of Symbol 123 MovieClip "pick1" in Symbol 1108 MovieClip Frame 1
onClipEvent (load) {
speedx = 7 - random(15);
speedy = random(10);
}
onClipEvent (enterFrame) {
_x = (_x + speedx);
_y = (_y + (grav - speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
grav++;
if (this.hitTest(_parent._parent.char.hit)) {
_root.pickItem.start();
_parent._parent.char.hp = _parent._parent.char.hp + 20;
if (_parent._parent.char.hp > 100) {
_parent._parent.char.hp = 100;
}
removeMovieClip(this);
}
if (_parent.hit.hitTest(_x + _parent._x, (_y + _parent._y) + (_height / 2), true)) {
grav = 0;
}
}
Instance of Symbol 1108 MovieClip "ground" in Symbol 1112 MovieClip Frame 1
onClipEvent (load) {
var spawntimer = 0;
var jmlSpawn = 0;
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
spawntimer--;
if ((spawntimer < 0) && (jmlSpawn < 7)) {
var spawnname = ("enem" + random(4));
var namaMusuh = ("enemies" + this.getNextHighestDepth());
duplicateMovieClip (spawnname, namaMusuh, this.getNextHighestDepth() + 200);
this[namaMusuh].go = 1;
this[namaMusuh]._x = (-100 + (random(2) * 900)) - _x;
this[namaMusuh]._y = -50 - random(100);
jmlSpawn++;
spawntimer = 15;
}
}
Instance of Symbol 986 MovieClip "bullet" in Symbol 1112 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
_x = (_x + speedx);
_y = (_y + speedy);
_alpha = (_alpha - 5);
if (_parent.ground.hit.hitTest(_x, _y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.explod, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
_parent.ground[nama]._alpha = 60 + random(40);
_parent.ground[nama]._rotation = _rotation;
removeMovieClip(this);
}
if (((((_x < -15) || (_x > 665)) || (_y < -15)) || (_y > 415)) || (_alpha < 0)) {
removeMovieClip(this);
}
}
onClipEvent (load) {
_alpha = 100;
damage = 1;
}
Instance of Symbol 989 MovieClip "fireball" in Symbol 1112 MovieClip Frame 1
onClipEvent (load) {
var _alpha = (random(40) + 60);
var ukuran = (25 + random(50));
_yscale = ukuran;
var _xscale = ukuran;
var ukuran = (100 + random(150));
var fly = 0;
var damage = 2;
}
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
fly = fly + 0.5;
if (_xscale < ukuran) {
_xscale = (_xscale + ((ukuran - _yscale) / 10));
_yscale = (_yscale + ((ukuran - _yscale) / 10));
}
if (_alpha < 0) {
removeMovieClip(this);
}
_alpha = (_alpha - 3);
_x = (_x + speedx);
_y = (_y + (speedy - fly));
if (_parent.ground.hit.hitTest(_x, _y, true)) {
nama = "smoke" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.smoke, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
removeMovieClip(this);
}
}
Instance of Symbol 1002 MovieClip "revball" in Symbol 1112 MovieClip Frame 1
onClipEvent (load) {
var _alpha = 100;
var myspeedx = 0;
var myspeedy = 0;
var damage = 2;
var _rotation = random(360);
}
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
if (_alpha < 0) {
removeMovieClip(this);
}
if (((((_x < -15) || (_x > 665)) || (_y < -15)) || (_y > 415)) || (_alpha < 0)) {
removeMovieClip(this);
}
_alpha = (_alpha - 5);
myspeedx = myspeedx + ((speedx - myspeedx) / 10);
myspeedy = myspeedy + ((speedy - myspeedy) / 10);
_rotation = (_rotation + myspeedx);
_x = (_x + myspeedx);
_y = (_y + myspeedy);
if (_parent.ground.hit.hitTest(_x, _y, true)) {
_root.explodeSound.start();
i = 0;
while (i < 5) {
nama = "revballpart" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.revballpart, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
_parent.ground[nama].grav = 0;
i++;
}
removeMovieClip(this);
}
}
Instance of Symbol 1005 MovieClip "laser" in Symbol 1112 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
_x = (_x + speedx);
_y = (_y + speedy);
_alpha = (_alpha - 5);
if (_parent.ground.hit.hitTest(_x, _y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.explod2, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
_parent.ground[nama]._alpha = 60 + random(40);
_parent.ground[nama]._rotation = _rotation;
speedx = speedx * -1;
speedy = speedy * -1;
_rotation = (_rotation + 180);
}
if (((((_x < -15) || (_x > 665)) || (_y < -15)) || (_y > 415)) || (_alpha < 0)) {
removeMovieClip(this);
}
}
onClipEvent (load) {
_alpha = 100;
var damage = 3;
}
Instance of Symbol 1033 MovieClip "char" in Symbol 1112 MovieClip Frame 1
onClipEvent (load) {
stop();
var hp = 100;
var firerate = 0;
var wpex;
var posx = _x;
var wpey;
var ukuran = _xscale;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var movechar = true;
var sisi = false;
var jumppower = 0;
var action = "stand";
var grav = 0;
var movechar = false;
var keyListener = new Object();
var mouseListener = new Object();
var wepselect = 1;
keyListener.onKeyUp = function () {
jumpgo = true;
if ((Key.getCode() == 83) && (jump == false)) {
body.play();
}
};
Key.addListener(keyListener);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
gotoAndStop(action);
_y = (_y + (grav - jumppower));
if (((sisi == false) && (movechar)) && (_x > posx)) {
var movechar = false;
var posx = _x;
} else if ((sisi && (movechar)) && (_x < posx)) {
var movechar = false;
var posx = _x;
}
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.ground.hit.hitTest(_x, _y - 2, true)) {
_y = (_y-1);
}
if (_parent.ground.hit.hitTest(_x - 10, _y, true) || (_parent.ground.hit.hitTest(_x + 10, _y, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (_parent.gnung._x < -380) {
_parent.gnung._x = -380;
} else if (_parent.gnung._x > -70) {
_parent.gnung._x = -70;
}
if (_parent.ground._x > -10) {
_parent.ground._x = -10;
_parent.ground2._x = -10;
var movechar = true;
var sisi = false;
} else if (_parent.ground._x < -5346) {
if (_root.execBoss == false) {
_root.bossHealth.play();
_root.bossHealth.foto = 2;
_root.bossHealth.hp._xscale = 150;
_root.siren.start(0, 3);
}
_root.execBoss = true;
_parent.ground._x = -5346;
_parent.ground2._x = -5346;
var movechar = true;
var sisi = true;
}
if (_x < 50) {
var _x = 50;
} else if (_x > 640) {
var _x = 640;
if (_root.bossDead == true) {
_root.frameTujuan = "level3";
_root.fader.play();
}
}
if (hp < 1) {
action = "dead";
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_root.frameTujuan = "gameOver";
_root.fader.play();
}
return(undefined);
}
if (_root._xmouse > _x) {
var _xscale = ukuran;
} else if (_root._xmouse < _x) {
var _xscale = (-ukuran);
}
tellTarget (body.arm) {
_rotation = ((Math.atan2(_parent._ymouse - _y, _parent._xmouse - _x) * 180) / Math.PI);
var wepPoint = {x:_x + 70, y:_y - tujuan};
localToGlobal(wepPoint);
_parent._parent.wepx = wepPoint.x - _root.game._x;
_parent._parent.wepy = wepPoint.y - _root.game._y;
_y = (_y + ((tujuan - _y) / 2));
if (_parent._parent.duck) {
var tujuan = 20;
} else {
var tujuan = 0;
}
};
if (Key.isDown(49)) {
var wepselect = 1;
body.arm.weapon.gotoAndStop(wepselect);
} else if (Key.isDown(50) && (_root.totalwep > 1)) {
var wepselect = 2;
body.arm.weapon.gotoAndStop(wepselect);
} else if (Key.isDown(51) && (_root.totalwep > 2)) {
var wepselect = 3;
body.arm.weapon.gotoAndStop(wepselect);
} else if (Key.isDown(52) && (_root.totalwep > 3)) {
var wepselect = 4;
body.arm.weapon.gotoAndStop(wepselect);
}
if (Key.isDown(65) && (moveable == true)) {
if ((jumppower == 0) || (jump == false)) {
var action = "run";
} else {
var action = "jump";
}
if (movechar) {
_x = (_x - 10);
} else {
_parent.gnung._x = _parent.gnung._x + 0.1;
_parent.ground._x = _parent.ground._x + 10;
_parent.ground2._x = _parent.ground2._x + 10;
}
} else if (Key.isDown(68) && (moveable == true)) {
if ((jumppower == 0) || (jump == false)) {
var action = "run";
} else {
var action = "jump";
}
if (movechar) {
_x = (_x + 10);
} else {
_parent.gnung._x = _parent.gnung._x - 0.1;
_parent.ground._x = _parent.ground._x - 10;
_parent.ground2._x = _parent.ground2._x - 10;
}
}
if ((Key.isDown(87) && (jump == false)) && (moveable == true)) {
if (jumpgo) {
var jumppower = 30;
var action = "jump";
body.play();
var jumpgo = false;
}
var jump = true;
} else if (((Key.isDown(83) && (jump == false)) && (moveable)) && (duck == false)) {
var moveable = false;
var duck = true;
var action = "duck";
}
if ((((((!Key.isDown(65)) && (!Key.isDown(68))) && (!Key.isDown(87))) && (!Key.isDown(83))) && (moveable)) && (jump == false)) {
var action = "stand";
}
if (_parent.ground.hit.hitTest(_x + 10, _y - 12, true)) {
if (movechar) {
_x = (_x - 10);
} else {
_parent.gnung._x = _parent.gnung._x + 0.1;
_parent.ground._x = _parent.ground._x + 10;
_parent.ground2._x = _parent.ground2._x + 10;
}
} else if (_parent.ground.hit.hitTest(_x - 10, _y - 12, true)) {
if (movechar) {
_x = (_x + 10);
} else {
_parent.gnung._x = _parent.gnung._x - 0.1;
_parent.ground._x = _parent.ground._x - 10;
_parent.ground2._x = _parent.ground2._x - 10;
}
}
if (_parent.ground.hit.hitTest(_x, _y - 2, true)) {
_y = (_y-1);
}
if (_parent.ground.hit.hitTest(_x - 10, _y, true) || (_parent.ground.hit.hitTest(_x + 10, _y, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if ((_root.fire && (firerate < 0)) && (wepselect == 1)) {
_root.fireWeapon();
body.arm.blast.play();
body.head.blast.play();
var firerate = 2;
} else if (((_root.fire && (firerate < 0)) && (wepselect == 2)) && (_root.specialAmmo > 0)) {
_root.fireWeapon2();
body.head.blast.play();
_root.specialAmmo--;
var firerate = 0;
} else if (((_root.fire && (firerate < 0)) && (wepselect == 3)) && (_root.specialAmmo > 2)) {
_root.fireWeapon3();
body.head.blast.play();
_root.specialAmmo = _root.specialAmmo - 3;
var firerate = 8;
} else if (((_root.fire && (firerate < 0)) && (wepselect == 4)) && (_root.specialAmmo > 1)) {
_root.fireWeapon4();
body.arm.blast2.play();
body.head.blast.play();
_root.specialAmmo = _root.specialAmmo - 2;
var firerate = 8;
}
firerate--;
}
Instance of Symbol 881 MovieClip in Symbol 1135 MovieClip Frame 50
onClipEvent (enterFrame) {
if (this.hitTest(_root.game.char.hit) && (_root.game.char.hp > 0)) {
_root.game.char.hp = _root.game.char.hp - 0.5;
}
}
Instance of Symbol 1139 MovieClip in Symbol 1140 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
stop();
} else {
play();
}
}
Instance of Symbol 1139 MovieClip in Symbol 1140 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
stop();
} else {
play();
}
}
Instance of Symbol 1139 MovieClip in Symbol 1140 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
stop();
} else {
play();
}
}
Instance of Symbol 1058 MovieClip "turret2" in Symbol 1141 MovieClip Frame 1
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (Math.abs(_rotation) + speed);
timer--;
speed = speed * 0.9;
if (Math.abs(_rotation) < 90) {
_rotation = 90;
} else if (Math.abs(_rotation) > 179) {
_rotation = 179;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Instance of Symbol 1058 MovieClip "turret3" in Symbol 1141 MovieClip Frame 1
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (_rotation + speed);
timer--;
speed = speed * 0.9;
if (_rotation < 0) {
_rotation = 0;
} else if (_rotation > 90) {
_rotation = 90;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Instance of Symbol 1058 MovieClip "turret0" in Symbol 1141 MovieClip Frame 1
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (Math.abs(_rotation) + speed);
timer--;
speed = speed * 0.9;
if (Math.abs(_rotation) < 90) {
_rotation = 90;
} else if (Math.abs(_rotation) > 179) {
_rotation = 179;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Instance of Symbol 1058 MovieClip "turret1" in Symbol 1141 MovieClip Frame 1
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (_rotation + speed);
timer--;
speed = speed * 0.9;
if (_rotation < 0) {
_rotation = 0;
} else if (_rotation > 90) {
_rotation = 90;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Instance of Symbol 1058 MovieClip "turret" in Symbol 1142 MovieClip Frame 1
onClipEvent (load) {
timer = 10;
speed = 20 - random(40);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_rotation = (_rotation + speed);
timer--;
speed = speed * 0.9;
if (_rotation < 0) {
_rotation = 0;
} else if (_rotation > 90) {
_rotation = 90;
}
if (timer < 0) {
speed = 20 - random(40);
timer = 20 + random(30);
}
}
Symbol 1156 MovieClip Frame 1
stop();
Symbol 1160 MovieClip Frame 1
stop();
Symbol 1168 MovieClip Frame 26
stop();
Symbol 1169 MovieClip Frame 7
stop();
Symbol 1170 MovieClip Frame 23
stop();
Instance of Symbol 1125 MovieClip in Symbol 1172 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
stop();
} else {
play();
}
}
Instance of Symbol 1125 MovieClip in Symbol 1172 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
stop();
} else {
play();
}
}
Instance of Symbol 1125 MovieClip in Symbol 1172 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
stop();
} else {
play();
}
}
Instance of Symbol 1136 MovieClip in Symbol 1172 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
stop();
} else {
play();
}
}
Instance of Symbol 1136 MovieClip in Symbol 1172 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
stop();
} else {
play();
}
}
Instance of Symbol 1136 MovieClip in Symbol 1172 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
stop();
} else {
play();
}
}
Instance of Symbol 1136 MovieClip in Symbol 1172 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
stop();
} else {
play();
}
}
Instance of Symbol 898 MovieClip "revballpart" in Symbol 1172 MovieClip Frame 1
onClipEvent (load) {
var _alpha = 100;
var speedx = (10 - random(20));
var speedy = random(20);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
if (_alpha < 0) {
removeMovieClip(this);
}
_alpha = (_alpha - 5);
grav++;
_x = (_x + speedx);
_y = (_y + (grav - speedy));
}
Instance of Symbol 901 MovieClip "smoke" in Symbol 1172 MovieClip Frame 1
onClipEvent (load) {
var _alpha = (40 + random(60));
var ukuran = (25 + random(50));
_yscale = ukuran;
var _xscale = ukuran;
var ukuran = (100 + random(150));
var fly = 0;
speedx = 3 - random(7);
speedy = random(7);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
fly++;
if (_xscale < ukuran) {
_xscale = (_xscale + ((ukuran - _yscale) / 10));
_yscale = (_yscale + ((ukuran - _yscale) / 10));
}
if (_alpha < 0) {
removeMovieClip(this);
}
_alpha = (_alpha - 3);
_x = (_x + speedx);
_y = (_y + (speedy - fly));
}
Instance of Symbol 881 MovieClip in Symbol 1172 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.game.char.hit) && (_root.game.char.hp > 1)) {
_root.game.char.hp--;
_root.game.char.grav = 0;
_root.game.char.jumppower = 15;
}
}
Instance of Symbol 1141 MovieClip in Symbol 1172 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
_root.bossHealth.hp._xscale = hp * divider;
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
var i;
var ex;
var ey;
var nama;
var tipe;
var jeda = 0;
hp = 150;
var divider = (150 / hp);
var firetime = random(70);
var moveAgain = 50;
var speedx = 0;
var speedy = 0;
var tujuanx = ((_x + 100) - random(200));
var tujuany = (-random(150));
var speedJatuh = (10 - random(20));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!_root.bossDead)) {
return(undefined);
}
if ((hp < 1) || (hp == undefined)) {
if (genItem) {
_root.bossHealth.moreBoss = false;
_root.bossHealth.play();
_parent._parent.nextlevel_mc.play();
_root.bossDead2 = true;
_root.deadSound.start();
_root.score = _root.score + 8000;
spawnItem();
genItem = false;
}
_y = (_y + 10);
_x = (_x + speedJatuh);
_rotation = (_rotation + speedJatuh);
if (_y > 400) {
_visible = false;
}
return(undefined);
}
hitBullet();
_x = (_x + (((tujuanx - _x) / 10) + speedx));
_y = (_y + (((tujuany - _y) / 10) + speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
if (moveAgain < 0) {
tujuanx = ((_root.game.char._x - _parent._x) + 200) - random(400);
tujuany = -random(150);
moveAgain = random(100);
}
moveAgain--;
if (firetime < 0) {
var tembak = 4;
var firetime = (60 + random(30));
}
if ((tembak > 0) && (jeda < 0)) {
_root.wepSound1.start();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = (_x - 46) + (92 * random(2));
_parent[namaatk]._y = _y + 48;
_parent[namaatk].speedx = 5 + random(5);
_parent[namaatk].speedy = random(10);
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = (_x - 28) + (56 * random(2));
_parent[namaatk]._y = _y + 81;
_parent[namaatk].speedx = 5 + random(5);
_parent[namaatk].speedy = random(10);
tembak--;
bl = 0;
while (bl < 4) {
namaatk = "enfire" + _parent.getNextHighestDepth();
if (bl < 2) {
turretposx = (_x - 62) + (bl * 124);
turretposy = _y - 9;
} else {
turretposx = (_x - 35) + (70 * (bl - 2));
turretposy = _y + 88;
}
_parent[namaatk]._x = turretposx;
_parent[namaatk]._y = turretposy;
turret = "turret" + bl;
_parent[namaatk].speedx = 20 * Math.cos(this[turret]._rotation * (Math.PI/180));
_parent[namaatk].speedy = 20 * Math.sin(this[turret]._rotation * (Math.PI/180));
bl++;
}
var jeda = 5;
}
jeda--;
if ((((_x + _parent._x) > 0) && ((_x + _parent._x) < 680)) && (_y > -250)) {
firetime--;
}
}
Instance of Symbol 1142 MovieClip in Symbol 1172 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
_root.bossHealth.hp._xscale = hp * divider;
_root.explodeSound.start();
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
var i;
var ex;
var ey;
var nama;
var tipe;
var jeda = 0;
var jeda2 = 0;
var jeda3 = 0;
var speedGo = -5;
hp = 50;
var divider = (150 / hp);
var firetime = random(70);
var firetime2 = random(70);
var firetime3 = random(70);
var moveAgain = 50;
var speedx = 0;
var speedy = 0;
var tujuanx = ((_x + 100) - random(200));
var tujuany = (-random(150));
var speedJatuh = (10 - random(20));
var genItem = true;
var initSound = true;
var copterSound;
var copterSound = new Sound(this);
copterSound.attachSound("helicopter");
}
onClipEvent (enterFrame) {
if (_root.pause || (!_root.execBoss)) {
return(undefined);
}
if (initSound) {
copterSound.start();
var initSound = false;
}
if ((hp < 1) || (hp == undefined)) {
if (genItem) {
_root.bossHealth.moreBoss = true;
_root.bossHealth.foto = 4;
_root.bossHealth.icon.gotoAndStop(4);
_root.bossHealth.hp._xscale = 150;
_root.bossHealth.play();
_root.siren.start(0, 3);
_root.bossDead = true;
_root.deadSound.start();
_root.score = _root.score + 5000;
spawnItem();
copterSound.stop();
genItem = false;
}
_y = (_y + 20);
_x = (_x + speedJatuh);
_rotation = (_rotation + speedJatuh);
if (_y > 400) {
_visible = false;
}
return(undefined);
}
hitBullet();
_y = (_y + (((tujuany - _y) / 10) + speedy));
_x = (_x + speedGo);
speedx = speedx * 0.9;
speedy = speedy * 0.9;
_rotation = speedGo;
if (moveAgain < 0) {
tujuany = ((_root.game.char._y - _parent._y) - random(150)) - 150;
moveAgain = random(100);
}
moveAgain--;
if ((_parent._x + _x) > 800) {
speedGo = (-random(10)) - 10;
_xscale = 100;
} else if ((_parent._x + _x) < -200) {
speedGo = random(10) + 10;
_xscale = -100;
}
if (firetime < 0) {
var tembak = 3;
var firetime = (40 + random(30));
}
if (firetime2 < 0) {
var tembak2 = 3;
var firetime2 = (40 + random(30));
}
if (firetime3 < 0) {
var tembak3 = 3;
var firetime3 = (40 + random(30));
}
if ((tembak > 0) && (jeda < 0)) {
_root.wepSound1.start();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x + 2;
_parent[namaatk]._y = _y + 30;
_parent[namaatk].speedx = (_xscale / 5) * Math.cos(turret._rotation * (Math.PI/180));
_parent[namaatk].speedy = 20 * Math.sin(turret._rotation * (Math.PI/180));
tembak--;
var jeda = 3;
}
if ((tembak2 > 0) && (jeda2 < 0)) {
_root.wepSound1.start();
blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
var wepPoint = {x:blast._x, y:blast._y};
localToGlobal(wepPoint);
_parent[namaatk]._x = wepPoint.x - _parent._x;
_parent[namaatk]._y = wepPoint.y - _parent._y;
_parent[namaatk].speedx = ((-_xscale) / 5) * Math.cos(_rotation * (Math.PI/180));
_parent[namaatk].speedy = ((-_xscale) / 5) * Math.sin(_rotation * (Math.PI/180));
tembak2--;
var jeda2 = 3;
}
if ((tembak3 > 0) && (jeda3 < 0)) {
belly.play();
if ((belly._currentframe > 20) && (belly._currentframe < 40)) {
_root.wepSound1.start();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x - (((34 + random(42)) * _xscale) / 100);
_parent[namaatk]._y = _y + 39;
_parent[namaatk].speedx = 0;
_parent[namaatk].speedy = 5;
tembak3--;
var jeda3 = 2;
}
}
jeda--;
jeda2--;
jeda3--;
if ((((_x + _parent._x) > 0) && ((_x + _parent._x) < 680)) && (_y > -250)) {
firetime--;
firetime2--;
firetime3--;
}
}
Instance of Symbol 919 MovieClip "enem0" in Symbol 1172 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
var i;
var ex;
var ey;
var nama;
var tipe;
hp = 3;
var firetime = random(70);
var moveAgain = 50;
var speedx = 0;
var speedy = 0;
var tujuanx = ((_x + 100) - random(200));
var tujuany = (-random(150));
var speedJatuh = (10 - random(20));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
if ((hp < 1) || (hp == undefined)) {
if (genItem) {
_root.score = _root.score + 100;
_root.deadSound();
var chance = random(8);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
_y = (_y + 10);
_x = (_x + speedJatuh);
_rotation = (_rotation + speedJatuh);
if (_y > 400) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
_x = (_x + (((tujuanx - _x) / 10) + speedx));
_y = (_y + (((tujuany - _y) / 10) + speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
if (moveAgain < 0) {
tujuanx = (_x + 100) - random(200);
tujuany = -random(150);
moveAgain = random(100);
}
moveAgain--;
if (_root.game.char._x > (_parent._x + _x)) {
_xscale = -100;
} else {
_xscale = 100;
}
if (firetime < 0) {
_root.wepSound1.start();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x;
_parent[namaatk]._y = _y;
_parent[namaatk].speedx = (-_xscale) / 10;
_parent[namaatk].speedy = random(10);
blast.play;
firetime = 40 + random(30);
}
if (((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
if ((((_x + _parent._x) > 0) && ((_x + _parent._x) < 680)) && (_y > -250)) {
firetime--;
}
}
Instance of Symbol 982 MovieClip "enem3" in Symbol 1172 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
stop();
var warna = (random(5) + 1);
var tujuanx = (-random(320));
var tujuany = random(240);
var timerAim = 100;
var movex = 0;
var movey = 0;
var hp = 6;
var wpex;
var wpey;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var jumppower = 0;
var action = "stand";
var grav = 0;
var movechar = false;
var aksi = 0;
var firetime = (40 + random(30));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
var bottomy = ((_y + (_height / 2)) + _parent._y);
var bottomx = (_x + _parent._x);
gotoAndStop(action);
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.hit.hitTest(bottomx, bottomy, true)) {
grav = 1;
_y = (_y-1);
}
_y = (_y + (grav - jumppower));
if (_parent.hit.hitTest(bottomx, bottomy, true) || (_parent.hit.hitTest(bottomx, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (hp < 3) {
}
if (hp < 1) {
if (genItem) {
_root.score = _root.score + 300;
_root.deadSound.start();
var chance = random(5);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
action = "dead";
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
if (charx > _x) {
var _xscale = 100;
} else if (charx < _x) {
var _xscale = -100;
}
movex = movex + ((tujuanx - movex) / 10);
movey = movey + ((tujuany - movey) / 10);
timerAim--;
if (timerAim < 0) {
tujuanx = -50 - random(320);
tujuany = 120 - random(240);
timerAim = 50 + random(50);
}
tellTarget (body.arm) {
_rotation = ((Math.atan2(_parent._parent.movey - _y, _parent._parent.movex - _x) * 180) / Math.PI);
var wepPoint = {x:_x + 70, y:_y - tujuan};
localToGlobal(wepPoint);
_parent._parent.wepx = wepPoint.x;
_parent._parent.wepy = wepPoint.y;
_y = (_y + ((tujuan - _y) / 2));
if (_parent._parent.duck) {
var tujuan = 20;
} else {
var tujuan = 0;
}
};
var charx = (_parent._parent.char._x - _parent._x);
if (moveable == true) {
if (Math.floor(jumppower) == 0) {
var action = "run";
} else {
var action = "jump";
}
speed = ((charx - _xscale) - _x) / 10;
if (speed > 5) {
speed = 5;
} else if (speed < -5) {
speed = -5;
}
_x = (_x + speed);
}
if (Math.floor(Math.abs(speed)) == 1) {
var idle = random(2);
}
if ((moveable && (Math.floor(Math.abs(speed)) < 1)) && (jumppower == 0)) {
if (idle == 0) {
var action = "stand";
} else {
var action = "duck";
}
}
if (_parent.hit.hitTest(bottomx + 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x - 10);
} else if (_parent.hit.hitTest(bottomx - 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x + 10);
}
if (_parent.hit.hitTest(bottomx - 20, bottomy, true) || (_parent.hit.hitTest(bottomx + 20, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (firetime < 0) {
_root.wepSound1.start();
body.arm.blast.play();
body.core.blast.play();
body.leg.blast.play();
body.leg2.blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = wepx - _parent._x;
_parent[namaatk]._y = wepy - _parent._y;
_parent[namaatk]._rotation = body.arm._rotation;
_parent[namaatk].speedx = ((-_xscale) / 5) * Math.cos(_parent[namaatk]._rotation * (Math.PI/180));
_parent[namaatk].speedy = ((-_xscale) / 5) * Math.sin(_parent[namaatk]._rotation * (((Math.PI/180) * (-_xscale)) / 100));
firetime = 40 + random(30);
}
firetime--;
if ((((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) || (_y > 400)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
}
Instance of Symbol 1171 MovieClip "enem4" in Symbol 1172 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
stop();
var warna = (random(5) + 1);
var movex = 0;
var movey = 0;
var hp = 10;
var wpex;
var wpey;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var jumppower = 0;
var action = "stand";
var grav = 0;
var movechar = false;
var aksi = 0;
var firetime = (40 + random(30));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
var bottomy = ((_y + (_height / 2)) + _parent._y);
var bottomx = (_x + _parent._x);
gotoAndStop(action);
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.hit.hitTest(bottomx, bottomy, true)) {
grav = 1;
_y = (_y-1);
}
_y = (_y + (grav - jumppower));
if (_parent.hit.hitTest(bottomx, bottomy, true) || (_parent.hit.hitTest(bottomx, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (hp < 1) {
if (genItem) {
_root.deadSound.start();
_root.score = _root.score + 500;
var chance = random(5);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
action = "dead";
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
if (charx > _x) {
var _xscale = 100;
} else if (charx < _x) {
var _xscale = -100;
}
tellTarget (body.arm) {
if (_parent._parent._xscale == 100) {
_rotation = (180 - ((Math.atan2(_parent._parent.movey - _y, _parent._parent.movex - _x) * 180) / Math.PI));
} else {
_rotation = ((Math.atan2(_parent._parent.movey - _y, _parent._parent.movex - _x) * 180) / Math.PI);
}
var wepPoint = {x:_x + 70, y:_y - tujuan};
localToGlobal(wepPoint);
_parent._parent.wepx = wepPoint.x;
_parent._parent.wepy = wepPoint.y;
_y = (_y + ((tujuan - _y) / 2));
if (_parent._parent.duck) {
var tujuan = 20;
} else {
var tujuan = 0;
}
};
var charx = (_parent._parent.char._x - _parent._x);
var chary = (_parent._parent.char._y - _parent._y);
movex = movex + (((charx - _x) - movex) / 10);
movey = movey + (((chary - _y) - movey) / 10);
if (moveable == true) {
if (Math.floor(jumppower) == 0) {
var action = "run";
} else {
var action = "jump";
}
speed = ((charx - _xscale) - _x) / 10;
if (speed > 5) {
speed = 5;
} else if (speed < -5) {
speed = -5;
}
_x = (_x + speed);
}
if (Math.floor(Math.abs(speed)) == 1) {
var idle = random(2);
}
if ((moveable && (Math.floor(Math.abs(speed)) < 1)) && (jumppower == 0)) {
if (idle == 0) {
var action = "stand";
} else {
var action = "duck";
}
}
if (_parent.hit.hitTest(bottomx + 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x - 10);
} else if (_parent.hit.hitTest(bottomx - 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x + 10);
}
if (_parent.hit.hitTest(bottomx - 20, bottomy, true) || (_parent.hit.hitTest(bottomx + 20, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (firetime < 0) {
_root.wepSound1.start();
body.arm.blast.play();
body.core.blast.play();
body.head.blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = wepx - _parent._x;
_parent[namaatk]._y = wepy - _parent._y;
_parent[namaatk]._rotation = body.arm._rotation;
_parent[namaatk].speedx = ((-_xscale) / 5) * Math.cos(_parent[namaatk]._rotation * (Math.PI/180));
_parent[namaatk].speedy = ((-_xscale) / 5) * Math.sin(_parent[namaatk]._rotation * (((Math.PI/180) * (-_xscale)) / 100));
firetime = random(30);
}
firetime--;
if ((((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) || (_y > 400)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
}
Instance of Symbol 1107 MovieClip "enem1" in Symbol 1172 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
var i;
var ex;
var ey;
var nama;
var tipe;
hp = 3;
var firetime = random(70);
var moveAgain = 50;
var speedx = 0;
var speedy = 0;
var tujuanx = ((_x + 100) - random(200));
var tujuany = (-random(150));
var speedJatuh = (10 - random(20));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
if ((hp < 1) || (hp == undefined)) {
if (genItem) {
_root.deadSound.start();
_root.score = _root.score + 100;
var chance = random(8);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
_y = (_y + 10);
_x = (_x + speedJatuh);
_rotation = (_rotation + speedJatuh);
if (_y > 400) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
_x = (_x + (((tujuanx - _x) / 10) + speedx));
_y = (_y + (((tujuany - _y) / 10) + speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
if (moveAgain < 0) {
tujuanx = ((_root.game.char._x - _parent._x) + 200) - random(400);
tujuany = -random(150);
moveAgain = random(100);
}
moveAgain--;
if (_root.game.char._x > (_parent._x + _x)) {
_xscale = -100;
} else {
_xscale = 100;
}
if (firetime < 0) {
_root.wepSound1.start();
blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x;
_parent[namaatk]._y = _y;
_parent[namaatk].speedx = (-_xscale) / 10;
_parent[namaatk].speedy = random(10);
firetime = 40 + random(30);
}
if (((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
if ((((_x + _parent._x) > 0) && ((_x + _parent._x) < 680)) && (_y > -250)) {
firetime--;
}
}
Instance of Symbol 925 MovieClip "enem2" in Symbol 1172 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
stop();
var warna = (random(5) + 1);
var tujuanx = (-random(320));
var tujuany = random(240);
var timerAim = 100;
var movex = 0;
var movey = 0;
var hp = 4;
var wpex;
var wpey;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var jumppower = 0;
var grav = 0;
var movechar = false;
var aksi = 0;
var firetime = (40 + random(30));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
var bottomy = ((_y + (_height / 2)) + _parent._y);
var bottomx = (_x + _parent._x);
gotoAndStop(action);
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.hit.hitTest(bottomx, bottomy, true)) {
grav = 1;
_y = (_y-1);
}
_y = (_y + (grav - jumppower));
if (_parent.hit.hitTest(bottomx, bottomy, true) || (_parent.hit.hitTest(bottomx, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (hp < 3) {
}
if (hp < 1) {
if (genItem) {
_root.score = _root.score + 150;
_root.deadSound.start();
var chance = random(5);
if (chance == 1) {
spawnItem();
}
speed = speed - (((10 + random(20)) * _xscale) / 100);
jumppower = 10 + random(10);
genItem = false;
}
_x = (_x + speed);
_rotation = (_rotation + speed);
speed = speed * 0.9;
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
if (charx > _x) {
var _xscale = 100;
} else if (charx < _x) {
var _xscale = -100;
}
movex = movex + ((tujuanx - movex) / 10);
movey = movey + ((tujuany - movey) / 10);
timerAim--;
if (timerAim < 0) {
tujuanx = -50 - random(320);
tujuany = 120 - random(240);
timerAim = 50 + random(50);
}
var charx = (_parent._parent.char._x - _parent._x);
if (moveable == true) {
speed = ((charx - _xscale) - _x) / 10;
if (speed > 5) {
speed = 5;
} else if (speed < -5) {
speed = -5;
}
_x = (_x + speed);
}
if (Math.floor(Math.abs(speed)) == 1) {
var idle = random(2);
}
if (_parent.hit.hitTest(bottomx, bottomy - 2, true)) {
_y = (_y-1);
}
if (_parent.hit.hitTest(bottomx + 20, bottomy - 15, true)) {
_x = (_x - 5);
} else if (_parent.hit.hitTest(bottomx - 20, bottomy - 15, true)) {
_x = (_x + 5);
}
if (_parent.hit.hitTest(bottomx - 20, bottomy, true) || (_parent.hit.hitTest(bottomx + 20, bottomy, true))) {
var grav = 0;
} else {
grav++;
}
if (firetime < 0) {
_root.wepSound1.start();
blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x;
_parent[namaatk]._y = _y;
_parent[namaatk].speedx = _xscale / 10;
_parent[namaatk].speedy = random(10);
firetime = 40 + random(30);
}
firetime--;
if ((((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) || (_y > 400)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
}
Instance of Symbol 904 MovieClip "redatk" in Symbol 1172 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_x = (_x + speedx);
_y = (_y + speedy);
_alpha = (_alpha-1);
if (_parent.hit.hitTest(_x + _parent._x, _y + _parent._y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redexplod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama]._alpha = 60 + random(40);
removeMovieClip(this);
}
if (_root.game.char.hitTest(_x + _parent._x, _y + _parent._y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redexplod, nama, _parent.getNextHighestDepth() + 10);
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama]._alpha = 60 + random(40);
_root.game.char.hp = _root.game.char.hp - 2;
removeMovieClip(this);
}
if (_alpha < 0) {
removeMovieClip(this);
}
}
onClipEvent (load) {
_alpha = 100;
}
Instance of Symbol 114 MovieClip in Symbol 1172 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_parent._parent.char.hit) && (_visible)) {
_root.totalwep = 4;
_root.pickItem.start();
_root.wep3.gotoAndStop(2);
_visible = false;
}
}
Instance of Symbol 121 MovieClip "pick0" in Symbol 1172 MovieClip Frame 1
onClipEvent (load) {
speedx = 7 - random(15);
speedy = random(10);
}
onClipEvent (enterFrame) {
_x = (_x + speedx);
_y = (_y + (grav - speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
grav++;
if (this.hitTest(_parent._parent.char.hit)) {
_root.specialAmmo = _root.specialAmmo + (50 + random(50));
_root.pickItem.start();
removeMovieClip(this);
}
if (_parent.hit.hitTest(_x + _parent._x, (_y + _parent._y) + (_height / 2), true)) {
grav = 0;
}
}
Instance of Symbol 123 MovieClip "pick1" in Symbol 1172 MovieClip Frame 1
onClipEvent (load) {
speedx = 7 - random(15);
speedy = random(10);
}
onClipEvent (enterFrame) {
_x = (_x + speedx);
_y = (_y + (grav - speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
grav++;
if (this.hitTest(_parent._parent.char.hit)) {
_root.pickItem.start();
_parent._parent.char.hp = _parent._parent.char.hp + 20;
if (_parent._parent.char.hp > 100) {
_parent._parent.char.hp = 100;
}
removeMovieClip(this);
}
if (_parent.hit.hitTest(_x + _parent._x, (_y + _parent._y) + (_height / 2), true)) {
grav = 0;
}
}
Instance of Symbol 1172 MovieClip "ground" in Symbol 1175 MovieClip Frame 1
onClipEvent (load) {
var spawntimer = 0;
var jmlSpawn = 0;
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
spawntimer--;
if (spawntimer < 0) {
var spawnname = ("enem" + random(5));
var namaMusuh = ("enemies" + this.getNextHighestDepth());
duplicateMovieClip (spawnname, namaMusuh, this.getNextHighestDepth() + 200);
this[namaMusuh].go = 1;
this[namaMusuh]._x = (-100 + (random(2) * 900)) - _x;
this[namaMusuh]._y = -50 - random(100);
jmlSpawn++;
var spawntimer = 20;
}
}
Instance of Symbol 986 MovieClip "bullet" in Symbol 1175 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
_x = (_x + speedx);
_y = (_y + speedy);
_alpha = (_alpha - 5);
if (_parent.ground.hit.hitTest(_x, _y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.explod, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
_parent.ground[nama]._alpha = 60 + random(40);
_parent.ground[nama]._rotation = _rotation;
removeMovieClip(this);
}
if (((((_x < -15) || (_x > 665)) || (_y < -15)) || (_y > 415)) || (_alpha < 0)) {
removeMovieClip(this);
}
}
onClipEvent (load) {
_alpha = 100;
damage = 1;
}
Instance of Symbol 989 MovieClip "fireball" in Symbol 1175 MovieClip Frame 1
onClipEvent (load) {
var _alpha = (random(40) + 60);
var ukuran = (25 + random(50));
_yscale = ukuran;
var _xscale = ukuran;
var ukuran = (100 + random(150));
var fly = 0;
var damage = 2;
}
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
fly = fly + 0.5;
if (_xscale < ukuran) {
_xscale = (_xscale + ((ukuran - _yscale) / 10));
_yscale = (_yscale + ((ukuran - _yscale) / 10));
}
if (_alpha < 0) {
removeMovieClip(this);
}
_alpha = (_alpha - 3);
_x = (_x + speedx);
_y = (_y + (speedy - fly));
if (_parent.ground.hit.hitTest(_x, _y, true)) {
nama = "smoke" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.smoke, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
removeMovieClip(this);
}
}
Instance of Symbol 1002 MovieClip "revball" in Symbol 1175 MovieClip Frame 1
onClipEvent (load) {
var _alpha = 100;
var myspeedx = 0;
var myspeedy = 0;
var damage = 2;
var _rotation = random(360);
}
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
if (_alpha < 0) {
removeMovieClip(this);
}
if (((((_x < -15) || (_x > 665)) || (_y < -15)) || (_y > 415)) || (_alpha < 0)) {
removeMovieClip(this);
}
_alpha = (_alpha - 5);
myspeedx = myspeedx + ((speedx - myspeedx) / 10);
myspeedy = myspeedy + ((speedy - myspeedy) / 10);
_rotation = (_rotation + myspeedx);
_x = (_x + myspeedx);
_y = (_y + myspeedy);
if (_parent.ground.hit.hitTest(_x, _y, true)) {
_root.explodeSound.start();
i = 0;
while (i < 5) {
nama = "revballpart" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.revballpart, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
_parent.ground[nama].grav = 0;
i++;
}
removeMovieClip(this);
}
}
Instance of Symbol 1005 MovieClip "laser" in Symbol 1175 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
_x = (_x + speedx);
_y = (_y + speedy);
_alpha = (_alpha - 5);
if (_parent.ground.hit.hitTest(_x, _y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.explod2, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
_parent.ground[nama]._alpha = 60 + random(40);
_parent.ground[nama]._rotation = _rotation;
speedx = speedx * -1;
speedy = speedy * -1;
_rotation = (_rotation + 180);
}
if (((((_x < -15) || (_x > 665)) || (_y < -15)) || (_y > 415)) || (_alpha < 0)) {
removeMovieClip(this);
}
}
onClipEvent (load) {
_alpha = 100;
var damage = 3;
}
Instance of Symbol 1033 MovieClip "char" in Symbol 1175 MovieClip Frame 1
onClipEvent (load) {
stop();
var hp = 100;
var firerate = 0;
var wpex;
var posx = _x;
var wpey;
var ukuran = _xscale;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var movechar = true;
var sisi = false;
var jumppower = 0;
var action = "stand";
var grav = 0;
var movechar = false;
var keyListener = new Object();
var mouseListener = new Object();
var wepselect = 1;
keyListener.onKeyUp = function () {
jumpgo = true;
if ((Key.getCode() == 83) && (jump == false)) {
body.play();
}
};
Key.addListener(keyListener);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
gotoAndStop(action);
_y = (_y + (grav - jumppower));
if (((sisi == false) && (movechar)) && (_x > posx)) {
var movechar = false;
var posx = _x;
} else if ((sisi && (movechar)) && (_x < posx)) {
var movechar = false;
var posx = _x;
}
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.ground.hit.hitTest(_x, _y - 2, true)) {
_y = (_y-1);
}
if (_parent.ground.hit.hitTest(_x - 10, _y, true) || (_parent.ground.hit.hitTest(_x + 10, _y, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (_y > 500) {
hp = hp - 5;
if (hp > 0) {
grav = 0;
jumppower = 60;
}
}
if (_parent.ground._x > -10) {
_parent.ground._x = -10;
_parent.ground2._x = -10;
var movechar = true;
var sisi = false;
} else if (_parent.ground._x < -5346) {
if (_root.execBoss == false) {
_root.bossHealth.play();
_root.bossHealth.foto = 3;
_root.bossHealth.hp._xscale = 150;
_root.siren.start(0, 3);
}
_root.execBoss = true;
_parent.ground._x = -5346;
_parent.ground2._x = -5346;
var movechar = true;
var sisi = true;
}
if (_x < 50) {
var _x = 50;
} else if (_x > 640) {
var _x = 640;
if (_root.bossDead2 == true) {
_root.frameTujuan = "level4";
_root.fader.play();
}
}
if (hp < 1) {
action = "dead";
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_root.frameTujuan = "gameOver";
_root.fader.play();
}
return(undefined);
}
if (_root._xmouse > _x) {
var _xscale = ukuran;
} else if (_root._xmouse < _x) {
var _xscale = (-ukuran);
}
tellTarget (body.arm) {
_rotation = ((Math.atan2(_parent._ymouse - _y, _parent._xmouse - _x) * 180) / Math.PI);
var wepPoint = {x:_x + 70, y:_y};
localToGlobal(wepPoint);
_parent._parent.wepx = wepPoint.x - _root.game._x;
_parent._parent.wepy = wepPoint.y - _root.game._y;
_y = (_y + ((tujuan - _y) / 2));
if (_parent._parent.duck) {
var tujuan = 20;
} else {
var tujuan = 0;
}
};
if (Key.isDown(49)) {
var wepselect = 1;
body.arm.weapon.gotoAndStop(wepselect);
} else if (Key.isDown(50) && (_root.totalwep > 1)) {
var wepselect = 2;
body.arm.weapon.gotoAndStop(wepselect);
} else if (Key.isDown(51) && (_root.totalwep > 2)) {
var wepselect = 3;
body.arm.weapon.gotoAndStop(wepselect);
} else if (Key.isDown(52) && (_root.totalwep > 3)) {
var wepselect = 4;
body.arm.weapon.gotoAndStop(wepselect);
}
if (Key.isDown(65) && (moveable == true)) {
if ((jumppower == 0) || (jump == false)) {
var action = "run";
} else {
var action = "jump";
}
if (movechar) {
_x = (_x - 10);
} else {
_parent.ground._x = _parent.ground._x + 10;
_parent.ground2._x = _parent.ground2._x + 10;
}
} else if (Key.isDown(68) && (moveable == true)) {
if ((jumppower == 0) || (jump == false)) {
var action = "run";
} else {
var action = "jump";
}
if (movechar) {
_x = (_x + 10);
} else {
_parent.ground._x = _parent.ground._x - 10;
_parent.ground2._x = _parent.ground2._x - 10;
}
}
if ((Key.isDown(87) && (jump == false)) && (moveable == true)) {
if (jumpgo) {
var jumppower = 30;
var action = "jump";
body.play();
var jumpgo = false;
}
var jump = true;
} else if (((Key.isDown(83) && (jump == false)) && (moveable)) && (duck == false)) {
var moveable = false;
var duck = true;
var action = "duck";
}
if ((((((!Key.isDown(65)) && (!Key.isDown(68))) && (!Key.isDown(87))) && (!Key.isDown(83))) && (moveable)) && (jump == false)) {
var action = "stand";
}
if (_parent.ground.hit.hitTest(_x + 10, _y - 12, true)) {
if (movechar) {
_x = (_x - 10);
} else {
_parent.ground._x = _parent.ground._x + 10;
_parent.ground2._x = _parent.ground2._x + 10;
}
} else if (_parent.ground.hit.hitTest(_x - 10, _y - 12, true)) {
if (movechar) {
_x = (_x + 10);
} else {
_parent.ground._x = _parent.ground._x - 10;
_parent.ground2._x = _parent.ground2._x - 10;
}
}
if (_parent.ground.hit.hitTest(_x, _y - 2, true)) {
_y = (_y-1);
}
if (_parent.ground.hit.hitTest(_x - 10, _y, true) || (_parent.ground.hit.hitTest(_x + 10, _y, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if ((_root.fire && (firerate < 0)) && (wepselect == 1)) {
_root.fireWeapon();
body.arm.blast.play();
body.head.blast.play();
var firerate = 2;
} else if (((_root.fire && (firerate < 0)) && (wepselect == 2)) && (_root.specialAmmo > 0)) {
_root.fireWeapon2();
body.head.blast.play();
_root.specialAmmo--;
var firerate = 0;
} else if (((_root.fire && (firerate < 0)) && (wepselect == 3)) && (_root.specialAmmo > 2)) {
_root.fireWeapon3();
body.head.blast.play();
_root.specialAmmo = _root.specialAmmo - 3;
var firerate = 8;
} else if (((_root.fire && (firerate < 0)) && (wepselect == 4)) && (_root.specialAmmo > 1)) {
_root.fireWeapon4();
body.arm.blast2.play();
body.head.blast.play();
_root.specialAmmo = _root.specialAmmo - 2;
var firerate = 8;
}
firerate--;
}
Instance of Symbol 1139 MovieClip in Symbol 1177 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
stop();
} else {
play();
}
}
Instance of Symbol 1139 MovieClip in Symbol 1177 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
stop();
} else {
play();
}
}
Symbol 1189 MovieClip Frame 21
gotoAndPlay(_name);
Symbol 1191 MovieClip Frame 29
gotoAndPlay(_name);
Symbol 1192 MovieClip Frame 15
stop();
Instance of Symbol 898 MovieClip "revballpart" in Symbol 1194 MovieClip Frame 1
onClipEvent (load) {
var _alpha = 100;
var speedx = (10 - random(20));
var speedy = random(20);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
if (_alpha < 0) {
removeMovieClip(this);
}
_alpha = (_alpha - 5);
grav++;
_x = (_x + speedx);
_y = (_y + (grav - speedy));
}
Instance of Symbol 901 MovieClip "smoke" in Symbol 1194 MovieClip Frame 1
onClipEvent (load) {
var _alpha = (40 + random(60));
var ukuran = (25 + random(50));
_yscale = ukuran;
var _xscale = ukuran;
var ukuran = (100 + random(150));
var fly = 0;
speedx = 3 - random(7);
speedy = random(7);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
fly++;
if (_xscale < ukuran) {
_xscale = (_xscale + ((ukuran - _yscale) / 10));
_yscale = (_yscale + ((ukuran - _yscale) / 10));
}
if (_alpha < 0) {
removeMovieClip(this);
}
_alpha = (_alpha - 3);
_x = (_x + speedx);
_y = (_y + (speedy - fly));
}
Instance of Symbol 881 MovieClip in Symbol 1194 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.game.char.hit) && (_root.game.char.hp > 1)) {
_root.game.char.hp--;
_root.game.char.grav = 0;
_root.game.char.jumppower = 15;
}
}
Instance of Symbol 904 MovieClip "redatk" in Symbol 1194 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
_x = (_x + speedx);
_y = (_y + speedy);
_alpha = (_alpha-1);
if (_parent.hit.hitTest(_x + _parent._x, _y + _parent._y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redexplod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama]._alpha = 60 + random(40);
removeMovieClip(this);
}
if (_root.game.char.hitTest(_x + _parent._x, _y + _parent._y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redexplod, nama, _parent.getNextHighestDepth() + 10);
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama]._alpha = 60 + random(40);
_root.game.char.hp = _root.game.char.hp - 3;
removeMovieClip(this);
}
if (_alpha < 0) {
removeMovieClip(this);
}
}
onClipEvent (load) {
_alpha = 100;
}
Instance of Symbol 121 MovieClip "pick0" in Symbol 1194 MovieClip Frame 1
onClipEvent (load) {
speedx = 7 - random(15);
speedy = random(10);
}
onClipEvent (enterFrame) {
_x = (_x + speedx);
_y = (_y + (grav - speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
grav++;
if (this.hitTest(_parent._parent.char.hit)) {
_root.specialAmmo = _root.specialAmmo + (50 + random(50));
_root.pickItem.start();
removeMovieClip(this);
}
if (_parent.hit.hitTest(_x + _parent._x, (_y + _parent._y) + (_height / 2), true)) {
grav = 0;
}
}
Instance of Symbol 123 MovieClip "pick1" in Symbol 1194 MovieClip Frame 1
onClipEvent (load) {
speedx = 7 - random(15);
speedy = random(10);
}
onClipEvent (enterFrame) {
_x = (_x + speedx);
_y = (_y + (grav - speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
grav++;
if (this.hitTest(_parent._parent.char.hit)) {
_root.pickItem.start();
_parent._parent.char.hp = _parent._parent.char.hp + 20;
if (_parent._parent.char.hp > 100) {
_parent._parent.char.hp = 100;
}
removeMovieClip(this);
}
if (_parent.hit.hitTest(_x + _parent._x, (_y + _parent._y) + (_height / 2), true)) {
grav = 0;
}
}
Instance of Symbol 1193 MovieClip "boss" in Symbol 1194 MovieClip Frame 1
onClipEvent (load) {
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
_root.bossHealth.hp._xscale = hp * divider;
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
stop();
var warna = (random(5) + 1);
var movex = 0;
var movey = 0;
var movex2 = 0;
var movey2 = 0;
var hp = 200;
var divider = (150 / hp);
var wpex;
var wpey;
var wpex2;
var wpey2;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var jumppower = 0;
var action = "stand";
var grav = 0;
var movechar = false;
var aksi = 0;
var firetime = (40 + random(30));
var firetime2 = random(40);
var genItem = true;
var timeAim = 0;
var timeAim2 = 50;
var aimx = 0;
var aimy = 0;
var aimx2 = 0;
var aimy2 = 0;
var bullet = 0;
var bullet2 = 0;
var jeda = 0;
var jeda2 = 0;
}
onClipEvent (enterFrame) {
if (_root.pause || (!_root.execBoss)) {
return(undefined);
}
var bottomy = ((_y + (_height / 2)) + _parent._y);
var bottomx = (_x + _parent._x);
gotoAndStop(action);
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.hit.hitTest(bottomx, bottomy, true)) {
grav = 1;
_y = (_y-1);
}
_y = (_y + (grav - jumppower));
if (_parent.hit.hitTest(bottomx, bottomy, true) || (_parent.hit.hitTest(bottomx, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (hp < 1) {
if (genItem) {
_root.bossHealth.play();
_root.deadSound.start();
_root.score = _root.score + 25000;
genItem = false;
}
action = "dead";
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_root.frameTujuan = "gameOver";
_root.fader.play();
}
return(undefined);
}
hitBullet();
if (charx > _x) {
var _xscale = -100;
} else if (charx < _x) {
var _xscale = 100;
}
tellTarget (body.arm) {
if (_parent._parent._xscale == 100) {
_rotation = ((Math.atan2(_parent._parent.movey - _y, _parent._parent.movex - _x) * 180) / Math.PI);
} else {
_rotation = (180 - ((Math.atan2(_parent._parent.movey - _y, _parent._parent.movex - _x) * 180) / Math.PI));
}
var wepPoint = {x:_x + 150, y:_y + 50};
localToGlobal(wepPoint);
_parent._parent.wepx = wepPoint.x - _parent._parent._parent._parent._x;
_parent._parent.wepy = wepPoint.y - _parent._parent._parent._parent._y;
};
tellTarget (body.arm2) {
if (_parent._parent._xscale == 100) {
_rotation = ((Math.atan2(_parent._parent.movey2 - _y, _parent._parent.movex2 - _x) * 180) / Math.PI);
} else {
_rotation = (180 - ((Math.atan2(_parent._parent.movey2 - _y, _parent._parent.movex2 - _x) * 180) / Math.PI));
}
var wepPoint2 = {x:_x + 180, y:_y + 50};
localToGlobal(wepPoint2);
_parent._parent.wepx2 = wepPoint2.x - _parent._parent._parent._parent._x;
_parent._parent.wepy2 = wepPoint2.y - _parent._parent._parent._parent._y;
};
var charx = (_parent._parent.char._x - _parent._x);
var chary = (_parent._parent.char._y - _parent._y);
if (timeAim < 0) {
var aimx = (_parent._parent.char._x - _parent._x);
var aimy = ((_parent._parent.char._y - _parent._y) - random(100));
timeAim = random(50);
}
if (timeAim2 < 0) {
var aimx = (_parent._parent.char._x - _parent._x);
var aimy = ((_parent._parent.char._y - _parent._y) - random(100));
timeAim2 = random(50);
}
timeAim--;
timeAim2--;
movex = movex + (((aimx - _x) - movex) / 10);
movey = movey + (((aimy - _y) - movey) / 10);
movex2 = movex2 + (((aimx - _x) - movex2) / 10);
movey2 = movey2 + (((aimy - _y) - movey2) / 10);
if (moveable == true) {
if (Math.floor(jumppower) == 0) {
var action = "run";
} else {
var action = "jump";
}
speed = ((charx + (_xscale * 2)) - _x) / 10;
if (speed > 8) {
speed = 8;
} else if (speed < -8) {
speed = -8;
}
_x = (_x + speed);
}
if ((moveable && (Math.floor(Math.abs(speed)) < 1)) && (jumppower == 0)) {
var action = "stand";
}
if (_parent.hit.hitTest(bottomx + 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x - 10);
} else if (_parent.hit.hitTest(bottomx - 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x + 10);
} else if (_y > 400) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 100;
var action = "jump";
var jump = true;
}
}
if (_parent.hit.hitTest(bottomx - 20, bottomy, true) || (_parent.hit.hitTest(bottomx + 20, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if ((bullet > 0) && (jeda < 0)) {
_root.wepSound1.start();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = wepx - _parent._x;
_parent[namaatk]._y = wepy - _parent._y;
_parent[namaatk]._rotation = (body.arm._rotation - 5) + random(10);
_parent[namaatk].speedx = (_xscale / 5) * Math.cos(_parent[namaatk]._rotation * (Math.PI/180));
_parent[namaatk].speedy = ((-_xscale) / 5) * Math.sin(_parent[namaatk]._rotation * (((Math.PI/180) * (-_xscale)) / 100));
bullet--;
var jeda = 2;
}
if ((bullet2 > 0) && (jeda2 < 0)) {
_root.wepSound1.start();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = wepx2 - _parent._x;
_parent[namaatk]._y = wepy2 - _parent._y;
_parent[namaatk]._rotation = (body.arm2._rotation - 5) + random(10);
_parent[namaatk].speedx = (_xscale / 5) * Math.cos(_parent[namaatk]._rotation * (Math.PI/180));
_parent[namaatk].speedy = ((-_xscale) / 5) * Math.sin(_parent[namaatk]._rotation * (((Math.PI/180) * (-_xscale)) / 100));
bullet2--;
var jeda2 = 2;
}
jeda--;
jeda2--;
if (firetime < 0) {
bullet = 5;
firetime = random(50);
}
if (firetime2 < 0) {
bullet2 = 5;
firetime2 = random(50);
}
if ((((_x + _parent._x) > 0) && ((_x + _parent._x) < 680)) && (_y > -250)) {
firetime--;
firetime2--;
}
}
Instance of Symbol 919 MovieClip "enem0" in Symbol 1194 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
var i;
var ex;
var ey;
var nama;
var tipe;
hp = 3;
var firetime = random(70);
var moveAgain = 50;
var speedx = 0;
var speedy = 0;
var tujuanx = ((_x + 100) - random(200));
var tujuany = (-random(150));
var speedJatuh = (10 - random(20));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
if ((hp < 1) || (hp == undefined)) {
if (genItem) {
_root.score = _root.score + 100;
_root.deadSound();
var chance = random(8);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
_y = (_y + 10);
_x = (_x + speedJatuh);
_rotation = (_rotation + speedJatuh);
if (_y > 400) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
_x = (_x + (((tujuanx - _x) / 10) + speedx));
_y = (_y + (((tujuany - _y) / 10) + speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
if (moveAgain < 0) {
tujuanx = (_x + 100) - random(200);
tujuany = -random(150);
moveAgain = random(100);
}
moveAgain--;
if (_root.game.char._x > (_parent._x + _x)) {
_xscale = -100;
} else {
_xscale = 100;
}
if (firetime < 0) {
_root.wepSound1.start();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x;
_parent[namaatk]._y = _y;
_parent[namaatk].speedx = (-_xscale) / 10;
_parent[namaatk].speedy = random(10);
blast.play;
firetime = 40 + random(30);
}
if (((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
if ((((_x + _parent._x) > 0) && ((_x + _parent._x) < 680)) && (_y > -250)) {
firetime--;
}
}
Instance of Symbol 982 MovieClip "enem3" in Symbol 1194 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
stop();
var warna = (random(5) + 1);
var tujuanx = (-random(320));
var tujuany = random(240);
var timerAim = 100;
var movex = 0;
var movey = 0;
var hp = 6;
var wpex;
var wpey;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var jumppower = 0;
var action = "stand";
var grav = 0;
var movechar = false;
var aksi = 0;
var firetime = (40 + random(30));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
var bottomy = ((_y + (_height / 2)) + _parent._y);
var bottomx = (_x + _parent._x);
gotoAndStop(action);
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.hit.hitTest(bottomx, bottomy, true)) {
grav = 1;
_y = (_y-1);
}
_y = (_y + (grav - jumppower));
if (_parent.hit.hitTest(bottomx, bottomy, true) || (_parent.hit.hitTest(bottomx, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (hp < 1) {
if (genItem) {
_root.score = _root.score + 300;
_root.deadSound.start();
var chance = random(5);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
action = "dead";
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
if (charx > _x) {
var _xscale = 100;
} else if (charx < _x) {
var _xscale = -100;
}
movex = movex + ((tujuanx - movex) / 10);
movey = movey + ((tujuany - movey) / 10);
timerAim--;
if (timerAim < 0) {
tujuanx = -50 - random(320);
tujuany = 120 - random(240);
timerAim = 50 + random(50);
}
tellTarget (body.arm) {
_rotation = ((Math.atan2(_parent._parent.movey - _y, _parent._parent.movex - _x) * 180) / Math.PI);
var wepPoint = {x:_x + 70, y:_y - tujuan};
localToGlobal(wepPoint);
_parent._parent.wepx = wepPoint.x;
_parent._parent.wepy = wepPoint.y;
_y = (_y + ((tujuan - _y) / 2));
if (_parent._parent.duck) {
var tujuan = 20;
} else {
var tujuan = 0;
}
};
var charx = (_parent._parent.char._x - _parent._x);
if (moveable == true) {
if (Math.floor(jumppower) == 0) {
var action = "run";
} else {
var action = "jump";
}
speed = ((charx - _xscale) - _x) / 10;
if (speed > 5) {
speed = 5;
} else if (speed < -5) {
speed = -5;
}
_x = (_x + speed);
}
if (Math.floor(Math.abs(speed)) == 1) {
var idle = random(2);
}
if ((moveable && (Math.floor(Math.abs(speed)) < 1)) && (jumppower == 0)) {
if (idle == 0) {
var action = "stand";
} else {
var action = "duck";
}
}
if (_parent.hit.hitTest(bottomx + 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x - 10);
} else if (_parent.hit.hitTest(bottomx - 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x + 10);
}
if (_parent.hit.hitTest(bottomx - 20, bottomy, true) || (_parent.hit.hitTest(bottomx + 20, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (firetime < 0) {
_root.wepSound1.start();
body.arm.blast.play();
body.core.blast.play();
body.leg.blast.play();
body.leg2.blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = wepx - _parent._x;
_parent[namaatk]._y = wepy - _parent._y;
_parent[namaatk]._rotation = body.arm._rotation;
_parent[namaatk].speedx = ((-_xscale) / 5) * Math.cos(_parent[namaatk]._rotation * (Math.PI/180));
_parent[namaatk].speedy = ((-_xscale) / 5) * Math.sin(_parent[namaatk]._rotation * (((Math.PI/180) * (-_xscale)) / 100));
firetime = 40 + random(30);
}
firetime--;
if ((((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) || (_y > 400)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
}
Instance of Symbol 1171 MovieClip "enem4" in Symbol 1194 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
stop();
var warna = (random(5) + 1);
var movex = 0;
var movey = 0;
var hp = 10;
var wpex;
var wpey;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var jumppower = 0;
var action = "stand";
var grav = 0;
var movechar = false;
var aksi = 0;
var firetime = (40 + random(30));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
var bottomy = ((_y + (_height / 2)) + _parent._y);
var bottomx = (_x + _parent._x);
gotoAndStop(action);
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.hit.hitTest(bottomx, bottomy, true)) {
grav = 1;
_y = (_y-1);
}
_y = (_y + (grav - jumppower));
if (_parent.hit.hitTest(bottomx, bottomy, true) || (_parent.hit.hitTest(bottomx, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (hp < 1) {
if (genItem) {
_root.deadSound.start();
_root.score = _root.score + 500;
var chance = random(5);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
action = "dead";
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
if (charx > _x) {
var _xscale = 100;
} else if (charx < _x) {
var _xscale = -100;
}
tellTarget (body.arm) {
if (_parent._parent._xscale == 100) {
_rotation = (180 - ((Math.atan2(_parent._parent.movey - _y, _parent._parent.movex - _x) * 180) / Math.PI));
} else {
_rotation = ((Math.atan2(_parent._parent.movey - _y, _parent._parent.movex - _x) * 180) / Math.PI);
}
var wepPoint = {x:_x + 70, y:_y - tujuan};
localToGlobal(wepPoint);
_parent._parent.wepx = wepPoint.x;
_parent._parent.wepy = wepPoint.y;
_y = (_y + ((tujuan - _y) / 2));
if (_parent._parent.duck) {
var tujuan = 20;
} else {
var tujuan = 0;
}
};
var charx = (_parent._parent.char._x - _parent._x);
var chary = (_parent._parent.char._y - _parent._y);
movex = movex + (((charx - _x) - movex) / 10);
movey = movey + (((chary - _y) - movey) / 10);
if (moveable == true) {
if (Math.floor(jumppower) == 0) {
var action = "run";
} else {
var action = "jump";
}
speed = ((charx - _xscale) - _x) / 10;
if (speed > 5) {
speed = 5;
} else if (speed < -5) {
speed = -5;
}
_x = (_x + speed);
}
if (Math.floor(Math.abs(speed)) == 1) {
var idle = random(2);
}
if ((moveable && (Math.floor(Math.abs(speed)) < 1)) && (jumppower == 0)) {
if (idle == 0) {
var action = "stand";
} else {
var action = "duck";
}
}
if (_parent.hit.hitTest(bottomx + 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x - 10);
} else if (_parent.hit.hitTest(bottomx - 20, bottomy - 15, true)) {
if (((aksi == 0) && (jump == false)) && (moveable == true)) {
var jumppower = 30;
var action = "jump";
var jump = true;
}
_x = (_x + 10);
}
if (_parent.hit.hitTest(bottomx - 20, bottomy, true) || (_parent.hit.hitTest(bottomx + 20, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (firetime < 0) {
_root.wepSound1.start();
body.arm.blast.play();
body.core.blast.play();
body.head.blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = wepx - _parent._x;
_parent[namaatk]._y = wepy - _parent._y;
_parent[namaatk]._rotation = body.arm._rotation;
_parent[namaatk].speedx = ((-_xscale) / 5) * Math.cos(_parent[namaatk]._rotation * (Math.PI/180));
_parent[namaatk].speedy = ((-_xscale) / 5) * Math.sin(_parent[namaatk]._rotation * (((Math.PI/180) * (-_xscale)) / 100));
firetime = random(30);
}
firetime--;
if ((((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) || (_y > 400)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
}
Instance of Symbol 1107 MovieClip "enem1" in Symbol 1194 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
var i;
var ex;
var ey;
var nama;
var tipe;
hp = 3;
var firetime = random(70);
var moveAgain = 50;
var speedx = 0;
var speedy = 0;
var tujuanx = ((_x + 100) - random(200));
var tujuany = (-random(150));
var speedJatuh = (10 - random(20));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
if ((hp < 1) || (hp == undefined)) {
if (genItem) {
_root.deadSound.start();
_root.score = _root.score + 100;
var chance = random(8);
if (chance == 1) {
spawnItem();
}
genItem = false;
}
_y = (_y + 10);
_x = (_x + speedJatuh);
_rotation = (_rotation + speedJatuh);
if (_y > 400) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
_x = (_x + (((tujuanx - _x) / 10) + speedx));
_y = (_y + (((tujuany - _y) / 10) + speedy));
speedx = speedx * 0.9;
speedy = speedy * 0.9;
if (moveAgain < 0) {
tujuanx = ((_root.game.char._x - _parent._x) + 200) - random(400);
tujuany = -random(150);
moveAgain = random(100);
}
moveAgain--;
if (_root.game.char._x > (_parent._x + _x)) {
_xscale = -100;
} else {
_xscale = 100;
}
if (firetime < 0) {
_root.wepSound1.start();
blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x;
_parent[namaatk]._y = _y;
_parent[namaatk].speedx = (-_xscale) / 10;
_parent[namaatk].speedy = random(10);
firetime = 40 + random(30);
}
if (((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
if ((((_x + _parent._x) > 0) && ((_x + _parent._x) < 680)) && (_y > -250)) {
firetime--;
}
}
Instance of Symbol 925 MovieClip "enem2" in Symbol 1194 MovieClip Frame 1
onClipEvent (load) {
function spawnItem() {
itemRan = random(5);
if (itemRan == 1) {
item = "pick1";
} else {
item = "pick0";
}
nama = "pick" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent[item], nama, _parent.getNextHighestDepth());
_parent[nama]._x = _x;
_parent[nama]._y = _y;
_parent[nama].grav = 0;
}
function hitBullet() {
i = 0;
while (i < 31) {
nama = "bullet" + i;
ex = _parent._parent[nama]._x;
ey = _parent._parent[nama]._y;
tipe = _parent._parent[nama].tipe;
if (this.hitTest(ex, ey, true)) {
if (!(_parent._parent[nama].damage === undefined)) {
_root.explodeSound.start();
hp = hp - _parent._parent[nama].damage;
speedx = speedx + (_parent._parent[nama].speedx / 10);
speedy = speedy + (_parent._parent[nama].speedy / 10);
}
if (tipe == 1) {
duplicateMovieClip (_parent.explod, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 2) {
duplicateMovieClip (_parent.smoke, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
removeMovieClip(_parent._parent[nama]);
} else if (tipe == 3) {
removeMovieClip(_parent._parent[nama]);
q = 0;
while (q < 5) {
nama = "revballpart" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.revballpart, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama].grav = 0;
q++;
}
} else if (tipe == 4) {
duplicateMovieClip (_parent.explod2, nama, _parent.getNextHighestDepth());
_parent[nama]._x = ex - _parent._x;
_parent[nama]._y = ey - _parent._y;
_parent[nama]._alpha = 60 + random(40);
_parent[nama]._rotation = _parent._parent[nama]._rotation;
_parent._parent[nama].speedx = _parent._parent[nama].speedx * -1;
_parent._parent[nama].speedy = _parent._parent[nama].speedy * -1;
_parent._parent[nama]._rotation = _parent._parent[nama]._rotation + 180;
}
}
i++;
}
}
stop();
var warna = (random(5) + 1);
var tujuanx = (-random(320));
var tujuany = random(240);
var timerAim = 100;
var movex = 0;
var movey = 0;
var hp = 4;
var wpex;
var wpey;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var jumppower = 0;
var grav = 0;
var movechar = false;
var aksi = 0;
var firetime = (40 + random(30));
var genItem = true;
}
onClipEvent (enterFrame) {
if (_root.pause || (!(go === 1))) {
return(undefined);
}
var bottomy = ((_y + (_height / 2)) + _parent._y);
var bottomx = (_x + _parent._x);
gotoAndStop(action);
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.hit.hitTest(bottomx, bottomy, true)) {
grav = 1;
_y = (_y-1);
}
_y = (_y + (grav - jumppower));
if (_parent.hit.hitTest(bottomx, bottomy, true) || (_parent.hit.hitTest(bottomx, bottomy, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (hp < 1) {
if (genItem) {
_root.score = _root.score + 150;
_root.deadSound.start();
var chance = random(5);
if (chance == 1) {
spawnItem();
}
speed = speed - (((10 + random(20)) * _xscale) / 100);
jumppower = 10 + random(10);
genItem = false;
}
_x = (_x + speed);
_rotation = (_rotation + speed);
speed = speed * 0.9;
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
return(undefined);
}
hitBullet();
if (charx > _x) {
var _xscale = 100;
} else if (charx < _x) {
var _xscale = -100;
}
movex = movex + ((tujuanx - movex) / 10);
movey = movey + ((tujuany - movey) / 10);
timerAim--;
if (timerAim < 0) {
tujuanx = -50 - random(320);
tujuany = 120 - random(240);
timerAim = 50 + random(50);
}
var charx = (_parent._parent.char._x - _parent._x);
if (moveable == true) {
speed = ((charx - _xscale) - _x) / 10;
if (speed > 5) {
speed = 5;
} else if (speed < -5) {
speed = -5;
}
_x = (_x + speed);
}
if (Math.floor(Math.abs(speed)) == 1) {
var idle = random(2);
}
if (_parent.hit.hitTest(bottomx, bottomy - 2, true)) {
_y = (_y-1);
}
if (_parent.hit.hitTest(bottomx + 20, bottomy - 15, true)) {
_x = (_x - 5);
} else if (_parent.hit.hitTest(bottomx - 20, bottomy - 15, true)) {
_x = (_x + 5);
}
if (_parent.hit.hitTest(bottomx - 20, bottomy, true) || (_parent.hit.hitTest(bottomx + 20, bottomy, true))) {
var grav = 0;
} else {
grav++;
}
if (firetime < 0) {
_root.wepSound1.start();
blast.play();
namaatk = "enfire" + _parent.getNextHighestDepth();
duplicateMovieClip (_parent.redatk, namaatk, _parent.getNextHighestDepth());
_parent[namaatk]._x = _x;
_parent[namaatk]._y = _y;
_parent[namaatk].speedx = _xscale / 10;
_parent[namaatk].speedy = random(10);
firetime = 40 + random(30);
}
firetime--;
if ((((_x + _parent._x) < -300) || ((_x + _parent._x) > 800)) || (_y > 400)) {
_parent.jmlSpawn--;
removeMovieClip(this);
}
}
Instance of Symbol 1194 MovieClip "ground" in Symbol 1195 MovieClip Frame 1
onClipEvent (load) {
var spawntimer = 0;
var jmlSpawn = 0;
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
spawntimer--;
if ((spawntimer < 0) && (jmlSpawn < 8)) {
var spawnname = ("enem" + random(5));
var namaMusuh = ("enemies" + this.getNextHighestDepth());
duplicateMovieClip (spawnname, namaMusuh, this.getNextHighestDepth() + 200);
this[namaMusuh].go = 1;
this[namaMusuh]._x = (-100 + (random(2) * 900)) - _x;
this[namaMusuh]._y = -50 - random(100);
jmlSpawn++;
spawntimer = 20;
}
}
Instance of Symbol 986 MovieClip "bullet" in Symbol 1195 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
_x = (_x + speedx);
_y = (_y + speedy);
_alpha = (_alpha - 5);
if (_parent.ground.hit.hitTest(_x, _y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.explod, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
_parent.ground[nama]._alpha = 60 + random(40);
_parent.ground[nama]._rotation = _rotation;
removeMovieClip(this);
}
if (((((_x < -15) || (_x > 665)) || (_y < -15)) || (_y > 415)) || (_alpha < 0)) {
removeMovieClip(this);
}
}
onClipEvent (load) {
_alpha = 100;
damage = 1;
}
Instance of Symbol 989 MovieClip "fireball" in Symbol 1195 MovieClip Frame 1
onClipEvent (load) {
var _alpha = (random(40) + 60);
var ukuran = (25 + random(50));
_yscale = ukuran;
var _xscale = ukuran;
var ukuran = (100 + random(150));
var fly = 0;
var damage = 2;
}
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
fly = fly + 0.5;
if (_xscale < ukuran) {
_xscale = (_xscale + ((ukuran - _yscale) / 10));
_yscale = (_yscale + ((ukuran - _yscale) / 10));
}
if (_alpha < 0) {
removeMovieClip(this);
}
_alpha = (_alpha - 3);
_x = (_x + speedx);
_y = (_y + (speedy - fly));
if (_parent.ground.hit.hitTest(_x, _y, true)) {
nama = "smoke" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.smoke, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
removeMovieClip(this);
}
}
Instance of Symbol 1002 MovieClip "revball" in Symbol 1195 MovieClip Frame 1
onClipEvent (load) {
var _alpha = 100;
var myspeedx = 0;
var myspeedy = 0;
var damage = 2;
var _rotation = random(360);
}
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
if (_alpha < 0) {
removeMovieClip(this);
}
if (((((_x < -15) || (_x > 665)) || (_y < -15)) || (_y > 415)) || (_alpha < 0)) {
removeMovieClip(this);
}
_alpha = (_alpha - 5);
myspeedx = myspeedx + ((speedx - myspeedx) / 10);
myspeedy = myspeedy + ((speedy - myspeedy) / 10);
_rotation = (_rotation + myspeedx);
_x = (_x + myspeedx);
_y = (_y + myspeedy);
if (_parent.ground.hit.hitTest(_x, _y, true)) {
_root.explodeSound.start();
i = 0;
while (i < 5) {
nama = "revballpart" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.revballpart, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
_parent.ground[nama].grav = 0;
i++;
}
removeMovieClip(this);
}
}
Instance of Symbol 1005 MovieClip "laser" in Symbol 1195 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.pause && (go)) {
return(undefined);
}
_x = (_x + speedx);
_y = (_y + speedy);
_alpha = (_alpha - 5);
if (_parent.ground.hit.hitTest(_x, _y, true)) {
_root.explodeSound.start();
nama = "explode" + _parent.ground.getNextHighestDepth();
duplicateMovieClip (_parent.ground.explod2, nama, _parent.ground.getNextHighestDepth());
_parent.ground[nama]._x = _x - _parent.ground._x;
_parent.ground[nama]._y = _y - _parent.ground._y;
_parent.ground[nama]._alpha = 60 + random(40);
_parent.ground[nama]._rotation = _rotation;
speedx = speedx * -1;
speedy = speedy * -1;
_rotation = (_rotation + 180);
}
if (((((_x < -15) || (_x > 665)) || (_y < -15)) || (_y > 415)) || (_alpha < 0)) {
removeMovieClip(this);
}
}
onClipEvent (load) {
_alpha = 100;
var damage = 3;
}
Instance of Symbol 1033 MovieClip "char" in Symbol 1195 MovieClip Frame 1
onClipEvent (load) {
stop();
var hp = 100;
var firerate = 0;
var wpex;
var posx = _x;
var wpey;
var ukuran = _xscale;
var duck = false;
var jump = false;
var jumpgo = true;
var moveable = true;
var movechar = true;
var sisi = false;
var jumppower = 0;
var action = "stand";
var grav = 0;
var movechar = false;
var keyListener = new Object();
var mouseListener = new Object();
var wepselect = 1;
keyListener.onKeyUp = function () {
jumpgo = true;
if ((Key.getCode() == 83) && (jump == false)) {
body.play();
}
};
Key.addListener(keyListener);
}
onClipEvent (enterFrame) {
if (_root.pause) {
return(undefined);
}
gotoAndStop(action);
_y = (_y + (grav - jumppower));
if (((sisi == false) && (movechar)) && (_x > posx)) {
var movechar = false;
var posx = _x;
} else if ((sisi && (movechar)) && (_x < posx)) {
var movechar = false;
var posx = _x;
}
if (grav > 9) {
var grav = 9;
}
jumppower = jumppower * 0.9;
if (_parent.ground.hit.hitTest(_x, _y - 2, true)) {
_y = (_y-1);
}
if (_parent.ground.hit.hitTest(_x - 10, _y, true) || (_parent.ground.hit.hitTest(_x + 10, _y, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if (_y > 500) {
hp = hp - 5;
if (hp > 0) {
grav = 0;
jumppower = 60;
}
}
if (_parent.ground._x > -10) {
_parent.ground._x = -10;
_parent.ground2._x = -10;
var movechar = true;
var sisi = false;
} else if (_parent.ground._x < -5346) {
if (_root.execBoss == false) {
_root.bossHealth.play();
_root.bossHealth.foto = 5;
_root.bossHealth.hp._xscale = 150;
_root.siren.start(0, 3);
}
_root.execBoss = true;
_parent.ground._x = -5346;
_parent.ground2._x = -5346;
var movechar = true;
var sisi = true;
}
if (_x < 50) {
var _x = 50;
} else if (_x > 640) {
var _x = 640;
}
if (hp < 1) {
action = "dead";
hp = 0;
_alpha = (_alpha-1);
if (_alpha < 0) {
_root.frameTujuan = "gameOver";
_root.fader.play();
}
return(undefined);
}
if (_root._xmouse > _x) {
var _xscale = ukuran;
} else if (_root._xmouse < _x) {
var _xscale = (-ukuran);
}
tellTarget (body.arm) {
_rotation = ((Math.atan2(_parent._ymouse - _y, _parent._xmouse - _x) * 180) / Math.PI);
var wepPoint = {x:_x + 70, y:_y};
localToGlobal(wepPoint);
_parent._parent.wepx = wepPoint.x - _root.game._x;
_parent._parent.wepy = wepPoint.y - _root.game._y;
_y = (_y + ((tujuan - _y) / 2));
if (_parent._parent.duck) {
var tujuan = 20;
} else {
var tujuan = 0;
}
};
if (Key.isDown(49)) {
var wepselect = 1;
body.arm.weapon.gotoAndStop(wepselect);
} else if (Key.isDown(50) && (_root.totalwep > 1)) {
var wepselect = 2;
body.arm.weapon.gotoAndStop(wepselect);
} else if (Key.isDown(51) && (_root.totalwep > 2)) {
var wepselect = 3;
body.arm.weapon.gotoAndStop(wepselect);
} else if (Key.isDown(52) && (_root.totalwep > 3)) {
var wepselect = 4;
body.arm.weapon.gotoAndStop(wepselect);
}
if (Key.isDown(65) && (moveable == true)) {
if ((jumppower == 0) || (jump == false)) {
var action = "run";
} else {
var action = "jump";
}
if (movechar) {
_x = (_x - 10);
} else {
_parent.ground._x = _parent.ground._x + 10;
_parent.ground2._x = _parent.ground2._x + 10;
}
} else if (Key.isDown(68) && (moveable == true)) {
if ((jumppower == 0) || (jump == false)) {
var action = "run";
} else {
var action = "jump";
}
if (movechar) {
_x = (_x + 10);
} else {
_parent.ground._x = _parent.ground._x - 10;
_parent.ground2._x = _parent.ground2._x - 10;
}
}
if ((Key.isDown(87) && (jump == false)) && (moveable == true)) {
if (jumpgo) {
var jumppower = 30;
var action = "jump";
body.play();
var jumpgo = false;
}
var jump = true;
} else if (((Key.isDown(83) && (jump == false)) && (moveable)) && (duck == false)) {
var moveable = false;
var duck = true;
var action = "duck";
}
if ((((((!Key.isDown(65)) && (!Key.isDown(68))) && (!Key.isDown(87))) && (!Key.isDown(83))) && (moveable)) && (jump == false)) {
var action = "stand";
}
if (_parent.ground.hit.hitTest(_x + 10, _y - 12, true)) {
if (movechar) {
_x = (_x - 10);
} else {
_parent.ground._x = _parent.ground._x + 10;
_parent.ground2._x = _parent.ground2._x + 10;
}
} else if (_parent.ground.hit.hitTest(_x - 10, _y - 12, true)) {
if (movechar) {
_x = (_x + 10);
} else {
_parent.ground._x = _parent.ground._x - 10;
_parent.ground2._x = _parent.ground2._x - 10;
}
}
if (_parent.ground.hit.hitTest(_x, _y - 2, true)) {
_y = (_y-1);
}
if (_parent.ground.hit.hitTest(_x - 10, _y, true) || (_parent.ground.hit.hitTest(_x + 10, _y, true))) {
if (jump == false) {
var jumppower = 0;
}
var jump = false;
var grav = 0;
} else {
grav++;
}
if ((_root.fire && (firerate < 0)) && (wepselect == 1)) {
_root.fireWeapon();
body.arm.blast.play();
body.head.blast.play();
var firerate = 2;
} else if (((_root.fire && (firerate < 0)) && (wepselect == 2)) && (_root.specialAmmo > 0)) {
_root.fireWeapon2();
body.head.blast.play();
_root.specialAmmo--;
var firerate = 0;
} else if (((_root.fire && (firerate < 0)) && (wepselect == 3)) && (_root.specialAmmo > 2)) {
_root.fireWeapon3();
body.head.blast.play();
_root.specialAmmo = _root.specialAmmo - 3;
var firerate = 8;
} else if (((_root.fire && (firerate < 0)) && (wepselect == 4)) && (_root.specialAmmo > 1)) {
_root.fireWeapon4();
body.arm.blast2.play();
body.head.blast.play();
_root.specialAmmo = _root.specialAmmo - 2;
var firerate = 8;
}
firerate--;
}
Symbol 1207 Button
on (release) {
_global.ipbSend();
}
Symbol 1213 Button
on (release) {
}