Frame 1
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
var life;
var score;
var level;
life = 3;
score = 0;
level = 1;
fscommand ("allowscale", "false");
fscommand ("showmenu", "false");
stop();
Frame 152
function playSfx(l) {
if (_root.muting == false) {
_root.sfx.setVolume(100);
switch (l) {
case 1 :
_root.sfx.attachSound("clash1");
break;
case 2 :
_root.sfx.attachSound("slap");
break;
case 3 :
_root.sfx.attachSound("clash2");
break;
case 4 :
_root.sfx.attachSound("pain");
break;
case 5 :
_root.sfx.attachSound("kalah");
break;
case 6 :
_root.sfx.attachSound("waza");
break;
case 7 :
_root.sfx.attachSound("boo");
break;
case 8 :
_root.sfx.attachSound("hit");
break;
case 9 :
_root.sfx.attachSound("yikes.wav");
break;
case 10 :
_root.sfx.attachSound("drum");
break;
case 11 :
_root.sfx.attachSound("clothes");
break;
case 12 :
_root.sfx.attachSound("splat.wav");
break;
case 13 :
_root.sfx.attachSound("tada");
}
_root.sfx.start(0, 1);
} else {
_root.sfx.setVolume(0);
_root.sfx.stop();
}
}
function playBG(l) {
if (_root.muting == false) {
_root.musik.setVolume(100);
_root.musik.stop();
switch (l) {
case 0 :
_root.musik.stop();
_root.musik.attachSound("none.mp3");
break;
case 1 :
_root.musik.attachSound("soundmenu");
break;
case 2 :
_root.musik.attachSound("songgame");
break;
case 3 :
_root.musik.attachSound("votesong");
break;
case 4 :
_root.musik.attachSound("japan1");
break;
case 5 :
_root.musik.attachSound("japan2");
break;
case 6 :
_root.musik.attachSound("song2");
}
_root.musik.start(0, 99999999);
} else {
_root.musik.setVolume(0);
_root.musik.stop();
}
}
var sfx = new Sound();
var musik = new Sound();
var muting = false;
muting = false;
_root.gotoAndStop("menu");
Frame 157
function initGame() {
score = 0;
}
function onEnterFrame() {
if (Key.isDown(32)) {
}
}
var score;
var curPlayer;
initGame();
_root.gotoAndStop("menu");
Frame 162
stop();
Symbol 19 MovieClip Frame 20
stop();
Symbol 28 Button
on (release) {
getURL ("http://jarkey.net", "_blank");
}
Symbol 29 Button
on (release) {
getURL ("http://jarkey.net/playgames/enigmatica_game.htm", "_blank");
}
Symbol 30 Button
on (release) {
getURL ("http://jarkey.net/playgames/bloons-player-pack-1_game.htm", "_blank");
}
Symbol 31 Button
on (release) {
getURL ("http://jarkey.net/playgames/hover-tanks-2_game.htm", "_blank");
}
Symbol 32 Button
on (release) {
getURL ("http://jarkey.net/playgames/super-doggy_game.htm", "_blank");
}
Symbol 33 Button
on (release) {
getURL ("http://jarkey.net/playgames/death-point_game.htm", "_blank");
}
Symbol 34 Button
on (release) {
getURL ("http://jarkey.net/playgames/goal-shoot_game.htm", "_blank");
}
Symbol 35 MovieClip Frame 1
stop();
MochiAd.showPreloaderAd({id:"ce6632ebcf4fd389", res:"640x480"});
Symbol 35 MovieClip Frame 2
Symbol 508 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("1.5");
}
static function showPreloaderAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local25 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local25);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local24 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local24);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb) {
cb = parseInt(cb);
var _local4 = this._callbacks[cb];
if (!_local4) {
return(undefined);
}
delete this._callbacks[cb];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 39 MovieClip [actAnim] Frame 1
_parent.paused = true;
actt.tulisan.text = "Act " + _root.level;
_root.playSfx(10);
Symbol 39 MovieClip [actAnim] Frame 76
_parent.paused = false;
_parent.mode1 = 0;
_parent.bolehPause = true;
this.removeMovieClip();
Symbol 105 MovieClip [blitzAnim] Frame 12
this.removeMovieClip();
Symbol 111 MovieClip Frame 1
_parent.canShoot = false;
Symbol 111 MovieClip Frame 111
_parent.canShoot = true;
_parent.gotoAndStop("normal");
Symbol 112 MovieClip Frame 1
_parent.canShoot = false;
Symbol 112 MovieClip Frame 10
_root.playSfx(2);
Symbol 112 MovieClip Frame 14
_parent._parent.shoot();
Symbol 112 MovieClip Frame 17
_parent.canShoot = true;
_parent.gotoAndStop("normal");
Symbol 113 MovieClip [player] Frame 1
canShoot = true;
stop();
Symbol 120 MovieClip [game] Frame 1
function init() {
canShoot = true;
_root.level = 1;
_root.score = 0;
_root.life = 3;
bg.swapDepths(1);
bg2.swapDepths(5000);
timeTxt.swapDepths(6021);
scoreTxt.swapDepths(6022);
player.swapDepths(4000);
targetTxt.swapDepths(6023);
bg2.playBtn._visible = false;
bg2.sound1Btn._visible = false;
bg2.sound2Btn._visible = false;
if (_root.muting) {
bg2.sound2Btn._visible = true;
} else {
bg2.sound1Btn._visible = true;
}
initLevel(_root.level);
updateScore();
processTime();
}
function initLevel(l) {
bolehPause = false;
after.removeMovieClip();
shootCount = 0;
loadAmmo.removeMovieClip();
var _local2;
_local2 = 0;
while (_local2 < 7) {
this["iga" + _local2].removeMovieClip();
this["koga" + _local2].removeMovieClip();
this["igad" + _local2].removeMovieClip();
this["kogad" + _local2].removeMovieClip();
_local2++;
}
peluru.removeMovieClip();
miss = 0;
hit = 0;
penalty = 0;
this.attachMovie("actAnim", "actAnim", 8000, {_x:0, _y:0});
var _local4;
var _local3;
_local4 = 50;
_local3 = 0;
_local2 = 0;
while (_local2 < 7) {
contacts[_local2] = 0;
leftLane[_local2] = 0;
rightLane[_local2] = 0;
_local2++;
}
_local2 = 1;
while (_local2 <= 9) {
this.attachMovie("ammo1", "ammo_" + _local2, 5000 + _local2, {_x:_local4, _y:_local3 + 410});
_local3 = _local3 + 15;
if ((_local2 % 3) == 0) {
_local3 = 0;
_local4 = _local4 + 30;
}
_local2++;
}
this.attachMovie("ammo2", "ammo_10", 5010, {_x:_local4 + 7, _y:(_local3 + 410) - 2});
this.attachMovie("life", "life3", 5020, {_x:190, _y:402});
this.attachMovie("life", "life2", 5021, {_x:225, _y:402});
this.attachMovie("life", "life1", 5022, {_x:260, _y:402});
ammo = 10;
player.gotoAndStop("normal");
paused = false;
timeCtr = 0;
gameOver = false;
win = false;
levelOver = false;
switch (l) {
case 1 :
left = 3;
right = 3;
target = 10;
timeLimit = 50 * fps;
break;
case 2 :
left = 4;
right = 4;
target = 20;
timeLimit = 60 * fps;
break;
case 3 :
left = 5;
right = 4;
target = 25;
timeLimit = 80 * fps;
break;
case 4 :
left = 5;
right = 5;
target = 1;
timeLimit = 3 * fps;
break;
case 5 :
left = 7;
right = 3;
target = 1;
timeLimit = 3 * fps;
}
maxShoot = target;
updateAmmo();
updateLife();
updateTarget();
_local2 = 0;
while (_local2 < left) {
while (addNinja(1) == false) {
}
_local2++;
}
_local2 = 0;
while (_local2 < right) {
while (addNinja(2) == false) {
}
_local2++;
}
_local2 = 0;
while (_local2 < 7) {
this["iga" + _local2]._x = random(200) + 150;
this["koga" + _local2]._x = this["iga" + _local2]._x + random(200);
_local2++;
}
}
function addNinja(l) {
var _local3;
var _local2;
_local3 = false;
_local2 = Math.floor(Math.random() * 7);
switch (l) {
case 1 :
if (leftLane[_local2] == 0) {
leftLane[_local2] = 1;
this.attachMovie("iga", "iga" + _local2, (1000 + _local2) + (_local2 * 30), {_x:-50, _y:lane[_local2]});
_local3 = true;
this["iga" + _local2]._dx = (Math.random() * spd) + 1;
}
break;
case 2 :
if (rightLane[_local2] != 0) {
break;
}
rightLane[_local2] = 1;
this.attachMovie("koga", "koga" + _local2, ((1000 + (_local2 * 2)) + 1) + (_local2 * 30), {_x:700, _y:lane[_local2]});
this["koga" + _local2]._dx = -((Math.random() * spd) + 1);
_local3 = true;
}
return(_local3);
}
function updateAmmo() {
switch (ammo) {
case 9 :
ammo_1._visible = false;
return;
case 8 :
ammo_2._visible = false;
return;
case 7 :
ammo_3._visible = false;
return;
case 6 :
ammo_4._visible = false;
return;
case 5 :
ammo_5._visible = false;
return;
case 4 :
ammo_6._visible = false;
return;
case 3 :
ammo_7._visible = false;
return;
case 2 :
ammo_8._visible = false;
return;
case 1 :
ammo_9._visible = false;
return;
case 0 :
ammo_10._visible = false;
}
}
function updateLife() {
switch (_root.life) {
case 0 :
life1._visible = false;
life2._visible = false;
life3._visible = false;
break;
case 1 :
life1._visible = false;
life2._visible = false;
break;
case 2 :
life1._visible = false;
}
}
function onEnterFrame() {
if (paused == false) {
if (target <= 0) {
win = true;
_root.level++;
if (_root.level >= 4) {
}
paused = true;
this.attachMovie("after", "after", this.getNextHighestDepth(), {_x:0, _y:0});
after.hitTxt.text = hit;
after.pointTxt.text = hit * 50;
if (penalty == 0) {
after.penaltyTxt.text = "0";
} else {
after.penaltyTxt.text = "-" + (penalty * 75);
}
if (shootCount == 0) {
shootCount = 1;
}
after.accTxt.text = Math.ceil((hit / shootCount) * 100) + "%";
after.totalTxt.text = (hit * 50) - (penalty * 75);
after.nextBtn.onRelease = function () {
if (_root.level >= 4) {
_parent.attachMovie("sukses1", "sukses1", this.getNextHighestDepth(), {_x:0, _y:0});
after.removeMovieClip();
} else {
initLevel(_root.level);
}
};
} else if ((target != 0) && (timeLimit == 0)) {
lostLife();
}
if (Key.isDown(32)) {
target = 0;
}
if (timeCtr > 0) {
timeCtr--;
if (timeCtr == 0) {
}
}
updateScore();
processTime();
moveKarakter();
updateTarget();
moveTarget();
if (peluru != undefined) {
movePeluru();
cekHitPeluru();
}
} else {
Mouse.show();
}
}
function movePeluru() {
projectIt(peluru);
}
function mouseRelease() {
if (paused == false) {
if (((player.canShoot && (peluru == undefined)) && (canShoot)) && (ammo > 0)) {
player.gotoAndStop("shoot");
}
}
}
function shoot() {
if (ammo > 0) {
shootCount++;
ammo--;
updateAmmo();
this.attachMovie("ammo", "peluru", 3999, {_x:-10, _y:-10});
peluru.dz = -5;
peluru.xp = _root._xmouse;
peluru.yp = player._y;
peluru.zp = 600;
if (ammo == 0) {
this.attachMovie("loadAmmo", "loadAmmo", 14000, {_x:100, _y:435});
loadAmmo._yscale = 70;
}
}
}
function lostLife() {
_root.life--;
if (_root.life == 0) {
gameOver = true;
_root.gotoAndStop("gameover");
} else {
attachMovie("lostLife", "lostLife", 10000, {_x:0, _y:0});
}
switch (_root.life) {
case 1 :
break;
case 2 :
break;
case 3 :
}
}
function moveKarakter() {
player._x = _root._xmouse;
}
function projectIt(m) {
m._x = m.xp;
m._y = m.yp;
m.zp--;
m.yp = m.yp - 40;
m._yscale = m._yscale * 0.8;
m._xscale = m._xscale * 0.95;
if (m._yscale < 20) {
m.removeMovieClip();
}
}
function moveTarget() {
var _local3;
var _local4;
_local3 = 0;
while (_local3 < 7) {
_local4 = false;
if (!cekCollision(_local3)) {
if (leftLane[_local3] != 0) {
this["iga" + _local3]._x = this["iga" + _local3]._x + this["iga" + _local3]._dx;
if ((this["iga" + _local3]._x > 600) && (this["iga" + _local3]._dx > 0)) {
this["iga" + _local3]._dx = -((Math.random() * spd) + 1);
this["iga" + _local3]._x = this["iga" + _local3]._x + this["iga" + _local3]._width;
this["iga" + _local3]._xscale = this["iga" + _local3]._xscale * -1;
}
if ((this["iga" + _local3]._x < 70) && (this["iga" + _local3]._dx < 0)) {
this["iga" + _local3]._dx = (Math.random() * spd) + 1;
this["iga" + _local3]._x = this["iga" + _local3]._x - this["iga" + _local3]._width;
this["iga" + _local3]._xscale = this["iga" + _local3]._xscale * -1;
contacts[_local3] = 0;
}
}
if (rightLane[_local3] != 0) {
this["koga" + _local3]._x = this["koga" + _local3]._x + this["koga" + _local3]._dx;
if ((this["koga" + _local3]._x < 70) && (this["koga" + _local3]._dx < 0)) {
this["koga" + _local3]._dx = (Math.random() * spd) + 1;
this["koga" + _local3]._x = this["koga" + _local3]._x + this["koga" + _local3]._width;
this["koga" + _local3]._xscale = this["koga" + _local3]._xscale * -1;
}
if ((this["koga" + _local3]._x > 600) && (this["koga" + _local3]._dx > 0)) {
this["koga" + _local3]._dx = -((Math.random() * spd) + 1);
this["koga" + _local3]._x = this["koga" + _local3]._x - this["koga" + _local3]._width;
this["koga" + _local3]._xscale = this["koga" + _local3]._xscale * -1;
contacts[_local3] = 0;
}
}
} else if (Math.random() < 0.1) {
_root.playSfx(3);
}
if (_local4) {
contacts[_local3] = 0;
}
_local3++;
}
}
function cekCollision(l) {
var _local5;
var _local4;
_local5 = false;
if ((leftLane[l] == 1) && (rightLane[l] == 1)) {
if ((this["iga" + l]._dx > 0) && (this["koga" + l]._dx < 0)) {
_local4 = Math.abs((this["iga" + l]._x + this["iga" + l]._width) - this["koga" + l]._x);
if (((Math.random() < 0.99) && (_local4 > 2)) && (_local4 < 10)) {
_local5 = true;
var _local3;
_local3 = random(1000) + 9000;
if (Math.random() < 0.1) {
this.attachMovie("blitzAnim", "blitzAnim" + _local3, _local3, {_x:-100, _y:-10});
this["blitzAnim" + _local3]._x = (this["iga" + l]._x + this["iga" + l]._width) + (((Math.floor(Math.random() * 2) - 1) * Math.random()) * 10);
this["blitzAnim" + _local3]._y = (this["iga" + l]._y + 30) + (((Math.floor(Math.random() * 2) - 1) * Math.random()) * 10);
var _local6 = Math.random() * 50;
this["blitzAnim" + _local3]._xscale = _local6 + 20;
this["blitzAnim" + _local3]._yscale = _local6 + 20;
this["blitzAnim" + _local3]._rotation = Math.random() * 180;
}
contacts[l] = 1;
} else if (contacts[l] == 1) {
var _local7;
_local7 = ((Math.random() * spd) / 2) + 1;
this["iga" + l]._dx = -_local7;
this["iga" + l]._x = this["iga" + l]._x - this["iga" + l]._width;
this["iga" + l]._xscale = this["iga" + l]._xscale * -1;
this["koga" + l]._dx = _local7;
this["koga" + l]._x = this["koga" + l]._x + this["koga" + l]._width;
this["koga" + l]._xscale = this["koga" + l]._xscale * -1;
contacts[l] = 2;
}
}
if ((this["iga" + l]._dx < 0) && (this["koga" + l]._dx > 0)) {
_local4 = Math.abs((this["koga" + l]._x + this["koga" + l]._width) - this["iga" + l]._x);
if (contacts[l] == 1) {
if (((Math.random() < 0.99) && (_local4 > 2)) && (_local4 < 10)) {
_local5 = true;
contacts[l] = 1;
var _local3 = random(1000) + 9000;
if (Math.random() < 0.3) {
this.attachMovie("blitzAnim", "blitzAnim" + _local3, _local3, {_x:-100, _y:-10});
this["blitzAnim" + _local3]._x = (this["iga" + l]._x + this["iga" + l]._width) + (((Math.floor(Math.random() * 2) - 1) * Math.random()) * 10);
this["blitzAnim" + _local3]._y = (this["iga" + l]._y + 30) + (((Math.floor(Math.random() * 2) - 1) * Math.random()) * 10);
var _local6 = Math.random() * 50;
this["blitzAnim" + _local3]._xscale = _local6 + 20;
this["blitzAnim" + _local3]._yscale = _local6 + 20;
this["blitzAnim" + _local3]._rotation = Math.random() * 180;
}
} else if (contacts[l] == 1) {
var _local7 = ((Math.random() * spd) / 2) + 1;
this["iga" + l]._dx = -_local7;
this["iga" + l]._x = this["iga" + l]._x - this["iga" + l]._width;
this["iga" + l]._xscale = this["iga" + l]._xscale * -1;
this["koga" + l]._dx = _local7;
this["koga" + l]._x = this["koga" + l]._x + this["koga" + l]._width;
this["koga" + l]._xscale = this["koga" + l]._xscale * -1;
contacts[l] = 2;
}
}
}
}
return(_local5);
}
function processTime() {
if (timeLimit > 0) {
if ((timeLimit % fps) == 0) {
timeTxt.timeTxt.text = timeLimit / fps;
}
timeLimit--;
}
}
function updateScore() {
if (_root.score != scoreTxt.scoreTxt.text) {
scoreTxt.scoreTxt.text = _root.score;
}
}
function cekHitPeluru() {
var _local3;
var _local6;
_local6 = 0;
_local3 = 0;
while (_local3 < 7) {
if (leftLane[_local3] == 1) {
if (peluru.hitTest(this["iga" + _local3])) {
if (peluru.hitTest(this["iga" + _local3].peri)) {
leftLane[_local3] = 0;
this.attachMovie("igad", "igad" + _local3, (600 + _local3) + (_local3 * 30), {_x:this["iga" + _local3]._x, _y:this["iga" + _local3]._y});
this["iga" + _local3].removeMovieClip();
while (addNinja(1) == false) {
}
player.gotoAndStop("fail");
_local6 = 1;
_root.score = _root.score - 75;
penalty++;
_root.playSfx(8);
} else {
this.attachMovie("miss", "miss" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:this["iga" + _local3]._x, _y:this["iga" + _local3]._y});
miss++;
}
}
}
if (rightLane[_local3] == 1) {
if (peluru.hitTest(this["koga" + _local3])) {
if (peluru.hitTest(this["koga" + _local3].peri)) {
hit++;
target--;
_root.score = _root.score + 50;
rightLane[_local3] = 0;
this.attachMovie("kogad", "kogad" + _local3, ((600 + (_local3 * 2)) + 1) + (_local3 * 30), {_x:this["koga" + _local3]._x, _y:this["koga" + _local3]._y});
this["koga" + _local3].removeMovieClip();
_root.playSfx(9);
while (addNinja(2) == false) {
}
} else {
this.attachMovie("miss2", "miss2_" + this.getNextHighestDepth(), this.getNextHighestDepth(), {_x:this["koga" + _local3]._x, _y:this["koga" + _local3]._y});
miss++;
}
}
}
_local3++;
}
if (_local6 == 1) {
_root.playSfx(4);
}
}
function updateTarget() {
if (target != targetTxt.targetTxt.text) {
targetTxt.targetTxt.text = target;
}
}
function reload() {
ammo = 10;
ammo_1._visible = true;
ammo_2._visible = true;
ammo_3._visible = true;
ammo_4._visible = true;
ammo_5._visible = true;
ammo_6._visible = true;
ammo_7._visible = true;
ammo_8._visible = true;
ammo_9._visible = true;
ammo_10._visible = true;
}
var maxShoot;
var canShoot;
var shootCount;
var hit;
var miss;
var penalty;
var fps = 40;
var spd = 3;
var aspect = 1.33333333333333;
var focalLength = 600;
var paused = false;
var w = 40;
var h = 40;
var scrLeft = 150;
var scrTop = 30;
var dataw = 8;
var datah = 8;
var maxType = 6;
var data1 = [new Array(dataw)];
var mouse1 = new Object();
var target;
var timeLimit;
var timeCtr;
var gameOver;
var win;
var levelOver;
var ammo;
var bolehPause = false;
var lane = [80, 100, 120, 140, 160, 180, 200];
var contacts = [0, 0, 0, 0, 0, 0, 0];
var leftLane = [0, 0, 0, 0, 0, 0, 0];
var rightLane = [0, 0, 0, 0, 0, 0, 0];
var xp;
var yp;
var zp;
var dz;
var left;
var right;
_root.playBG(2);
bg2.playBtn.onRollOver = function () {
canShoot = false;
};
bg2.pauseBtn.onRollOver = function () {
canShoot = false;
};
bg2.backtomenuBtn.onRollOver = function () {
canShoot = false;
};
bg2.sound1Btn.onRollOver = function () {
canShoot = false;
};
bg2.sound2Btn.onRollOver = function () {
canShoot = false;
};
bg2.playBtn.onRollOut = function () {
canShoot = true;
};
bg2.pauseBtn.onRollOut = function () {
canShoot = true;
};
bg2.backtomenuBtn.onRollOut = function () {
canShoot = true;
};
bg2.sound1Btn.onRollOut = function () {
canShoot = true;
};
bg2.sound2Btn.onRollOut = function () {
canShoot = true;
};
bg2.playBtn.onRelease = function () {
paused = false;
_parent.bgpause.removeMovieClip();
bg2.pauseBtn._visible = true;
bg2.playBtn._visible = false;
};
bg2.pauseBtn.onRelease = function () {
if (bolehPause) {
_parent.attachMovie("bgpause", "bgpause", this.getNextHighestDepth(), {_x:0, _y:0});
paused = true;
bg2.pauseBtn._visible = false;
bg2.playBtn._visible = true;
}
};
bg2.backtomenuBtn.onRelease = function () {
_parent.loadAmmo.removeMovieClip();
_parent.bgpause.removeMovieClip();
_root.gotoAndStop("menu");
};
bg2.sound1Btn.onRelease = function () {
_root.muting = true;
_root.playBG(2);
bg2.sound1Btn._visible = false;
bg2.sound2Btn._visible = true;
};
bg2.sound2Btn.onRelease = function () {
_root.muting = false;
_root.playBG(2);
bg2.sound1Btn._visible = true;
bg2.sound2Btn._visible = false;
};
Mouse.addListener(mouse1);
init();
mouse1.onMouseUp = function () {
mouseRelease();
};
Symbol 138 MovieClip [loadAmmo] Frame 132
_parent.reload();
this.removeMovieClip();
Symbol 150 MovieClip [lostLife] Frame 1
_parent.paused = true;
_root.playSfx(7);
Symbol 150 MovieClip [lostLife] Frame 190
_parent.paused = false;
_parent.initLevel(_root.level);
this.removeMovieClip();
Symbol 154 MovieClip [miss] Frame 48
this.removeMovieClip();
Symbol 159 MovieClip [miss2] Frame 22
this.removeMovieClip();
Symbol 166 MovieClip [sukses1] Frame 1
_parent.paused = true;
Symbol 166 MovieClip [sukses1] Frame 190
_parent.paused = false;
_root.gotoAndStop("instruction2");
this.removeMovieClip();
Symbol 171 MovieClip [player2_shoot] Frame 1
_parent.canShoot = false;
Symbol 171 MovieClip [player2_shoot] Frame 10
_root.playSfx(2);
Symbol 171 MovieClip [player2_shoot] Frame 14
_parent._parent.shoot();
Symbol 171 MovieClip [player2_shoot] Frame 17
_parent.canShoot = true;
_parent.gotoAndStop("normal");
Symbol 172 MovieClip [player2] Frame 1
canShoot = true;
stop();
Symbol 176 MovieClip Frame 38
_parent.gotoAndStop("normal");
Symbol 177 MovieClip Frame 26
_parent.gotoAndStop("normal");
Symbol 178 MovieClip Frame 26
_parent.gotoAndStop("normal");
Symbol 181 MovieClip [player_hi] Frame 1
peri._visible = false;
Symbol 182 MovieClip Frame 1
this.isJumping = false;
this.isHit = true;
stop();
Symbol 182 MovieClip Frame 2
this.isJumping = true;
this.isHit = false;
Symbol 182 MovieClip Frame 3
this.isJumping = true;
this.isHit = false;
Symbol 182 MovieClip Frame 4
this.isJumping = false;
this.isHit = false;
stop();
Symbol 183 MovieClip [game2] Frame 1
function init() {
sukses2.removeMovieClip();
canShoot = true;
bg.swapDepths(1);
bg2.swapDepths(5000);
timeTxt.swapDepths(6021);
scoreTxt.swapDepths(6022);
player.swapDepths(4000);
targetTxt.swapDepths(6023);
playerku.swapDepths(3998);
playerku.isJumping = false;
playerku.isHit = false;
playerku.gotoAndStop("normal");
playerku._x = random(300) + 100;
bg2.playBtn._visible = false;
bg2.sound1Btn._visible = false;
bg2.sound2Btn._visible = false;
if (_root.muting) {
bg2.sound2Btn._visible = true;
} else {
bg2.sound1Btn._visible = true;
}
_root.level = 4;
initLevel(_root.level, true);
updateScore();
processTime();
}
function initLevel(l, b) {
after.removeMovieClip();
shootCount = 0;
loadAmmo.removeMovieClip();
peluru.removeMovieClip();
miss = 0;
hit = 0;
penalty = 0;
if (b == true) {
this.attachMovie("actAnim", "actAnim", 8000, {_x:0, _y:0});
}
var _local2;
var _local4;
var _local3;
_local4 = 50;
_local3 = 0;
_local2 = 1;
while (_local2 <= 9) {
this.attachMovie("ammo1", "ammo_" + _local2, 5000 + _local2, {_x:_local4, _y:_local3 + 410});
_local3 = _local3 + 15;
if ((_local2 % 3) == 0) {
_local3 = 0;
_local4 = _local4 + 30;
}
_local2++;
}
this.attachMovie("ammo2", "ammo_10", 5010, {_x:_local4 + 7, _y:(_local3 + 410) - 2});
this.attachMovie("life", "life3", 5020, {_x:190, _y:402});
this.attachMovie("life", "life2", 5021, {_x:225, _y:402});
this.attachMovie("life", "life1", 5022, {_x:260, _y:402});
ammo = 10;
player.gotoAndStop("normal");
paused = false;
timeCtr = 0;
gameOver = false;
win = false;
levelOver = false;
switch (l) {
case 4 :
target = 1;
track = 0.5;
enemy_dx = 2.5;
timeLimit = 20 * fps;
tracking = true;
trackingLama = (Math.random() * 5) * fps;
break;
case 5 :
target = 1;
track = 0.5;
enemy_dx = 3.5;
timeLimit = 30 * fps;
tracking = true;
trackingLama = (Math.random() * 5) * fps;
break;
case 6 :
timeLimit = 80 * fps;
break;
case 7 :
timeLimit = 90 * fps;
break;
case 8 :
timeLimit = 120 * fps;
}
maxShoot = target;
updateAmmo();
updateLife();
updateTarget();
updateScore();
processTime();
}
function updateAmmo() {
switch (ammo) {
case 9 :
ammo_1._visible = false;
return;
case 8 :
ammo_2._visible = false;
return;
case 7 :
ammo_3._visible = false;
return;
case 6 :
ammo_4._visible = false;
return;
case 5 :
ammo_5._visible = false;
return;
case 4 :
ammo_6._visible = false;
return;
case 3 :
ammo_7._visible = false;
return;
case 2 :
ammo_8._visible = false;
return;
case 1 :
ammo_9._visible = false;
return;
case 0 :
ammo_10._visible = false;
}
}
function updateLife() {
switch (_root.life) {
case 0 :
life1._visible = false;
life2._visible = false;
life3._visible = false;
break;
case 1 :
life1._visible = false;
life2._visible = false;
break;
case 2 :
life1._visible = false;
}
}
function onEnterFrame() {
if (paused == false) {
if (timeLimit == 0) {
win = true;
_root.level++;
if (_root.level >= 6) {
paused = true;
this.attachMovie("sukses2", "sukses2", this.getNextHighestDepth(), {_x:0, _y:0});
} else {
initLevel(_root.level, true);
}
paused = true;
after.hitTxt.text = hit;
after.pointTxt.text = hit * 50;
if (penalty == 0) {
after.penaltyTxt.text = "0";
} else {
after.penaltyTxt.text = "-" + (penalty * 75);
}
after.accTxt.text = Math.ceil((hit / shootCount) * 100) + "%";
after.totalTxt.text = (hit * 50) - (penalty * 75);
}
if (Key.isDown(32)) {
timeCtr = 1;
}
if (timeCtr > 0) {
timeCtr--;
if (timeCtr == 0) {
}
}
moveEnemy();
updateScore();
processTime();
moveKarakter();
updateTarget();
moveTarget();
if (peluru != undefined) {
movePeluru();
cekHitPeluru();
}
} else {
Mouse.show();
}
}
function movePeluru() {
projectIt(peluru);
}
function mouseRelease() {
if (paused == false) {
if (((player.canShoot && (peluru == undefined)) && (canShoot)) && (ammo > 0)) {
player.gotoAndStop("shoot");
}
}
}
function shoot() {
if (ammo > 0) {
shootCount++;
ammo--;
updateAmmo();
this.attachMovie("ammo", "peluru", 3999, {_x:-10, _y:-10});
peluru.dz = -5;
peluru.xp = _root._xmouse;
peluru.xp = adax + 8;
peluru.yp = player._y;
peluru.zp = 600;
if (ammo == 0) {
this.attachMovie("loadAmmo", "loadAmmo", 14000, {_x:100, _y:435});
loadAmmo._yscale = 70;
}
}
}
function lostLife() {
_root.life--;
if (_root.life == 0) {
gameOver = true;
_root.gotoAndStop("gameover");
} else {
initLevel(_root.level, false);
attachMovie("lostLife2", "lostLife", 10000, {_x:0, _y:0});
}
switch (_root.life) {
case 1 :
break;
case 2 :
break;
case 3 :
}
}
function moveKarakter() {
var _local2;
_local2 = 0;
if (Key.isDown(37) && (playerku.isJumping == false)) {
playerku._x = playerku._x - 4;
_local2 = 1;
}
if (Key.isDown(39) && (playerku.isJumping == false)) {
playerku._x = playerku._x + 4;
_local2 = 2;
}
if (Key.isDown(38) && (playerku.isJumping == false)) {
_root.playSfx(11);
if ((_local2 == 2) || (_local2 == 0)) {
playerku.gotoAndStop("jump_l");
if (_local2 == 0) {
playerku._dx = 0;
} else {
playerku._dx = 4;
}
} else {
playerku.gotoAndStop("jump_r");
playerku._dx = -4;
}
}
if (playerku.isJumping) {
playerku._x = playerku._x + playerku._dx;
}
if (playerku._x >= 579) {
playerku._x = 578;
}
if (playerku._x <= 0) {
playerku._x = 1;
}
}
function projectIt(m) {
m._x = m.xp;
m._y = m.yp;
m.zp--;
m.yp = m.yp - 40;
m._yscale = m._yscale * 0.8;
m._xscale = m._xscale * 0.95;
if (m._yscale < 20) {
m.removeMovieClip();
}
}
function moveTarget() {
}
function processTime() {
if (timeLimit > 0) {
if ((timeLimit % fps) == 0) {
timeTxt.timeTxt.text = timeLimit / fps;
}
timeLimit--;
}
}
function updateScore() {
if (_root.score != scoreTxt.scoreTxt.text) {
scoreTxt.scoreTxt.text = _root.score;
}
}
function cekHitPeluru() {
var _local3;
var _local2;
_local2 = 0;
if (((playerku.isJumping == false) && (playerku.isHit == false)) && (peluru.hitTest(playerku.pl.peri))) {
_root.playSfx(12);
playerku.gotoAndStop("hit");
lostLife();
}
}
function updateTarget() {
if (target != targetTxt.targetTxt.text) {
targetTxt.targetTxt.text = target;
}
}
function reload() {
ammo = 10;
ammo_1._visible = true;
ammo_2._visible = true;
ammo_3._visible = true;
ammo_4._visible = true;
ammo_5._visible = true;
ammo_6._visible = true;
ammo_7._visible = true;
ammo_8._visible = true;
ammo_9._visible = true;
ammo_10._visible = true;
}
function moveEnemy() {
var _local1;
_local1 = -35;
trackLama--;
if (trackLama <= 0) {
if (Math.random() < track) {
tracking = true;
} else {
tracking = false;
lamaRnd = 0;
}
trackLama = Math.ceil((Math.random() * 5) * fps);
}
if (tracking == true) {
var _local2;
_local2 = enemy_dx * ((Math.random() * 0.5) + 1);
dx = playerku._x - (player._x + _local1);
if ((dx >= 0) && (dx < _local2)) {
_local2 = dx;
player._x = playerku._x - _local1;
}
if ((dx <= 0) && ((-dx) < _local2)) {
_local2 = dx;
player._x = playerku._x - _local1;
}
if ((player._x + _local1) < playerku._x) {
player._x = player._x + _local2;
}
if ((player._x + _local1) > playerku._x) {
player._x = player._x - _local2;
}
} else {
lamaRnd--;
if (lamaRnd <= 0) {
var _local2 = (((enemy_dx * ((Math.random() * 0.8) + 1)) * Math.floor(Math.random() * 2)) * 2) - 1;
lamaRnd = Math.ceil((Math.random() * 3) * fps);
enemyDx = _local2;
}
if (((player._x + enemyDx) + player._width) > 640) {
enemyDx = -Math.abs(enemyDx);
}
if ((player._x + enemyDx) < 100) {
enemyDx = Math.abs(enemyDx);
}
player._x = player._x + enemyDx;
}
dx = playerku._x - (player._x + _local1);
adax = player._x;
if ((Math.random() < 0.1) && (Math.abs(dx) < 100)) {
mouseRelease();
}
}
var track;
var enemyDx;
var tracking;
var trackLama;
var lamaRnd;
var adax;
var enemy_dx;
var maxShoot;
var canShoot;
var shootCount;
var hit;
var miss;
var penalty;
var fps = 40;
var spd = 3;
var aspect = 1.33333333333333;
var focalLength = 600;
var paused = false;
var w = 40;
var h = 40;
var scrLeft = 150;
var scrTop = 30;
var dataw = 8;
var datah = 8;
var maxType = 6;
var data1 = [new Array(dataw)];
var mouse1 = new Object();
var target;
var timeLimit;
var timeCtr;
var gameOver;
var win;
var levelOver;
var ammo;
var xp;
var yp;
var zp;
var dz;
var left;
var right;
var bolehPause = false;
_root.playBG(2);
bg2.playBtn.onRollOver = function () {
canShoot = false;
};
bg2.pauseBtn.onRollOver = function () {
canShoot = false;
};
bg2.backtomenuBtn.onRollOver = function () {
canShoot = false;
};
bg2.sound1Btn.onRollOver = function () {
canShoot = false;
};
bg2.sound2Btn.onRollOver = function () {
canShoot = false;
};
bg2.playBtn.onRollOut = function () {
canShoot = true;
};
bg2.pauseBtn.onRollOut = function () {
canShoot = true;
};
bg2.backtomenuBtn.onRollOut = function () {
canShoot = true;
};
bg2.sound1Btn.onRollOut = function () {
canShoot = true;
};
bg2.sound2Btn.onRollOut = function () {
canShoot = true;
};
bg2.playBtn.onRelease = function () {
paused = false;
_parent.bgpause.removeMovieClip();
bg2.pauseBtn._visible = true;
bg2.playBtn._visible = false;
};
bg2.pauseBtn.onRelease = function () {
if (bolehPause) {
_parent.attachMovie("bgpause", "bgpause", this.getNextHighestDepth(), {_x:0, _y:0});
paused = true;
bg2.pauseBtn._visible = false;
bg2.playBtn._visible = true;
}
};
bg2.backtomenuBtn.onRelease = function () {
_parent.loadAmmo.removeMovieClip();
_parent.bgpause.removeMovieClip();
_root.gotoAndStop("menu");
};
bg2.sound1Btn.onRelease = function () {
_root.muting = true;
_root.playBG(2);
bg2.sound1Btn._visible = false;
bg2.sound2Btn._visible = true;
};
bg2.sound2Btn.onRelease = function () {
_root.muting = false;
_root.playBG(2);
bg2.sound1Btn._visible = true;
bg2.sound2Btn._visible = false;
};
Mouse.addListener(mouse1);
init();
mouse1.onMouseUp = function () {
mouseRelease();
};
Symbol 185 MovieClip [lostLife2] Frame 1
_parent.paused = true;
_root.playSfx(7);
Symbol 185 MovieClip [lostLife2] Frame 190
_parent.paused = false;
_parent.initLevel(_parent.level);
this.removeMovieClip();
Symbol 186 MovieClip [sukses2] Frame 1
_parent.paused = true;
Symbol 186 MovieClip [sukses2] Frame 190
_parent.paused = false;
_root.gotoAndStop("instruction3");
this.removeMovieClip();
Symbol 198 MovieClip Frame 54
_parent.gotoAndStop("normal");
Symbol 202 MovieClip Frame 65
_parent.gotoAndStop("normal");
Symbol 203 MovieClip Frame 1
stop();
isAnim = false;
Symbol 203 MovieClip Frame 2
stop();
Symbol 210 MovieClip Frame 1
stop();
Symbol 210 MovieClip Frame 30
_parent._parent._parent.mode1 = 3;
gotoAndStop (1);
Symbol 212 MovieClip Frame 1
stop();
Symbol 212 MovieClip Frame 30
_parent._parent.mode1 = 3;
gotoAndStop (1);
Symbol 213 MovieClip Frame 1
stop();
Symbol 213 MovieClip Frame 60
_parent._parent.mode1 = 3;
gotoAndStop (1);
Symbol 214 MovieClip Frame 1
stop();
Symbol 214 MovieClip Frame 30
_parent._parent.mode1 = 3;
gotoAndStop (1);
Symbol 215 MovieClip Frame 1
stop();
Symbol 215 MovieClip Frame 30
_parent._parent.mode1 = 3;
gotoAndStop (1);
Symbol 216 MovieClip Frame 1
stop();
Symbol 216 MovieClip Frame 60
_parent._parent.mode1 = 3;
gotoAndStop (1);
Symbol 217 MovieClip Frame 1
stop();
Symbol 217 MovieClip Frame 30
_parent._parent.mode1 = 3;
gotoAndStop (1);
Symbol 218 MovieClip [mangkukku] Frame 1
stop();
Symbol 219 MovieClip [game3] Frame 1
function initButton() {
mangkukku.gotoAndStop("normal");
var _local3;
_local3 = 1;
while (_local3 <= 3) {
mangkukku.mangkuk["mangkuk" + _local3].idx = _local3 - 1;
mangkukku.mangkuk["mangkuk" + _local3].onRollOver = function () {
this.attachMovie("piumuter", "piu", this.getNextHighestDepth());
};
mangkukku.mangkuk["mangkuk" + _local3].onRollOut = function () {
this.piu.removeMovieClip();
};
mangkukku.mangkuk["mangkuk" + _local3].onRelease = function () {
if ((sudahpilih == false) && (mode1 == 8)) {
sudahpilih = true;
if (data1[this.idx] == 0) {
ninja.isAnim = true;
this.obj._visible = false;
ninja.gotoAndStop("lose");
dly = 20;
lose = true;
} else {
_root.playSfx(13);
this.obj._visible = true;
ninja.isAnim = true;
ninja.gotoAndStop("win");
lose = false;
dly = 20;
}
this.gotoAndPlay(2);
}
};
_local3++;
}
}
function init() {
sukses3.removeMovieClip();
data1 = new Array(3);
data1[0] = 0;
data1[1] = 0;
data1[2] = 0;
canShoot = true;
bg.swapDepths(1);
ninja.swapDepths(4800);
bg3.swapDepths(5000);
bg33.swapDepths(5001);
mangkukku.swapDepths(5020);
timeTxt.swapDepths(6021);
scoreTxt.swapDepths(6022);
player.swapDepths(4000);
targetTxt.swapDepths(6023);
playerku.swapDepths(3998);
playerku.isJumping = false;
playerku.isHit = false;
playerku.gotoAndStop("normal");
playerku._x = random(300) + 100;
bg33.playBtn._visible = false;
bg33.sound1Btn._visible = false;
bg33.sound2Btn._visible = false;
if (_root.muting) {
bg33.sound2Btn._visible = true;
} else {
bg33.sound1Btn._visible = true;
}
_root.level = 6;
initLevel(_root.level, true);
updateScore();
processTime();
}
function initLevel(l, b) {
dly = 0;
sudahpilih = false;
data1[0] = 0;
data1[1] = 0;
data1[2] = 0;
isi = Math.floor(Math.random() * 3);
data1[isi] = 1;
mode1 = -1;
switch (l) {
case 6 :
skiping = 1;
ctrSwap = 10;
break;
case 7 :
skiping = 2;
ctrSwap = 20;
break;
case 8 :
skiping = 3;
ctrSwap = 30;
break;
case 9 :
skiping = 4;
ctrSwap = 40;
break;
case 10 :
skiping = 5;
ctrSwap = 50;
}
after.removeMovieClip();
shootCount = 0;
loadAmmo.removeMovieClip();
peluru.removeMovieClip();
miss = 0;
hit = 0;
penalty = 0;
if (b == true) {
this.attachMovie("actAnim", "actAnim", this.getNextHighestDepth(), {_x:0, _y:0});
}
var _local8;
var _local6;
var _local5;
_local6 = 50;
_local5 = 0;
this.attachMovie("life", "life3", 5120, {_x:100, _y:432});
this.attachMovie("life", "life2", 5121, {_x:145, _y:432});
this.attachMovie("life", "life1", 5122, {_x:190, _y:432});
ammo = 10;
player.gotoAndStop("normal");
paused = false;
timeCtr = 0;
gameOver = false;
win = false;
levelOver = false;
switch (l) {
case 4 :
target = 1;
track = 0.5;
enemy_dx = 2.5;
timeLimit = 30 * fps;
tracking = true;
trackingLama = (Math.random() * 5) * fps;
break;
case 5 :
target = 1;
track = 0.5;
enemy_dx = 3.5;
timeLimit = 40 * fps;
tracking = true;
trackingLama = (Math.random() * 5) * fps;
break;
case 6 :
timeLimit = 80 * fps;
break;
case 7 :
timeLimit = 90 * fps;
break;
case 8 :
timeLimit = 120 * fps;
}
maxShoot = target;
updateAmmo();
updateLife();
updateTarget();
updateScore();
processTime();
}
function updateAmmo() {
switch (ammo) {
case 9 :
ammo_1._visible = false;
return;
case 8 :
ammo_2._visible = false;
return;
case 7 :
ammo_3._visible = false;
return;
case 6 :
ammo_4._visible = false;
return;
case 5 :
ammo_5._visible = false;
return;
case 4 :
ammo_6._visible = false;
return;
case 3 :
ammo_7._visible = false;
return;
case 2 :
ammo_8._visible = false;
return;
case 1 :
ammo_9._visible = false;
return;
case 0 :
ammo_10._visible = false;
}
}
function updateLife() {
switch (_root.life) {
case 0 :
life1._visible = false;
life2._visible = false;
life3._visible = false;
break;
case 1 :
life1._visible = false;
life2._visible = false;
break;
case 2 :
life1._visible = false;
}
}
function onEnterFrame() {
if (paused == false) {
updateLife();
if (dly > 0) {
dly--;
if ((dly <= 0) && (lose == false)) {
_root.level++;
if (_root.level > 10) {
paused = true;
this.attachMovie("sukses3", "sukses3", this.getNextHighestDepth(), {_x:0, _y:0});
} else {
initLevel(_root.level, true);
}
} else if ((dly <= 0) && (lose == true)) {
lostLife();
}
}
moveKarakter();
if ((mode1 == 0) && (actAnim == undefined)) {
mode1 = 2;
if (data1[0] == 1) {
mangkukku.mangkuk.mangkuk1.obj._visible = true;
mangkukku.mangkuk.mangkuk1.gotoAndPlay(2);
}
if (data1[1] == 1) {
mangkukku.mangkuk.mangkuk2.obj._visible = true;
mangkukku.mangkuk.mangkuk2.gotoAndPlay(2);
}
if (data1[2] == 1) {
mangkukku.mangkuk.mangkuk3.obj._visible = true;
mangkukku.mangkuk.mangkuk3.gotoAndPlay(2);
}
}
if (mode1 == 3) {
if (ctrSwap <= 0) {
mode1 = 7;
} else {
ctrSwap--;
var _local4;
_local4 = Math.floor(Math.random() * 6);
doSwap(_local4);
}
}
if (mode1 == 4) {
var _local3;
_local3 = 0;
while (_local3 < skiping) {
if (mode1 == 4) {
mangkukku.mangkuk.nextFrame();
}
_local3++;
}
}
if (mode1 == 7) {
initButton();
mode1 = 8;
}
if (timeLimit == 0) {
win = true;
_root.level++;
if (_root.level >= 6) {
_root.gotoAndStop("ending");
}
paused = true;
after.hitTxt.text = hit;
after.pointTxt.text = hit * 50;
if (penalty == 0) {
after.penaltyTxt.text = "0";
} else {
after.penaltyTxt.text = "-" + (penalty * 75);
}
after.accTxt.text = Math.ceil((hit / shootCount) * 100) + "%";
after.totalTxt.text = (hit * 50) - (penalty * 75);
after.nextBtn.onRelease = function () {
initLevel(_root.level, true);
};
}
if (Key.isDown(32)) {
}
updateScore();
} else {
Mouse.show();
}
}
function mouseRelease() {
if (paused == false) {
if (((player.canShoot && (peluru == undefined)) && (canShoot)) && (ammo > 0)) {
player.gotoAndStop("shoot");
}
}
}
function lostLife() {
_root.life--;
if (_root.life == 0) {
gameOver = true;
_root.gotoAndStop("gameover");
} else {
initLevel(_root.level, false);
attachMovie("lostLife3", "lostLife", 10000, {_x:0, _y:0});
}
}
function doSwap(c) {
mode1 = 4;
switch (c) {
case 0 :
mangkukku.gotoAndStop("m12");
swap(0, 1);
break;
case 1 :
mangkukku.gotoAndStop("m13");
swap(0, 2);
break;
case 2 :
mangkukku.gotoAndStop("m23");
swap(1, 2);
break;
case 3 :
mangkukku.gotoAndStop("m21");
swap(1, 0);
break;
case 4 :
mangkukku.gotoAndStop("m31");
swap(2, 0);
break;
case 5 :
mangkukku.gotoAndStop("m32");
swap(2, 1);
}
}
function swap(i1, i2) {
var _local1;
_local1 = data1[i1];
data1[i1] = data1[i2];
data1[i2] = _local1;
}
function moveKarakter() {
var _local2;
_local2 = 2;
var _local4;
var _local3;
_local3 = (_root._xmouse - ninja._x) - (ninja._width / 2);
_local4 = 0;
if (Math.abs(_local3) < _local2) {
_local2 = Math.abs(_local3);
}
if (_local3 > 0) {
_local4 = _local2;
} else if (_local3 < 0) {
_local4 = -_local2;
}
if (ninja.isAnim == false) {
ninja._x = ninja._x + _local4;
}
}
var lose;
var dly;
var sudahpilih;
var data1 = new Array();
var mode1;
var skiping;
var ctrSwap;
var fps = 40;
var spd = 3;
var aspect = 1.33333333333333;
var focalLength = 600;
var paused = false;
var w = 40;
var h = 40;
var scrLeft = 150;
var scrTop = 30;
var dataw = 8;
var datah = 8;
var maxType = 6;
var mouse1 = new Object();
var target;
var timeLimit;
var timeCtr;
var gameOver;
var win;
var levelOver;
var ammo;
var xp;
var yp;
var zp;
var dz;
var left;
var right;
var bolehPause = false;
_root.playBG(6);
bg33.playBtn.onRollOver = function () {
canShoot = false;
};
bg33.pauseBtn.onRollOver = function () {
canShoot = false;
};
bg33.backtomenuBtn.onRollOver = function () {
canShoot = false;
};
bg33.sound1Btn.onRollOver = function () {
canShoot = false;
};
bg33.sound2Btn.onRollOver = function () {
canShoot = false;
};
bg33.playBtn.onRollOut = function () {
canShoot = true;
};
bg33.pauseBtn.onRollOut = function () {
canShoot = true;
};
bg33.backtomenuBtn.onRollOut = function () {
canShoot = true;
};
bg33.sound1Btn.onRollOut = function () {
canShoot = true;
};
bg33.sound2Btn.onRollOut = function () {
canShoot = true;
};
bg33.playBtn.onRelease = function () {
if (actAnim == undefined) {
paused = false;
_parent.bgpause.removeMovieClip();
bg33.pauseBtn._visible = true;
bg33.playBtn._visible = false;
}
};
bg33.pauseBtn.onRelease = function () {
if (actAnim == undefined) {
_parent.attachMovie("bgpause", "bgpause", this.getNextHighestDepth(), {_x:0, _y:0});
paused = true;
bg33.pauseBtn._visible = false;
bg33.playBtn._visible = true;
}
};
bg33.backtomenuBtn.onRelease = function () {
_parent.loadAmmo.removeMovieClip();
_parent.bgpause.removeMovieClip();
_root.gotoAndStop("menu");
};
bg33.sound1Btn.onRelease = function () {
_root.muting = true;
_root.playBG(6);
bg33.sound1Btn._visible = false;
bg33.sound2Btn._visible = true;
};
bg33.sound2Btn.onRelease = function () {
_root.muting = false;
_root.playBG(6);
bg33.sound1Btn._visible = true;
bg33.sound2Btn._visible = false;
};
Mouse.addListener(mouse1);
init();
mouse1.onMouseUp = function () {
mouseRelease();
};
Symbol 221 MovieClip [lostLife3] Frame 1
_parent.paused = true;
_root.playSfx(7);
Symbol 221 MovieClip [lostLife3] Frame 190
_parent.paused = false;
_parent.initLevel(_root.level, true);
this.removeMovieClip();
Symbol 222 MovieClip [sukses3] Frame 1
_parent.paused = true;
Symbol 222 MovieClip [sukses3] Frame 190
_parent.paused = false;
_root.gotoAndStop("instruction4");
this.removeMovieClip();
Symbol 226 MovieClip [lostLife4] Frame 1
_parent.paused = true;
_root.playSfx(7);
Symbol 226 MovieClip [lostLife4] Frame 190
_parent.paused = false;
_parent.initLevel(_root.level, true);
this.removeMovieClip();
Symbol 245 MovieClip [iga] Frame 1
peri._visible = false;
Symbol 246 MovieClip [igad] Frame 30
this.removeMovieClip();
Symbol 253 MovieClip [koga] Frame 1
peri._visible = false;
Symbol 254 MovieClip [kogad] Frame 30
this.removeMovieClip();
Symbol 267 MovieClip [bola] Frame 1
stop();
Symbol 268 MovieClip [bola_hilang] Frame 15
stop();
bola.swapDepths(9999999);
this.removeMovieClip();
Symbol 292 MovieClip Frame 5
stop();
Symbol 294 Button
on (release) {
_root.playSfx(1);
getURL ("http://jarkey.net/free_games_for_your_site.html", "_blank");
}
Symbol 295 Button
on (release) {
_root.playSfx(1);
getURL ("http://jarkey.net/", "_blank");
}
Symbol 297 MovieClip Frame 89
stop();
startBtn.onRelease = function () {
_root.playSfx(1);
_root.gotoAndStop("story");
};
Symbol 302 MovieClip Frame 20
stop();
Symbol 315 MovieClip Frame 67
stop();
Symbol 316 MovieClip [menu] Frame 1
function init() {
}
function onEnterFrame() {
}
_root.playBG(1);
init();
Symbol 342 MovieClip Frame 1
stop();
Symbol 353 Button
on (release) {
_root.gotoAndStop("menu");
}
Symbol 354 Button
on (release) {
_root.gotoAndStop("game");
}
Symbol 355 MovieClip Frame 1
_root.playBG(4);
Symbol 355 MovieClip Frame 26
koga.peri._visible = false;
iga.peri._visible = false;
Symbol 355 MovieClip Frame 44
stop();
Symbol 389 MovieClip Frame 69
_root.playSfx(6);
Symbol 389 MovieClip Frame 112
_root.playSfx(5);
Symbol 389 MovieClip Frame 117
backtomenuBtn.onRelease = function () {
_root.gotoAndStop("menu");
};
agBtn.onRelease = function () {
getURL ("http://www.dailyfreegames.com/free-games.html", "_blank");
};
pgBtn.onRelease = function () {
getURL ("http://www.dailyfreegames.com", "_blank");
};
Symbol 389 MovieClip Frame 120
_root.playSfx(5);
Symbol 389 MovieClip Frame 128
_root.playSfx(5);
Symbol 389 MovieClip Frame 136
_root.playSfx(5);
Symbol 389 MovieClip Frame 140
gotoAndPlay (117);
Symbol 400 MovieClip Frame 118
_parent.nextFrame();
Symbol 420 MovieClip Frame 88
_parent.nextFrame();
Symbol 445 MovieClip Frame 80
stop();
_root.playBG(5);
Symbol 446 MovieClip Frame 1
stop();
_root.playBG(0);
Symbol 464 MovieClip Frame 47
stop();
next2Btn.onRelease = function () {
_root.gotoAndStop("instruction1");
};
Symbol 494 MovieClip Frame 1
stop();
Symbol 495 MovieClip Frame 1
function init() {
data1 = new Array(3);
data1[0] = 0;
data1[1] = 0;
data1[2] = 0;
canShoot = true;
bg.swapDepths(1);
ninja.swapDepths(4800);
bg3.swapDepths(5000);
bg33.swapDepths(5001);
timeTxt.swapDepths(6021);
scoreTxt.swapDepths(6022);
player.swapDepths(4000);
targetTxt.swapDepths(6023);
playerku.swapDepths(3998);
playerku.isJumping = false;
playerku.isHit = false;
playerku.gotoAndStop("normal");
playerku._x = random(300) + 100;
bg33.playBtn._visible = false;
bg33.sound1Btn._visible = false;
bg33.sound2Btn._visible = false;
if (_root.muting) {
bg33.sound2Btn._visible = true;
} else {
bg33.sound1Btn._visible = true;
}
_root.level = 11;
initLevel(_root.level, true);
updateScore();
processTime();
}
function initLevel(l, b) {
isInvisible = false;
ninja._x = 295;
ninja._y = 156.9;
deathDelay = 0;
isHit = false;
ninja.gotoAndStop(1);
scrollfin._y = -100;
jalan1._y = 0;
jalan2._y = -618;
cntPiu = 0;
dly = 0;
sudahpilih = false;
data1[0] = 0;
data1[1] = 0;
data1[2] = 0;
isi = Math.floor(Math.random() * 3);
data1[isi] = 1;
mode1 = -1;
curDistance = 0;
switch (l) {
case 11 :
piuProb = 0.8 / fps;
distance = 2000;
break;
case 12 :
piuProb = 1 / fps;
distance = 2000;
}
after.removeMovieClip();
shootCount = 0;
loadAmmo.removeMovieClip();
peluru.removeMovieClip();
miss = 0;
hit = 0;
penalty = 0;
if (b == true) {
this.attachMovie("actAnim", "actAnim", this.getNextHighestDepth(), {_x:0, _y:0});
}
var _local8;
var _local5;
var _local4;
_local5 = 50;
_local4 = 0;
this.attachMovie("life", "life3", 5120, {_x:100, _y:432});
this.attachMovie("life", "life2", 5121, {_x:145, _y:432});
this.attachMovie("life", "life1", 5122, {_x:190, _y:432});
ammo = 10;
player.gotoAndStop("normal");
paused = false;
timeCtr = 0;
gameOver = false;
win = false;
levelOver = false;
maxShoot = target;
updateAmmo();
updateLife();
updateTarget();
updateScore();
processTime();
}
function updateAmmo() {
switch (ammo) {
case 9 :
ammo_1._visible = false;
return;
case 8 :
ammo_2._visible = false;
return;
case 7 :
ammo_3._visible = false;
return;
case 6 :
ammo_4._visible = false;
return;
case 5 :
ammo_5._visible = false;
return;
case 4 :
ammo_6._visible = false;
return;
case 3 :
ammo_7._visible = false;
return;
case 2 :
ammo_8._visible = false;
return;
case 1 :
ammo_9._visible = false;
return;
case 0 :
ammo_10._visible = false;
}
}
function updateLife() {
switch (_root.life) {
case 0 :
life1._visible = false;
life2._visible = false;
life3._visible = false;
break;
case 1 :
life1._visible = false;
life2._visible = false;
break;
case 2 :
life1._visible = false;
}
}
function processDistance() {
if (curDistance < distance) {
curDistance++;
}
}
function onEnterFrame() {
if (paused == false) {
cekHit();
updateLife();
updateDistance();
processDistance();
processMovement();
processPiu();
processJalan();
if (deathDelay > 0) {
deathDelay--;
if (deathDelay == 0) {
if (isHit) {
lostLife();
}
if (isInvisible == true) {
_root.level++;
if (_root.level > 12) {
_root.gotoAndStop("ending");
} else {
initLevel(_root.level, true);
}
}
}
}
updateScore();
} else {
Mouse.show();
}
}
function mouseRelease() {
if (paused == false) {
}
}
function lostLife() {
_root.life--;
if (_root.life == 0) {
gameOver = true;
_root.gotoAndStop("gameover");
} else {
initLevel(_root.level, false);
attachMovie("lostLife4", "lostLife4", 10000, {_x:0, _y:0});
}
}
function updateDistance() {
run._y = 314 - ((curDistance / distance) * bar3._height);
}
function processMovement() {
if ((isHit == false) && (isInvisible == false)) {
var _local3;
var _local2;
_local3 = (_root._xmouse - Math.floor(ninja._width / 2)) - ninja._x;
_local2 = (_root._ymouse - Math.floor(ninja._height / 2)) - ninja._y;
var _local7;
var _local6;
var _local5;
var _local4;
var _local8 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local5 = 5 * Math.abs(_local3 / _local8);
_local4 = 5 * Math.abs(_local2 / _local8);
if (Math.abs(_local3) < _local5) {
_local5 = Math.abs(_local3);
}
if (Math.abs(_local2) < _local4) {
_local4 = Math.abs(_local2);
}
if (_local3 > 0) {
_local7 = _local5;
} else if (_local3 < 0) {
_local7 = -_local5;
} else {
_local7 = 0;
}
if (_local2 > 0) {
_local6 = _local4;
} else if (_local2 < 0) {
_local6 = -_local4;
} else {
_local6 = 0;
}
ninja._x = ninja._x + _local7;
ninja._y = ninja._y + _local6;
if (ninja._x < left1._width) {
ninja._x = left1._width;
}
if (ninja._x > (right1._x - ninja._width)) {
ninja._x = right1._x - ninja._width;
}
if ((ninja._y + ninja._height) > 480) {
ninja._y = 480 - ninja._height;
}
}
}
function addPiu() {
var arah;
_root.playSfx(3);
this.attachMovie("piumuter2", "piumuter2" + cntPiu, 2000 + cntPiu);
arah = Math.floor(Math.random() * 2);
this["piumuter2" + cntPiu].dy = (Math.random() * 5) + 2;
this["piumuter2" + cntPiu]._xscale = 30;
this["piumuter2" + cntPiu]._yscale = 30;
if (arah == 0) {
this["piumuter2" + cntPiu]._y = -57;
} else {
this["piumuter2" + cntPiu]._y = 480;
this["piumuter2" + cntPiu].dy = this["piumuter2" + cntPiu].dy * -1;
}
this["piumuter2" + cntPiu].arah = arah;
this["piumuter2" + cntPiu]._x = 187 + Math.floor(Math.random() * (jalan1._width - 30));
this["piumuter2" + cntPiu].onEnterFrame = function () {
this._y = this._y + this.dy;
if (arah == 0) {
if (this._y > 520) {
this.removeMovieClip();
}
} else if (this._y < -50) {
this.removeMovieClip();
}
};
cntPiu++;
if (cntPiu > 50) {
cntPiu = 0;
}
}
function processPiu() {
var _local1;
_local1 = Math.random();
if (_local1 < piuProb) {
addPiu();
}
}
function processJalan() {
if (curDistance < distance) {
if ((distance - curDistance) < 200) {
scrollfin._y++;
}
if (isHit == true) {
ninja._y++;
}
jalan1._y++;
jalan2._y++;
if (jalan1._y > 619) {
jalan1._y = -617;
}
if (jalan2._y > 619) {
jalan2._y = -617;
}
}
}
function cekHit() {
var _local3;
if ((isHit == false) && (isInvisible == false)) {
_local3 = 0;
while (_local3 < cntPiu) {
if (this["piumuter2" + _local3] != undefined) {
if (ninja.ninja.peri.hitTest(this["piumuter2" + _local3])) {
_root.playSfx(12);
isHit = true;
deathDelay = 120;
ninja.gotoAndStop(2);
}
}
_local3++;
}
}
if (ninja.ninja.peri.hitTest(scrollfin) && (isInvisible == false)) {
_root.playSfx(13);
deathDelay = 20;
isInvisible = true;
}
}
var isInvisible;
var deathDelay;
var isHit;
var cntPiu;
var piuProb;
var distance;
var curDistance;
var lose;
var dly;
var sudahpilih;
var data1 = new Array();
var mode1;
var skiping;
var ctrSwap;
var fps = 40;
var spd = 3;
var aspect = 1.33333333333333;
var focalLength = 600;
var paused = false;
var w = 40;
var h = 40;
var scrLeft = 150;
var scrTop = 30;
var dataw = 8;
var datah = 8;
var maxType = 6;
var mouse1 = new Object();
var target;
var timeLimit;
var timeCtr;
var gameOver;
var win;
var levelOver;
var ammo;
var xp;
var yp;
var zp;
var dz;
var left;
var right;
var bolehPause = false;
_root.playBG(5);
bg33.playBtn.onRollOver = function () {
canShoot = false;
};
bg33.pauseBtn.onRollOver = function () {
canShoot = false;
};
bg33.backtomenuBtn.onRollOver = function () {
canShoot = false;
};
bg33.sound1Btn.onRollOver = function () {
canShoot = false;
};
bg33.sound2Btn.onRollOver = function () {
canShoot = false;
};
bg33.playBtn.onRollOut = function () {
canShoot = true;
};
bg33.pauseBtn.onRollOut = function () {
canShoot = true;
};
bg33.backtomenuBtn.onRollOut = function () {
canShoot = true;
};
bg33.sound1Btn.onRollOut = function () {
canShoot = true;
};
bg33.sound2Btn.onRollOut = function () {
canShoot = true;
};
bg33.playBtn.onRelease = function () {
if (actAnim == undefined) {
paused = false;
_parent.bgpause.removeMovieClip();
bg33.pauseBtn._visible = true;
bg33.playBtn._visible = false;
}
};
bg33.pauseBtn.onRelease = function () {
if (actAnim == undefined) {
_parent.attachMovie("bgpause", "bgpause", this.getNextHighestDepth(), {_x:0, _y:0});
paused = true;
bg33.pauseBtn._visible = false;
bg33.playBtn._visible = true;
}
};
bg33.backtomenuBtn.onRelease = function () {
_parent.loadAmmo.removeMovieClip();
_parent.bgpause.removeMovieClip();
_root.gotoAndStop("menu");
};
bg33.sound1Btn.onRelease = function () {
_root.muting = true;
_root.playBG(5);
bg33.sound1Btn._visible = false;
bg33.sound2Btn._visible = true;
};
bg33.sound2Btn.onRelease = function () {
_root.muting = false;
_root.playBG(5);
bg33.sound1Btn._visible = true;
bg33.sound2Btn._visible = false;
};
Mouse.addListener(mouse1);
init();
mouse1.onMouseUp = function () {
mouseRelease();
};
mouse1.onMouseMove = function () {
};
Symbol 498 Button
on (release) {
_root.gotoAndStop("game2");
}
Symbol 499 MovieClip Frame 1
_root.playBG(4);
Symbol 499 MovieClip Frame 26
koga.peri._visible = false;
iga.peri._visible = false;
Symbol 499 MovieClip Frame 44
stop();
Symbol 502 Button
on (release) {
_root.gotoAndStop("game3");
}
Symbol 503 MovieClip Frame 1
_root.playBG(4);
Symbol 503 MovieClip Frame 26
koga.peri._visible = false;
iga.peri._visible = false;
Symbol 503 MovieClip Frame 44
stop();
Symbol 506 Button
on (release) {
_root.gotoAndStop("game4");
}
Symbol 507 MovieClip Frame 1
_root.playBG(4);
Symbol 507 MovieClip Frame 26
koga.peri._visible = false;
iga.peri._visible = false;
Symbol 507 MovieClip Frame 44
stop();