Frame 1
function goTo1() {
getURL (sponsorurl, "_blank");
}
function goTo2() {
getURL (hosturl, "_blank");
}
function goTo3() {
getURL (walkurl, "_blank");
}
function goTo4() {
getURL (devurl, "_blank");
}
function goTo5() {
getURL (ninjaurl, "_blank");
}
function goTo6() {
getURL (androidurl, "_blank");
}
_global.sponsorurl = "http://www.kongregate.com/?haref=ninjapainter2&src=spon&cm=ninjapainter2";
_global.hosturl = "http://www.kongregate.com/games_for_your_site?haref=ninjapainter2&src=spon&cm=ninjapainter2";
_global.walkurl = "http://www.kongregate.com/pages/ninja-painter-2-walkthrough?haref=ninjapainter2&src=spon&cm=ninjapainter2";
_global.mushroomurl = "http://www.kongregate.com/games/SilenGames/mushroom-madness-3?haref=ninjapainter2&src=spon&cm=ninjapainter2";
_global.prizmaurl = "http://www.kongregate.com/games/SilenGames/prizma-puzzle-challenges?haref=ninjapainter2&src=spon&cm=ninjapainter2";
_global.grannyurl = "http://www.kongregate.com/games/SilenGames/granny-strikes-back?haref=ninjapainter2&src=spon&cm=ninjapainter2";
_global.candyurl = "http://www.kongregate.com/games/SilenGames/flying-candy?haref=ninjapainter2&src=spon&cm=ninjapainter2";
_global.fishurl = "http://www.kongregate.com/games/SilenGames/icy-fishes?haref=ninjapainter2&src=spon&cm=ninjapainter2";
_global.beeurl = "http://www.kongregate.com/games/SilenGames/the-bee-way?haref=ninjapainter2&src=spon&cm=ninjapainter2";
_global.ninjaurl = "http://www.kongregate.com/games/SilenGames/ninja-painter?haref=ninjapainter2&src=spon&cm=ninjapainter2";
_global.devurl = "http://www.silengames.com";
_global.androidurl = "https://play.google.com/store/apps/details?id=com.fizzicsgames.ninjapainter.ad";
var newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
newMenu.customItems.push(new ContextMenuItem("Play More Games", goTo1));
newMenu.customItems.push(new ContextMenuItem("Host This Game", goTo2));
newMenu.customItems.push(new ContextMenuItem("Video Walkthrough", goTo3));
newMenu.customItems.push(new ContextMenuItem("Developer Site", goTo4, true));
newMenu.customItems.push(new ContextMenuItem("Play Ninja Painter 1", goTo5, true));
newMenu.customItems.push(new ContextMenuItem("Ninja Painter for Android", goTo6, true));
this.menu = newMenu;
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") {
kongapi = true;
var kongregate = _global.kongregate;
kongregate.services.connect();
}
kongsend = function (kng1, kng2) {
if (kongapi == true) {
kongregate.stats.submit(kng1, kng2);
}
};
Frame 2
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(res);
}
stop();
back.gotoAndStop(3);
back.img.back2.gotoAndStop(3);
back.img.back3.gotoAndStop(3);
butload.title = "START GAME";
butload._visible = false;
percentDone = 0;
butload.but.onRelease = function () {
onEnterFrame = null;
gotoAndStop (3);
};
adsin = 0;
ads1.img.img.gotoAndStop(7);
ads2.img.img.gotoAndStop(3);
onEnterFrame = function () {
loadingDone = _root.getBytesLoaded() / _root.getBytesTotal();
if (percentDone < (loadingDone * 100)) {
percentDone++;
preloaderImg._x = preloaderImg._x + 7;
preloaderImg2._x = preloaderImg2._x - 7;
loadingtxt = percentDone + "%";
preloaderBar._xscale = percentDone;
preloaderBar2._xscale = percentDone;
}
if (percentDone >= 100) {
if (butload._visible == false) {
butload._visible = true;
butload._alpha = 0;
} else if (butload._alpha < 100) {
butload._alpha = butload._alpha + 10;
}
}
if (adsin == 0) {
if (percentDone > 20) {
adsin = 1;
ads1.timer = 10;
}
}
if (adsin == 1) {
if (percentDone > 60) {
adsin = 2;
ads2.timer = 10;
}
}
};
__com_mochibot__("3a86e9a4", this, 10301, true);
Frame 3
Frame 4
Instance of Symbol 525 MovieClip in Frame 4
on (release) {
getURL (devurl, "_blank");
}
Frame 5
gotoAndStop (6);
Frame 6
gotoAndStop (7);
Frame 7
onEnterFrame = null;
maxlvl = 36;
lvlneed = [0, 0, 5, 10, 25, 40, 60];
lvlmap = new Array();
lvlmap[0] = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111";
lvlmap[1] = "111111111111111111111111111111111111111111111111113231111111111111111111111111111132212131111111111111111111113221212121219131111111111111111111210141518151412111111111111111111133217121212171211111111111111111111121712121217121111111111111111111322171212121712131111111111111113221214171717141912131111111111132212121912121212121212131111111322121212121212121212121212131113221212121212121212121212121212131";
lvlmap[2] = "111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111113221311111111111111111111111111132210121311111111111111111111111322182612121311111111111111111113221212161419121311111111111111132219141416121212121311111111111322121212121614141419121311111113221924141414161212121212121311132212121212121212272727272727221312121212121212121212121212121212121";
lvlmap[3] = "111111111111111111111111111111111111111111111111111111111111111111111111322121212134113321212121311111111121347474332121213472723321111111112174414174219221724141722111111111217441417421412172414172211111111121744161744101417261417221111111112174515174212121725151722111111111217491847421212172829172211111111121743274742241227272317221111111113321212121219121212121213411111111111111111133213411111111111111";
lvlmap[4] = "111111111111111111111111111111111111111111111111322131111111111111111111322131111121012111113221311111111121913321212141212121349121111111112131922241339234412292322111111111212121212141414121212121211111111133217373333161323473732134111111111133213173212221733221341111111111113221217341834173212131111111111132341133317361733234113331111111323411111133219121341111113331113234111111111133213411111111113331";
lvlmap[5] = "111111111111111111111111111111111111111111111111112111111111111111111111111111111132873111111111111111111111111111322151213111111111111111111111111142250125421111111111111111111111322134813321311111111111111111111142257161712542111111111111111111322134717171332131111111111111111142257171617171254211111111111111322134719171917133212131111111111142257171716171717125429131111111322121212121212121212121212131";
lvlmap[6] = "111111111111111111111111111111111111111111111111322131111111111111112121212121212121212121212121212121332186417424413701384124744186213411332121742121512151212174212134111111332174213441214133217421341111111111337434419121914133743411111111111132743151412141513274311111111111322174212131913221217421311111113221217421212121212121742121311132218741742541854184412574418721312121212121212121212121212121212121";
lvlmap[7] = "111111111111111111111111111111111111111133311111111111111111111111321111322121212121212121212121313234111121737373217272722171717121341111112173217321722172217121712111111132219221832192218221922181211111112191225122512251225122510121111111332121219221732192217221212111111111111121732173217221722111333111111111322173917321729172211111333111113234332121212121212134111111331132341111111111111111111111111111";
lvlmap[8] = "111111111111111111111111111111111111111111111111111111111111111111111111111111111132213111111111111111111111111111213482332111111111111111111111113221724172213111111111111111111132217272727272213111111111111111322141924191419241213111111111113221727272725172617272213111111132219122514131015161512291213111113321212121212121212121212121341111113411333411332134113334113311111111111111111132213111111111111111";
lvlmap[9] = "111111111111111111111111111111111111111111362335112111111136233511111111111123911111811111111191231111111111113711113222311111111138111111362335111132210121311111111111111123911111328621618821311111111111113711113226515161218721311111111111111132218521216151512421311111111111112125515151612121212192311111113251212121212161717171717126311132237171717171716121212121212121312121212121212121212121212121212121";
lvlmap[10] = "111111111111111111111111111111111111111111111111111111111111111111111111321111113321212134111111311111113221311111114273421111113221311111112191311111427342111132912111111111212292311142734211329222211111111121414121314273423221414121111111322141418321215121218241412131111121014141414141614141414141912111113321212172727272727272212121341111112111332121212121212134112111111132213111211111211111211132213111";
lvlmap[11] = "111111111111111111111111111111111111111111111111111111111111111111111111111111113221212131111111111111111111113221217191712121311111111111113221212183737373842121213111111111212181727272727272728221211111112121917474747401747474747421211111112171617161716171617161912111111111212121212173737321212121211111111111111133216161612134111111111111111111111111212121111111111111111111111111111111211111111111111111";
lvlmap[12] = "111111111111111111111111111111111111111111111111111111111111111111111111111111322121212121311111111111111132212121212121212121212131111111112183747341416141416161922111111111214174734191226141747361211111111121417473412291224174734121111111112161747341612291417473412111111111214174734141614141747341211111111121926161414101414174738421111111112121212121212121212121212111111111332121212121212121212121341111";
lvlmap[13] = "111111111111111111111111111111111111111111111111111111111111111111111111111121212121212121212111111111111111112181516172515191211111111111111111215121722172215121111111111111113221617272727272252131111111111111219151218721872151912111111111111133212571717171716121341111111111111121512171217121512111111111111111112101515171615182211111111111111111212121212121212121111111111111111111211121112111211111111111";
lvlmap[14] = "111111111111111111111111111111111111111111111111111111111111111111111111111111112121212121111111111111111111111121732183217321111111111111111111217361226122617321111111111111111121217321922173212111111111111111112192612201226192211111111111111111212171219221712121111111111111111121716122612261712111111111111111214122712181217122912111111111111121414121212121219191211111111111112121211111211111212121111111";
lvlmap[15] = "111111111111111111111111111111111111322131113221311132213111322131111121714211428621112181429142722111112171211121512111332134112172211111212321112124212121213111217221111121714211425151015151211121722111112171211121852121218621112172211111217121112151519151514211427221111121712111332121212123211121242111112171211132213111215121112172211111217142914282211121854211427221111133213411332134113321341133213411";
lvlmap[16] = "111111111111111111111111111111111111111111111111322131111111111111111111323111111132913111111132311111111121212121212141212121212121111111112185257392229122927185732111111132217125735141414151712373213111111142712573414191414171237342111111332171257351412141517123732134111111217187837341014171812387211111111121212121212121212121212121111111113334112111112111112111333411111111111111211111211111211111111111";
lvlmap[17] = "111111111111111111111111111111111111111121112111211121112111211111111111212121212121212121212121211111112121232323617281512171717121211111112141212391722122217121712111111121218592727272214123712185212111111121012121212121212121212121111111212171927122822172727221852121111111217121712141217221722141211111112121717132213191322131913221211111112121212121212121212121212111111111112111211121112111211121111111";
lvlmap[18] = "111111111111111111111111111111111111113221213111111111113221213111111111217171212121212121217373211111111121717171510183225173737321111111112171717121214321217373732111111132214321213411911133212143213111112291811111111121111111118491221111332143212121119211212121432134111111217272722121513221747474211111111121727272512282925174747421111111112172722121212121212174742111111111332121341111111111332121341111";
lvlmap[19] = "111111111111111111111111111111111121212121212121212131111111111111112171717171717171717131111111111111217121212121212121318131111111111121712151516192229121612131111111112122215121512121212151212131111111216101512151922251516122912131111121222151212121215121512121212131112122215151619222922151219292929231212221212151212192215121212121922121222291215192229221612222229292212121212121212121432121212121212121";
lvlmap[20] = "111111111111111111111111111111111111112121212131111111322121212111111132217272722121212121217171213111111121727232347373739171717121111111322172822131738332217171712131111111213161212161212121612121211111113221344133217474742151413321311111112192815121747474215151842111111132212292514174617441619222213111111121912221515101212192229121111111322121212121212121212121212131111111211111112111111121111111211111";
lvlmap[21] = "111111111111111111111111111111111111111111212121214121212121111111111111112121212121212121212121111111111121218351513885375151822121111111112121515138736172375151212111111121212151387334913372375121212111112141212373619101916172232141211111212121513571317132713651212121111111212151513574617436515121211111111121218451513585365151812121111111111121212121212121212121211111111111111121212121412121212111111111";
lvlmap[22] = "111111111111111111111111111111111133213111111111111111111111113221341133212143212121432121214321213411113234737373017373732541518721311111425173215121512173215121514211111133317373737373917351835141213411111121512151215121512151215121111111322141518151719171717171713331111111425121512171215121512171514211113321855141237171719171717132341111322121432121214321212143212131111121341111111111111111111111332111";
lvlmap[23] = "111111111111111111111111111111111111212311111132212121311111112321111121911111118451875151111111912511112411111111717171717111111161211111216111111151518651811111111125111124111111117474747474111111612111112161111111845187515111111111251111241111111171717171711111116121111121611111115151865181111111112511112411111111747474747411111161211111210111111184518551511111119121111121211111113321212134111111212111";
lvlmap[24] = "111111111111111111111111111111111111111111111111111111111111111111111111111111322121212121311111111111111111112121865181518821211111111111111111217124242526267121111111111111111121712691259126712111111111111111112171242423252671211111111111111111217123239125257121111111111111111121712326262625712111111111111111112121855101518721211111111111111111112121212121212111111111111111111111341134113311331111111111";
lvlmap[25] = "111111111111111111111111111111111111322134113221212121212121212121311121411111517351725171517251715121113351311121735172512551725171512132210121112173517251715172247125212185618111917351725171237251715121218761831191732572517151725171512121866182119173517224715172517151213321512111217351725171237225715121113251341121735125517151725171512111214111115173517251715172517151211133213111332121212121212121212134";
lvlmap[26] = "111111111111111111111111111111111121214343434343432121214343434321212134717171717171339134727272723321427134717171335171514151415141724242717141515141327151514151415172424271713471713285612331727233417242429131387171826101618172723633724242714131717133236185347272327272424271514151415151723441515141727242427141514151415172513172727232724221317171717132913172727272727232212121434343432121214343434343432121";
lvlmap[27] = "111111111111111111111111111111111111111121212121212121212121211111111111329184247474617272218291311111111111212121742123217221232111111111113221747474218651727272213111111111112174212121242151217221111111111132216124862301238524612131111111111121732151212421212171211111111111322173737351852171717121311111111111212321732123217121212111111111113291832173736171712481213111111111112121212121212121212121111111";
lvlmap[28] = "111111111111111111111111111111111111111111111111111111111111111111111111113221212121212121212131111111113221213451514187415151332121311111212491514151518551514151812421111121515132242424242424243141512111112171712471717101717171247171211111214141332424246424242434415121111121255151415151865151415151252111112121213191354164413691322121211131111132212121212121212121111111322121212141214121412141214121212121";
lvlmap[29] = "111111111111111111111111111111111111111111111111111111111111213111113221212121311111113291111101213111218174747474112324256511115121211121212121212111111121111111618521112182737373731123242664111151212111212121212121111111219111116186211121837272727211232625631111512121112121212121211111112111111161872111218471717171112624256211115121211133212121213411111133911111618821111111111111111111111111111133213411";
lvlmap[30] = "111111111111111111111111111111111111111111111111322131111111111111111132212121212121812121212121213111322491717171717161717171717192213111212321215121212221215121214121111142914226885185518751882642924211112125212121512122215121212141211111429142112587518651872511429242111133213411332151225121341133213411111121111111238551862311111121111111112111111133210121341111112111111111211111111133213411111111211111";
lvlmap[31] = "111111111111111111111111111111111132212121212121212121212121212131112192514151515183618492237441222111332185212386518161852471742191211111218621742487826125727174212221111121874274712573617372717421912111322151217471727321737271742122211121920121747172737373257174219121113321212174717225727272247421212111111133217471247171717171232134111111111121742374747474747474211111111111112121212121212121212134111111";
lvlmap[32] = "111111111111111111111111111111111111111111512151212121212121212151211111217151519251515151515151514151112151515121512121512151212121512111515171515151515191515151515171211111215151215121215121512121215121111151715122515101912151515151715111115121512151212151212121512151212151517151515151519151515151517151111151215121512121512151215121512111515141515181515151515121515171511121512151212121212121212151212121";
lvlmap[33] = "111111111111111111111111111111111111322134111111111111111111332131111121611111116151713361111111612111111111111132347171715121911111111121111111213471717171713331111111212131613234717171717171713331613221210161227171717181717171712211912121346133517171717171717132346133211111111161317171717171516111111111111111211133317171713234112111911111216111119221517151219211116121111133211121211133213411212111213411";
lvlmap[34] = "111111111111111111111111111111111111111111111111332134111111111111111111111111324343914343311111111111112131113223628663856425311132211111217311426287638664856542117121111121341142886387648665854211332111114291514263886401658663425191421111213111428564886587638642113221111121831142648565886387644211812111112134113324658563886426341133211111111111113343434343433411111111111111111111111111111111111111111111";
lvlmap[35] = "111111111111111111111111111111111111111132212134322131322121212131111111323451332221013451737373224211113234515151913361515134515133211132345151415151516151517351415142113331515151519234615151735151512111112131514151725192515173514132211111213451515172319183317351515142111121515141517221613221735141512111323451515151323461913385515151421133317272727272726131513551828521111133212121212121212111232111212111";
lvlmap[36] = "111111111111111111111111111111111111212121212121212121212121212121111121872382247225912673238324882111112123212421252126212321242125211111217224722572268623732473257321111121242125212621232124212521262111112185257226872301248825732686211111212521262123212421252126212321111121722671237124852571267123732111112126212321242125212621232124211111218623912471258126712391248521111121212121212121212121212121212111";
gachi = new Array();
gachitxt = new Array();
stat = new Array();
setGahci = function () {
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] = [10000, 50000, 150000, 300000, 600000];
gachitxt[3] = ["Earn", "Points"];
gachi[4] = [1, 5, 12, 25, 36];
gachitxt[4] = ["Complete", "Levels"];
gachi[5] = [3, 15, 40, 75, 108];
gachitxt[5] = ["Collect", "Stars"];
gachi[6] = [5, 10, 15, 25, 35];
gachitxt[6] = ["Get", "Combo"];
gachi[7] = [1, 10, 25, 50, 75];
gachitxt[7] = ["Open", "Doors"];
gachi[8] = [5, 20, 50, 100, 200];
gachitxt[8] = ["Use", "Switches"];
gachi[9] = [1];
gachitxt[9] = ["View your awards", ""];
gachi[10] = [1];
gachitxt[10] = ["View authors of the game", ""];
gachi[11] = [1];
gachitxt[11] = ["Last level completed in less than 1 minute", ""];
gachi[12] = [1];
gachitxt[12] = ["Fly into window", ""];
gachi[13] = [60];
gachitxt[13] = ["Play \n one \n hour", ""];
gachi[14] = [1];
gachitxt[14] = ["Don't move during 1 minute", ""];
gachi[15] = [1];
gachitxt[15] = ["Replay level \n 5 times", ""];
gachi[16] = [1];
gachitxt[16] = ["Change \n your character", ""];
gachi[17] = [1];
gachitxt[17] = ["Launch the game once more", ""];
i = 0;
while (i < gachi.length) {
stat[i] = 0;
i++;
}
};
setGahci();
menuanim1 = new Array();
menuanim1[0] = [70, 70, 30];
menuanim1[1] = [90, 80, 70];
menuanim1[2] = [105, 85, 100];
menuanim1[3] = [110, 90, 100];
menuanim1[4] = [105, 95, 100];
menuanim1[5] = [100, 100, 100];
menuanim1[6] = [97, 103, 100];
menuanim1[7] = [94, 106, 100];
menuanim1[8] = [97, 103, 100];
menuanim1[9] = [100, 100, 100];
menuanim1[10] = [103, 97, 100];
menuanim1[11] = [100, 100, 100];
menuanim2 = new Array();
menuanim2[0] = [90, 90, 80];
menuanim2[1] = [80, 80, 50];
menuanim2[2] = [70, 70, 20];
atxt = new Array();
i = 0;
while (i < gachi.length) {
atxt[i] = new Array();
j = 0;
while (j < gachi[i].length) {
if (i < 9) {
atxt[i][j] = (((gachitxt[i][0] + newline) + gachi[i][j]) + newline) + gachitxt[i][1];
} else {
atxt[i][j] = gachitxt[i][0];
}
j++;
}
i++;
}
var my_so = SharedObject.getLocal("ninja-painter-2", "/");
lvlmedal = new Array();
lvlrec = new Array();
resetGame = function () {
trace("RESET GAME");
totalscore = 0;
plrnum = undefined;
my_so.data.lvlmedal[0] = -1;
my_so.data.lvlmedal[1] = -1;
my_so.data.lvlmedal[7] = -1;
my_so.data.lvlmedal[13] = -1;
my_so.data.lvlmedal[19] = -1;
my_so.data.lvlmedal[25] = -1;
my_so.data.lvlmedal[31] = -1;
i = 1;
while (i <= maxlvl) {
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++;
}
};
if (my_so.data.lvlmedal[0] == undefined) {
my_so.data.lvlmedal = new Array();
my_so.data.lvlrec = new Array();
resetGame();
}
sound = my_so.data.sound;
music = my_so.data.music;
plrnum = my_so.data.plrnum;
totalscore = 0;
if (music == false) {
ib2.gotoAndStop(2);
}
if (sound == false) {
ib1.gotoAndStop(2);
}
i = 1;
while (i <= maxlvl) {
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 < gachi.length) {
j = 0;
while (j < gachi[i].length) {
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.data.plrnum = plrnum;
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];
if (type < 9) {
gachilogo.img.gotoAndStop(j + 1);
gachilogo.img.img.gotoAndStop(type + 1);
} else {
gachilogo.img.gotoAndStop(6);
gachilogo.img.img.gotoAndStop(10);
}
gachilogo.gotoAndPlay(2);
gachi[type][j] = -1;
}
}
j++;
}
};
gotoAndStop ("function");
Frame 17
total_ms = 0;
total_sec = 0;
tilew = 16;
tileh = 11;
tile = 44;
moving = false;
movex = 0;
movey = 0;
speed = 22;
objcount = 0;
paused = true;
editor = false;
player1._visible = false;
player2._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;
diznum = 1;
dizChange = function (type) {
type.gotoAndStop(diznum);
};
createLevel = function () {
closeMenu();
clearLevel();
if (day == 3) {
day = 1;
} else {
day++;
}
if (lvlmedal[lvl] == -1) {
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 / 6);
diznum = lvltype;
back.img.back2.gotoAndStop(lvltype);
back.img.back3.gotoAndStop(lvltype);
k = 0;
objcount = 0;
stars = 0;
walls = 0;
keys = 0;
moves = 0;
score = 0;
maxcombo = 0;
combo = false;
combocount = 0;
combotimer = 1;
exitopen = false;
replaycount++;
if (replaycount == 6) {
setStat(15, 1);
}
if (plrnum == 1) {
player = _root.player1;
} else {
player = _root.player2;
}
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", (("t" + i) + "-") + j, levelmap.getNextHighestDepth());
if (x == 7) {
walls++;
}
if (((x == 2) or (x == 3)) and (editor == false)) {
obj2 = levelmap2.attachMovie("block", (("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) and (editor == false)) {
obj.gotoAndStop(12);
} else {
obj.gotoAndStop(x + 1);
}
obj.type = y;
obj.img.gotoAndStop(obj.type);
if ((x == 8) && (y > 4)) {
switchbank[y - 4].push((("t" + i) + "-") + j);
}
if ((x == 2) && (y > 2)) {
wallbank[y - 2].push((("t" + i) + "-") + j);
obj._visible = true;
obj.gotoAndStop(6);
obj.img.gotoAndStop(2);
obj.img.img.gotoAndStop(y - 2);
obj2.img._visible = false;
}
if ((x == 3) && (y > 4)) {
cornerbank.push((("t" + i) + "-") + j);
obj._visible = true;
obj.gotoAndStop(6);
obj.img.gotoAndStop(3);
obj.img.img.gotoAndStop(obj2.img._currentframe - 4);
obj2.img._visible = false;
}
if ((x == 6) && (y > 1)) {
stairbank[y - 1].push((("t" + i) + "-") + j);
obj.gotoAndStop(6);
obj.img.gotoAndStop(4);
obj.img.img.gotoAndStop(y - 1);
}
if ((x == 8) && (y < 5)) {
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) {
if (y == 1) {
objpart = partmap.attachMovie("block_star", "tobj" + objcount, partmap.getNextHighestDepth());
} else {
objpart = partmap.attachMovie("block_key", "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;
}
i = 0;
while (i <= tileh) {
j = 0;
while (j <= tilew) {
obj = _root.levelmap[(("t" + i) + "-") + j];
if (obj._currentframe == 12) {
objL = _root.levelmap[(("t" + i) + "-") + (j - 1)]._currentframe;
objR = _root.levelmap[(("t" + i) + "-") + (j + 1)]._currentframe;
objU = _root.levelmap[(("t" + (i - 1)) + "-") + j]._currentframe;
objD = _root.levelmap[(("t" + (i + 1)) + "-") + j]._currentframe;
objUL = _root.levelmap[(("t" + (i - 1)) + "-") + (j - 1)]._currentframe;
objUR = _root.levelmap[(("t" + (i - 1)) + "-") + (j + 1)]._currentframe;
objDL = _root.levelmap[(("t" + (i + 1)) + "-") + (j - 1)]._currentframe;
objDR = _root.levelmap[(("t" + (i + 1)) + "-") + (j + 1)]._currentframe;
obj._visible = true;
if ((obj.img._currentframe == 1) & (((objU == 2) || (objR == 2)) || (objUR == 2))) {
obj._visible = false;
}
if ((obj.img._currentframe == 2) & (((objU == 2) || (objL == 2)) || (objUL == 2))) {
obj._visible = false;
}
if ((obj.img._currentframe == 3) & (((objL == 2) || (objD == 2)) || (objDL == 2))) {
obj._visible = false;
}
if ((obj.img._currentframe == 4) & (((objD == 2) || (objR == 2)) || (objDR == 2))) {
obj._visible = false;
}
}
j = j + 1;
}
i = i + 1;
}
};
clearLevel = function () {
new Sound().setVolume(100);
tarobj = undefined;
movex = 0;
movey = 0;
moving = false;
interbonus.gotoAndStop(1);
intercombo.gotoAndStop(1);
tutor._visible = false;
player1._visible = false;
player2._visible = false;
cursor._visible = false;
switchbank = [[undefined], [undefined], [undefined], [undefined], [undefined]];
wallbank = [[undefined], [undefined], [undefined], [undefined], [undefined]];
cornerbank = [undefined];
stairbank = [[undefined], [undefined], [undefined], [undefined], [undefined]];
ispausedobj._visible = false;
notmove = 0;
lasttime = 0;
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 (mobj._currentframe == 3) {
if (mobj.img._currentframe == 2) {
if (tempkeys > 0) {
tempkeys--;
} else {
x = 0;
}
} else {
x = 0;
}
}
if (mobj._currentframe == 12) {
switch (mobj.img._currentframe) {
case 1 :
case 5 :
if (movex != 0) {
if (movex > 0) {
x = 0;
}
}
if (movey != 0) {
if (movey < 0) {
x = 0;
}
}
break;
case 2 :
case 6 :
if (movex != 0) {
if (movex < 0) {
x = 0;
}
}
if (movey != 0) {
if (movey < 0) {
x = 0;
}
}
break;
case 3 :
case 7 :
if (movex != 0) {
if (movex < 0) {
x = 0;
}
}
if (movey != 0) {
if (movey > 0) {
x = 0;
}
}
break;
case 4 :
case 8 :
if (movex != 0) {
if (movex > 0) {
x = 0;
}
}
if (movey == 0) {
break;
}
if (movey <= 0) {
break;
}
x = 0;
}
}
if (x == 1) {
moving = true;
if (one == true) {
one = false;
} else {
player.img.gotoAndStop("move");
}
} else {
tarobj = preobj;
moving = false;
playerx = player._x / tile;
playery = player._y / tile;
obj = levelmap[(("t" + Math.floor(playery)) + "-") + Math.floor(playerx)];
if (obj._currentframe == 7) {
player._rotation = 0;
player.img.gotoAndStop("catch");
} else {
player.img.gotoAndStop("land");
if (one == false) {
createPart(player._x + lengthdir_x(25, player._rotation + 90), player._y - lengthdir_y(25, player._rotation + 90), "part_dust", 6);
}
}
return(true);
}
preobj = mobj;
};
moveObj = function (type) {
switch (type) {
case 0 :
mobj = levelmap[(("t" + (playery - 1)) + "-") + playerx];
break;
case 1 :
mobj = levelmap[(("t" + (playery + 1)) + "-") + playerx];
break;
case 2 :
mobj = levelmap[(("t" + playery) + "-") + (playerx - 1)];
break;
case 3 :
mobj = levelmap[(("t" + playery) + "-") + (playerx + 1)];
}
moveTest();
};
moveUp = function () {
playSound("jump1", "jump2");
tempkeys = keys;
one = true;
player._rotation = 180;
moveside = 0;
movex = 0;
movey = -1 * speed;
moveObj(moveside);
};
moveDown = function () {
playSound("jump1", "jump2");
tempkeys = keys;
one = true;
player._rotation = 0;
moveside = 1;
movex = 0;
movey = 1 * speed;
moveObj(moveside);
};
moveLeft = function () {
playSound("jump1", "jump2");
tempkeys = keys;
one = true;
player._rotation = 90;
moveside = 2;
movex = -1 * speed;
movey = 0;
moveObj(moveside);
};
moveRight = function () {
playSound("jump1", "jump2");
tempkeys = keys;
one = true;
player._rotation = -90;
moveside = 3;
movex = 1 * speed;
movey = 0;
moveObj(moveside);
};
closeMenu = function () {
opt.timerx1 = 0;
opt.timerx2 = 0;
opt.anim = true;
opt.tar = "exit";
opt.gotoAndStop("exit");
};
openMenu = function (info) {
opt.timerx1 = 0;
opt.timerx2 = 0;
opt.tar = info;
opt.close = true;
opt.anim = true;
};
openScreen = function (info) {
opt.timerx1 = _root.menuanim1.length - 1;
opt.timerx2 = _root.menuanim2.length - 1;
opt.tar = info;
opt.close = true;
opt.anim = false;
_root.trans.gotoAndPlay(2);
};
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("on");
}
};
hideLogo = function () {
if (logo._currentframe != 1) {
logo.gotoAndPlay("off");
}
};
_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) {
if (i < 9) {
z.gotoAndStop(j + 1);
z.img.gotoAndStop(i + 1);
} else {
z.gotoAndStop(6);
z.img.gotoAndStop(10);
}
} else {
z.gotoAndStop(7);
if (i < 9) {
z.perc = Math.floor((_root.stat[i] / _root.gachi[i][j]) * 100) + "%";
} else {
z.desc.text = "Secret \n Award";
z.perc = "???";
}
}
j++;
}
i++;
}
};
_global.lengthdir_x = function (len, dir) {
return(Math.cos((dir * Math.PI) / 180) * len);
};
_global.lengthdir_y = function (len, dir) {
return((-Math.sin((dir * Math.PI) / 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) / Math.PI) * 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_unlock = new Sound(_root);
snd_unlock.attachSound("unlock");
var snd_getkey = new Sound(_root);
snd_getkey.attachSound("getkey");
var snd_combo = new Sound(_root);
snd_combo.attachSound("scombo");
var snd_switch = new Sound(_root);
snd_switch.attachSound("sswitch");
var snd_yeah1 = new Sound(_root);
snd_yeah1.attachSound("syeah1");
var snd_yeah2 = new Sound(_root);
snd_yeah2.attachSound("syeah2");
var snd_no1 = new Sound(_root);
snd_no1.attachSound("sno1");
var snd_no2 = new Sound(_root);
snd_no2.attachSound("sno2");
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 27
mousePressed = false;
var keyListener = new Object();
Key.addListener(keyListener);
onEnterFrame = function () {
if (quake > 0) {
if ((quake % 1) == 0) {
levelmap2._y = quake;
} else {
levelmap2._y = -quake;
}
quake = quake - 0.5;
}
total_ms++;
if (total_ms == 30) {
total_ms = 0;
total_sec++;
if (total_sec == 60) {
total_sec = 0;
addStat(13, 1);
trace("Minute: " + stat[13]);
}
}
if (paused == false) {
if (ispause == false) {
if (lvl == maxlvl) {
if (stat[11] == 0) {
lasttime++;
}
}
if (stat[14] == 0) {
notmove++;
if (notmove > 1800) {
setStat(14, 1);
}
}
if (moving == true) {
notmove = 0;
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) and ((player._y % tile) == 0)) {
playerx = player._x / tile;
playery = player._y / tile;
moveObj(moveside);
obj = levelmap[(("t" + Math.floor(playery)) + "-") + Math.floor(playerx)];
obj2 = levelmap2[(("t" + Math.floor(playery)) + "-") + Math.floor(playerx)];
if (obj == tarobj) {
playSound("fall");
moving = false;
if ((obj._currentframe != 4) && (obj._currentframe != 12)) {
player.img.gotoAndStop("land");
moves++;
addStat(2, 1);
}
}
if (obj == undefined) {
openScreen("def");
paused = true;
moving = false;
player.img.gotoAndStop("stand");
}
switch (obj._currentframe) {
case 1 :
if (exitopen == true) {
if (lvl == maxlvl) {
if (lasttime < 1800) {
setStat(11, 1);
}
}
openScreen("win");
paused = true;
moving = false;
player.img.gotoAndStop("land");
player._rotation = 0;
createPart(player._x, player._y, "part_star", 1, 5);
}
break;
case 3 :
if (obj2.img._currentframe == 2) {
keys--;
quake = 2;
playSound("unlock");
addStat(7, 1);
obj._visible = true;
obj.gotoAndStop(6);
obj2.gotoAndStop(2);
createPart(player._x, player._y, "part_dust", 8);
createPart(player._x, player._y, "part_door", 1);
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(1);
setStat(12, 1);
}
break;
case 7 :
moving = false;
player._rotation = 0;
player.img.gotoAndStop("catch");
tarobj = undefined;
preobj = obj;
break;
case 8 :
if (obj.type == player._currentframe) {
playSound("wall1", "wall2");
obj.gotoAndStop(11);
obj.img.gotoAndStop(obj.type);
walls--;
addStat(1, 1);
combocount++;
combotimer = 1;
createPart(player._x, player._y, "part_wall", 1);
createPart(player._x, player._y, "part_color", 8, obj.type);
if (walls == 0) {
combotimer = 61;
quake = 2;
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.img._currentframe < 5) {
if (obj.type < 5) {
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);
}
}
} else {
quake = 2;
playSound("switch");
addStat(8, 1);
createPart(player._x, player._y, "part_star", 1, obj.type);
ind = obj.img._currentframe - 4;
if (obj.img.img._currentframe == 1) {
obj.img.img.gotoAndStop(2);
off = false;
} else {
obj.img.img.gotoAndStop(1);
off = true;
}
i = 1;
while (i < switchbank[ind].length) {
zz = switchbank[ind][i];
levelmap[zz].img.img.gotoAndStop(obj.img.img._currentframe);
i++;
}
i = 1;
while (i < wallbank[ind].length) {
zz = wallbank[ind][i];
createPart(levelmap[zz]._x, levelmap[zz]._y, "part_dust", 6);
if (off) {
levelmap[zz]._visible = true;
levelmap[zz].gotoAndStop(6);
levelmap[zz].img.gotoAndStop(2);
levelmap[zz].img.img.gotoAndStop(ind);
levelmap2[zz].img._visible = false;
} else {
levelmap[zz]._visible = false;
levelmap[zz].gotoAndStop(3);
levelmap[zz].img.gotoAndStop(ind + 2);
levelmap2[zz].img._visible = true;
}
i++;
}
i = 1;
while (i < stairbank[ind].length) {
zz = stairbank[ind][i];
createPart(levelmap[zz]._x, levelmap[zz]._y, "part_dust", 6);
if (off) {
levelmap[zz].gotoAndStop(6);
levelmap[zz].img.gotoAndStop(4);
levelmap[zz].img.img.gotoAndStop(ind);
} else {
levelmap[zz].gotoAndStop(7);
levelmap[zz].img.gotoAndStop(ind + 1);
}
i++;
}
if (ind == 1) {
i = 1;
while (i < cornerbank.length) {
zz = cornerbank[i];
createPart(levelmap[zz]._x, levelmap[zz]._y, "part_dust", 6);
if (off) {
levelmap[zz].gotoAndStop(6);
levelmap[zz].img.gotoAndStop(3);
levelmap[zz].img.img.gotoAndStop(levelmap2[zz].img._currentframe - 4);
levelmap2[zz].img._visible = false;
} else {
levelmap[zz].gotoAndStop(12);
levelmap[zz].img.gotoAndStop(levelmap2[zz].img._currentframe - 4);
levelmap2[zz].img._visible = true;
}
i++;
}
}
tempkeys = keys;
one = true;
moveObj(moveside);
if (moving) {
player.img.gotoAndStop("move");
} else {
player.img.gotoAndStop("land");
}
}
break;
case 10 :
if (obj.img._currentframe == 1) {
playSound("star");
stars++;
obj.gotoAndStop(6);
obj.img.gotoAndStop(1);
createPart(player._x, player._y, "part_star2", 8);
createPart(player._x, player._y, "part_star", 1, 6);
obj.part.removeMovieClip();
} else {
playSound("getkey");
keys++;
obj.gotoAndStop(6);
obj.img.gotoAndStop(1);
createPart(player._x, player._y, "part_key", 8);
createPart(player._x, player._y, "part_star", 1, 6);
obj.part.removeMovieClip();
tempkeys = keys;
one = true;
moveObj(moveside);
}
break;
case 4 :
case 12 :
moving = false;
switch (obj.type) {
case 1 :
case 5 :
if (movex != 0) {
if (movex < 0) {
moveUp();
}
}
if (movey != 0) {
if (movey > 0) {
moveRight();
}
}
break;
case 2 :
case 6 :
if (movex != 0) {
if (movex > 0) {
moveUp();
}
}
if (movey != 0) {
if (movey > 0) {
moveLeft();
}
}
break;
case 3 :
case 7 :
if (movex != 0) {
if (movex > 0) {
moveDown();
}
}
if (movey != 0) {
if (movey < 0) {
moveLeft();
}
}
break;
case 4 :
case 8 :
if (movex != 0) {
if (movex < 0) {
moveDown();
}
}
if (movey == 0) {
break;
}
if (movey >= 0) {
break;
}
moveRight();
}
}
}
}
if (combocount > 0) {
if (combotimer < 61) {
combotimer++;
} else {
addscore = 100 * (combocount * (combocount / 2));
score = score + addscore;
interbonus.combo = combocount;
interbonus.score = addscore;
setStat(6, combocount);
if (combocount > 15) {
playSound("combo");
playSound("achi");
interbonus.gotoAndStop(5);
} else if (combocount > 10) {
playSound("combo");
interbonus.gotoAndStop(4);
} else if (combocount > 5) {
playSound("combo");
interbonus.gotoAndStop(3);
} else if (combocount > 1) {
playSound("combo");
interbonus.gotoAndStop(2);
}
combocount = 0;
combotimer = 1;
}
intercombo.gotoAndStop(combotimer);
}
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);
}
};
nextLevel = function () {
if ((lvl % 6) != 0) {
lvl++;
trans.gotoAndPlay(2);
loadLevel = true;
replaycount = 0;
} else if (stat[4] == 36) {
openScreen("congrat");
} else {
openScreen("select");
}
};
keyListener.onKeyDown = function () {
if (paused == false) {
if (Key.isDown(82)) {
if (_root.trans._currentframe == 1) {
_root.paused = true;
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
}
}
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)) {
trace("space" + opt._currentframe);
if (opt._currentframe == 41) {
nextLevel();
}
if (opt._currentframe == 51) {
_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 37
stop();
closeInter();
openMenu("main");
if (plrnum != undefined) {
setStat(17, 1);
}
playMusic();
ib1.ico.gotoAndStop(1);
ib1.desc.text = "SOUND";
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 28 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 29 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 36 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 38 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 44 MovieClip [part_score] Frame 31
this.removeMovieClip();
Symbol 45 MovieClip [part_wall] Frame 11
this.removeMovieClip();
Symbol 48 MovieClip [part_door] Frame 1
speed = 6 + random(4);
timer = 10 + random(15);
dir = random(180);
onEnterFrame = function () {
_rotation = (_rotation + 2);
if (speed > 0) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + (3 + lengthdir_y(speed, dir)));
speed--;
} else {
_y = (_y + 1);
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 48 MovieClip [part_door] Frame 11
stop();
Symbol 50 MovieClip [part_key] 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 61 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 {
this.removeMovieClip();
}
};
Symbol 64 MovieClip [part_dust2] Frame 1
speed = 2 + random(2);
timer = 15 + random(10);
dir = random(360);
_rotation = dir;
onEnterFrame = function () {
_rotation = (_rotation + 5);
if (speed > 0) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = speed - 0.5;
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 65 MovieClip [part_dust] Frame 1
speed = 4 + random(2);
timer = 15 + random(10);
dir = random(360);
_rotation = dir;
onEnterFrame = function () {
_rotation = (_rotation + 10);
if (speed > 0) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = speed - 0.5;
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 70 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 75 MovieClip Frame 1
stop();
Symbol 111 MovieClip [block3] Frame 1
stop();
Symbol 137 MovieClip [block2] Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 155 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 1
stop();
Symbol 164 MovieClip [block1] Frame 1
stop();
Symbol 165 MovieClip Frame 1
stop();
Symbol 167 MovieClip Frame 1
stop();
Symbol 180 MovieClip Frame 1
stop();
_root.dizChange(this);
Symbol 183 MovieClip Frame 1
stop();
Symbol 196 MovieClip Frame 1
stop();
_root.dizChange(this);
Symbol 209 MovieClip Frame 1
stop();
_root.dizChange(this);
Symbol 222 MovieClip Frame 1
stop();
_root.dizChange(this);
Symbol 235 MovieClip Frame 1
stop();
_root.dizChange(this);
Symbol 238 MovieClip Frame 1
stop();
Symbol 249 MovieClip Frame 1
stop();
_root.dizChange(this);
Symbol 262 MovieClip Frame 1
stop();
_root.dizChange(this);
Symbol 267 MovieClip Frame 1
stop();
Symbol 268 MovieClip Frame 1
stop();
Symbol 271 MovieClip Frame 1
stop();
Symbol 272 MovieClip Frame 1
stop();
Symbol 275 MovieClip Frame 1
stop();
Symbol 318 MovieClip Frame 1
stop();
Symbol 319 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 1
stop();
Symbol 333 MovieClip Frame 1
stop();
_root.dizChange(this);
Symbol 335 MovieClip Frame 1
stop();
Symbol 336 MovieClip [block] Frame 1
stop();
Symbol 415 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 1
stop();
Symbol 430 MovieClip Frame 1
stop();
Symbol 434 MovieClip Frame 1
stop();
Symbol 444 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
}
Symbol 461 Button
on (release) {
getURL (androidurl, "_blank");
}
Symbol 468 Button
on (rollOver) {
playSound("over");
}
on (release) {
playSound("click");
getURL (lnk, "_blank");
}
Symbol 481 MovieClip Frame 1
stop();
title = "PLAY\nFlying Candy";
lnk = candyurl;
Symbol 481 MovieClip Frame 2
title = "PLAY\nIcy Fishes";
lnk = fishurl;
Symbol 481 MovieClip Frame 3
title = "PLAY\nMushroom Madness 3";
lnk = mushroomurl;
Symbol 481 MovieClip Frame 4
title = "PLAY\nPrizma Puzzle Challenges";
lnk = prizmaurl;
Symbol 481 MovieClip Frame 5
title = "PLAY\nGranny Strikes Back";
lnk = grannyurl;
Symbol 481 MovieClip Frame 6
title = "PLAY\nThe Bee Way";
lnk = beeurl;
Symbol 481 MovieClip Frame 7
title = "PLAY\nNinja Painter 1";
lnk = ninjaurl;
Symbol 485 MovieClip Frame 1
stop();
_visible = false;
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
gotoAndPlay ("on");
}
}
};
Symbol 485 MovieClip Frame 2
_visible = true;
Symbol 485 MovieClip Frame 88
gotoAndPlay(15 + random(60));
Symbol 489 Button
on (release) {
getURL (sponsorurl, "_blank");
}
Symbol 515 MovieClip Frame 86
_root.gotoAndStop(4);
Symbol 525 MovieClip Frame 86
_root.gotoAndStop(5);
Symbol 584 MovieClip Frame 4
_parent.gotoAndStop("stand");
Symbol 587 MovieClip Frame 4
_parent.gotoAndStop("stair");
Symbol 588 MovieClip Frame 3
onEnterFrame = function () {
if ((_parent._rotation % 180) == 0) {
yy._visible = true;
xx._visible = false;
} else {
xx._visible = true;
yy._visible = false;
}
};
Symbol 588 MovieClip Frame 5
_parent.gotoAndStop("stair");
Symbol 645 MovieClip Frame 4
_parent.gotoAndStop("stand");
Symbol 648 MovieClip Frame 4
_parent.gotoAndStop("stair");
Symbol 649 MovieClip Frame 3
onEnterFrame = function () {
if ((_parent._rotation % 180) == 0) {
yy._visible = true;
xx._visible = false;
} else {
xx._visible = true;
yy._visible = false;
}
};
Symbol 649 MovieClip Frame 5
_parent.gotoAndStop("stair");
Symbol 656 MovieClip Frame 1
gotoAndStop(_parent.info);
Symbol 660 MovieClip Frame 1
stop();
Symbol 664 MovieClip Frame 1
stop();
Symbol 667 MovieClip Frame 1
stop();
Symbol 667 MovieClip Frame 2
img1.gotoAndStop(info);
img4.gotoAndStop(info);
imga1.gotoAndStop(info);
playSound("jump1");
if (info == 1) {
logonum._visible = true;
} else {
logonum._visible = false;
}
Symbol 667 MovieClip Frame 10
img2.gotoAndStop(info);
playSound("wall1");
Symbol 667 MovieClip Frame 12
playSound("wall2");
Symbol 667 MovieClip Frame 15
playSound("wall1");
Symbol 667 MovieClip Frame 21
img3.gotoAndStop(info);
imga3.gotoAndStop(info);
playSound("jump2");
Symbol 667 MovieClip Frame 37
if (info == 1) {
playSound("combo");
}
Symbol 667 MovieClip Frame 43
stop();
Symbol 727 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.replaycount = 0;
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
}
}
Symbol 744 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.replaycount = 0;
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
}
}
Symbol 748 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.replaycount = 0;
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
}
}
Symbol 760 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
getURL (sponsorurl, "_blank");
}
Symbol 786 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
getURL (walkurl, "_blank");
}
Symbol 792 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
getURL (sponsorurl, "_blank");
}
Symbol 796 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
getURL (devurl, "_blank");
}
Symbol 813 Button
on (rollOver) {
desc._visible = true;
}
on (rollOut) {
desc._visible = false;
}
Symbol 823 Button
on (rollOver) {
_root.play_on.start();
}
on (release) {
getURL ("http://www.silengames.com", "_blank");
_root.play_pre.start();
}
Symbol 839 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
gotoAndPlay (3);
playSound("star");
if (_name == "s3") {
playSound("holy");
}
}
}
};
Symbol 839 MovieClip Frame 13
gotoAndStop (2);
Symbol 847 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
gotoAndPlay (2);
playSound("achi");
}
}
};
Symbol 847 MovieClip Frame 12
stop();
Symbol 852 MovieClip Frame 1
stop();
Symbol 857 Button
on (rollOver) {
playSound("mouseon");
playSound("yeah1");
}
on (release) {
playSound("click");
}
Symbol 861 Button
on (rollOver) {
playSound("mouseon");
playSound("yeah2");
}
on (release) {
playSound("click");
}
Symbol 870 MovieClip Frame 1
stop();
timerx1 = 0;
timerx2 = 0;
timer1 = _root.menuanim1.length;
timer2 = _root.menuanim2.length;
timer = 0;
close = true;
anim = true;
tar = "exit";
gotoAndStop ("exit");
onEnterFrame = function () {
if (close == false) {
if (anim == true) {
if (timerx1 < timer1) {
trace((timerx1 + "--") + timer1);
_yscale = _root.menuanim1[timerx1][0];
_xscale = _root.menuanim1[timerx1][1];
_alpha = _root.menuanim1[timerx1][2];
timerx1++;
}
} else if (_y < 260) {
_y = (_y + 10);
}
} else if (anim == true) {
if (timerx2 < timer2) {
trace((timerx2 + "--") + timer2);
_yscale = _root.menuanim2[timerx2][0];
_xscale = _root.menuanim2[timerx2][1];
_alpha = _root.menuanim2[timerx2][2];
timerx2++;
} else if (_currentframe != tar) {
close = false;
gotoAndStop(tar);
}
} else if (_y < 360) {
_y = (_y + 40);
} else if (_currentframe != tar) {
close = false;
_y = 160;
gotoAndStop(tar);
}
if (_currentframe == 11) {
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 870 MovieClip Frame 2
stop();
_root.hideLogo();
totaltxt.text = _root.totalscore;
back1.gotoAndStop(1);
back2.gotoAndStop(2);
back3.gotoAndStop(3);
stat_star = _root.stat[5];
stat_lvl = _root.stat[4];
i = 1;
while (i <= 6) {
if (stat_star < _root.lvlneed[i]) {
this["need" + i]._visible = true;
this["need" + i].num.text = _root.lvlneed[i];
} else {
this["need" + i]._visible = false;
}
if (_root.lvlmedal[i * 6] > -1) {
this["comp" + i]._visible = true;
} else {
this["comp" + i]._visible = false;
}
i++;
}
i = 1;
while (i <= _root.maxlvl) {
this["l" + i].id = i;
lvlblock = Math.ceil(i / 6);
if (stat_star < _root.lvlneed[lvlblock]) {
this["l" + i]._visible = false;
} else {
this["l" + i]._visible = true;
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.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++;
}
b1.title = "Main Menu";
b2.title = ("Awards " + gachis) + "/54";
b3.title = "Character";
b1.but.onRelease = function () {
_root.openMenu("main");
};
b2.but.onRelease = function () {
_root.openScreen("achi");
};
b3.but.onRelease = function () {
_root.openMenu("char");
};
Symbol 870 MovieClip Frame 11
stop();
ads1.img.img.gotoAndStop(7);
ads1.timer = 40;
_root.showLogo(1);
b1.title = "PLAY";
b2.title = "Awards";
b3.title = "More Games";
b4.title = "Credits";
b5.title = "Ninja Painter 1";
b6.title = "Reset Game";
b7.title = "Host Game";
b1.but.onRelease = function () {
if (_root.plrnum == undefined) {
_root.openMenu("char");
} else {
_root.openScreen("select");
}
};
b2.but.onRelease = function () {
_root.openScreen("achi");
};
b3.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
b4.but.onRelease = function () {
_root.openMenu("credit");
};
b5.but.onRelease = function () {
getURL (np1url);
};
b6.but.onRelease = function () {
_root.openMenu("reset");
};
b7.but.onRelease = function () {
getURL (hosturl, "_blank");
};
Symbol 870 MovieClip Frame 21
stop();
_root.hideLogo();
setStat(9, 1);
_root.initAchi();
b1.title = "Levels";
b2.title = "Main Menu";
b1.but.onRelease = function () {
if (_root.plrnum == undefined) {
_root.openMenu("char");
} else {
_root.openScreen("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 870 MovieClip Frame 31
stop();
setStat(10, 1);
b1.title = "Back to Menu";
b1.but.onRelease = function () {
_root.openMenu("main");
};
Symbol 870 MovieClip Frame 41
function playVoice() {
if (_root.player == _root.player1) {
playSound("yeah1");
} else {
playSound("yeah2");
}
}
stop();
if (_root.lvl > 2) {
ads1.img.img.gotoAndStop(1 + random(7));
do {
ads2.img.img.gotoAndStop(1 + random(7));
} while (ads1.img.img._currentframe == ads2.img.img._currentframe);
ads1.timer = 20;
ads2.timer = 30;
}
scoretxt.text = _root.score;
_root.showLogo(2);
playSound("win");
setTimeout(playVoice, 700);
rectxt._visible = false;
recvase.gotoAndStop(1);
recvase.timer = 0;
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;
recvase.timer = (12 * _root.stars) + 12;
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 <= _root.maxlvl) {
if (_root.lvlmedal[i] > -1) {
stat_lvl++;
if (_root.lvlmedal[i] > 0) {
stat_star = stat_star + _root.lvlmedal[i];
}
}
i++;
}
setStat(4, stat_lvl);
setStat(5, stat_star);
saveStat();
b11._visible = true;
b11.title = "CONTINUE";
b2.title = "SUBMIT";
b3.title = "Levels";
b4.title = "Replay";
b5.title = "Play More Games";
b11.but.onRelease = function () {
_root.nextLevel();
};
b2.but.onRelease = function () {
_root.openScreen("select");
};
b3.but.onRelease = function () {
_root.openScreen("select");
};
b4.but.onRelease = function () {
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
};
b5.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
if (_root.kongapi == true) {
i = 0;
while (i < 9) {
_root.kongsend("stat" + i, _root.stat[i]);
i++;
}
}
Symbol 870 MovieClip Frame 51
function playVoice() {
if (_root.player == _root.player1) {
playSound("no1");
} else {
playSound("no2");
}
}
stop();
ads1.img.img.gotoAndStop(1 + random(7));
do {
ads2.img.img.gotoAndStop(1 + random(7));
} while (ads1.img.img._currentframe == ads2.img.img._currentframe);
ads1.timer = 10;
ads2.timer = 20;
_root.showLogo(3);
playSound("def");
setTimeout(playVoice, 700);
plr.gotoAndStop(_root.plrnum);
b1.title = "TRY AGAIN";
b2.title = "Select Level";
b3.title = "More Games";
b1.but.onRelease = function () {
_root.trans.gotoAndPlay(2);
_root.loadLevel = true;
};
b2.but.onRelease = function () {
_root.openScreen("select");
};
b3.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
Symbol 870 MovieClip Frame 61
stop();
_root.hideLogo();
b1.but.onRelease = function () {
if (_root.plrnum == 2) {
setStat(16, 1);
}
_root.player = _root.player1;
_root.plrnum = 1;
_root.openScreen("select");
};
b2.but.onRelease = function () {
if (_root.plrnum == 1) {
setStat(16, 1);
}
_root.player = _root.player2;
_root.plrnum = 2;
_root.openScreen("select");
};
b3.title = "Back to Menu";
b3.but.onRelease = function () {
_root.openMenu("main");
};
Symbol 870 MovieClip Frame 71
_root.hideLogo();
b1.title = "CONTINUE";
b1.but.onRelease = function () {
_root.openScreen("select");
};
Symbol 870 MovieClip Frame 81
b1.title = "YES";
b2.title = "NO";
b1.but.onRelease = function () {
i = 1;
while (i <= _root.maxlvl) {
_root.my_so.data.lvlmedal[i] = undefined;
_root.lvlmedal[i] = undefined;
_root.my_so.data.lvlrec[i] = 0;
_root.lvlrec[i] = 0;
i++;
}
_root.setGahci();
_root.resetGame();
i = 1;
while (i <= _root.maxlvl) {
_root.lvlmedal[i] = _root.my_so.data.lvlmedal[i];
i++;
}
saveStat();
_root.openMenu("main");
};
b2.but.onRelease = function () {
_root.openMenu("main");
};
Symbol 870 MovieClip Frame 91
stop();
Symbol 891 MovieClip Frame 1
b1.title = "RESUME";
b2.title = "Replay Level";
b3.title = "Quit";
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");
_root.mouseClick = true;
if (_root.trans._currentframe == 1) {
_root.paused = true;
_root.cursor._visible = false;
_root.openScreen("select");
}
};
Symbol 891 MovieClip Frame 2
b1.title = "YES";
b2.title = "NO";
b1.but.onRelease = function () {
playSound("click");
_root.mouseClick = true;
if (_root.trans._currentframe == 1) {
_root.paused = true;
_root.cursor._visible = false;
_root.openScreen("select");
}
};
b2.but.onRelease = function () {
playSound("click");
gotoAndStop (1);
};
Symbol 891 MovieClip Frame 3
img1.stop();
img2.stop();
b1.title = "RESUME";
b1.but.onRelease = function () {
playSound("click");
_root.mouseClick = true;
_root.getPause();
};
Symbol 897 Button
on (rollOver) {
playSound("mouseon");
}
Symbol 905 MovieClip Frame 1
stop();
Symbol 914 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 = "HELP";
ib3.desc.text = "REPLAY";
ib4.desc.text = "PAUSE";
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 919 MovieClip Frame 1
stop();
Symbol 924 MovieClip Frame 1
stop();
Symbol 924 MovieClip Frame 2
play();
Symbol 924 MovieClip Frame 60
_parent.gotoAndStop(1);
Symbol 925 MovieClip Frame 1
stop();
Symbol 925 MovieClip Frame 2
img.img1.txt.text = "Good Combo x" + combo;
img.img2.txt.text = "+" + score;
img.gotoAndPlay(2);
Symbol 925 MovieClip Frame 3
img.img1.txt.text = "Great Combo x" + combo;
img.img2.txt.text = "+" + score;
img.gotoAndPlay(2);
Symbol 925 MovieClip Frame 4
img.img1.txt.text = "Amazing Combo x" + combo;
img.img2.txt.text = "+" + score;
img.gotoAndPlay(2);
Symbol 925 MovieClip Frame 5
img.img1.txt.text = "Unreal Combo x" + combo;
img.img2.txt.text = "+" + score;
img.gotoAndPlay(2);
Symbol 929 MovieClip Frame 1
stop();
Symbol 929 MovieClip Frame 7
trace("tar=" + _root.opt.tar);
if (_root.loadLevel == true) {
_root.createLevel();
_root.loadLevel = false;
} else {
_root.clearLevel();
}
Symbol 930 MovieClip Frame 1
stop();
Symbol 935 MovieClip Frame 1
stop();
_visible = false;
Symbol 935 MovieClip Frame 2
_visible = true;
playSound("paint");
Symbol 935 MovieClip Frame 11
playSound("achi");
Symbol 935 MovieClip Frame 31
desctxt.text = desc;