Frame 1
function goTo() {
getURL (sponsorurl);
}
_global.sponsorurl = "http://game.24h.com.vn";
_global.walkurl = "http://game.24h.com.vn";
var gkl = (new com.miniclip.gatekeeper.GatekeeperLoader());
gkl.onResult = function (ok) {
if (ok) {
} else {
stop();
_root._y = -520;
onEnterFrame = null;
}
};
gkl.start();
var newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
newMenu.customItems.push(new ContextMenuItem("Play More Games", goTo));
this.menu = newMenu;
onEnterFrame = function () {
totalBytes = Math.round(_root.getBytesTotal() / 1024);
loadedBytes = Math.round(_root.getBytesLoaded() / 1024);
if (Math.round((loadedBytes / totalBytes) * 100) >= 100) {
_root.gotoAndStop(2);
onEnterFrame = null;
}
};
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);
stop();
Frame 2
onEnterFrame = null;
gotoAndStop (3);
Frame 3
gotoAndStop (4);
Frame 4
onEnterFrame = null;
lvlmap = new Array();
lvlmap[0] = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";
lvlmap[1] = "111111112121212121212121211111111111111111214141412141414121111111111111111121212121212121212111111111111111112121345151513321211111111111111121215151510151515121111111111111112134912121212121513321111111111111215191214141412181512111111111111121319121212121215132211111111111112121517171717171512111111111111111112121315151513221211111111111111111212121212121212121111111111111111121414141214141412111111111";
lvlmap[2] = "111111515132212121212131515111111111111151322121414141212131511111111111113221212121212121212131111111111111212121212121212121212111111111111121727272727272727201211111111111112172414141914141416121111111111111217241414191414141612111111111111121724141419141414161211111111111112131414141824141416121111111515132212121212121212121212131515151322121212121212121212121212131513221212121212121212121212121212131";
lvlmap[3] = "112121212121212121212121212121211111212121212121212121212121212121111121347171717171217171717171332111114271412121212121212121214171421111213171717171716171717171713221111121212121212121912121212121212111112101415181514161415183514191211111212121212121219121212121212121111121347373737373617373737373332111114273412121212121212121214173421111213173737373732173737373733221111121212121212121212121212121212111";
lvlmap[4] = "111111212121212121212121212111111111111133212121212121212121341111111111115121615151845151612151111111111111514261513321345161425111111111111151216151747474516121511111111111115121617474747474612151111111111111512161747491747461215111111111111151216174747474746121511111111111115121615174747451612151111111111111514261913221319161425111111111111151216151510151516121511111111111113221212121212121212131111111";
lvlmap[5] = "111111111121212121212121111111111111111111212121212121212121111111111111112121212121212121212121111111111111112191515151615181211111111111111111215121712172215121111111111111111121517171917272612111111111111111212171217121722172212111111111111111216171719172725121111111111111111121512171217221512111111111111111112182516151515101211111111111111121212121212121212121211111111111111121212121212121212111111111";
lvlmap[6] = "111111111111212121212111111111111111111111112121916191212111111111111111111121212121512121212111111111111111217171712151217373732111111111112171717171215121737373732111111111217171817151615173837373211111112121212121214101412121212121211111112172727272516151747474742111111111217272727221912174747474211111111111217282722121217484742111111111111132212121212121212121311111111132212121212121212121212121213111";
lvlmap[7] = "212121212121212121212121212121212121347373735151516151515174747433212131737373333231513231347474743221218333345151332151213451513334842121515151515151325131515151515151212173917334733234513331743374917421217351735173214343432174517451742121733273317333319132347432743174212151345133515133513451513451335121215151515151515151515151515151512121317373733231510151323174747432212121212121212121212121212121212121";
lvlmap[8] = "212121212121212121212121212121212121414121414121414141214141214141212121212121212121212121212121212121213451815182513321345183518451332121515161516151510151516151615151212121517351715133213451745172512121213451735171515191515174517251332121915173517151512151517451725191212131517351715132213151745172513221212121212121212121212121212121212121414121414121414141214141214141212121212121212121212121212121212121";
lvlmap[9] = "111111212121212121212121212111111111112121214141212121414121212111111111219133212121912121213491211111111121717171716151617474747421111111112171717171616161747474742111111111217171717132413174747474211111111121717171713341347474747421111111112171717161616161617474742111111111217171716184018161747474211111111121212121212121212121212121111111112121412121214121212141212111111111212141332134413321344121211111";
lvlmap[10] = "115132212143212121212143212131511111322121215121212121215121212131111121345151415151615151415151332111112151515121815161517171717151211111214151722121515151212121214121111121515172215151415134515151512111112151917251515101515151212121211111425151722151212121515151917342111121514172214151515141515141732111112151515151519141515151835173211111428221315151515151322121517342111121212121212121212121212121212111";
lvlmap[11] = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111211111111111111111111111111111112101211111111111111111111111111121416141211111111111111111111111213491419133211111111111111111112121314161413221211111111111111121348474746174748433211111111111212131837373617373833221211111112134827272727261727272728233211121213181717171719171717171813221212121212121212121212121212121212121";
lvlmap[12] = "111111111111111111111121212121211111111111111111111111112181618321112121212121212121212121212161212121213451517171715141517373736151332121735161717171519151737373615151212173216121212121212121212121212121217351617373735141517171715151332121735161737373519151717171615151212173212121212121212121212161217121217351515151515141515151516151712121730151515151519151515151615171212121212121212121212121212121212121";
lvlmap[13] = "212121212121212121212121212121212121727272727272726173737373737373212172515151515151515151515151517321217251515132432141214331515151732121615151514284214121814251515161212171515151212134513321215151517421217151515141415101514141515151742121715151512121315132212151515174212171515191428321912182429151517421217151515133432141214334515151742121717171717161515151617474747474212121212121212121212121212121212121";
lvlmap[14] = "212121212121212121212121212121212121347171717171717171717171713351212171515151513471713334713351715121217134717191717171317171713371512121717151347171717171713321717151212171717171717101713371713471713321217131717171322151717171917171712121817133317171335171713171713271212121717151515131713271343271517121213432317171719171713231713251712121317171717171717171717171717132212121212121212121212121212121212121";
lvlmap[15] = "212121212121212121212121212121212121344151514151514151514151514133212171212151212121212172213433215121217121727241519121517221717221512121712172512172724172722171722151212171217251217221212172217172215121217121725121722121217221717241322121712131612172347272322151314133212181417261217272726141215151217121212121916121612121419141325121712121717171717161717171017171717182212121212121212121212121212121212121";
lvlmap[16] = "111111111111111111111111111111111111212121212121211121212121212121111121747474748121432173736173822111112161747474744291427373737361211111217474747474214321737373737321111121212121212121112121214321212111111111111111111111111142914211111111212121212121211121212143212121111121017171718321432172727272842111112161717171714291427272727261211111217171717171214321727261727221111121212121212121112121212121212111";
lvlmap[17] = "113221212121212121212121212121212132213473737373737373737373737333212134737361216173917361216173337321217173216173612121216173612191732121717183737373737373730173617332212121212121212121212121212161212121217272727272727272727221216121912121727272727272727272727221612172212172212121217272726161722161217221217233212121217272612121216121722121727281212121217261727272617282212121212121212121212121212121212121";
lvlmap[18] = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111112111111111111111111111111111111121012111111111111111111111111111215161912111111111111111111111112141325141512111111111111111111121833251915134332111111111111111217132415131417381332111111111112171325151345151328272332111111121713251514173514151915172212111215131515173513251515131723221212121515151515151515151512121212121";
lvlmap[19] = "111111113231111111113231111111111111323132343331323132343331321111113221213151513221213151513221433111212121215151212121210151212143211121737121434321737221214321343221112171739151518472734233512161212111217371215121213172219151427474211121717321515142727321215121747421112161712151512173722191512174744211216173825151217273425161217474211121733221218321732121816121313221112121212121212121212121212121212111";
lvlmap[20] = "214343212121212121212121212121212121815151514251512121518321727272212151515151215151215151212143432121214343219121215142515151425151512121735151514251514251515121515151214273735151215151214321212121212121212143212121512121515142515184212121515121515151425151512143215151422151514251515121515151219142515142215151219174215151215121432121432121015142747421825121514251717171212121212121212121212121214321212121";
lvlmap[21] = "214343434343434343434343434343432142515134515151815151513351513351424234717133345151333473737333515142427134515132313451715151337351514242715131513334515171515151325151424271513231735132613171717171713342423151333473516101615151323151714242349151517351336134515133345191424283515151735151515151515151517142423173737332315191515132347171324242213132315151323173737332313251422143434343434343434343434343434321";
lvlmap[22] = "212121212121212121212121212121212121413451515142519151425151513341212141912183212121212121218421914121212151515134423321344233515151212121217451747442742174427474517421212134517251514251215142515173513321215151513151426121614251325151512121515151815142612161425182515151212171715151714271417142715151717121213151725151425101514251517351322121213172513221212121213151733221212121212121212121212121212121212121";
lvlmap[23] = "111111112121212121212121212121111111111121345151515151344151513321111111212151519121915151415151322121212121212121212121215141512121212121344151415141513321514151212121212151412121212121714171417191813321215141344173413371417141512121732121514173418341615141514151332173212151413141734151514151415151217321215141212121213472417241725121732121814151410141318241324172515132212121212121212121212121212121212121";
lvlmap[24] = "111111111111111121432143432131111111113221432111112151345184332111111111212151214343215151512174421111111121349151515151513251517421111111112151612134917373837321742111111111212181617171717121747451421111111121212161512171715182747421111111112101615121727121512174744211111111212161212172213491217474211111111121726172726121315174743242111111113343434321512151616161212111111111111111112143214343434321341111";
lvlmap[25] = "212121212121212121212121212121212121217272727272727272727261727171212171737373737373737373736121317121217173213433343334515151513301732121717351515151515134333451516173212171735151323182513231513291717321217121515133343391333451513271732121712131513291323451513151337173212171213481335151515132348332617321217171717171717171717171717161722121727272217171323172727272727272212121212121212121212121212121212121";
lvlmap[26] = "111121214321212121211121212111111121212151515151717121212181212111112134515132213151515151515151212121215121518121212121812121215151512121432151332171715151515121512151212171715161915132212121512151217121218121215121518121015132215121712121212151714251512121212134512151212121215171215151332151915134515121213451322121212151212181215121512121915151515181333151717171512181212121432121212143212143214321214321";
lvlmap[27] = "212121212121212121212151212121212121515172727251212121217373735133215151517221725171717151732173214121215151727272517121712173737321412151516151325151712171212121512141212151617373735171217121727272214121212161732173517171715172217234322151515173737331518151327272725151513151515151515133913151325121313321215121515182513101915151835134322121319161332131513334513221515121212121215151212121515121212121212121";
lvlmap[28] = "414141414141414141414141414141414141345151513351345151515151515133414191515151515151515134513351515141413451513391516151515151513351514141313351515151515151313351515151414151515151515132345151515151515141413451333433515174515131335151334141513151519151517451515151515133414131335151343351743451315184515141415151515151515174513451613351514141313231613231510151323331515132414141414141414141214141414141414141";
lvlmap[29] = "111111111111111111111111111111111111112121212121212121212121212111111111218273717171717173737381211111111142737171717191717171717342111111114273727272616172617373734211111111429161726161617261616191421111111142726172726161617261616142111111114272726161616172727272734211111111210173736161616161617383211111111121212143434343434343212121111111111111111111111111111111111111111111111111111111111111111111111111";
lvlmap[30] = "214121212141412141214121414141412121815151515151515151515151515151414151616161616171717171717171719121215151515151516161616161616161512141615151515151515151515151516161212151515191717171717171717171716121215161517171717171717171717171714141515151717171717171717171717171212131513451717171717171717171716121219161515151515151513151515161512141517171717101717171717171717171212141214121214121214121212121214121";
gachi = new Array();
gachitxt = new Array();
gachi[0] = [3, 15, 40, 80, 150];
gachitxt[0] = ["Change", "Colours"];
gachi[1] = [5, 50, 150, 500, 1000];
gachitxt[1] = ["Paint", "Walls"];
gachi[2] = [10, 100, 300, 750, 1500];
gachitxt[2] = ["Perform", "Jumps"];
gachi[3] = [1000, 5000, 15000, 30000, 65000];
gachitxt[3] = ["Earn", "Points"];
gachi[4] = [1, 5, 10, 20, 30];
gachitxt[4] = ["Complete", "Levels"];
gachi[5] = [3, 10, 25, 50, 90];
gachitxt[5] = ["Collect", "Stars"];
atxt = new Array();
i = 0;
while (i < gachi.length) {
atxt[i] = new Array();
j = 0;
while (j < gachi[i].length) {
atxt[i][j] = (((gachitxt[i][0] + newline) + gachi[i][j]) + newline) + gachitxt[i][1];
j++;
}
i++;
}
var my_so = SharedObject.getLocal("ninja_molar", "/");
lvlmedal = new Array();
lvlrec = new Array();
stat = new Array();
i = 0;
while (i < gachi.length) {
stat[i] = 0;
i++;
}
if (my_so.data.lvlmedal[0] == undefined) {
my_so.data.lvlmedal = new Array();
my_so.data.lvlmedal[0] = -1;
my_so.data.lvlmedal[1] = -1;
my_so.data.lvlmedal[11] = -1;
my_so.data.lvlmedal[21] = -1;
my_so.data.lvlrec = new Array();
i = 1;
while (i < 31) {
my_so.data.lvlrec[i] = 0;
i++;
}
my_so.data.sound = true;
my_so.data.music = true;
i = 0;
while (i < gachi.length) {
j = 0;
while (j < gachi[i].length) {
my_so.data[("gachi" + i) + j] = gachi[i][j];
j++;
}
my_so.data["stat" + i] = stat[i];
i++;
}
}
sound = my_so.data.sound;
music = my_so.data.music;
totalscore = 0;
if (music == false) {
ib2.gotoAndStop(2);
}
if (sound == false) {
ib1.gotoAndStop(2);
}
i = 1;
while (i < 31) {
lvlmedal[i] = my_so.data.lvlmedal[i];
lvlrec[i] = my_so.data.lvlrec[i];
if (lvlrec[i] != undefined) {
totalscore = totalscore + lvlrec[i];
}
i++;
}
i = 0;
while (i < 6) {
j = 0;
while (j < 5) {
if (my_so.data[("gachi" + i) + j] != undefined) {
gachi[i][j] = my_so.data[("gachi" + i) + j];
} else {
break;
}
j++;
}
stat[i] = my_so.data["stat" + i];
i++;
}
_global.saveStat = function () {
trace("SAVE STAT...");
i = 0;
while (i < gachi.length) {
j = 0;
while (j < gachi[i].length) {
my_so.data[("gachi" + i) + j] = gachi[i][j];
j++;
}
my_so.data["stat" + i] = stat[i];
trace((gachitxt[i][0] + "---") + my_so.data["stat" + i]);
i++;
}
trace("SAVE STAT END...");
my_so.data.sound = sound;
my_so.data.music = music;
my_so.flush();
};
_global.addStat = function (type, amount) {
stat[type] = stat[type] + amount;
testGachi(type);
};
_global.setStat = function (type, amount) {
if (amount > stat[type]) {
stat[type] = amount;
}
testGachi(type);
};
_global.testGachi = function (type) {
j = 0;
while (j < gachi[type].length) {
if (gachi[type][j] != -1) {
if (stat[type] >= gachi[type][j]) {
gachilogo.desc = atxt[type][j];
gachilogo.img.gotoAndStop(j + 1);
gachilogo.img.img.gotoAndStop(type + 1);
gachilogo.img2.gotoAndStop(j + 1);
gachilogo.gotoAndPlay(2);
gachi[type][j] = -1;
saveStat();
}
}
j++;
}
};
gotoAndStop ("function");
Frame 14
tilew = 16;
tileh = 11;
tile = 44;
moving = false;
movex = 0;
movey = 0;
speed = 22;
objcount = 0;
paused = true;
editor = false;
player._visible = false;
cursor._visible = false;
mouseshow = true;
loadLevel = false;
day = random(3) + 1;
back.gotoAndStop(day);
back.img.back2.gotoAndStop(3);
back.img.back3.gotoAndStop(3);
logo.gotoAndStop(1);
tutor._visible = false;
tutor.gotoAndStop(1);
ispausedobj._visible = false;
lvl = 1;
createLevel = function () {
closeMenu();
clearLevel();
if (day == 3) {
day = 1;
} else {
day++;
}
tutor._visible = true;
tutor.gotoAndStop(lvl);
logo.gotoAndStop(1);
back.gotoAndStop(day);
paused = false;
ispause = false;
moving = false;
map = lvlmap[lvl];
lvltype = Math.ceil(lvl / 10);
back.img.back2.gotoAndStop(lvltype);
back.img.back3.gotoAndStop(lvltype);
k = 0;
objcount = 0;
stars = 0;
walls = 0;
moves = 0;
score = 0;
maxcombo = 0;
combo = false;
combocount = 0;
exitopen = false;
player._visible = true;
showInter();
playMusic();
if (_ymouse > 485) {
cursor._visible = false;
Mouse.show();
} else {
cursor._visible = true;
Mouse.hide();
}
i = 0;
while (i <= tileh) {
j = 0;
while (j <= tilew) {
z = Number(map.substr(k, 2));
x = Math.floor(z / 10);
y = z % 10;
k = k + 2;
obj = levelmap.attachMovie("block" + lvltype, (("t" + i) + "-") + j, levelmap.getNextHighestDepth());
if (x == 7) {
walls++;
}
if (((x == 2) || (x == 3)) && (editor == false)) {
obj2 = levelmap2.attachMovie("block" + lvltype, (("t" + i) + "-") + j, levelmap2.getNextHighestDepth());
obj2._x = j * tile;
obj2._y = i * tile;
obj2.gotoAndStop(x + 1);
obj2.type = y;
obj2.img.gotoAndStop(obj2.type);
obj._visible == false;
} else {
obj._visible == true;
if (x == 0) {
exit_obj = obj;
playerx = j;
playery = i;
player._x = playerx * tile;
player._y = playery * tile;
player.gotoAndStop(5);
player.img.gotoAndStop("stand");
player._rotation = 0;
cursor.img.gotoAndStop(5);
createPart(player._x, player._y, "part_star", 1, 5);
}
}
obj._x = j * tile;
obj._y = i * tile;
if ((x == 3) && (editor == false)) {
obj.gotoAndStop(12);
} else {
obj.gotoAndStop(x + 1);
}
obj.type = y;
obj.img.gotoAndStop(obj.type);
if (x == 8) {
objpart = partmap.attachMovie("block_color", "tobj" + objcount, partmap.getNextHighestDepth());
objpart._x = obj._x;
objpart._y = obj._y;
objpart.type = y;
objpart.gotoAndStop(y);
obj.part = objpart;
objcount++;
}
if (x == 9) {
objpart = partmap.attachMovie("block_star", "tobj" + objcount, partmap.getNextHighestDepth());
objpart._x = obj._x;
objpart._y = obj._y;
objpart.type = y;
objpart.gotoAndStop(y);
obj.part = objpart;
objcount++;
}
j = j + 1;
}
i = i + 1;
}
};
clearLevel = function () {
new Sound().setVolume(100);
tutor._visible = false;
player._visible = false;
cursor._visible = false;
ispausedobj._visible = false;
Mouse.show();
i = 0;
while (i <= tileh) {
j = 0;
while (j <= tilew) {
levelmap[(("t" + i) + "-") + j].removeMovieClip();
levelmap2[(("t" + i) + "-") + j].removeMovieClip();
j = j + 1;
}
i = i + 1;
}
i = 0;
while (i < objcount) {
partmap["tobj" + i].removeMovieClip();
i = i + 1;
}
};
createPart = function (xx, yy, type, count, info) {
m = 1;
while (m <= count) {
objpart = partmap.attachMovie(type, (("part" + xx) + "-") + yy, partmap.getNextHighestDepth() + j);
objpart._x = xx;
objpart._y = yy;
objpart.info = info;
m++;
}
};
moveTest = function () {
x = 1;
if (obj._currentframe == 3) {
x = 0;
}
if (obj._currentframe == 12) {
switch (obj.type) {
case 1 :
if (movex != 0) {
if (movex > 0) {
x = 0;
}
}
if (movey != 0) {
if (movey < 0) {
x = 0;
}
}
break;
case 2 :
if (movex != 0) {
if (movex < 0) {
x = 0;
}
}
if (movey != 0) {
if (movey < 0) {
x = 0;
}
}
break;
case 3 :
if (movex != 0) {
if (movex < 0) {
x = 0;
}
}
if (movey != 0) {
if (movey > 0) {
x = 0;
}
}
break;
case 4 :
if (movex != 0) {
if (movex > 0) {
x = 0;
}
}
if (movey == 0) {
break;
}
if (movey <= 0) {
break;
}
x = 0;
}
}
if (x == 1) {
if (one == true) {
one = false;
} else {
moving = true;
player.img.gotoAndStop("move");
}
} else {
tarobj = preobj;
playSound("jump1", "jump2");
return(true);
}
preobj = obj;
};
moveUp = function () {
one = true;
player._rotation = 180;
i = playery;
while (i >= 0) {
obj = levelmap[(("t" + i) + "-") + playerx];
if (moveTest()) {
return;
}
movex = 0;
movey = -1 * speed;
i--;
}
};
moveDown = function () {
one = true;
player._rotation = 0;
i = playery;
while (i <= tileh) {
obj = levelmap[(("t" + i) + "-") + playerx];
if (moveTest()) {
return;
}
movex = 0;
movey = 1 * speed;
i++;
}
};
moveLeft = function () {
one = true;
player._rotation = 90;
i = playerx;
while (i >= 0) {
obj = levelmap[(("t" + playery) + "-") + i];
if (moveTest()) {
return;
}
movex = -1 * speed;
movey = 0;
i--;
}
};
moveRight = function () {
one = true;
player._rotation = -90;
i = playerx;
while (i <= tilew) {
obj = levelmap[(("t" + playery) + "-") + i];
if (moveTest()) {
return;
}
movex = 1 * speed;
movey = 0;
i++;
}
};
closeMenu = function () {
opt.tar = "exit";
opt.gotoAndStop("exit");
};
openMenu = function (info) {
_root.opt.tar = info;
_root.opt.close = true;
};
showInter = function () {
inter._alpha = 100;
inter._visible = true;
};
closeInter = function () {
inter._alpha = 0;
inter._visible = false;
};
showLogo = function (info) {
if (logo._currentframe == 1) {
logo.info = info;
logo.gotoAndPlay(2);
}
};
_global.playSound = function () {
if (sound == true) {
_root["snd_" + arguments[random(arguments.length)]].start();
}
};
_global.playMusic = function () {
_root["snd_muz" + currMuz].stop();
if (music == true) {
currMuz = day;
_root["snd_muz" + currMuz].start(0, 999);
}
};
initAchi = function () {
i = 0;
while (i < _root.gachi.length) {
j = 0;
while (j < _root.gachi[i].length) {
z = opt[("a" + i) + j];
z.desc.text = _root.atxt[i][j];
z.desc._visible = false;
if (_root.gachi[i][j] == -1) {
z.gotoAndStop(j + 1);
z.img.gotoAndStop(i + 1);
} else {
z.gotoAndStop(7);
z.perc = Math.floor((_root.stat[i] / _root.gachi[i][j]) * 100) + "%";
}
j++;
}
i++;
}
};
_global.lengthdir_x = function (len, dir) {
return(Math.cos((dir * 3.141593) / 180) * len);
};
_global.lengthdir_y = function (len, dir) {
return((-Math.sin((dir * 3.141593) / 180)) * len);
};
_global.point_distance = function (x1, y1, x2, y2) {
return(Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)));
};
_global.point_direction = function (x1, y1, x2, y2) {
return((Math.atan2(y2 - y1, x2 - x1) / 3.141593) * 180);
};
_global.choose = function () {
return(arguments[random(arguments.length)]);
};
compileLevel = function () {
z = "";
i = 0;
while (i <= tileh) {
j = 0;
while (j <= tilew) {
obj = levelmap[(("t" + i) + "-") + j];
z = z + (((obj._currentframe - 1) + "") + obj.type);
j = j + 1;
}
i = i + 1;
}
return(z);
};
var snd_achi = new Sound(_root);
snd_achi.attachSound("achi");
var snd_click = new Sound(_root);
snd_click.attachSound("click");
var snd_def = new Sound(_root);
snd_def.attachSound("def");
var snd_door = new Sound(_root);
snd_door.attachSound("door");
var snd_fall = new Sound(_root);
snd_fall.attachSound("fall");
var snd_jump1 = new Sound(_root);
snd_jump1.attachSound("jump1");
var snd_jump2 = new Sound(_root);
snd_jump2.attachSound("jump2");
var snd_mouseon = new Sound(_root);
snd_mouseon.attachSound("mouseon");
var snd_paint = new Sound(_root);
snd_paint.attachSound("paint");
var snd_star = new Sound(_root);
snd_star.attachSound("star");
var snd_wall1 = new Sound(_root);
snd_wall1.attachSound("wall1");
var snd_wall2 = new Sound(_root);
snd_wall2.attachSound("wall2");
var snd_win = new Sound(_root);
snd_win.attachSound("win");
var snd_window = new Sound(_root);
snd_window.attachSound("window");
var snd_muz1 = new Sound(_root);
snd_muz1.attachSound("muz1");
var snd_muz2 = new Sound(_root);
snd_muz2.attachSound("muz2");
var snd_muz3 = new Sound(_root);
snd_muz3.attachSound("muz3");
gotoAndStop ("controller");
Frame 24
mousePressed = false;
var keyListener = new Object();
Key.addListener(keyListener);
onEnterFrame = function () {
if (paused == false) {
if (ispause == false) {
if (moving == true) {
createPart(player._x, player._y, "part_star3", 1, player._currentframe);
player._x = player._x + movex;
player._y = player._y + movey;
if (((player._x % tile) == 0) && ((player._y % tile) == 0)) {
playerx = player._x / tile;
playery = player._y / tile;
obj = levelmap[(("t" + Math.floor(playery)) + "-") + Math.floor(playerx)];
if (obj == tarobj) {
playSound("fall");
moving = false;
player.img.gotoAndStop("land");
moves++;
addStat(2, 1);
}
if (obj == undefined) {
_root.trans.gotoAndPlay(2);
openMenu("def");
paused = true;
moving = false;
player.img.gotoAndStop("stand");
}
switch (obj._currentframe) {
case 1 :
if (exitopen == true) {
_root.trans.gotoAndPlay(2);
openMenu("win");
paused = true;
moving = false;
player.img.gotoAndStop("land");
player._rotation = 0;
createPart(player._x, player._y, "part_star", 1, 5);
}
break;
case 5 :
if (obj.type != 1) {
playSound("window");
createPart(player._x, player._y, "part_glass", 8);
obj.gotoAndStop(6);
obj.img.gotoAndStop(obj.type);
}
break;
case 7 :
moving = false;
player._rotation = 0;
player.img.gotoAndStop("catch");
break;
case 8 :
if (obj.type == player._currentframe) {
playSound("wall1", "wall2");
obj.gotoAndStop(11);
obj.img.gotoAndStop(obj.type);
walls--;
addStat(1, 1);
combo = true;
addscore = (10 * combocount) + 50;
score = score + addscore;
objscore = partmap.attachMovie("part_score", (("pscore" + player._x) + "-") + player._y, partmap.getNextHighestDepth());
objscore._x = player._x;
objscore._y = player._y;
objscore.info = "+" + addscore;
if (walls == 0) {
playSound("door");
exitopen = true;
exit_obj.img.img.gotoAndStop(2);
objpart = partmap.attachMovie("block_exit_o", "tobj" + objcount, partmap.getNextHighestDepth());
objpart._x = exit_obj._x;
objpart._y = exit_obj._y;
objcount++;
createPart(exit_obj._x, exit_obj._y, "part_star", 1, 5);
}
}
break;
case 9 :
if (obj.type != player._currentframe) {
playSound("paint");
createPart(player._x, player._y, "part_color", 8, obj.type);
createPart(player._x, player._y, "part_star", 1, obj.type);
player.gotoAndStop(obj.type);
cursor.img.gotoAndStop(obj.type);
addStat(0, 1);
}
break;
case 10 :
playSound("star");
stars++;
obj.gotoAndStop(6);
obj.img.gotoAndStop(obj.type);
createPart(player._x, player._y, "part_star2", 8);
createPart(player._x, player._y, "part_star", 1, 6);
obj.part.removeMovieClip();
break;
case 4 :
case 12 :
moving = false;
switch (obj.type) {
case 1 :
if (movex != 0) {
if (movex < 0) {
moveUp();
}
}
if (movey != 0) {
if (movey > 0) {
moveRight();
}
}
break;
case 2 :
if (movex != 0) {
if (movex > 0) {
moveUp();
}
}
if (movey != 0) {
if (movey > 0) {
moveLeft();
}
}
break;
case 3 :
if (movex != 0) {
if (movex > 0) {
moveDown();
}
}
if (movey != 0) {
if (movey < 0) {
moveLeft();
}
}
break;
case 4 :
if (movex != 0) {
if (movex < 0) {
moveDown();
}
}
if (movey == 0) {
break;
}
if (movey >= 0) {
break;
}
moveRight();
}
}
if (combo == true) {
combo = false;
combocount++;
} else if (combocount > 0) {
combocount = 0;
}
}
}
cursor._x = _xmouse;
cursor._y = _ymouse;
cursor._rotation = Math.round(point_direction(player._x, player._y, _xmouse, _ymouse) / 90) * 90;
if (_ymouse > 485) {
if (mouseshow == false) {
Mouse.show();
cursor._visible = false;
mouseshow = true;
}
} else if (mouseshow == true) {
Mouse.hide();
cursor._visible = true;
mouseshow = false;
}
}
}
};
getPause = function (info) {
if (info == "help") {
if (ispausedobj._visible == true) {
ispause = false;
}
ispausedobj.gotoAndStop(3);
} else {
ispausedobj.gotoAndStop(1);
}
if (ispause == false) {
ispause = true;
ispausedobj._visible = true;
Mouse.show();
cursor._visible = false;
new Sound().setVolume(0);
} else {
ispause = false;
ispausedobj._visible = false;
Mouse.hide();
cursor._visible = true;
new Sound().setVolume(100);
}
};
keyListener.onKeyDown = function () {
if (paused == false) {
if (Key.isDown(80)) {
getPause();
}
if (ispause == false) {
if (moving == false) {
if (Key.isDown(38) || (Key.isDown(87))) {
moveUp();
} else if (Key.isDown(40) || (Key.isDown(83))) {
moveDown();
} else if (Key.isDown(37) || (Key.isDown(65))) {
moveLeft();
} else if (Key.isDown(39) || (Key.isDown(68))) {
moveRight();
}
}
}
} else if (Key.isDown(32)) {
if (opt._currentframe == 41) {
if (_root.stat[4] < 30) {
_root.lvl++;
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
}
}
}
};
onMouseDown = function () {
mousePressed = true;
if (paused == false) {
if (ispause == false) {
if (moving == false) {
if (_ymouse < 485) {
switch (cursor._rotation) {
case 0 :
moveRight();
return;
case 90 :
moveDown();
return;
case -90 :
moveUp();
return;
case 180 :
case -180 :
moveLeft();
}
}
}
}
}
};
onMouseUp = function () {
mousePressed = false;
};
gotoAndStop ("game");
Frame 34
stop();
closeInter();
openMenu("main");
playMusic();
ib1.ico.gotoAndStop(1);
ib1.desc.text = "Nh\u1EA1c";
ib1.desc._visible = false;
ib1.but.onRollOver = function () {
ib1.desc._visible = true;
};
ib1.but.onRollOut = function () {
ib1.desc._visible = false;
};
ib1.but.onPress = function () {
playSound("click");
_root.mouseClick = true;
if (_root.sound == true) {
_root.sound = false;
_root.music = false;
playMusic();
ib1.gotoAndStop(2);
} else {
_root.sound = true;
_root.music = true;
playMusic();
ib1.gotoAndStop(1);
}
};
Symbol 17 MovieClip [cont] Frame 1
#initclip 10
Object.registerClass("cont", advertising.AdvertContainer);
#endinitclip
Symbol 22 MovieClip Frame 1
stop();
Symbol 58 MovieClip [block1] Frame 1
stop();
Symbol 84 MovieClip [block3] Frame 1
stop();
Symbol 89 MovieClip [part_color] Frame 1
speed = 5 + random(5);
timer = 10 + random(15);
dir = random(360);
_yscale = (70 + random(31));
_xscale = (70 + random(31));
onEnterFrame = function () {
_yscale = (_yscale - 2);
_xscale = (_yscale - 2);
if (speed > 2) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = speed - 1;
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
gotoAndStop(info);
Symbol 100 MovieClip [part_glass] Frame 1
speed = 8 + random(8);
timer = 10 + random(15);
dir = random(360);
gotoAndStop(2 + random(5));
onEnterFrame = function () {
if (speed > 0) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (3 + lengthdir_y(speed, dir)));
speed--;
} else {
_y = (_y + 3);
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
_root.oxcount--;
this.removeMovieClip();
}
};
Symbol 106 MovieClip [part_score] Frame 31
this.removeMovieClip();
Symbol 108 MovieClip [part_star2] Frame 1
speed = 5 + random(5);
timer = 10 + random(15);
rot = choose(2, -2);
dir = random(360);
onEnterFrame = function () {
_rotation = (_rotation + rot);
if (speed > 2) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = speed - 1;
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 115 MovieClip [part_star] Frame 1
dir = random(360);
timer = 15;
_rotation = random(360);
onEnterFrame = function () {
_rotation = (_rotation + 10);
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
gotoAndStop(info);
Symbol 117 MovieClip [part_star4] Frame 1
dir = random(360);
timer = 15;
_rotation = random(360);
onEnterFrame = function () {
_rotation = (_rotation + 10);
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 122 MovieClip [part_star3] Frame 1
dir = random(360);
rot = choose(-10, -5, 10, 5);
timer = 15;
_rotation = random(360);
_x = (_x + (random(10) - 5));
_y = (_y + (random(10) - 5));
onEnterFrame = function () {
_rotation = (_rotation + rot);
_yscale = (_yscale - 4);
_xscale = (_yscale - 4);
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
gotoAndStop(info);
Symbol 146 MovieClip [block2] Frame 1
stop();
Symbol 546 MovieClip [__Packages.com.miniclip.gatekeeper.GatekeeperLoader] Frame 0
class com.miniclip.gatekeeper.GatekeeperLoader
{
var _ldr, onResult;
function GatekeeperLoader () {
applySecurity(getAllowedDomains());
}
function start() {
_ldr = new MovieClipLoader();
var _local4 = _root.createEmptyMovieClip("gatekeeper", _root.getNextHighestDepth());
_ldr.addListener(this);
var _local3 = _GATEKEEPER_URL;
if (((_root._url.indexOf("://cms.miniclip.com/") == 4) || (_root._url.indexOf("://developers.miniclip.com/") == 4)) || (_root._url.indexOf("file://") == 0)) {
_local3 = _local3.split("://www.miniclip.com/").join("://cms.miniclip.com/");
}
_ldr.loadClip(_local3, _local4);
}
function getAllowedDomains() {
var _local1 = new Array();
_local1.push("game.24h.com.vn");
_local1.push("24h.com.vn");
return(_local1);
}
function applySecurity(domains) {
var _local1 = 0;
while (_local1 < domains.length) {
System.security.allowDomain(domains[_local1]);
_local1++;
}
}
function onLoadInit(tgt_mc) {
var _local4 = tgt_mc.gatekeeper;
var _local5;
if (_url.substr(0, 7) == "file://") {
onResult(true);
} else {
var _local3 = String(flash.external.ExternalInterface.call(" function(){ return document.location.href.toString();} "));
_local5 = _local4.validateDomain(_local3, _root._url);
onResult(true);
}
}
function loadAlert() {
_root.gatekeeper.loadMovie(_OFFSITE_URL);
}
var _GATEKEEPER_URL = "http://www.miniclip.com/swfcontent/components/gatekeeper_as2.swf";
var _OFFSITE_URL = "http://www.miniclip.com/swfcontent/components/game_offsite_as2.swf";
}
Symbol 547 MovieClip [__Packages.proto.ComponentBase] Frame 0
class proto.ComponentBase extends MovieClip
{
var _visible, _ready, onEnterFrame, _totalframes, _framesloaded, _rotation, width, _width, height, _height, _xscale, _yscale, _bg, createEmptyMovieClip, _alpha;
function ComponentBase () {
super();
_visible = false;
_ready = false;
onEnterFrame = mx.utils.Delegate.create(this, _onEnterFrame);
}
function _onEnterFrame() {
if (_ready == true) {
delete onEnterFrame;
INITIALISE();
return(undefined);
}
if (_framesloaded >= _totalframes) {
preInit();
_ready = true;
}
}
function preInit(expectedWidth, expectedHeight) {
_rotation = 0;
width = ((expectedWidth > 0) ? (expectedWidth) : (_width));
height = ((expectedHeight > 0) ? (expectedHeight) : (_height));
_xscale = (_yscale = 100);
_bg = createEmptyMovieClip("_bg", _bg.getDepth());
_ready = true;
}
function drawBg() {
}
function show(instant) {
if (instant != true) {
_alpha = 0;
_visible = true;
} else {
_visible = true;
_alpha = 100;
onShowComplete();
}
}
function onShowComplete() {
}
function INITIALISE() {
}
}
Symbol 548 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 549 MovieClip [__Packages.advertising.AdvertContainer] Frame 0
class advertising.AdvertContainer extends proto.ComponentBase
{
var initComplete, domain_excluded, loadingQueue, preInit, _expectedWidth, width, _expectedHeight, height, _gameID, _geo_tag, _domain, advert_data, _ready, defaultURL, imageContainer, createEmptyMovieClip, getNextHighestDepth, imageUrl, clickData, drawBg, show, getURL, defaultTargetUrl, dataMap, allClickData, slotData, _url;
function AdvertContainer () {
super();
initComplete = false;
domain_excluded = false;
loadingQueue = new util.LoadingQueue();
}
function init(gameId, advert_id, geo_tag, domain, expectedWidth, expectedHeight) {
if ((advert_id >= 0) && (advert_id < 5)) {
_id = "g" + String(advert_id);
} else {
_id = "g0";
}
setUP(gameId, geo_tag, domain, expectedWidth, expectedHeight);
preInit(expectedWidth, expectedHeight);
}
function setUP(gameId, geo_tag, domain, expectedWidth, expectedHeight) {
_expectedWidth = ((expectedWidth > 0) ? (expectedWidth) : (width));
_expectedHeight = ((expectedHeight > 0) ? (expectedHeight) : (height));
_gameID = gameId;
_geo_tag = geo_tag;
_domain = domain;
if (!advert_data) {
advert_data = {game_id:gameId, geo:geo_tag, domain:domain};
}
if (((_gameID != "") && (_ready == true)) && (initComplete == false)) {
loadData();
}
}
function loadData() {
setPath();
if (!initComplete) {
initComplete = true;
util.XMLParser.load((((defaultURL + "am_cfg") + _gameID) + ".xml") + cacheKill(), util.cCallBack.delegate(this, onDataLoaded), null, false, true);
}
}
function onDataLoaded(success, parsedObject, xml) {
if (success) {
addMapping(parsedObject.mapping[0].item);
setClickData(parsedObject.advert_data[0].item);
setAdvertData(parsedObject.slots[0].item);
getClickData();
} else {
notifyDirector(false);
}
}
function loadImage() {
imageContainer = createEmptyMovieClip("_cont", getNextHighestDepth());
imageUrl = clickData.file[0].nodeValue;
if (imageUrl) {
if (imageUrl.indexOf("http://") != 0) {
imageUrl = defaultURL + imageUrl;
}
loadingQueue.addToLoadingList(this, imageContainer, imageUrl, onImageLoaded, onImageLoadingError);
drawBg();
} else {
notifyDirector(false);
}
}
function onImageLoaded() {
_expectedWidth = ((_expectedWidth > 0) ? (_expectedWidth) : (width));
_expectedHeight = ((_expectedHeight > 0) ? (_expectedHeight) : (height));
var _local2 = _expectedWidth / imageContainer._width;
var _local3 = _expectedHeight / imageContainer._height;
imageContainer._xscale = (imageContainer._yscale = 100 * ((_local2 < _local3) ? (_local2) : (_local3)));
imageContainer._x = (_expectedWidth - imageContainer._width) / 2;
imageContainer._y = (_expectedHeight - imageContainer._height) / 2;
setActions();
if (System.capabilities.playerType == "DirectorXtra") {
if (((clickData.action == "release") || (clickData.action == "click")) || (clickData.action == "click")) {
imageContainer.onRollOver = util.cCallBack.delegate(this, _onRollOver, []);
imageContainer.onRollOut = util.cCallBack.delegate(this, _onRollOut, []);
}
show(true);
} else {
show(false);
}
triggerTracking(clickData.view_track);
}
function setActions() {
if ((clickData.action == "release") || (clickData.action == "click")) {
imageContainer.onRelease = util.cCallBack.delegate(this, _onAction, []);
} else if (clickData.action == "press") {
imageContainer.onPress = util.cCallBack.delegate(this, _onAction, []);
}
}
function onImageLoadingError() {
notifyDirector(false);
}
function _onRollOver() {
getURL("lingo: cursor 280");
}
function _onRollOut() {
getURL("lingo: cursor -1");
}
function _onAction() {
if (defaultTargetUrl) {
var _local3 = ("javascript:open_link(\"" + defaultTargetUrl) + "\");";
var _local4 = clickData.window;
var _local2 = (("lingo:goToNetPage(\"" + _local3) + "\",") + "\"_blank\")";
if (System.capabilities.playerType == "DirectorXtra") {
getURL(_local2);
} else {
getURL(defaultTargetUrl, _local4);
}
triggerTracking(clickData.click_track);
}
}
function triggerTracking(toLoad) {
var _local2 = 0;
while (_local2 < toLoad.length) {
var _local3 = createEmptyMovieClip("dummny" + _local2, -1000 + _local2);
_local3._alpha = 0;
loadingQueue.addToLoadingList(this, _local3, toLoad[_local2].nodeValue, onTrackingAssetLoaded);
_local2++;
}
}
function onTrackingAssetLoaded(target, path) {
}
function getClickData() {
var _local2 = dataMap.getClickDataId(_id, _geo_tag, _domain);
clickData = allClickData[_local2];
defaultTargetUrl = clickData.target[0].nodeValue;
if (slotData) {
_expectedWidth = ((slotData.width > 0) ? (slotData.width) : (_expectedWidth));
_expectedHeight = ((slotData.height > 0) ? (slotData.height) : (_expectedHeight));
}
if (clickData) {
loadImage();
} else {
notifyDirector(false);
}
}
function setAdvertData(list) {
var _local4 = "";
var _local2 = 0;
while (_local2 < list.length) {
_local4 = list[_local2].id;
if (_local4 == _id) {
slotData = list[_local2];
break;
}
_local2++;
}
}
function domainIsExcluded(excluded) {
for (var _local8 in excluded) {
}
var _local4 = false;
var _local6 = false;
var _local7 = false;
if (!excluded) {
return(_local7);
}
var _local3;
for (var _local8 in excluded) {
_local3 = String(excluded[_local8].geo).split(",");
if (_local3[0] == "*") {
_local4 = true;
} else {
var _local2 = 0;
while (_local2 < _local3.length) {
if (String(_local3[_local2]).toLowerCase() == _geo_tag.toLowerCase()) {
_local4 = true;
}
_local2++;
}
}
if (_domain == excluded[_local8].nodeValue) {
_local6 = true;
}
if ((_local4 == true) && (_local6 == true)) {
_local7 = true;
}
_local4 = false;
_local6 = false;
}
return(_local7);
}
function setClickData(list) {
allClickData = new Object();
var _local4 = "";
var _local2 = 0;
while (_local2 < list.length) {
_local4 = list[_local2].id;
if (domainIsExcluded(list[_local2].exclude) == false) {
allClickData[_local4] = {target:list[_local2].target, file:list[_local2].file, click_track:list[_local2].click_track, view_track:list[_local2].view_track, call:list[_local2].call, window:list[_local2].config[0].window, action:list[_local2].config[0].action};
}
_local2++;
}
}
function addMapping(mapping) {
dataMap = new advertising.DataMap();
var _local2 = 0;
while (_local2 < mapping.length) {
dataMap.addPattern(mapping[_local2].slot, mapping[_local2].data, mapping[_local2].geo, mapping[_local2].domain);
_local2++;
}
}
function notifyDirector(state) {
if (System.capabilities.playerType == "DirectorXtra") {
var _local2 = "";
if (state) {
_local2 = "lingo:flashAd(\"true\")";
} else {
_local2 = "lingo:flashAd(\"false\")";
}
getURL(_local2);
}
}
function onShowComplete() {
notifyDirector(true);
}
function INITIALISE() {
if (advert_data) {
_gameID = advert_data.game_id;
_geo_tag = advert_data.geo;
_domain = advert_data.domain;
loadData();
}
}
function setPath() {
if (_mode != "debug") {
defaultURL = releaseURL;
} else {
defaultURL = debugURL;
}
}
function cacheKill() {
if (_url.indexOf("file:///") == 0) {
return("");
}
var _local4 = "?ord=";
var _local2 = 0;
while (_local2 < 10) {
var _local3 = Math.floor(Math.random() * 10);
_local4 = _local4 + String(_local3);
_local2++;
}
return(_local4);
}
var debugURL = "http://devcms.miniclip.com/i/creatives/games-syndication/";
var releaseURL = "http://www.miniclip.com/i/creatives/games-syndication/";
var _mode = "release";
var _id = "";
}
Symbol 550 MovieClip [__Packages.util.LoadingQueue] Frame 0
class util.LoadingQueue extends MovieClip
{
var loadingList, in_progress, mcl, currentElement;
function LoadingQueue () {
super();
loadingList = new Array();
in_progress = false;
mcl = new MovieClipLoader();
mcl.addListener(this);
}
function addToLoadingList(scope, target, path, onLoadInit, onLoadError) {
loadingList.push({target:target, path:path, onLoadInit:util.cCallBack.delegate(scope, onLoadInit, [target, path]), onLoadError:util.cCallBack.delegate(scope, onLoadError)});
if (in_progress == false) {
loadNext();
}
}
function onLoadInit(_mc) {
Function(currentElement.onLoadInit).apply();
loadNext();
}
function onLoadProgress(_mc, loaded, total) {
}
function onLoadError(_mc, sError) {
Function(currentElement.onLoadError).apply();
loadNext();
}
function loadNext() {
if (loadingList.length > 0) {
currentElement = loadingList.shift();
mcl.loadClip(currentElement.path, currentElement.target);
} else {
onAllLoaded();
}
}
function onAllLoaded() {
in_progress = false;
}
}
Symbol 551 MovieClip [__Packages.util.cCallBack] Frame 0
class util.cCallBack
{
function cCallBack () {
}
static function delegate(scope, notify, predefinedArguments) {
var _local2 = function () {
return(notify.apply(scope, ((predefinedArguments.length > 0) ? (predefinedArguments.concat(arguments)) : arguments)));
};
return(_local2);
}
}
Symbol 552 MovieClip [__Packages.util.XMLParser] Frame 0
class util.XMLParser
{
static var _all;
var parse, loaded, _results, _xmlUrl, _onComplete, keepRootNode, parseLineBreaks, _xml;
function XMLParser () {
parse = initLoad;
loaded = false;
if (_all == undefined) {
_all = [];
}
_all.push(this);
}
static function load($url, $onComplete, $results, $keepRootNode, $parseLineBreaks) {
var _local1 = new util.XMLParser();
_local1.initLoad($url, $onComplete, $results, $keepRootNode, $parseLineBreaks);
return(_local1);
}
static function sendAndLoad($toSend, $url, $onComplete, $results, $keepRootNode, $parseLineBreaks) {
var _local1 = new util.XMLParser();
_local1.initSendAndLoad($toSend, $url, $onComplete, $results, $keepRootNode, $parseLineBreaks);
return(_local1);
}
function initLoad($url, $onComplete, $results, $keepRootNode, $parseLineBreaks) {
_results = $results || ({});
_xmlUrl = $url;
_onComplete = $onComplete;
keepRootNode = $keepRootNode;
parseLineBreaks = $parseLineBreaks;
_xml = new XML();
_xml.ignoreWhite = true;
_xml.onData = mx.utils.Delegate.create(this, onData);
loaded = false;
_xml.load(_xmlUrl);
}
function initSendAndLoad($toSend, $url, $onComplete, $results, $keepRootNode, $parseLineBreaks) {
_results = $results || ({});
_xmlUrl = $url;
_onComplete = $onComplete;
keepRootNode = $keepRootNode;
parseLineBreaks = $parseLineBreaks;
var _local2;
if ($toSend instanceof XML) {
_local2 = XML($toSend);
} else {
_local2 = objectToXML($toSend);
}
_xml = new XML();
_xml.ignoreWhite = true;
_xml.onData = mx.utils.Delegate.create(this, onData);
loaded = false;
_local2.sendAndLoad(_xmlUrl, _xml);
}
function onData($xml) {
if ($xml == undefined) {
parseLoadedXML(false);
} else {
_xml.parseXML($xml);
loaded = true;
parseLoadedXML(true);
}
}
function parseLoadedXML($success) {
if ($success == false) {
_onComplete(false);
return(undefined);
}
XMLToObject(_xml, _results, keepRootNode, parseLineBreaks);
_onComplete(true, _results, _xml);
}
static function XMLToObject($xml, $results, $keepRootNode, $parseLineBreaks) {
var _local8 = $xml;
$results = $results || ({});
var _local1 = _local8.firstChild;
var _local7 = _local8.firstChild;
_local8.obj = $results;
if ($keepRootNode != true) {
_local1 = _local1.firstChild;
_local7 = _local8.firstChild.lastChild;
_local8.firstChild.obj = $results;
}
while (_local1 != undefined) {
if ((_local1.nodeName == null) && (_local1.nodeType == 3)) {
_local1.parentNode.obj.nodeValue = clean(_local1.nodeValue, $parseLineBreaks);
} else {
_local1.nodeName = _local1.nodeName.split("-").join("_");
var _local3 = {};
for (var _local6 in _local1.attributes) {
_local3[_local6] = clean(_local1.attributes[_local6], $parseLineBreaks);
}
var _local4 = _local1.parentNode.obj;
if (_local4[_local1.nodeName] == undefined) {
_local4[_local1.nodeName] = [];
}
_local1.obj = _local3;
_local4[_local1.nodeName].push(_local3);
}
if (_local1.childNodes.length > 0) {
_local1 = _local1.childNodes[0];
continue;
}
var _local2 = _local1;
while ((_local2.nextSibling == undefined) && (_local2.parentNode != undefined)) {
_local2 = _local2.parentNode;
}
_local1 = _local2.nextSibling;
if (_local2 == _local7) {
_local1 = undefined;
}
}
return($results);
}
static function clean($s, $parseLineBreaks) {
if ((((!isNaN(Number($s))) && ($s != "")) && ($s.charAt(0) != "0")) && (containsNoLetters($s))) {
return(Number($s));
}
if ($s == "true") {
return(true);
}
if ($s == "false") {
return(false);
}
if ($parseLineBreaks) {
return($s.split("\\n").join(newline));
}
return($s);
}
static function containsNoLetters($s) {
var _local3 = $s.length;
var _local2;
var _local1 = 0;
while (_local1 < _local3) {
_local2 = $s.charCodeAt(_local1);
if ((_local2 < 48) || (_local2 > 57)) {
return(false);
}
_local1++;
}
return(true);
}
static function objectToXML($o, $rootNodeName) {
if ($rootNodeName == undefined) {
$rootNodeName = "XML";
}
var _local6 = new XML();
var _local4 = _local6.createElement($rootNodeName);
var _local5 = [];
var _local1;
var _local3;
var _local7;
for (_local3 in $o) {
_local5.push(_local3);
}
_local3 = _local5.length - 1;
while (_local3 >= 0) {
_local1 = _local5[_local3];
if ((typeof($o[_local1]) == "object") && ($o[_local1].length > 0)) {
arrayToNodes($o[_local1], _local4, _local6, _local1);
} else if (_local1 == "nodeValue") {
_local7 = _local6.createTextNode($o.nodeValue);
_local4.appendChild(_local7);
} else {
_local4.attributes[_local1] = $o[_local1];
}
_local3--;
}
_local6.appendChild(_local4);
return(_local6);
}
static function arrayToNodes($ar, $parentNode, $xml, $nodeName) {
var _local9 = [];
var _local5;
var _local1;
var _local4;
var _local2;
var _local8;
var _local3;
_local8 = $ar.length - 1;
while (_local8 >= 0) {
_local4 = $xml.createElement($nodeName);
_local2 = $ar[_local8];
_local5 = [];
for (_local3 in _local2) {
_local5.push(_local3);
}
_local3 = _local5.length - 1;
while (_local3 >= 0) {
_local1 = _local5[_local3];
if ((typeof(_local2[_local1]) == "object") && (_local2[_local1].length > 0)) {
arrayToNodes(_local2[_local1], _local4, $xml, _local1);
} else if (_local1 != "nodeValue") {
_local4.attributes[_local1] = _local2[_local1];
} else {
var _local6 = $xml.createTextNode(_local2.nodeValue);
_local4.appendChild(_local6);
}
_local3--;
}
_local9.push(_local4);
_local8--;
}
_local8 = _local9.length - 1;
while (_local8 >= 0) {
$parentNode.appendChild(_local9[_local8]);
_local8--;
}
}
function cancel() {
_xml.onData = null;
}
function destroy() {
cancel();
delete _xml;
var _local2 = _all.length - 1;
while (_local2 >= 0) {
if (this == _all[_local2]) {
_all.splice(_local2, 1);
}
_local2--;
}
}
static function get active() {
if (_all.length > 0) {
return(true);
}
return(false);
}
function get percentLoaded() {
}
function get xml() {
return(_xml);
}
function get bytesLoaded() {
return(_xml.getBytesLoaded() || 0);
}
function get bytesTotal() {
if (loaded) {
return(_xml.getBytesTotal() || 0);
}
return(_xml.getBytesTotal() || 1024);
}
}
Symbol 553 MovieClip [__Packages.advertising.DataMap] Frame 0
class advertising.DataMap extends Object
{
var geoTagsPattern, alltages;
function DataMap () {
super();
geoTagsPattern = new Object();
alltages = new Array();
}
function addPattern(advert_id, click_data_id, geo_list, domains_list) {
if (!geoTagsPattern[advert_id]) {
geoTagsPattern[advert_id] = [];
}
var _local2 = {geo_list:geo_list, domains_list:domains_list, click_data_id:click_data_id};
geoTagsPattern[advert_id].push(_local2);
}
function getClickDataId(advert_id, geo_tag, domain) {
var _local12 = null;
var _local6;
var _local5;
var _local2;
var _local11;
var _local8;
var _local9;
var _local7;
var _local3;
var _local10 = 0;
var _local4 = 0;
if (geoTagsPattern[advert_id]) {
_local9 = geoTagsPattern[advert_id];
_local6 = 0;
while (_local6 < _local9.length) {
_local11 = _local9[_local6].geo_list;
_local8 = _local9[_local6].domains_list;
_local5 = 0;
while (_local5 < _local11.length) {
_local7 = String(_local11[_local5].nodeValue).toLowerCase();
if ((_local7 == "*") || (_local7 == geo_tag.toLowerCase())) {
if (_local7 != "*") {
_local4++;
}
_local2 = 0;
while (_local2 < _local8.length) {
_local3 = String(_local8[_local2].nodeValue);
if ((_local3 == "*") || (_local3 == domain)) {
if (_local3 != "*") {
_local4++;
}
if (_local4 >= _local10) {
_local10 = _local4;
_local12 = String(_local9[_local6].click_data_id);
}
}
_local2++;
}
}
_local5++;
}
_local6++;
}
}
return(_local12);
}
}
Symbol 554 MovieClip [__Packages.com.miniclip.highscores.HighscoresLoader] Frame 0
class com.miniclip.highscores.HighscoresLoader
{
static var singleInstance;
var URL_PREFIX, target, game_quality, container, localConnectionID, ldr, objLocalConnection, levelName, level, score;
function HighscoresLoader () {
}
static function start(score, level, level_name) {
trace((("HighscoresLoader.start (AS2)/ score:" + score) + " level:") + level);
if (singleInstance == undefined) {
singleInstance = new com.miniclip.highscores.HighscoresLoader();
}
singleInstance.score = (isNaN(score) ? undefined : (Number(score)));
singleInstance.level = Math.floor(Math.max(0, level));
if (singleInstance.level > 0) {
singleInstance.levelName = ((level_name.length > 0) ? (level_name) : "");
}
singleInstance.container = _root;
singleInstance.init();
return(singleInstance);
}
function init() {
trace("HSB: HighscoresLoader.init() ... ");
URL_PREFIX = ((_root._url.substring(0, 8) == "file:///") ? "http://www.miniclip.com/swfcontent/components/" : "/swfcontent/components/");
System.security.allowDomain("cms.miniclip.com");
System.security.allowDomain("devcms.miniclip.com");
if (target._name != "MiniclipHighScoresContainer") {
game_quality = _root._quality;
_root._quality = "HIGH";
target = container.createEmptyMovieClip("MiniclipHighScoresContainer", container.getNextHighestDepth());
target.onUnload = function () {
this.target = undefined;
};
localConnectionID = "LC" + String(Math.floor(Math.random() * 1000000));
ldr = target.createEmptyMovieClip("ldr", 1);
initialize();
} else {
target.swapDepths(container.getNextHighestDepth());
sendScore();
}
}
function initialize() {
objLocalConnection = new LocalConnection();
objLocalConnection.allowDomain = function (sendingDomain) {
var _local1 = sendingDomain.substr(-13, 13) == ".miniclip.com";
return(_local1);
};
objLocalConnection.ref = this;
objLocalConnection.hsbready = function () {
this.ref.sendScore();
};
objLocalConnection.hsbhidden = function () {
_root._quality = self.game_quality;
this.ref.ldr._visible = false;
self.onClose();
};
if (!validateDomain()) {
localConnectionID = "_" + localConnectionID;
}
objLocalConnection.connect(localConnectionID + "back");
var _local4 = new MovieClipLoader();
var _local5 = {};
_local4.addListener(_local5);
var self = this;
if (validateDomain()) {
var _local3 = buildQueryString();
_local4.loadClip((URL_PREFIX + HIGHSCORESBOX_SWF) + _local3, ldr);
} else {
if (_root.mc_gamename.legth > 1) {
var _local3 = ("?msg=Play " + _root.mc_gamename) + " on Miniclip.com";
} else {
var _local3 = "?msg=Play this game on Miniclip.com";
}
var _local3 = _local3 + ("&lcid=" + localConnectionID);
_local5.onLoadInit = function () {
self.handleOffsiteLoaded();
};
ldr._visible = true;
_local4.loadClip((URL_PREFIX + OFFSITE_SWF) + _local3, ldr);
}
}
function handleOffsiteLoaded() {
var _local2 = ldr.mcBtn._width;
var _local3 = ldr.mcBtn._height;
ldr._x = (Stage.width - _local2) / 2;
ldr._y = (Stage.height - _local3) / 2;
var self = this;
ldr.onClose = function () {
self.onClose();
};
}
function sendScore() {
var _local2 = new LocalConnection();
trace(((((((("HSB: lcSender.send(" + localConnectionID) + ", setScore, ") + score) + ", ") + level) + ",") + levelName) + ")");
trace("HSB: lcSender.domain() ..." + _local2.domain());
ldr._visible = true;
_local2.send(localConnectionID, "setScore", score, level, levelName);
}
function validateDomain() {
var _local5 = false;
var _local6 = _root._url;
var _local4 = getDomainName(_local6);
if (_local4 != "") {
var _local3 = 0;
while (_local3 < ALLOWED_DOMAINS.length) {
if (_local4.indexOf(ALLOWED_DOMAINS[_local3]) >= (_local4.length - ALLOWED_DOMAINS[_local3].length)) {
_local5 = true;
}
_local3++;
}
}
if (_local6.indexOf("/swfcontent/webmastergames/") != -1) {
_local5 = false;
}
return(_local5);
}
function buildQueryString() {
var _local3 = "?";
var _local4 = "";
for (var _local5 in _root) {
if (_local5.substring(0, 3) == "mc_") {
_local3 = _local3 + (((_local4 + _local5) + "=") + escape(_root[_local5]));
_local4 = "&";
}
}
_local3 = _local3 + ("&mc_lcid=" + localConnectionID);
return(_local3);
}
function getDomainName(url) {
var _local2 = "";
var _local1 = url.indexOf("://");
if (_local1 > 0) {
var _local4 = url.substr(_local1 + 3);
var _local3 = _local4.split("/");
if (_local3.length > 0) {
_local2 = _local3[0];
}
}
return(_local2);
}
function toString() {
return("HighscoresLoader instance.");
}
var HIGHSCORESBOX_SWF = "highscoresbox_v3.swf";
var OFFSITE_SWF = "highscores_offsite.swf";
var ALLOWED_DOMAINS = [".miniclip.com"];
}
Symbol 219 MovieClip Frame 1
stop();
Symbol 223 MovieClip Frame 1
stop();
Symbol 231 MovieClip Frame 1
stop();
Symbol 287 MovieClip Frame 4
_parent.gotoAndStop("stand");
Symbol 290 MovieClip Frame 4
_parent.gotoAndStop("stair");
Symbol 291 MovieClip Frame 3
onEnterFrame = function () {
if ((_parent._rotation % 180) == 0) {
yy._visible = true;
xx._visible = false;
} else {
xx._visible = true;
yy._visible = false;
}
};
Symbol 291 MovieClip Frame 5
_parent.gotoAndStop("stair");
Symbol 300 MovieClip Frame 1
gotoAndStop(_parent.info);
Symbol 304 MovieClip Frame 1
stop();
Symbol 308 MovieClip Frame 1
stop();
Symbol 309 MovieClip Frame 2
img1.gotoAndStop(info);
img4.gotoAndStop(info);
Symbol 309 MovieClip Frame 10
img2.gotoAndStop(info);
Symbol 309 MovieClip Frame 21
img3.gotoAndStop(info);
Symbol 309 MovieClip Frame 32
stop();
if (info == 3) {
var myHighscores = com.miniclip.highscores.HighscoresLoader.start(_root.totalscore);
}
if (info == 2) {
if (_root.stat[4] == 30) {
var myHighscores = com.miniclip.highscores.HighscoresLoader.start(_root.totalscore);
}
}
Symbol 318 MovieClip Frame 1
stop();
Symbol 326 Button
on (rollOver) {
playSound("mouseon");
rec._visible = true;
}
on (rollOut) {
rec._visible = false;
}
on (release) {
playSound("click");
_root.lvl = id;
if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
}
}
Symbol 340 Button
on (rollOver) {
playSound("mouseon");
rec._visible = true;
}
on (rollOut) {
rec._visible = false;
}
on (release) {
playSound("click");
_root.lvl = id;
if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
}
}
Symbol 342 Button
on (rollOver) {
playSound("mouseon");
rec._visible = true;
}
on (rollOut) {
rec._visible = false;
}
on (release) {
playSound("click");
_root.lvl = id;
if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
}
}
Symbol 349 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
}
Symbol 365 Button
on (release) {
playSound("click");
getURL (sponsorurl, "_blank");
}
Symbol 388 Button
on (rollOver) {
desc._visible = true;
}
on (rollOut) {
desc._visible = false;
}
Symbol 398 Button
on (rollOver) {
_root.play_on.start();
}
on (release) {
getURL ("http://www.silengames.com", "_blank");
_root.play_pre.start();
}
Symbol 424 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
gotoAndPlay (3);
playSound("star");
if (_name == "s3") {
playSound("holy");
}
}
}
};
Symbol 424 MovieClip Frame 13
gotoAndStop (2);
Symbol 432 MovieClip Frame 1
stop();
timer = 0;
close = true;
tar = "exit";
gotoAndStop ("exit");
onEnterFrame = function () {
if (close == false) {
if (_xscale != 100) {
if (_xscale < 100) {
_yscale = (_yscale + 30);
_xscale = (_yscale + 30);
} else {
_yscale = (_yscale - 10);
_xscale = (_yscale - 10);
}
}
} else if (_xscale > 30) {
_yscale = (_yscale - 40);
_xscale = (_yscale - 40);
} else if (_currentframe != tar) {
close = false;
gotoAndStop(tar);
}
if (_currentframe < 60) {
if (timer == 0) {
timer = 50 + random(40);
obj = _root.attachMovie("part_star4", "part", _root.getNextHighestDepth());
obj._x = 505;
obj._y = 28;
} else {
timer--;
if (timer == 10) {
obj = _root.attachMovie("part_star4", "part", _root.getNextHighestDepth());
obj._x = 27;
obj._y = 100;
}
}
}
};
Symbol 432 MovieClip Frame 2
stop();
_root.showLogo(1);
totaltxt.text = _root.totalscore;
b1.title = "Menu ch\u00EDnh";
b2.title = "Achievements";
b3.title = "L\u01B0u \u0111i\u1EC3m";
b1.but.onRelease = function () {
_root.openMenu("main");
};
b2.but.onRelease = function () {
_root.openMenu("achi");
};
b3.but.onRelease = function () {
if (_root._url.indexOf("24h.com.vn") != -1) {
gname = "ninjapainter";
gscore = _root.totalscore;
getURL ("index.php?act=Arcade&do=newscore", "_self", "POST");
} else {
getURL ("http://game.24h.com.vn", "_self");
}
};
back1.gotoAndStop(1);
back2.gotoAndStop(2);
back3.gotoAndStop(3);
stat_star = 0;
stat_lvl = 0;
i = 1;
while (i < 31) {
this["l" + i].id = i;
if (_root.lvlmedal[i] == undefined) {
this["l" + i].gotoAndStop(4);
} else if (_root.lvlmedal[i] < 3) {
if (_root.lvlmedal[i] == -1) {
this["l" + i].gotoAndStop(1);
} else {
this["l" + i].gotoAndStop(2);
}
} else {
this["l" + i].gotoAndStop(3);
}
this["l" + i].star.gotoAndStop(_root.lvlmedal[i] + 2);
if (_root.lvlmedal[i] > 0) {
stat_star = stat_star + _root.lvlmedal[i];
stat_lvl++;
}
if (_root.lvlrec[i] != undefined) {
this["l" + i].rec.txt.text = _root.lvlrec[i];
this["l" + i].rec._visible = false;
}
i++;
}
gachis = 0;
i = 0;
while (i < _root.gachi.length) {
j = 0;
while (j < _root.gachi[i].length) {
if (_root.gachi[i][j] == -1) {
gachis++;
}
j++;
}
i++;
}
saveStat();
Symbol 432 MovieClip Frame 11
stop();
_root.logo.gotoAndStop(1);
b1.title = "PLAY";
b2.title = "Th\u00E0nh t\u00EDch";
b3.title = "View Highscores";
b4.title = "Credits";
b5.title = "Play More Games .";
b1.but.onRelease = function () {
_root.openMenu("select");
};
b2.but.onRelease = function () {
_root.openMenu("achi");
};
b3.but.onRelease = function () {
var _local1 = com.miniclip.highscores.HighscoresLoader.start();
};
b4.but.onRelease = function () {
_root.openMenu("credit");
};
b5.but.onRelease = function () {
getURL (sponsorurl);
};
Symbol 432 MovieClip Frame 21
stop();
_root.showLogo(1);
_root.initAchi();
b1.title = "Level Select";
b2.title = "Back to Menu";
b1.but.onRelease = function () {
_root.openMenu("select");
};
b2.but.onRelease = function () {
_root.openMenu("main");
};
gachis = 0;
i = 0;
while (i < _root.gachi.length) {
j = 0;
while (j < _root.gachi[i].length) {
if (_root.gachi[i][j] == -1) {
gachis++;
}
j++;
}
i++;
}
Symbol 432 MovieClip Frame 31
stop();
b1.title = "Back to Menu";
b1.but.onRelease = function () {
_root.openMenu("main");
};
Symbol 432 MovieClip Frame 41
stop();
scoretxt.text = _root.score;
playSound("win");
rectxt._visible = false;
addtxt._visible = false;
totaladd = 0;
if (_root.lvlrec[_root.lvl] == undefined) {
totaladd = _root.score;
} else if (_root.score > _root.lvlrec[_root.lvl]) {
totaladd = _root.score - _root.lvlrec[_root.lvl];
}
if (totaladd > 0) {
_root.lvlrec[_root.lvl] = _root.score;
_root.my_so.data.lvlrec[_root.lvl] = _root.score;
rectxt._visible = true;
addtxt._visible = true;
addtxt.text = "+" + totaladd;
}
_root.totalscore = _root.totalscore + totaladd;
totaltxt.text = _root.totalscore;
setStat(3, _root.totalscore);
i = 1;
while (i < 4) {
zz = this["s" + i];
if (i > _root.lvlmedal[_root.lvl]) {
zz.gotoAndStop(1);
} else {
zz.gotoAndStop(2);
}
if (i <= _root.stars) {
zz.timer = 12 * i;
} else {
zz.timer = 0;
}
i++;
}
if (_root.lvlmedal[_root.lvl] < _root.stars) {
_root.lvlmedal[_root.lvl] = _root.stars;
_root.my_so.data.lvlmedal[_root.lvl] = _root.stars;
}
if (_root.lvlmedal[_root.lvl + 1] == undefined) {
_root.lvlmedal[_root.lvl + 1] = -1;
_root.my_so.data.lvlmedal[_root.lvl + 1] = -1;
}
stat_star = 0;
stat_lvl = 0;
i = 1;
while (i < 31) {
if (_root.lvlmedal[i] > 0) {
stat_star = stat_star + _root.lvlmedal[i];
stat_lvl++;
}
i++;
}
setStat(4, stat_lvl);
setStat(5, stat_star);
saveStat();
if (_root.stat[4] == 30) {
b11._visible = false;
spacetxt._visible = false;
playimg._visible = false;
} else {
b11._visible = true;
spacetxt._visible = true;
playimg._visible = true;
}
b11.title = "Ti\u1EBFp t\u1EE5c";
b2.title = "L\u01B0u \u0111i\u1EC3m";
b3.title = "B\u00E0i";
b4.title = "Ch\u01A1i l\u1EA1i";
b11.but.onRelease = function () {
_root.lvl++;
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
};
b2.but.onRelease = function () {
if (_root._url.indexOf("24h.com.vn") != -1) {
gname = "ninjapainter";
gscore = _root.totalscore;
getURL ("index.php?act=Arcade&do=newscore", "_self", "POST");
} else {
getURL ("http://game.24h.com.vn", "_self");
}
};
b3.but.onRelease = function () {
_root.openMenu("select");
};
b4.but.onRelease = function () {
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
};
Symbol 432 MovieClip Frame 51
stop();
playSound("def");
b1.title = "Th\u1EED l\u1EA1i";
b2.title = "Ch\u1ECDn b\u00E0i";
b3.title = "Ch\u01A1i game kh\u00E1c";
b1.but.onRelease = function () {
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
};
b2.but.onRelease = function () {
_root.openMenu("select");
};
b3.but.onRelease = function () {
getURL (sponsorurl);
};
Symbol 432 MovieClip Frame 61
stop();
Symbol 471 MovieClip Frame 1
b1.title = "Ti\u1EBFp t\u1EE5c";
b2.title = "Ch\u01A1i l\u1EA1i";
b3.title = "Tho\u00E1t";
b1.but.onRelease = function () {
playSound("click");
_root.mouseClick = true;
_root.getPause();
};
b2.but.onRelease = function () {
playSound("click");
_root.mouseClick = true;
if (_root.trans._currentframe == 1) {
_root.paused = true;
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
}
};
b3.but.onRelease = function () {
playSound("click");
gotoAndStop (2);
};
Symbol 471 MovieClip Frame 2
b1.title = "C\u00F3";
b2.title = "Kh\u00F4ng";
b1.but.onRelease = function () {
playSound("click");
_root.mouseClick = true;
if (_root.trans._currentframe == 1) {
_root.paused = true;
_root.trans.gotoAndPlay(2);
_root.cursor._visible = false;
_root.openMenu("select");
}
};
b2.but.onRelease = function () {
playSound("click");
gotoAndStop (1);
};
Symbol 471 MovieClip Frame 3
img1.stop();
img2.stop();
b1.title = "Quay l\u1EA1i";
b1.but.onRelease = function () {
playSound("click");
_root.mouseClick = true;
_root.getPause();
};
Symbol 477 Button
on (rollOver) {
playSound("mouseon");
}
Symbol 485 MovieClip Frame 1
stop();
Symbol 504 MovieClip Frame 1
stop();
Symbol 510 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.paused == true) {
if (_alpha > 0) {
_alpha = (_alpha - 15);
} else {
_visible = false;
}
}
};
ib2.ico.gotoAndStop(2);
ib3.ico.gotoAndStop(3);
ib4.ico.gotoAndStop(4);
ib2.desc.text = "Gi\u00FAp";
ib3.desc.text = "L\u1EA1i";
ib4.desc.text = "D\u1EEBng";
ib2.desc._visible = false;
ib3.desc._visible = false;
ib4.desc._visible = false;
ib2.but.onRollOver = function () {
ib2.desc._visible = true;
};
ib2.but.onRollOut = function () {
ib2.desc._visible = false;
};
ib3.but.onRollOver = function () {
ib3.desc._visible = true;
};
ib3.but.onRollOut = function () {
ib3.desc._visible = false;
};
ib4.but.onRollOver = function () {
ib4.desc._visible = true;
};
ib4.but.onRollOut = function () {
ib4.desc._visible = false;
};
ib2.but.onPress = function () {
playSound("click");
_root.mouseClick = true;
_root.getPause("help");
Mouse.show();
};
ib3.but.onPress = function () {
playSound("click");
_root.mouseClick = true;
if (_root.trans._currentframe == 1) {
_root.paused = true;
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
}
};
ib4.but.onPress = function () {
playSound("click");
_root.mouseClick = true;
_root.getPause();
Mouse.show();
};
Symbol 510 MovieClip Frame 11
but.gotoAndStop(5);
but.onRelease = function () {
_root.editor = true;
_root.clearLevel();
_root.createLevel();
gotoAndStop (2);
};
Symbol 510 MovieClip Frame 12
i = 0;
while (i < 10) {
z = this["b" + i];
z.img.gotoAndStop(i + 1);
z.img.img.gotoAndStop(1);
z.eff._visible = false;
z.onRelease = function () {
if (_root.editor_obj == this.img) {
if (this.img.img._currentframe < this.img.img._totalframes) {
this.img.img.nextFrame();
} else {
this.img.img.gotoAndStop(1);
}
} else {
_root.editor_obj._parent.eff._visible = false;
_root.editor_obj = this.img;
_root.editor_obj._parent.eff._visible = true;
}
};
i++;
}
i = 1;
while (i < 5) {
this["but" + i].gotoAndStop(i);
i++;
}
but1.onRelease = function () {
_root.editorobj.gotoAndStop(1);
_root.clearLevel();
_root.editorobj.map = _root.lvlmap[0];
_root.createLevel();
};
but2.onRelease = function () {
_root.editorobj.map = _root.compileLevel();
_root.my_so.data.name = name;
_root.my_so.data.mapname = mapname;
_root.my_so.data.map = _root.editorobj.map;
_root.my_so.flush();
_root.editorobj.filename = ((("maps/" + name) + "-") + mapname) + ".map";
_root.editorobj.action = "SAVE";
_root.editorobj.loadVariables("http://gmakers.ru/competition/molar/editor.php", "GET");
};
but3.onRelease = function () {
_root.editorobj.filename = ((("maps/" + name) + "-") + mapname) + ".map";
_root.editorobj.action = "LOAD";
_root.editorobj.loadVariables("http://gmakers.ru/competition/molar/editor.php", "GET");
};
but4.onRelease = function () {
x = 0;
i = 0;
while (i <= _root.tileh) {
j = 0;
while (j <= _root.tilew) {
if (_root.levelmap[(("t" + i) + "-") + j]._currentframe == 1) {
x = 1;
break;
}
j = j + 1;
}
i = i + 1;
}
if (x == 1) {
_root.editor = false;
_root.editorobj.gotoAndStop(1);
_root.editorobj.map = _root.compileLevel();
_root.createLevel();
gotoAndStop (1);
} else {
_root.mess.title = "Please add START/EXIT block before test level.";
_root.mess.gotoAndPlay(2);
}
};
Symbol 516 MovieClip Frame 1
stop();
Symbol 516 MovieClip Frame 7
trace("tar=" + _root.opt.tar);
if (_root.loadLevel == true) {
_root.createLevel();
_root.loadLevel = false;
} else {
_root.clearLevel();
}
Symbol 517 MovieClip Frame 1
stop();
Symbol 545 MovieClip Frame 1
stop();
_visible = false;
Symbol 545 MovieClip Frame 2
_visible = true;
playSound("paint");
Symbol 545 MovieClip Frame 11
playSound("achi");
Symbol 545 MovieClip Frame 31
desctxt.text = desc;