Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(undefined);
}
fscommand ("showmenu", false);
fscommand ("allowscale", true);
fscommand ("trapallkeys", "true");
_quality = "HIGH";
var kongregate = _global.kongregate;
kongregate.services.connect();
logo_btn.onRelease = function () {
getURL ("http://www.gameboltz.com/home.php?gameref=jumpinglittleninja", "_blank");
};
_urlStart = _url.indexOf("://") + 3;
_urlEnd = _url.indexOf("/", _urlStart);
domain = _url.substring(_urlStart, _urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain == "kongregate.com") {
logo_btn2._visible = true;
adBox._visible = false;
} else {
adBox._visible = true;
logo_btn2._visible = false;
var CPMStarContentSpotID = "1451QDB44EFCD";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
}
stop();
preload = true;
this.onEnterFrame = function () {
if (preload == true) {
if (persen == 100) {
_root.gotoAndStop("ready");
preload = false;
}
now = getBytesLoaded();
tot = getBytesTotal();
persen = Math.round((now / tot) * 100);
load_txt.text = persen + "%";
}
};
logo_btn2.onRelease = function () {
getURL ("http://www.gameboltz.com/home.php?gameref=jumpinglittleninja", "_blank");
};
__com_mochibot__("3c6a147b", this, 10301, true);
Frame 2
stop();
var highscore = new GameboltzHighscore("321");
if (domain == "kongregate.com") {
logo_btn._visible = true;
adBox._visible = false;
} else {
adBox._visible = true;
logo_btn._visible = false;
var CPMStarContentSpotID = "1451QDB44EFCD";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
}
play_btn.onRelease = function () {
gotoAndStop ("gameboltz");
};
logo_btn.onRelease = function () {
getURL ("http://www.gameboltz.com/home.php?gameref=jumpinglittleninja", "_blank");
};
logo_btn2.onRelease = function () {
getURL ("http://www.gameboltz.com/home.php?gameref=jumpinglittleninja", "_blank");
};
cekDomain(localhost);
Frame 3
play();
Frame 4
stop();
removeMovieClip(adBox);
logo_btn.onRelease = function () {
getURL ("http://www.gameboltz.com/home.php?gameref=jumpinglittleninja", "_blank");
};
Frame 5
stop();
logo_btn.onRelease = function () {
getURL ("http://belugerinstudios.com/", "_blank");
};
Frame 6
function saveAchievements() {
Save = SharedObject.getLocal("JumpingNinjaAchievements", "/");
Save.data.achievements = achievements;
Save.flush(10);
}
function loadAchievements() {
Save = SharedObject.getLocal("JumpingNinjaAchievements", "/");
if (Save.data.achievements != undefined) {
achievements = Save.data.achievements;
}
Save.flush(10);
}
function resetData() {
Cookies = SharedObject.getLocal("JumpingNinja", "/");
delete Cookies.data.duit;
delete Cookies.data.trainingSpeed;
delete Cookies.data.trainingJump;
delete Cookies.data.trainingDuration;
Cookies.flush(10);
}
function saveData() {
Cookies = SharedObject.getLocal("JumpingNinja", "/");
Cookies.data.duit = duit;
Cookies.data.trainingSpeed = trainingSpeed;
Cookies.data.trainingJump = trainingJump;
Cookies.data.trainingDuration = trainingDuration;
Cookies.flush(10);
}
function loadData() {
Cookies = SharedObject.getLocal("JumpingNinja", "/");
if (Cookies.data.duit != undefined) {
duit = Cookies.data.duit;
trainingSpeed = Cookies.data.trainingSpeed;
trainingJump = Cookies.data.trainingJump;
trainingDuration = Cookies.data.trainingDuration;
} else {
trainingSpeed = 0;
trainingJump = 0;
trainingDuration = 0;
duit = 0;
}
Cookies.flush(10);
}
function loadCredit() {
menu_mc.removeMovieClip();
_root.gotoAndStop("credit");
}
function soundFX(idSound) {
sEffect = new Sound(slevel1);
sEffect.attachSound(idSound);
sEffect.start(0, 0);
}
function soundBGM(idSound) {
stopAllSounds();
sBGM = new Sound(slevel2);
sBGM.attachSound(idSound);
sBGM.start(0, 999999);
}
function volumeBGM(vol) {
sBGM.setVolume(vol);
}
function volumeFX(vol) {
sEffect.setVolume(vol);
}
function submitScore(_nama, _score) {
loadVariablesNum ((("http://www.belugerinstudios.com/API/score.php?game=jumpingninja&name=" + _nama) + "&score=") + _score, 0, "POST");
}
stop();
var trainingSpeed = 0;
var trainingJump = 0;
var trainingDuration = 0;
var duit = 0;
var achievements = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var achName = [0, "NUBIE NINJA", "IM GETTING HIGH", "HI ET!", "VERY DEAD", "REAL NINJA", "LUCKY NINJA", "ARE WE THERE YET?", "HARD ASS", "ELECTRICIAN JUMP", "NOW IM READY", "JUMPING LITTLE NINJA"];
var achDes = [0, "first time fail", "meet the bird", "saw an UFO", "fall from 10000", "30x combo", "reach atitude at 20000", "reach sun", "combo-fail by obstacle 8x", "combo-fail by electric 5x", "max upgrade", "finish the game"];
loadAchievements();
play_btn.onRollOver = function () {
soundFX("button");
};
play_btn.onRelease = function () {
menu_mc.removeMovieClip();
loadData();
gotoAndStop (123);
};
new_btn.onRollOver = function () {
soundFX("button");
};
new_btn.onRelease = function () {
attachMovie("Confirm", "menu_mc", 1000);
menu_mc._x = Stage.width / 2;
menu_mc._y = Stage.height / 2;
menu_mc.play_btn.onRelease = function () {
_root.gotoAndStop("tutorial");
menu_mc.removeMovieClip();
};
menu_mc.back_btn.onRelease = function () {
menu_mc.removeMovieClip();
};
};
credit_btn.onRollOver = function () {
soundFX("button");
};
credit_btn.onRelease = loadCredit;
more_btn.onRollOver = function () {
soundFX("button");
};
more_btn.onRelease = function () {
menu_mc.removeMovieClip();
getURL ("http://www.gameboltz.com/home.php?gameref=jumpinglittleninja", "_blank");
};
achievement_btn.onRollOver = function () {
soundFX("button");
};
achievement_btn.onRelease = function () {
menu_mc.removeMovieClip();
gotoAndStop ("achievement");
};
logo_btn.onRelease = function () {
menu_mc.removeMovieClip();
getURL ("http://www.gameboltz.com/home.php?gameref=jumpinglittleninja", "_blank");
};
volumeFX(80);
Frame 7
credit_mc.back_btn.onRelease = function () {
_root.gotoAndStop("menu");
};
Frame 8
next_btn.onRelease = function () {
resetData();
gotoAndStop (123);
};
Frame 9
function toolTips2(_tulisan) {
_root.attachMovie("Tips2", "tips", 9997);
if (_xmouse > 150) {
_root.tips.gotoAndStop(1);
} else {
_root.tips.gotoAndStop(2);
}
_root.tips._x = _xmouse;
_root.tips._y = _ymouse;
_root.tips.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse;
_root.tips.tulisan.text = _tulisan;
if (_xmouse > 150) {
_root.tips.gotoAndStop(1);
} else {
_root.tips.gotoAndStop(2);
}
};
}
stop();
back_btn.onRelease = function () {
gotoAndStop ("menu");
};
achievement_mc.tulisan.text = "roll-over to view description";
var i = 1;
while (i <= 11) {
achievement_mc["ach" + i].gotoAndStop(achievements[i] + 1);
achievement_mc["ach" + i].i = i;
achievement_mc["ach" + i].onRollOver = function () {
toolTips2(achName[this.i]);
achievement_mc.tulisan.text = achDes[this.i];
};
achievement_mc["ach" + i].onRollOut = function () {
_root.tips.removeMovieClip();
achievement_mc.tulisan.text = "roll-over to view description";
};
i++;
}
Frame 10
tulisan.text = totalScore;
submit_btn.onRelease = function () {
namaKu = nama.text;
scoreKu = tulisan.text;
if (namaKu != "") {
_root.highscore.submit(namaKu, scoreKu);
}
play();
};
hs_btn.onRelease = function () {
_root.highscore.view();
};
Frame 15
tulisan.text = totalScore;
nama.text = namaKu;
Frame 122
tulisan.text = totalScore;
nama.text = namaKu;
stop();
_root.highscore.view();
back_btn.onRelease = function () {
_root.gotoAndStop("menu");
};
hs_btn.onRelease = function () {
_root.highscore.view();
};
Frame 123
function setBlack(who) {
myColor = new Color(who);
myColorTransform = new Object();
myColorTransform = {rb:-255, gb:-255, bb:-255};
myColor.setTransform(myColorTransform);
}
function setOriginalColor(who) {
myColor = new Color(who);
myColorTransform = new Object();
myColorTransform = {rb:0, gb:0, bb:0};
myColor.setTransform(myColorTransform);
}
function refreshMenu() {
var list = [0, "trainingSpeed", "trainingJump", "trainingDuration"];
var des = [0, "Speed Skill", "Jumping Skill", "Special Skill"];
var des2 = [0, "Increase movement speed", "Be able to jump higher", "Increase skill duration"];
var harga = [0, [0, 1000, 5000, 15000], [0, 1500, 8000, 20000], [0, 1200, 7000, 18000]];
if (((trainingSpeed == 3) && (trainingJump == 3)) && (trainingDuration == 3)) {
menu_mc.lp.text = "MASTERED";
newAchievement(10);
}
var i = 1;
while (i <= 3) {
menu_mc["upgrade" + i].gotoAndStop(_root[list[i]] + 1);
var j = 1;
while (j <= 3) {
menu_mc["upgrade" + i]["btn" + j].i = i;
menu_mc["upgrade" + i]["btn" + j].j = j;
if (menu_mc["upgrade" + i]["btn" + j].j > _root[list[i]]) {
menu_mc["upgrade" + i]["btn" + j].harga = harga[i][j];
menu_mc["upgrade" + i]["btn" + j].onRollOver = function () {
menu_mc["upgrade" + this.i].gotoAndStop(this.j + 1);
toolTips((((((des[this.i] + " Level ") + this.j) + newline) + des2[this.i]) + "\nLearn Point needed: ") + this.harga);
};
menu_mc["upgrade" + i]["btn" + j].onRollOut = function () {
menu_mc["upgrade" + this.i].gotoAndStop(_root[list[this.i]] + 1);
_root.tips.removeMovieClip();
};
menu_mc["upgrade" + i]["btn" + j].onRelease = function () {
if ((duit - this.harga) >= 0) {
_root.tips.removeMovieClip();
_root[list[this.i]] = this.j;
menu_mc["upgrade" + this.i].gotoAndStop(_root[list[this.i]] + 1);
duit = duit - this.harga;
menu_mc.lp.text = duit;
if (((trainingSpeed == 3) && (trainingJump == 3)) && (trainingDuration == 3)) {
menu_mc.lp.text = "MASTERED";
}
refreshMenu();
} else {
soundFX("error");
}
};
} else {
menu_mc["upgrade" + i]["btn" + j].enabled = false;
}
j++;
}
i++;
}
}
function showMenu() {
saveData();
menuMode = true;
attachMovie("Menu", "menu_mc", 1000);
refreshMenu();
menu_mc._x = 300;
menu_mc.lp.text = duit;
if (((trainingSpeed == 3) && (trainingJump == 3)) && (trainingDuration == 3)) {
menu_mc.lp.text = "MASTERED";
}
menu_mc.next_btn.onRelease = function () {
resetObstacle();
menuMode = false;
menu_mc.onEnterFrame = function () {
this.difX = (-450 - this._x) / 4;
this._x = this._x + this.difX;
if (this._x < -400) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
};
menu_mc.onEnterFrame = function () {
this.difX = (-this._x) / 4;
this._x = this._x + this.difX;
if (this._x < 0.2) {
this._x = 0;
delete this.onEnterFrame;
}
};
}
function loadSelesai() {
saveData();
attachMovie("Selesai", "menu_mc", 1000);
menu_mc.tulisan.text = totalScore;
menu_mc.next_btn.onRelease = function () {
gotoAndStop (4);
menu_mc.removeMovieClip();
};
menu_mc.submit_btn.onRelease = function () {
gotoAndStop (10);
menu_mc.removeMovieClip();
};
}
function efekCahaya() {
attachMovie("Efek", "efek", 2000);
}
function efekCahaya2() {
attachMovie("Efek2", "efek", 19998000);
}
function efekCombo(_teks) {
attachMovie("Combo", "combo_mc", 2002);
combo_mc._x = 210;
combo_mc._y = 550;
combo_mc.mc.tulisan.text = _teks + "x COMBO!";
}
function newAchievement(num) {
if (achievements[num] == 0) {
attachMovie("Achievement", "achievement_mc", 2001);
achievement_mc._x = 50;
achievement_mc._y = 520;
achievement_mc.tulisan.text = achName[num];
achievements[num] = 1;
}
saveAchievements();
}
function toolTips(_tulisan) {
_root.attachMovie("Tips", "tips", 9997);
_root.tips.tulisan.text = _tulisan;
if (_xmouse > 150) {
_root.tips._x = _xmouse - (_root.tips._width / 2);
} else {
_root.tips._x = _xmouse;
}
if (_ymouse < 480) {
_root.tips._y = _ymouse;
} else {
_root.tips._y = _ymouse - _root.tips._height;
}
_root.tips.onEnterFrame = function () {
if (_xmouse > 150) {
_root.tips._x = _xmouse - (_root.tips._width / 2);
} else {
_root.tips._x = _xmouse;
}
if (_ymouse < 480) {
_root.tips._y = _ymouse;
} else {
_root.tips._y = _ymouse - _root.tips._height;
}
};
}
function deadEffect(sasaran) {
var _local3 = 1;
while (_local3 <= 5) {
bg_mc.depth++;
var _local2 = "part" + bg_mc.depth;
bg_mc.attachMovie("hero_part" + _local3, _local2, bg_mc.depth);
bg_mc[_local2]._x = sasaran._x;
bg_mc[_local2]._y = sasaran._y;
bg_mc[_local2].xspeed = -5 + random(10);
bg_mc[_local2].yspeed = 5 + random(10);
bg_mc[_local2].rot = (-5 + random(10)) * 10;
bg_mc[_local2].cacheAsBitmap = true;
bg_mc[_local2].onEnterFrame = function () {
if (!isPaused) {
this._y = this._y - this.yspeed;
this.yspeed = this.yspeed - (gra / 2);
this._x = this._x + this.xspeed;
this._rotation = this._rotation + this.rot;
if (this._y > (ninja_mc._y - 5)) {
this.yspeed = this.yspeed * -0.5;
this.xspeed = this.xspeed * 0.5;
if (this.yspeed < 0.2) {
this.yspeed = 0;
this.xspeed = 0;
this.rot = 0;
delete this.onEnterFrame;
bloodEffect(this);
}
}
}
};
_local3++;
}
}
function bloodEffect(sasaran) {
bg_mc.depth++;
var _local1 = "blood" + bg_mc.depth;
bg_mc.attachMovie("Blood", _local1, bg_mc.depth - 100);
bg_mc[_local1]._x = sasaran._x;
bg_mc[_local1]._y = sasaran._y;
bg_mc[_local1].cacheAsBitmap = true;
}
function shadingEffect(sasaran) {
bg_mc.depth++;
var _local2 = "shade" + bg_mc.depth;
bg_mc.attachMovie("Ninja_shadow", _local2, bg_mc.depth);
bg_mc[_local2]._x = sasaran._x;
bg_mc[_local2]._y = sasaran._y;
bg_mc[_local2].cacheAsBitmap = true;
bg_mc[_local2].onEnterFrame = function () {
if (!isPaused) {
if (firstJump) {
this._y = this._y + ninja_mc.jumpPow;
}
}
};
}
function scoreEffect(sasaran, type) {
bg_mc.depth++;
var _local2 = "score" + bg_mc.depth;
bg_mc.attachMovie("Score" + type, _local2, bg_mc.depth);
bg_mc[_local2]._x = sasaran._x;
bg_mc[_local2]._y = sasaran._y;
if (type == 1) {
bg_mc[_local2].score.text = sasaran.scoreGet * combo;
} else {
bg_mc[_local2].score.text = sasaran.scoreGet;
}
bg_mc[_local2].cacheAsBitmap = true;
bg_mc[_local2].onEnterFrame = function () {
if (!isPaused) {
this._y = this._y - 5;
this._xscale = this._xscale + 20;
this._yscale = this._yscale + 20;
}
};
}
function debuEffect(sasaran) {
bg_mc.depth++;
var _local1 = "smoke" + bg_mc.depth;
bg_mc.attachMovie("smokeFX", _local1, bg_mc.depth);
bg_mc[_local1]._x = sasaran._x;
bg_mc[_local1]._y = sasaran._y;
bg_mc[_local1].cacheAsBitmap = true;
}
function debuEffect2(sasaran) {
bg_mc.depth++;
var _local1 = "smoke" + bg_mc.depth;
bg_mc.attachMovie("smokeFX2", _local1, bg_mc.depth * 9999);
bg_mc[_local1]._x = sasaran._x;
bg_mc[_local1]._y = sasaran._y;
bg_mc[_local1].cacheAsBitmap = true;
}
function burungLewat(whereY) {
newAchievement(2);
bg_mc.depth++;
var _local2 = "burung" + bg_mc.depth;
bgg_mc.attachMovie("Burung", _local2, bg_mc.depth);
bgg_mc[_local2]._x = 500;
bgg_mc[_local2]._y = whereY;
bgg_mc[_local2].cacheAsBitmap = true;
bgg_mc[_local2].onEnterFrame = function () {
if (!isPaused) {
this._x = this._x - 2;
if (this._x < 0) {
pengganggu = false;
this.removeMovieClip();
}
}
};
}
function rocketLewat(whereY) {
bg_mc.depth++;
var _local2 = "burung" + bg_mc.depth;
bgg_mc.attachMovie("Roket", _local2, bg_mc.depth);
bgg_mc[_local2]._x = (1 + random(3)) * 120;
bgg_mc[_local2]._y = whereY;
bgg_mc[_local2].cacheAsBitmap = true;
bgg_mc[_local2].onEnterFrame = function () {
if (!isPaused) {
this._y = this._y - 4;
if (this._y < -20000) {
pengganggu = false;
this.removeMovieClip();
}
}
};
}
function ufoLewat(whereY) {
newAchievement(3);
bg_mc.depth++;
var _local2 = "burung" + bg_mc.depth;
bgg_mc.attachMovie("Ufo", _local2, bg_mc.depth);
bgg_mc[_local2]._x = -100;
bgg_mc[_local2]._y = whereY;
bgg_mc[_local2].cacheAsBitmap = true;
bgg_mc[_local2].onEnterFrame = function () {
if (!isPaused) {
this._x = this._x + 1;
if (this._x > 600) {
pengganggu = false;
this.removeMovieClip();
}
}
};
}
function acakBonus() {
itemSlot = 1 + random(5);
}
function tambahPijakan(posX, posY, type) {
bg_mc.depth++;
var _local2 = "pijakan" + bg_mc.depth;
bg_mc.attachMovie("Pijakan" + type, _local2, bg_mc.depth);
bg_mc[_local2]._x = posX;
bg_mc[_local2]._y = posY;
bg_mc[_local2].jumpAble = tablePijakan[type][0];
bg_mc[_local2].moving = tablePijakan[type][1];
bg_mc[_local2].efek = tablePijakan[type][2];
bg_mc[_local2].bonus = tablePijakan[type][3];
bg_mc[_local2].destructible = tablePijakan[type][4];
bg_mc[_local2].elastis = tablePijakan[type][5];
bg_mc[_local2].scoreGet = tablePijakan[type][6];
bg_mc[_local2].terpijak = false;
bg_mc[_local2].cacheAsBitmap = true;
bg_mc[_local2].onEnterFrame = function () {
if (!isPaused) {
this._x = this._x + this.moving;
if ((this._x > 450) || (this._x < 50)) {
this.moving = this.moving * -1;
}
}
};
}
function resetObstacle() {
arrayPijakan = [];
arrayGenerated = [];
firstJump = false;
combo = 0;
score = 0;
totalScore = 0;
ketinggianMax = 0;
dead = false;
itemSlot = 0;
reverse = false;
pengganggu = false;
bg_mc.depth = 100;
ninja_mc.mbledos = false;
ninja_mc.listrik = false;
ninja_mc.jurus = false;
ninja_mc.bounceMode = false;
ninja_mc.jumpPow = 0;
ninja_mc.jumpPowAwal = 19 + trainingJump;
ninja_mc.speedUp = false;
ninja_mc.speed = 0;
ninja_mc.speedAwal = 6 + (trainingSpeed * 1.5);
ninja_mc.timerAwal = 200 + (trainingDuration * 50);
ninja_mc._x = 0;
ninja_mc._y = 0;
ninja_mc.gotoAndStop(1);
bg_mc._y = Stage.height;
bgg_mc._y = Stage.height;
bggg_mc._y = Stage.height;
bgback_mc._y = Stage.height;
onEnterFrame = updateFrame;
var _local8 = 110;
for (var _local4 in bg_mc) {
if (bg_mc[_local4]._name.substr(0, 7) == "pijakan") {
var _local10 = bg_mc[_local4];
_local10.removeMovieClip();
}
}
for (var _local4 in bg_mc) {
if (bg_mc[_local4]._name.substr(0, 4) == "part") {
var _local10 = bg_mc[_local4];
_local10.removeMovieClip();
}
}
for (var _local4 in bg_mc) {
if (bg_mc[_local4]._name.substr(0, 5) == "blood") {
var _local10 = bg_mc[_local4];
_local10.removeMovieClip();
}
}
for (var _local4 in bgg_mc) {
if (bgg_mc[_local4]._name.substr(0, 6) == "burung") {
var _local10 = bgg_mc[_local4];
_local10.removeMovieClip();
}
}
tambahPijakan(pijakanPosX[1 + random(8)], -200, 1);
var _local4 = 2;
while (_local4 <= 500) {
if (_local4 < 75) {
var _local5 = _local4;
} else {
var _local5 = 75;
}
arrayPijakan.push((-(_local8 + _local5)) * _local4);
arrayGenerated.push(false);
var _local7 = 1 + random(8);
var _local6 = 1 + random(8);
var _local9 = random(Math.ceil(_local4 / 30));
if (_local9 <= 3) {
var _local1 = (-((_local8 + _local5) / 2)) - ((_local8 + _local5) * _local4);
var _local2;
if (_local1 > -8000) {
_local2 = 50;
} else if ((_local1 <= -8000) && (_local1 > -12000)) {
_local2 = 51;
} else if ((_local1 <= -12000) && (_local1 > -18000)) {
_local2 = 52;
} else if ((_local1 <= -18000) && (_local1 > -24000)) {
_local2 = 53;
} else if ((_local1 <= -24000) && (_local1 > -30000)) {
_local2 = 54;
} else if ((_local1 <= -30000) && (_local1 > -40000)) {
_local2 = 53;
} else if ((_local1 <= -40000) && (_local1 > -45000)) {
_local2 = 55;
} else {
_local2 = 150;
}
tambahPijakan(pijakanPosX[_local7], _local1, _local2);
if ((_local6 != _local7) && (random(3) == 1)) {
tambahPijakan(pijakanPosX[_local6], _local1, _local2);
}
}
_local4++;
}
var _local3 = 1;
while (_local3 <= 3) {
tambahPijakan(125 * _local3, -3000, 100);
tambahPijakan(125 * _local3, -10000, 100);
tambahPijakan(125 * _local3, -17000, 100);
tambahPijakan(125 * _local3, -25000, 100);
tambahPijakan(125 * _local3, -42000, 100);
_local3++;
}
tambahPijakan(225, -61600, 20);
}
function clearStage() {
bg_mc.removeMovieClip();
bggg_mc.removeMovieClip();
bgg_mc.removeMovieClip();
bgback_mc.removeMovieClip();
interface_mc.removeMovieClip();
debug.removeTextField();
Key.removeListener(key);
delete onMouseDown;
delete onEnterFrame;
}
function updateFrame() {
if (selesai) {
loadSelesai();
clearStage();
}
if (!isPaused) {
for (var _local4 in arrayPijakan) {
if (!arrayGenerated[_local4]) {
var _local3 = 1 + random(8);
if ((arrayPijakan[_local4] - ninja_mc._y) > -600) {
tambahPijakan(pijakanPosX[_local3], arrayPijakan[_local4], Math.ceil(_local4 / 30));
arrayGenerated[_local4] = true;
}
}
}
if (ketinggian > 30000) {
newAchievement(6);
}
if ((ketinggian > 101000) && (ketinggian < 103500)) {
newAchievement(7);
setBlack(bg_mc);
} else {
setOriginalColor(bg_mc);
}
if ((acakTimer > 0) && (!dead)) {
acakTimer--;
acakBonus();
}
if (menuMode) {
delete onEnterFrame;
}
ketinggian = Math.round((-((ninja_mc._y - 570) - (bg_mc._y - 600))) - 620);
if (ketinggianMax < ketinggian) {
ketinggianMax = ketinggian;
}
if (score < 0) {
score = 0;
}
totalScore = score + ketinggianMax;
debug.text = (((((("Altitude:\t\t\t" + ketinggian) + "\nMax Altitude:\t\t") + ketinggianMax) + "\nScore:\t\t\t") + score) + "\nTotal Score:\t\t") + totalScore;
debug.setTextFormat(format);
interface_mc.slot.gotoAndStop(itemSlot + 1);
if (!reverse) {
ninja_mc._x = ninja_mc._x + ninja_mc.speed;
} else {
ninja_mc._x = ninja_mc._x - ninja_mc.speed;
}
if (ninja_mc._x <= 30) {
ninja_mc._x = 30;
}
if (ninja_mc._x >= 470) {
ninja_mc._x = 470;
}
bg_mc._x = (-((_xmouse / 350) * 500)) / 3.34;
bgg_mc._x = (-((_xmouse / 350) * 400)) / 3.34;
bggg_mc._x = (-((_xmouse / 350) * 800)) / 3.34;
bgback_mc._x = (-((_xmouse / 350) * 160)) / 3.34;
nin_mc._x = bg_mc._x;
if ((bg_mc._xmouse - 5) > ninja_mc._x) {
ninja_mc.speed = ninja_mc.speedAwal;
ninja_mc._xscale = 100;
} else if ((bg_mc._xmouse + 5) < ninja_mc._x) {
ninja_mc.speed = -ninja_mc.speedAwal;
ninja_mc._xscale = -100;
} else {
ninja_mc.speed = 0;
}
if ((!ninja_mc.jumping) && (!dead)) {
if (ninja_mc.speed != 0) {
ninja_mc.gotoAndStop(2);
} else {
ninja_mc.gotoAndStop(1);
}
} else if (((((ninja_mc.jumpPow > -50) && (!ninja_mc.baloonMode)) && (!ninja_mc.mbledos)) && (!ninja_mc.listrik)) && (!ninja_mc.bounceMode)) {
ninja_mc.gotoAndStop(3);
ninja_mc._rotation = 0;
}
if (((ketinggian > 6000) && (ketinggian < 6100)) && (!pengganggu)) {
burungLewat(-2000);
pengganggu = true;
}
if (((ketinggian > 12000) && (ketinggian < 12100)) && (!pengganggu)) {
burungLewat(-3800);
pengganggu = true;
}
if (((ketinggian > 25000) && (ketinggian < 25100)) && (!pengganggu)) {
rocketLewat(-6000);
pengganggu = true;
}
if (((ketinggian > 80000) && (ketinggian < 80100)) && (!pengganggu)) {
ufoLewat(-21000);
pengganggu = true;
}
if (dead) {
newAchievement(1);
soundFX("dead");
itemSlot = 0;
ninja_mc.bounceMode = false;
ninja_mc._rotation = 0;
ninja_mc.gotoAndStop(4);
deadEffect(ninja_mc);
delete onEnterFrame;
_root.attachMovie("BoxReset", "win", 98);
win._x = Stage.width / 2;
win._y = Stage.height / 2;
win.submit_btn.onRelease = function () {
clearStage();
win.removeMovieClip();
gotoAndStop (10);
};
duit = duit + 100;
win.tulisan.text = totalScore;
win.tulisan2.text = duit;
if (((trainingSpeed == 3) && (trainingJump == 3)) && (trainingDuration == 3)) {
win.tulisan2.text = "MASTERED";
}
saveData();
win.reset_btn.onRelease = function () {
showMenu();
win.removeMovieClip();
};
}
if (ninja_mc.baloonMode) {
ninja_mc.gotoAndStop(6);
gra = 0;
ninja_mc.jumpPow = 3;
ninja_mc.timer--;
if (ninja_mc.timer <= 0) {
gra = 1;
ninja_mc.baloonMode = false;
}
}
if (ninja_mc.bounceMode) {
ninja_mc.gotoAndStop(9);
ninja_mc.timer--;
if (ninja_mc.timer <= 0) {
ninja_mc.jumpPowAwal = ninja_mc.jumpPowAwal - 5;
ninja_mc.bounceMode = false;
}
}
if ((ninja_mc.mbledos && (!ninja_mc.baloonMode)) && (!dead)) {
ninja_mc.gotoAndStop(7);
}
if ((ninja_mc.listrik && (!ninja_mc.baloonMode)) && (!dead)) {
ninja_mc.gotoAndStop(8);
}
if (ninja_mc.jurus) {
shadingEffect(ninja_mc);
}
if (ninja_mc.menghilang) {
ninja_mc._visible = false;
}
if (ninja_mc.jumpPow < 0) {
ninja_mc.jurus = false;
if (ninja_mc.menghilang) {
debuEffect2(ninja_mc);
}
ninja_mc.menghilang = false;
ninja_mc._visible = true;
}
if (ninja_mc.speedUp) {
shadingEffect(ninja_mc);
ninja_mc.speedAwal = 15;
ninja_mc.timer--;
if (ninja_mc.timer <= 0) {
ninja_mc.speedAwal = 8;
ninja_mc.speedUp = false;
}
}
if ((ninja_mc.jumpPow <= -50) && (!dead)) {
ninja_mc.mbledos = false;
ninja_mc.listrik = false;
ninja_mc.gotoAndStop(5);
ninja_mc._rotation = ninja_mc._rotation + 5;
if (ketinggianMax > 10000) {
newAchievement(4);
}
}
if (ninja_mc.jumping) {
if (firstJump) {
bg_mc._y = bg_mc._y + ninja_mc.jumpPow;
bgg_mc._y = bgg_mc._y + (ninja_mc.jumpPow / 2);
bggg_mc._y = bggg_mc._y + (ninja_mc.jumpPow * 1.5);
bgback_mc._y = bgback_mc._y + (ninja_mc.jumpPow / 2.5);
ninja_mc._y = ninja_mc._y - ninja_mc.jumpPow;
} else {
ninja_mc._y = ninja_mc._y - ninja_mc.jumpPow;
}
ninja_mc.jumpPow = ninja_mc.jumpPow - gra;
}
if (firstJump) {
if (bg_mc._y <= Stage.height) {
bg_mc._y = Stage.height;
bgg_mc._y = Stage.height;
bggg_mc._y = Stage.height;
bgback_mc._y = Stage.height;
ninja_mc._y = ninja_mc._y - ninja_mc.jumpPow;
if (ninja_mc._y >= -50) {
ninja_mc._y = -50;
ninja_mc.jumping = false;
firstJump = false;
ninja_mc.mbledos = false;
if (ketinggianMax > 1000) {
dead = true;
}
}
}
} else if (ninja_mc._y >= -50) {
ninja_mc._y = -50;
ninja_mc.jumping = false;
}
for (var _local4 in bg_mc) {
if (bg_mc[_local4]._name.substr(0, 7) == "pijakan") {
var _local2 = bg_mc[_local4];
if (((_local2.hitTest(ninja_mc.foot) && (!ninja_mc.baloonMode)) && (!ninja_mc.jurus)) && (ninja_mc.jumpPow <= 0)) {
if (_local2.jumpAble) {
if (curang) {
ninja_mc.jumpPow = 100 + _local2.elastis;
} else {
ninja_mc.jumpPow = ninja_mc.jumpPowAwal + _local2.elastis;
}
ninja_mc.jumping = true;
ninja_mc.char.gotoAndPlay(1);
}
if (_local2.bonus) {
itemSlot = 0;
acakTimer = 100;
}
firstJump = true;
if ((!_local2.terpijak) && (_local2.scoreGet > 0)) {
if (_local2.scoreGet >= 1000000) {
combo = 0;
efekCahaya2();
}
if (combo < 5) {
soundFX("bonus" + (combo + 1));
} else {
soundFX("bonus5");
}
combo = combo + 1;
score = score + (_local2.scoreGet * combo);
duit = duit + (_local2.scoreGet * 2);
scoreEffect(_local2, 1);
if (combo > 1) {
efekCombo(combo);
}
if (combo >= 30) {
newAchievement(5);
}
combofail1 = 0;
combofail2 = 0;
}
if ((_local2.scoreGet < 0) || (_local2.terpijak)) {
combo = 0;
}
if (_local2.efek == "mbledos") {
combofail1++;
if (combofail1 >= 8) {
newAchievement(8);
}
score = score + _local2.scoreGet;
scoreEffect(_local2, 2);
soundFX("hit1");
ninja_mc.mbledos = true;
} else {
ninja_mc.mbledos = false;
}
if (_local2.efek == "listrik") {
combofail2++;
if (combofail2 >= 5) {
newAchievement(9);
}
score = score + _local2.scoreGet;
scoreEffect(_local2, 2);
soundFX("hit2");
ninja_mc.listrik = true;
} else {
ninja_mc.listrik = false;
}
_local2.terpijak = true;
debuEffect(_local2);
if (_local2.destructible) {
_local2.removeMovieClip();
}
soundFX("jump1");
}
if ((_local2._y + bg_mc._y) > 1000) {
_local2.removeMovieClip();
}
}
}
}
}
stop();
var format = new TextFormat();
format.color = 16777215 /* 0xFFFFFF */;
format.size = 14;
format.font = "Berlin Sans FB Demi";
this.createTextField("debug", 999, 10, 10, 100, 22);
debug.autoSize = true;
debug.selectable = false;
debug.text = "debbuger";
debug.embedFonts = true;
debug.setTextFormat(format);
attachMovie("mymask", "mymask", 99999);
var score = 0;
var combo = 0;
var menuMode = false;
var selesai = false;
_root.createEmptyMovieClip("bg_mc", 1);
bg_mc.attachMovie("Hero", "ninja", 999999);
ninja_mc = bg_mc.ninja;
ninja_mc.cacheAsBitmap = true;
attachMovie("Interface", "interface_mc", 9);
_root.createEmptyMovieClip("bggg_mc", 2);
bggg_mc.attachMovie("BG0", "bg0", 1);
var i = 1;
while (i <= 50) {
bggg_mc.attachMovie("Cloud", "cloud" + i, 10 + i);
bggg_mc["cloud" + i]._y = -4000 - (500 * i);
if (random(2) == 1) {
bggg_mc["cloud" + i]._x = 650;
} else {
bggg_mc["cloud" + i]._x = 0;
bggg_mc["cloud" + i]._xscale = bggg_mc["cloud" + i]._xscale * -1;
}
i++;
}
bggg_mc.cacheAsBitmap = true;
_root.createEmptyMovieClip("bgg_mc", 0);
bgg_mc.attachMovie("BG1", "bg1", 1);
bgg_mc.cacheAsBitmap = true;
_root.createEmptyMovieClip("bgback_mc", -1);
var i = 1;
while (i <= 12) {
bgback_mc.attachMovie("BGs" + i, "bg" + i, i);
bgback_mc["bg" + i]._y = 2115 - (2115 * i);
i++;
}
bgback_mc.cacheAsBitmap = true;
bg_mc.depth = 100;
pijakanPosX = [50, 100, 150, 200, 250, 300, 350, 400, 450];
tablePijakan = new Array();
tablePijakan[0] = ["jumpAble", "moving", "efek", "bonus", "destructible", "elastis", "scoreGet"];
tablePijakan[1] = [true, 0, "none", false, false, -1, 10];
tablePijakan[2] = [true, 0, "none", false, false, -1, 15];
tablePijakan[3] = [true, 1, "none", false, true, -1, 30];
tablePijakan[4] = [true, 0, "none", false, true, -1.5, 50];
tablePijakan[5] = [true, 2, "none", false, true, -1.5, 80];
tablePijakan[6] = [true, 3, "none", false, true, -2, 100];
tablePijakan[7] = [true, 3, "none", false, true, -2, 100];
tablePijakan[8] = [true, 4, "none", false, true, -2.2, 200];
tablePijakan[9] = [true, 3, "none", false, true, -2.3, 300];
tablePijakan[10] = [true, 4, "none", false, true, -1, 500];
tablePijakan[11] = [true, 2, "none", false, true, -1, 1000];
tablePijakan[20] = [true, 0, "none", false, false, 10, 1000000];
tablePijakan[50] = [true, 0, "mbledos", false, false, -1, -25];
tablePijakan[51] = [true, 1, "listrik", false, true, -1, -50];
tablePijakan[52] = [true, 2, "mbledos", false, true, -1, -100];
tablePijakan[53] = [false, 0, "none", false, true, 0, -500];
tablePijakan[54] = [true, 4, "mbledos", false, true, -2, -1000];
tablePijakan[55] = [true, 4, "mbledos", false, true, -2.3, -5000];
tablePijakan[100] = [true, 0, "none", true, true, -1, 0];
var arrayPijakan = new Array();
var arrayGenerated = new Array();
resetObstacle();
itemSlot = 0;
firstJump = false;
dead = false;
gra = 1;
ketinggian = 0;
ketinggianMax = 0;
onMouseDown = function () {
if ((!ninja_mc.jumping) && (!dead)) {
ninja_mc.jumpPow = ninja_mc.jumpPowAwal;
ninja_mc.jumping = true;
ninja_mc.char.gotoAndPlay(1);
}
if ((acakTimer <= 0) && (!isPaused)) {
if (itemSlot == 1) {
soundFX("baloon");
ninja_mc.timer = ninja_mc.timerAwal;
ninja_mc.baloonMode = true;
} else if (itemSlot == 2) {
soundFX("fly");
ninja_mc.jurus = true;
ninja_mc.jumpPow = ninja_mc.jumpPowAwal * 2;
ninja_mc.jumping = true;
ninja_mc.char.gotoAndPlay(1);
} else if (itemSlot == 3) {
ninja_mc.timer = ninja_mc.timerAwal;
ninja_mc.speedUp = true;
ninja_mc.char.gotoAndPlay(1);
} else if (itemSlot == 4) {
debuEffect2(ninja_mc);
ninja_mc.menghilang = true;
ninja_mc.jumpPow = ninja_mc.jumpPowAwal * 2.5;
ninja_mc.jumping = true;
ninja_mc.char.gotoAndPlay(1);
} else if (itemSlot == 5) {
ninja_mc.timer = ninja_mc.timerAwal;
ninja_mc.bounceMode = true;
ninja_mc.jumpPowAwal = ninja_mc.jumpPowAwal + 5;
}
if (itemSlot != 0) {
efekCahaya();
}
itemSlot = 0;
}
};
curang = false;
var key = new Object();
key.onKeyDown = function () {
if (Key.isDown(80)) {
trace("paused");
if (isPaused) {
paused_mc.removeMovieClip();
isPaused = false;
} else {
attachMovie("Paused", "paused_mc", 8000);
isPaused = true;
}
}
if (Key.isDown(77)) {
if (isMute) {
volumeBGM(100);
volumeFX(80);
isMute = false;
} else {
volumeBGM(0);
volumeFX(0);
isMute = true;
}
}
if (Key.isDown(45)) {
if (!curang) {
curang = true;
} else {
curang = false;
}
}
};
Key.addListener(key);
soundBGM("BGM");
Symbol 10 MovieClip [Score2] Frame 15
stop();
this.removeMovieClip();
Symbol 20 MovieClip [Efek2] Frame 25
_root.selesai = true;
Symbol 20 MovieClip [Efek2] Frame 221
stop();
_root.newAchievement(11);
this.removeMovieClip();
Symbol 29 MovieClip [smokeFX2] Frame 1
_root.soundFX("poff");
Symbol 29 MovieClip [smokeFX2] Frame 11
stop();
this.removeMovieClip();
Symbol 31 MovieClip [Achievement] Frame 102
stop();
this.removeMovieClip();
Symbol 33 MovieClip [Ads] Frame 1
var CPMStarContentSpotID = "1451QDB44EFCD";
System.security.allowDomain("server.cpmstar.com");
this.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
Symbol 36 MovieClip [Combo] Frame 51
stop();
this.removeMovieClip();
Symbol 76 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 100
stop();
_parent.gotoAndPlay("shock");
Symbol 83 MovieClip Frame 62
stop();
botak.play();
Symbol 83 MovieClip Frame 234
stop();
Symbol 524 MovieClip [__Packages.GameboltzHighscore] Frame 0
class GameboltzHighscore
{
var gameid;
function GameboltzHighscore (_gameid) {
gameid = _gameid;
}
function submit(_username, _score) {
var _local2;
var _local3;
_local2 = new LoadVars();
_local3 = new LoadVars();
_local2.gameid = gameid;
_local2.username = _username;
_local2.score = _score;
_local2.sendAndLoad(connecturl, _local3, "POST");
}
function view() {
getURL ((highscoreurl + "?gameid=") + gameid, "_blank");
}
var connecturl = "http://gameboltz.com/highscore/send.php";
var highscoreurl = "http://gameboltz.com/highscore/highscore.php";
}
Symbol 141 MovieClip [Blood] Frame 50
stop();
Symbol 174 MovieClip [Efek] Frame 26
stop();
this.removeMovieClip();
Symbol 179 MovieClip Frame 1
this._alpha = 0;
Symbol 199 MovieClip Frame 20
stop();
Symbol 271 MovieClip [Menu] Frame 1
logo_btn.onRelease = function () {
getURL ("http://www.gameboltz.com/home.php?gameref=jumpinglittleninja", "_blank");
};
Symbol 275 MovieClip [Ninja_shadow] Frame 17
stop();
this.removeMovieClip();
Symbol 315 MovieClip [Pijakan53] Frame 1
this.removeMovieClip();
Symbol 325 MovieClip [Pijakan150] Frame 1
this.removeMovieClip();
Symbol 332 MovieClip [Score1] Frame 15
stop();
this.removeMovieClip();
Symbol 348 MovieClip [smokeFX] Frame 16
this.removeMovieClip();
Symbol 397 MovieClip Frame 39
stop();
botak.play();
Symbol 397 MovieClip Frame 201
stop();
_root.play();
Symbol 406 MovieClip Frame 89
stop();
_root.play();