STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
228073
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2560 · P5120

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/80781977?noj=FRM80781977-29DC" width="1" height="1"></div>

runic-drops.swf

This is the info page for
Flash #127166

(Click the ID number above for more basic data on this flash file.)


ActionScript [AS1/AS2]
Combined Code
movieClip 8 particle2 { } movieClip 10 particle1 { } frame 1 { function initKeyMapper() { _root.keylistener.onEnterFrame = function () { kl = 0; while (kl < _root.keylist.length) { if (Key.isDown(_root.keylist[kl])) { if (!_root.keymap[kl][0]) { _root.keymap[kl][1] = true; } else { _root.keymap[kl][1] = false; } _root.keymap[kl][0] = true; } else { _root.keymap[kl][0] = false; _root.keymap[kl][1] = false; } ++kl; } }; onMouseDown = function () { _root.mousebtn = true; }; onMouseUp = function () { _root.mousebtn = false; }; } function playMusic(musicname, vol, loop) { if (_root.musicenabled) { if (vol < 0) { vol = 100; } _root.musicpos = 0; _root.musicloop = loop ? loop : 2000000; delete _root.jukebox.onEnterFrame; _root.music.stop(); _root.music.attachSound(musicname); _root.music.setVolume(vol); _root.music.start(0, _root.musicloop); } } function pauseMusic() { if (_root.musicpos && !_root.jukebox.onEnterFrame) { _root.music.start(Math.round(_root.musicpos / 1000), _root.musicloop); _root.musicpos = 0; } else { _root.musicpos = _root.music.position; _root.music.stop(); } } function stopMusic() { _root.music.stop(); } function fadeMusic(limit) { _root.jukebox.cframe = limit; _root.jukebox.climit = limit; _root.jukebox.ovol = _root.music.getVolume(); _root.jukebox.onEnterFrame = function () { if (this.cframe >= 0) { _root.music.setVolume((this.cframe / this.climit) * this.ovol); --this.cframe; } else { delete this.onEnterFrame; } }; } function playSound(soundname, vol) { if (_root.soundenabled) { sfx = new Sound(); sfx.attachSound(soundname); sfx.setVolume(vol); sfx.start(); } } function emptyMenu() { _root.menu = new ContextMenu(); _root.menu.hideBuiltInItems(); } function Overlap(clip1, clip2) { if (clip1._x + clip1._width - 1 >= clip2._x && clip1._x <= clip2._x + clip2._width - 1 && clip1._y + clip1._height - 1 >= clip2._y && clip1._y <= clip2._y + clip2._height - 1) { return true; } else { return false; } } function willOverlap(clip1, clip2, speedx, speedy) { if (clip1._x + clip1._width - 1 + speedx >= clip2._x && clip1._x + speedx <= clip2._x + clip2._width - 1 && clip1._y + clip1._height - 1 + speedy >= clip2._y && clip1._y + speedy <= clip2._y + clip2._height - 1) { return true; } else { return false; } } function distanceBetween(clip1, clip2, axis) { dist = 0; if (axis) { if (clip1._y > clip2._y + clip2._height) { return clip2._y + clip2._height - clip1._y; } else { if (clip2._y > clip1._y + clip1._height) { return clip2._y - clip1._y - clip1._height; } } return dist; } if (clip1._x > clip2._x + clip2._width) { return clip2._x + clip2._width - clip1._x; return dist; } if (clip2._x > clip1._x + clip1._width) { return clip2._x - clip1._x - clip1._width; } return dist; } function arrayPos(curarray, element) { pos = -1; i = curarray.length - 1; while (i >= 0) { if (element == curarray[i]) { pos = i; } --i; } return pos; } function chopArray(oldarray, elem) { newarray = new Array(); i = 0; while (i < oldarray.length) { if (i != elem) { newarray.push(oldarray[i]); } ++i; } return newarray; } function forceLength(string, force, char) { k = string.length; while (k < force) { string = char + string; ++k; } return string; } function calcSpeed(degree) { hspeed = Math.sin(degree * Math.PI / 180); vspeed = -Math.cos(degree * Math.PI / 180); return new Array(hspeed, vspeed); } function addDegree(degree, addition) { rdeg = degree + addition; while (rdeg > 180) { rdeg -= 360; } while (rdeg < -180) { rdeg += 360; } return rdeg; } function calcDegree(posx, posy) { hypo = Math.sqrt(Math.pow(posx, 2) + Math.pow(posy, 2)); rawangle = Math.acos(posx / hypo) * 180 / Math.PI; angle = 0; if (posx > 0) { if (posy > 0) { angle = rawangle + 90; } else { if (posy < 0) { angle = 90 - rawangle; } else { angle = 90; } } return angle; } if (posx < 0) { if (posy > 0) { angle = rawangle - 270; } else { if (posy < 0) { angle = 90 - rawangle; } else { angle = -90; } } return angle; } if (posy > 0) { angle = 180; return angle; } angle = 0; return angle; } function shortestRotation(trot, crot) { if (trot < crot) { mp = trot + 180 + (180 - crot); pp = crot - trot; if (mp >= pp) { return pp; } else { return -mp; } } else { if (trot > crot) { mp = crot + 180 + (180 - trot); pp = trot - crot; if (mp >= pp) { return -pp; } else { return mp; } } else { return 0; } } } function customCurve(cframe, param1, param2) { timeper = 1 - Math.pow(cframe, param1); distance = 1 - Math.pow(timeper, param2); return distance; } function roundCurve(cframe) { timeper = 1 - Math.pow(cframe, 0.5); distance = 1 - Math.pow(timeper, 2); return distance; } function paraCurve(cframe) { distance = 1 - Math.pow(cframe * 2 - 1, 2); return distance; } function scaleRatio(ratio, rstart, rend) { return ratio * (rend - rstart) + rstart; } function getRandom(min, max) { var v1 = Math.floor(Math.random() * (max - min + 1)) + min; return v1; } function splitColor(color) { colorarray = new Array(3); colorarray[0] = Math.floor(color / 65536); colorarray[1] = Math.floor((color - colorarray[0] * 65536) / 256); colorarray[2] = color - colorarray[0] * 65536 - colorarray[1] * 256; return colorarray; } function mixColors(color1, color2, ratio) { carray1 = splitColor(color1); carray2 = splitColor(color2); colormix = Math.ceil(carray1[0] * (1 - ratio) + carray2[0] * ratio) * 65536 + Math.ceil(carray1[1] * (1 - ratio) + carray2[1] * ratio) * 256 + Math.ceil(carray1[2] * (1 - ratio) + carray2[2] * ratio); return colormix; } function clearMovieClip(mc) { for (mcstr in mc) { mc[mcstr].removeMovieClip(); } mc.clear(); } function drawMovieClip(container, mc, mcindex, posx, posy, frame) { container.attachMovie(mc, mc + mcindex, container.getNextHighestDepth(), {'_x': posx, '_y': posy}); container[mc + mcindex].gotoAndStop(frame); return container[mc + mcindex]; } function formatNumber(num, maxdec) { rawstr = num.toString(); decstr = ''; numsplit = rawstr.split('.'); if (numsplit.length != 2) { missing = maxdec; } else { if (numsplit[1].length < maxdec) { decstr = numsplit[1]; missing = maxdec - numsplit[1].length; } else { ch = 0; while (ch < maxdec) { decstr += numsplit[1].charAt(ch); ++ch; } missing = 0; } } ch = 0; while (ch < missing) { decstr += '0'; ++ch; } if (decstr) { decstr = '.' + decstr; } numstr = numsplit[0] + decstr; return numstr; } function initGame(curobj) { initVariables(curobj); curobj.curstate = 0; curobj.nextstate = 0; curobj.counter = 0; curobj.keycounter = 5; curobj.keymax = 5; curobj.createEmptyMovieClip('canvas', curobj.getNextHighestDepth()); curobj.attachMovie('game_mask', 'canvas_mask', curobj.getNextHighestDepth(), {'_x': -5, '_y': -5}); curobj.canvas.setMask(curobj.canvas_mask); curobj.canvas.bcounter = 0; curobj.createEmptyMovieClip('drop', curobj.getNextHighestDepth()); curobj.attachMovie('game_mask', 'drop_mask', curobj.getNextHighestDepth(), {'_x': -5, '_y': -5}); curobj.drop.setMask(curobj.drop_mask); curobj.drop.px = bubblesize * 3; curobj.drop.py = bubblesize * -2; curobj.drop.prevpx = curobj.drop.px; curobj.drop.prevpy = curobj.drop.py; curobj.drop.curframe = 0; curobj.drop.maxframes = 15; curobj.drop.onEnterFrame = function () { smoothMovement(this, 0); }; curobj.createEmptyMovieClip('effects', curobj.getNextHighestDepth()); curobj.attachMovie('game_mask', 'effects_mask', curobj.getNextHighestDepth(), {'_x': -5, '_y': -5}); curobj.effects.setMask(curobj.effects_mask); curobj.effects.ecounter = 0; curobj.gotoAndStop(gametype); switch (gametype) { case 2: if (puzzlelevel) { curobj.txtLevel.text = puzzlelevel; curobj._parent.game_bg.gotoAndStop(puzzlelevel + 10); } else { curobj.txtLevel.text = 'Editor'; curobj._parent.game_bg.gotoAndStop('editor'); } diffmulti = 0; curobj.createEmptyMovieClip('nextdrops', curobj.getNextHighestDepth()); curobj.nextdrops._x = 290; curobj.nextdrops._y = 90; setBubbleSelection(curobj, levels[puzzlelevel][0]); setBubbleArray(curobj, levels[puzzlelevel][1]); break; default: switch (difficulty) { case 1: diffmulti = 2; break; case 2: diffmulti = 4; break; default: diffmulti = 1; } curobj.nextdrops.gotoAndStop('end'); curobj.level_meter.actpos = 0; curobj.level_meter.onEnterFrame = function () { curpos = levelmeter / levelup; this.actpos += (curpos - this.actpos) / 3; this.bar._width = this.actpos * 100; this.ball._x = this.actpos * 100 + 10; }; if (handicap) { hinc = 0; hi = 0; while (hi < handicap) { if (hi >= handicap / 2) { initype = 3; } else { initype = 4; } line = 0; while (line < canvaswidth) { addBubble(curobj.canvas, 'ini' + hinc++, bubblesize * line, bubblesize * (11 - hi), 0, initype, 0, 0); ++line; } ++hi; } } } curobj.onEnterFrame = function () { curobj.txtScore.text = score; if (gametype == 1) { curobj.txtLevel.text = level + 1; } curobj.txtBubbles.text = bubbles; if (gamestarted) { if (keymap[7][1] && curobj.curstate != -1) { if (canmove) { curobj.canvas_mask._x = 1000; curobj.drop_mask._x = 1000; curobj.effects_mask._x = 1000; curobj.game_paused._alpha = 100; gamepaused = true; canmove = false; } else { curobj.canvas_mask._x = -5; curobj.drop_mask._x = -5; curobj.effects_mask._x = -5; curobj.game_paused._alpha = 0; gamepaused = false; canmove = true; } } else { if (keymap[8][1] && gamepaused) { curobj.game_paused._alpha = 0; gamepaused = false; canmove = false; curobj.curstate = -1; if (gametype == 2) { curobj._parent.gotoAndPlay('gamelose'); } else { curobj._parent.gotoAndPlay('gameover'); } } else { if (keymap[9][1] && gametype == 2 && gamepaused) { curobj._parent.restart = true; curobj.game_paused._alpha = 0; gamepaused = false; canmove = false; curobj.curstate = -1; curobj._parent.gotoAndPlay('gamerestart'); } } } if (canmove) { if (gametype == 2 && curobj.curstate == 1) { if (keymap[0][1]) { if (curobj.drops_selector.dropx < 1 && curobj.drops_selector.selarray[curobj.drops_selector.dropx + 1][curobj.drops_selector.dropy]) { ++curobj.drops_selector.dropx; curobj.drops_selector.px += 70; _root.playSound('flip.wav', 100); } } else { if (keymap[1][1]) { if (curobj.drops_selector.dropy < 2 && curobj.drops_selector.selarray[curobj.drops_selector.dropx][curobj.drops_selector.dropy + 1]) { ++curobj.drops_selector.dropy; curobj.drops_selector.py += 70; _root.playSound('flip.wav', 100); } } else { if (keymap[2][1]) { if (curobj.drops_selector.dropx > 0 && curobj.drops_selector.selarray[curobj.drops_selector.dropx - 1][curobj.drops_selector.dropy]) { --curobj.drops_selector.dropx; curobj.drops_selector.px -= 70; _root.playSound('flip.wav', 100); } } else { if (keymap[3][1]) { if (curobj.drops_selector.dropy > 0 && curobj.drops_selector.selarray[curobj.drops_selector.dropx][curobj.drops_selector.dropy - 1]) { --curobj.drops_selector.dropy; curobj.drops_selector.py -= 70; _root.playSound('flip.wav', 100); } } else { if (keymap[6][1]) { curobj.selecteddrop = curobj.drops_selector.selarray[curobj.drops_selector.dropx][curobj.drops_selector.dropy]; curobj.nextdrops['drops' + curobj.selecteddrop].disapear = true; curobj.drops_selector.selarray[curobj.drops_selector.dropx][curobj.drops_selector.dropy] = 0; arrangeBubbleSelection(curobj); } } } } } } else { if (curobj.keycounter < curobj.keymax) { ++curobj.keycounter; } if (curobj.curstate == 2 || curobj.nextstate == 2) { if (keymap[2][0] && curobj.keycounter == curobj.keymax || keymap[2][1]) { curobj.keycounter = 0; if (curobj.drop.px && !checkBubbleCollision(curobj, -1, 0)) { curobj.drop.px -= bubblesize; } } if (keymap[0][0] && curobj.keycounter == curobj.keymax || keymap[0][1]) { curobj.keycounter = 0; if (curobj.drop.px < gamewidth - bubblesize && !checkBubbleCollision(curobj, 1, 0)) { curobj.drop.px += bubblesize; } } if (keymap[4][1]) { rotateDroppings(curobj, -1); if (checkBubbleCollision(curobj, 0, 0)) { rotateDroppings(curobj, 1); } else { _root.playSound('flip.wav', 100); } } if (keymap[5][1] || keymap[3][1]) { rotateDroppings(curobj, 1); if (checkBubbleCollision(curobj, 0, 0)) { rotateDroppings(curobj, -1); } else { _root.playSound('flip.wav', 100); } } } if (keymap[1][0]) { if (curobj.nextstate == 2 && curobj.curstate == 0) { curobj.curstate = 2; curobj.nextstate = 0; } gamespeed = 0; } else { gamespeed = levelspeed[level]; } curobj.drop.maxframes = gamespeed / 2; } switch (curobj.curstate) { case 0: if (!curobj.nextstate) { curobj.curstate = 1; } else { if (curobj.counter) { --curobj.counter; } else { curobj.curstate = curobj.nextstate; if (gametype == 2 && curobj.curstate == 1) { if (!curobj.drops_selector.selarray[0][0]) { if (checkEmptyTable(curobj)) { curobj.curstate = -1; curobj._parent.gotoAndPlay('gamewin'); if (levelwon < puzzlelevel) { levelwon = puzzlelevel; } puzzlewon = true; _root.saveSharedObject(); } else { curobj.curstate = -1; curobj._parent.gotoAndPlay('gamelose'); } } else { if (checkTop(curobj)) { curobj.curstate = -1; curobj._parent.gotoAndPlay('gamelose'); } else { curobj.drops_selector.play(); } } } } } break; case 1: if (gametype == 1) { if (checkTop(curobj)) { curobj.curstate = -1; curobj._parent.gotoAndPlay('gameover'); } else { combo = 0; clearMovieClip(curobj.drop); curobj.drop._x = Math.round((canvaswidth / 2 - 1) * bubblesize); curobj.drop.px = curobj.drop._x; curobj.drop._y = bubblesize * -2; curobj.drop.py = curobj.drop._y; newdrops = getNewDrops(); bcounter = 0; if (nextdrops[0][0][0] || nextdrops[0][0][1]) { actdrops = nextdrops; } else { actdrops = getNewDrops(); } nextdrops = getNewDrops(); clearMovieClip(curobj.nextdrops.nextdrops); curobj.nextdrops.gotoAndPlay('start'); ncounter = 0; px = 0; while (px < 2) { py = 0; while (py < 2) { if (newdrops[px][py][0] || newdrops[px][py][1]) { addBubble(curobj.drop, 'd_' + bcounter++, px * bubblesize, py * bubblesize, actdrops[px][py][0], actdrops[px][py][1], 5, 0); addBubble(curobj.nextdrops.nextdrops, 'n_' + ncounter++, px * bubblesize, py * bubblesize, nextdrops[px][py][0], nextdrops[px][py][1], 1, 0); } ++py; } ++px; } curobj.curstate = 2; } } else { if (gametype == 2 && curobj.selecteddrop) { combo = 0; bcounter = 0; clearMovieClip(curobj.drop); curobj.drop._x = Math.round((canvaswidth / 2 - 1) * bubblesize); curobj.drop.px = curobj.drop._x; curobj.drop._y = bubblesize * -2; curobj.drop.py = curobj.drop._y; px = 0; while (px < 2) { py = 0; while (py < 2) { var v2 = levels[puzzlelevel][0][curobj.selecteddrop - 1][py][px]; var v4 = 0; var v3 = 0; if (v2 >= 20) { v3 = v2 - 20; } else { if (v2 >= 10) { v4 = v2 - 10; v3 = 1; } else { v4 = v2; } } if (v4 || v3) { addBubble(curobj.drop, 'd_' + bcounter++, px * bubblesize, py * bubblesize, v4, v3, 5, 0); } ++py; } ++px; } curobj.curstate = 2; curobj.selecteddrop = 0; } } break; case 2: collision = checkBubbleCollision(curobj, 0, 1); if (collision) { pindex = 0; while (pindex < 4) { curdrop = curobj.drop['d_' + pindex]; if (curdrop) { newx = curdrop.px + curobj.drop.px; newy = curdrop.py + curobj.drop.py; addBubble(curobj.canvas, 'b_' + curobj.canvas.bcounter, newx, newy, curdrop.btype, curdrop.bmod, 5, 1); ++curobj.canvas.bcounter; } ++pindex; } clearMovieClip(curobj.drop); curobj.curstate = 4; } else { curobj.drop.py += bubblesize; pauseAndGo(curobj, gamespeed, 2); } break; case 3: break; case 4: mustdrop = false; hasdropped = false; do { mustdrop = false; bubbletable = getBubbleTable(curobj); px = 0; while (px < gamewidth / bubblesize) { py = 0; while (py < gameheight / bubblesize + 1) { if (bubbletable[px][py] && (py < gameheight / bubblesize - 1 || py == gameheight / bubblesize)) { if (!bubbletable[px][py + 1] && py != gameheight / bubblesize || !bubbletable[px][0] && py == gameheight / bubblesize) { mustdrop = true; hasdropped = true; curobj.canvas[bubbletable[px][py]].py += bubblesize; } } ++py; } ++px; } } while (mustdrop); if (hasdropped) { _root.playSound('drop.wav', 100); pauseAndGo(curobj, 20, 6); } else { pauseAndGo(curobj, 5, 6); } break; case 5: break; case 6: destable = new Array(gamewidth / bubblesize); px = 0; while (px < gamewidth / bubblesize) { destable[px] = new Array(gameheight / bubblesize); py = 0; while (py < gameheight / bubblesize) { destable[px][py] = false; ++py; } ++px; } px = 0; while (px < 10) { tokenlist[px] = false; ++px; } tokenfound = false; bubbletable = getBubbleTable(curobj); px = 0; while (px < gamewidth / bubblesize) { py = 0; while (py < gameheight / bubblesize) { bubblemc = bubbletable[px][py]; if (bubblemc) { curmod = curobj.canvas[bubblemc].bmod; curtype = curobj.canvas[bubblemc].btype; if (curtype) { if (px + 1 < gamewidth / bubblesize && px - 1 >= 0 && bubbletable[px - 1][py] && bubbletable[px + 1][py]) { prevbubble = curobj.canvas[bubbletable[px - 1][py]]; nextbubble = curobj.canvas[bubbletable[px + 1][py]]; prevtype = prevbubble.btype; prevmod = prevbubble.bmod; nexttype = nextbubble.btype; nextmod = nextbubble.bmod; if (curtype == prevtype && curtype == nexttype) { if (curmod == 1 || prevmod == 1 || nextmod == 1) { tokenfound = true; tokenlist[curtype - 1] = true; } destable[px][py] = true; destable[px - 1][py] = true; destable[px + 1][py] = true; } } if (py + 1 < gameheight / bubblesize && py - 1 >= 0 && bubbletable[px][py - 1] && bubbletable[px][py + 1]) { prevbubble = curobj.canvas[bubbletable[px][py - 1]]; nextbubble = curobj.canvas[bubbletable[px][py + 1]]; prevtype = prevbubble.btype; prevmod = prevbubble.bmod; nexttype = nextbubble.btype; nextmod = nextbubble.bmod; if (curtype == prevtype && curtype == nexttype) { if (curmod == 1 || prevmod == 1 || nextmod == 1) { tokenfound = true; tokenlist[curtype - 1] = true; } destable[px][py] = true; destable[px][py - 1] = true; destable[px][py + 1] = true; } } } } ++py; } ++px; } destroyed = false; bubblenum = 0; whitenum = 0; icenum = 0; px = 0; while (px < gamewidth / bubblesize) { py = 0; while (py < gameheight / bubblesize) { if (destable[px][py]) { bubbletable = getBubbleTable(curobj); bcolor = curobj.canvas[bubbletable[px][py]].btype; breakables = getBreakables(curobj, px, py, bubbletable); whites = getWhites(curobj, px, py, bubbletable); for (bi in breakables) { curclip = curobj.canvas[breakables[bi]]; iceBurst(curobj.effects, curclip.px + bubblesize / 2, curclip.py + bubblesize / 2); curclip.removeMovieClip(); ++icenum; } for (wi in whites) { curclip = curobj.canvas[whites[wi]]; curobj.effects.attachMovie('white_recolor', 'effect' + curobj.effects.ecounter++, curobj.effects.getNextHighestDepth(), {'_x': curclip.px, '_y': curclip.py}); curclip.btype = bcolor; curclip.bmod = 0; curclip.bubble.gotoAndStop(bcolor); ++whitenum; } curclip = curobj.canvas[bubbletable[px][py]]; if (curclip.bmod == 1) { curobj.effects.attachMovie('token_burst', 'effect' + curobj.effects.ecounter, curobj.effects.getNextHighestDepth(), {'_x': px * bubblesize, '_y': py * bubblesize}); curobj.effects['effect' + curobj.effects.ecounter].symbolno = curclip.btype; ++curobj.effects.ecounter; } else { colorBurst(curobj.effects, px * bubblesize + bubblesize / 2, py * bubblesize + bubblesize / 2, bcolor); } curclip.removeMovieClip(); ++bubblenum; destable[px][py] = false; destroyed = true; } ++py; } ++px; } if (destroyed) { _root.playSound('burst.wav', 100); if (icenum) { _root.playSound('ice.wav', 100); } if (whitenum) { _root.playSound('white.wav', 100); } ++combo; addScore(bubblenum, icenum, whitenum); incrementLevelMeter(bubblenum, curobj); if (combo >= 2) { curobj.attachMovie('combo_anim', 'combo_anim', curobj.getNextHighestDepth(), {'_x': gamewidth / 2, '_y': gameheight / 2}); curobj.combo_anim.combo.txtCombo.text = combo; if (combo > 8) { combosound = 8; } else { combosound = combo; } _root.playSound('combo' + combosound + '.wav', 100); } if (tokenfound) { _root.playSound('rune.wav', 100); pauseAndGo(curobj, 15, 7); } else { pauseAndGo(curobj, 15, 4); } } else { pauseAndGo(curobj, 0, 1); } break; case 7: recoltable = new Array(); destroyed = false; bubblenum = 0; whitenum = 0; icenum = 0; px = 0; while (px < gamewidth / bubblesize) { py = 0; while (py < gameheight / bubblesize) { bubbletable = getBubbleTable(curobj); curbubble = curobj.canvas[bubbletable[px][py]]; if (curbubble) { curtype = curbubble.btype; curmod = curbubble.bmod; if (curtype && curmod <= 1) { if (tokenlist[curtype - 1]) { destroyed = true; breakables = getBreakables(curobj, px, py, bubbletable); whites = getWhites(curobj, px, py, bubbletable); for (bi in breakables) { curclip = curobj.canvas[breakables[bi]]; iceBurst(curobj.effects, curclip.px + bubblesize / 2, curclip.py + bubblesize / 2); curclip.removeMovieClip(); ++icenum; } for (wi in whites) { recoltable.push(new Array(whites[wi], curobj.canvas[bubbletable[px][py]].btype)); ++whitenum; } curclip = curobj.canvas[bubbletable[px][py]]; colorBurst(curobj.effects, curclip.px + bubblesize / 2, curclip.py + bubblesize / 2, curtype); curclip.removeMovieClip(); ++bubblenum; } } } ++py; } ++px; } tokenlist = new Array(10); px = 0; while (px < 10) { tokenlist[px] = false; ++px; } mci = 0; while (mci < recoltable.length) { curclip = curobj.canvas[recoltable[mci][0]]; curobj.effects.attachMovie('white_recolor', 'effect' + curobj.effects.ecounter++, curobj.effects.getNextHighestDepth(), {'_x': curclip.px, '_y': curclip.py}); bcolor = recoltable[mci][1]; curclip.btype = bcolor; curclip.bmod = 0; curclip.bubble.gotoAndStop(bcolor); ++mci; } recoltable = new Array(); addScore(bubblenum, icenum, whitenum); incrementLevelMeter(bubblenum, curobj); if (destroyed) { _root.playSound('burst.wav', 100); if (icenum) { _root.playSound('ice.wav', 100); } if (whitenum) { _root.playSound('white.wav', 100); } pauseAndGo(curobj, 15, 4); } else { curobj.curstate = 4; } } } checkAchievements(curobj); } }; } function initVariables(curobj) { clearMovieClip(curobj); score = 0; bubbles = 0; combo = 0; gamespeed = 0; level = startlevel; levelmeter = 0; canmove = true; gamestarted = false; puzzlewon = false; gamepaused = false; px = 0; while (px < 10) { tokenlist[px] = false; ++px; } tokenfound = false; px = 0; while (px < 2) { py = 0; while (py < 2) { nextdrops[px][py] = new Array(0, 0); ++py; } ++px; } } function addScore(bubblenum, icenum, whitenum) { score += diffmulti * (levelbonus[level] * (combo * (bubblenum * bubblescore + whitenum * whitescore + icenum * icescore))); bubbles += bubblenum; } function incrementLevelMeter(bubblenum, curobj) { if (gametype == 1 && level < levelspeed.length - 1) { levelinc = false; levelmeter += bubblenum; while (levelmeter >= levelup) { levelinc = true; levelmeter -= levelup; ++level; tokenBurst(curobj, 355, 115); } if (level >= levelspeed.length - 1) { level = levelspeed.length - 1; levelmeter = levelup; } if (levelinc) { _root.playSound('levelup.wav', 100); } } } function getNewDrops() { newdrops = new Array(2); px = 0; while (px < 2) { newdrops[px] = new Array(2); py = 0; while (py < 2) { if (!(px == 1 && py == 0)) { bubbletype = getRandom(1, difficulty + 3); modperc = getRandom(1, 100); bubblemod = 0; switch (difficulty) { case 0: if (modperc >= 0 && modperc < 5) { bubblemod = 1; } else { if (modperc >= 10 && modperc < 13) { bubblemod = 2; } else { if (modperc >= 30 && modperc < 33) { bubblemod = 3; } } } break; case 1: if (modperc >= 0 && modperc < 3) { bubblemod = 1; } else { if (modperc >= 10 && modperc < 18) { bubblemod = 2; } else { if (modperc >= 30 && modperc < 38) { bubblemod = 3; } } } break; case 2: if (modperc >= 0 && modperc < 2) { bubblemod = 1; } else { if (modperc >= 10 && modperc < 25) { bubblemod = 2; } else { if (modperc >= 30 && modperc < 45) { bubblemod = 3; } } } } if (bubblemod > 1) { bubbletype = 0; } newdrops[px][py] = new Array(bubbletype, bubblemod); } ++py; } ++px; } return newdrops; } function addBubble(curclip, bubblename, bx, by, btype, bmod, maxframes, anim) { curclip.attachMovie('bubble_anim', bubblename, curclip.getNextHighestDepth(), {'_x': bx, '_y': by, '_width': bubblesize, '_height': bubblesize}); newbubble = curclip[bubblename]; if (bmod > 1) { gotoframe = 20 + bmod; } else { if (bmod == 1) { gotoframe = 10 + btype; } else { gotoframe = btype; } } newbubble.bubble.gotoAndStop(gotoframe); newbubble.btype = btype; newbubble.bmod = bmod; newbubble.px = bx; newbubble.py = by; newbubble.curframe = 0; newbubble.maxframes = maxframes; newbubble.anim = anim; newbubble.onEnterFrame = function () { smoothMovement(this, this.anim); }; } function getBubbleTable(curobj) { btable = new Array(gamewidth / bubblesize); btx = 0; while (btx < gamewidth / bubblesize) { btable[btx] = new Array(gameheight / bubblesize + 1); bty = 0; while (bty < gameheight / bubblesize + 1) { btable[btx][bty] = null; ++bty; } ++btx; } for (mcb in curobj.canvas) { curx = Math.round(curobj.canvas[mcb].px / bubblesize); cury = Math.round(curobj.canvas[mcb].py / bubblesize); if (cury == -1) { btable[curx][gameheight / bubblesize] = mcb; } else { btable[curx][cury] = mcb; } } return btable; } function smoothMovement(curclip, movetype) { if (curclip._x != curclip.px || curclip._y != curclip.py) { if (curclip.curframe >= curclip.maxframes) { curclip._x = curclip.px; curclip._y = curclip.py; curclip.curframe = 0; } else { switch (movetype) { case 1: frameratio = customCurve(curclip.curframe / curclip.maxframes, 2, 0.5); curclip._x += (curclip.px - curclip._x) * frameratio; curclip._y += (curclip.py - curclip._y) * frameratio; ++curclip.curframe; if (curclip.curframe >= curclip.maxframes) { curclip.gotoAndPlay('start'); } break; case 2: curclip._x += (curclip.px - curclip._x) / 2; curclip._y += (curclip.py - curclip._y) / 2; break; default: curclip._x += (curclip.px - curclip._x) / 3; curclip._y += (curclip.py - curclip._y) / 3; } } } else { curclip.curframe = 0; } } function checkBubbleCollision(curobj, posx, posy) { collision = false; absx = curobj.drop.px; absy = curobj.drop.py; bci = 0; while (bci < 4) { for (mc in curobj.canvas) { canx = curobj.canvas[mc].px; cany = curobj.canvas[mc].py; dropx = curobj.drop['d_' + bci].px + absx + posx * bubblesize; dropy = curobj.drop['d_' + bci].py + absy + posy * bubblesize; if (canx == dropx && cany == dropy || dropx < 0 || dropx > gamewidth - bubblesize || dropy > gameheight - bubblesize) { collision = true; } } ++bci; } return collision; } function checkTop(curobj) { dropxpos = Math.round((canvaswidth / 2 - 1) * bubblesize); collision = false; for (mc in curobj.canvas) { xpos = curobj.canvas[mc].px; ypos = curobj.canvas[mc].py; if (ypos == 0 && (xpos == dropxpos || xpos == dropxpos + bubblesize)) { collision = true; } } return collision; } function rotateDroppings(curobj, rot) { rot = Math.round(rot); while (rot) { if (rot > 0) { bindex = 0; while (bindex < 4) { if (curobj.drop['d_' + bindex].px) { if (curobj.drop['d_' + bindex].py) { curobj.drop['d_' + bindex].px -= bubblesize; } else { curobj.drop['d_' + bindex].py += bubblesize; } } else { if (curobj.drop['d_' + bindex].py) { curobj.drop['d_' + bindex].py -= bubblesize; } else { curobj.drop['d_' + bindex].px += bubblesize; } } ++bindex; } --rot; } else { if (rot < 0) { bindex = 0; while (bindex < 4) { if (curobj.drop['d_' + bindex].px) { if (curobj.drop['d_' + bindex].py) { curobj.drop['d_' + bindex].py -= bubblesize; } else { curobj.drop['d_' + bindex].px -= bubblesize; } } else { if (curobj.drop['d_' + bindex].py) { curobj.drop['d_' + bindex].px += bubblesize; } else { curobj.drop['d_' + bindex].py += bubblesize; } } ++bindex; } ++rot; } } } } function pauseAndGo(curobj, frames, nextstate) { curobj.curstate = 0; curobj.nextstate = nextstate; curobj.counter = frames; } function getBreakables(curobj, bbx, bby, bubbletable) { breakables = new Array(); if (bbx > 0) { curclip = curobj.canvas[bubbletable[bbx - 1][bby]]; if (curclip && curclip.bmod == 3) { breakables.push(bubbletable[bbx - 1][bby]); } } if (bbx < gamewidth / bubblesize - 1) { curclip = curobj.canvas[bubbletable[bbx + 1][bby]]; if (curclip && curclip.bmod == 3) { breakables.push(bubbletable[bbx + 1][bby]); } } if (bby > 0) { curclip = curobj.canvas[bubbletable[bbx][bby - 1]]; if (curclip && curclip.bmod == 3) { breakables.push(bubbletable[bbx][bby - 1]); } } if (bby < gameheight / bubblesize - 1) { curclip = curobj.canvas[bubbletable[bbx][bby + 1]]; if (curclip && curclip.bmod == 3) { breakables.push(bubbletable[bbx][bby + 1]); } } return breakables; } function getWhites(curobj, bwx, bwy, bubbletable) { whites = new Array(); curbubble = curobj.canvas[bubbletable[bwx][bwy]]; if (curbubble) { if (bwx > 0) { curclip = curobj.canvas[bubbletable[bwx - 1][bwy]]; if (curclip && curclip.bmod == 2) { whites.push(bubbletable[bwx - 1][bwy]); } } if (bwx < gamewidth / bubblesize - 1) { curclip = curobj.canvas[bubbletable[bwx + 1][bwy]]; if (curclip && curclip.bmod == 2) { whites.push(bubbletable[bwx + 1][bwy]); } } if (bwy > 0) { curclip = curobj.canvas[bubbletable[bwx][bwy - 1]]; if (curclip && curclip.bmod == 2) { whites.push(bubbletable[bwx][bwy - 1]); } } if (bwy < gameheight / bubblesize - 1) { curclip = curobj.canvas[bubbletable[bwx][bwy + 1]]; if (curclip && curclip.bmod == 2) { whites.push(bubbletable[bwx][bwy + 1]); } } } return whites; } function colorBurst(partmc, xpos, ypos, partcol) { particleBurst(partmc, xpos, ypos, ['particle2', 20, partcol], ['particle1', 20, 0], [1, 10], 15); } function iceBurst(partmc, xpos, ypos) { particleBurst(partmc, xpos, ypos, ['particle3', 10, 0], ['particle1', 10, 0], [1, 10], 15); } function tokenBurst(partmc, xpos, ypos) { particleBurst(partmc, xpos, ypos, ['', 0, 0], ['particle1', 20, 0], [1, 10], 15); } function multiBurst(partmc, xpos, ypos) { particleBurst(partmc, xpos, ypos, ['particle_multi', 20, 0], ['particle1', 20, 0], [1, 10], 15); } function particleBurst(partmc, xpos, ypos, part1, part2, speed, framelen) { var v5 = 0; while (v5 < part1[1] + part2[1]) { var v7 = getRandom(-180, 180); var v8 = calcSpeed(v7); var v4; if (v5 >= part1[1]) { v4 = part2; } else { v4 = part1; } if (partmc.ecounter == undefined) { partmc.ecounter = 0; } partmc.attachMovie(v4[0], v4[0] + partmc.ecounter, partmc.getNextHighestDepth()); var v2 = partmc[v4[0] + partmc.ecounter]; if (v4[2]) { v2.gotoAndStop(v4[2]); } v2._x = xpos; v2._y = ypos; v2._rotation = v7; v2.xspeed = v8[0] * getRandom(speed[0], speed[1]); v2.yspeed = v8[1] * getRandom(speed[0], speed[1]); v2.maxframe = framelen; v2.curframe = 0; v2.onEnterFrame = function () { this._x += this.xspeed; this._y += this.yspeed; this._xscale = (1 - this.curframe / this.maxframe) * 100; this._yscale = (1 - this.curframe / this.maxframe) * 100; if (this.curframe == this.maxframe) { delete this.onEnterFrame; this.removeMovieClip(); } else { ++this.curframe; } }; ++partmc.ecounter; ++v5; } } function setBubbleSelection(curobj, table) { clearMovieClip(curobj.nextdrops); curobj.drops_selector.swapDepths(curobj.getNextHighestDepth()); curobj.drops_selector.selarray = new Array(new Array(0, 0, 0), new Array(0, 0, 0)); curobj.drops_selector.px = curobj.drops_selector._x; curobj.drops_selector.py = curobj.drops_selector._y; curobj.drops_selector.dropx = 0; curobj.drops_selector.dropy = 0; curobj.drops_selector.maxframes = 5; curobj.drops_selector.curframe = 0; curobj.drops_selector.onEnterFrame = function () { smoothMovement(this, 2); }; var v13 = table.length; var v8 = 0; while (v8 < v13) { var v11 = v8 % 2; var v10 = Math.floor(v8 / 2); curobj.drops_selector.selarray[v11][v10] = v8 + 1; curobj.nextdrops.createEmptyMovieClip('drops' + (v8 + 1), curobj.nextdrops.getNextHighestDepth()); var v7 = curobj.nextdrops['drops' + (v8 + 1)]; v7._x = v11 * 70; v7._y = v10 * 70; v7.px = v7._x; v7.py = v7._y; v7.maxframes = 5; v7.curframe = 0; v7.disapear = false; v7.onEnterFrame = function () { if (this.disapear) { this._alpha = (1 - this.curframe / this.maxframes) * 100; if (this.curframe >= this.maxframes) { delete this.onEnterFrame; this.removeMovieClip(); } else { ++this.curframe; } } else { smoothMovement(this, 0); } }; var v6 = 0; while (v6 < 2) { var v3 = 0; while (v3 < 2) { var v2 = table[v8][v3][v6]; var v4 = 0; var v5 = 0; if (v2 >= 20) { v5 = v2 - 20; } else { if (v2 >= 10) { v4 = v2 - 10; v5 = 1; } else { v4 = v2; } } if (v4 || v5) { addBubble(v7, 'bubble' + v6 + '' + v3, v6 * 30, v3 * 30, v4, v5, 5, 1); } ++v3; } ++v6; } ++v8; } } function setBubbleArray(curobj, table) { dcounter = 0; px = 0; while (px < 8) { py = 0; while (py < 12) { if (table[py][7 - px] >= 20) { val = 0; type = table[py][7 - px] - 20; } else { if (table[py][7 - px] >= 10) { val = table[py][7 - px] - 10; type = 1; } else { val = table[py][7 - px]; type = 0; } } if (val || type) { addBubble(curobj.canvas, 'ini' + dcounter++, bubblesize * (7 - px), bubblesize * py, val, type, 5, 1); } ++py; } ++px; } } function arrangeBubbleSelection(curobj) { var v7 = true; var v3; var v4; var v2; var v6; var v5; while (v7) { v7 = false; v3 = 0; while (v3 < 6) { v4 = v3 % 2; v2 = Math.floor(v3 / 2); if (v3 < 5) { v6 = (v3 + 1) % 2; v5 = Math.floor((v3 + 1) / 2); if (!curobj.drops_selector.selarray[v4][v2] && curobj.drops_selector.selarray[v6][v5]) { curobj.drops_selector.selarray[v4][v2] = curobj.drops_selector.selarray[v6][v5]; curobj.drops_selector.selarray[v6][v5] = 0; v7 = true; } } ++v3; } } v4 = 0; while (v4 < 2) { v2 = 0; while (v2 < 3) { curobj.nextdrops['drops' + curobj.drops_selector.selarray[v4][v2]].px = v4 * 70; curobj.nextdrops['drops' + curobj.drops_selector.selarray[v4][v2]].py = v2 * 70; ++v2; } ++v4; } var v8 = Math.round((curobj.drops_selector._x - 290) / 70); var v9 = Math.round((curobj.drops_selector._y - 90) / 70); if (!curobj.drops_selector.selarray[v8][v9] && (v8 || v9)) { if (v8) { curobj.drops_selector.px -= 70; --curobj.drops_selector.dropx; } else { curobj.drops_selector.px += 70; curobj.drops_selector.py -= 70; ++curobj.drops_selector.dropx; --curobj.drops_selector.dropy; } } } function checkEmptyTable(curobj) { var v8 = true; var v5 = getBubbleTable(curobj); var v9 = v5.length; var v2 = 0; while (v2 < v9) { var v7 = v5[v2].length; var v1 = 0; while (v1 < v7) { var v4 = curobj.canvas[v5[v2][v1]].btype; var v3 = curobj.canvas[v5[v2][v1]].bmod; if (v4 || v3 && v3 != 4) { v8 = false; } ++v1; } ++v2; } return v8; } function initPlayer() { achcompleted = new Array(false, false, false, false, false, false, false, false, false); gamestats = new Array(0, 0, 0, 0); levelwon = 0; readthis = false; keylist = new Array(39, 40, 37, 38, 90, 88, 13, 80, 81, 82); musicenabled = true; soundenabled = true; } function saveSharedObject() { _root.so.data.readthis = readthis; _root.so.data.exists = true; _root.so.data.ach = new Array(9); i = 0; while (i < 9) { _root.so.data.ach[i] = achcompleted[i]; ++i; } _root.so.data.stats = new Array(4); i = 0; while (i < 4) { _root.so.data.stats[i] = gamestats[i]; ++i; } _root.so.data.levelwon = levelwon; _root.so.data.keylist = new Array(_root.keylist.length); i = 0; while (i < _root.keylist.length) { _root.so.data.keylist[i] = _root.keylist[i]; ++i; } _root.so.data.musicenabled = musicenabled; _root.so.data.soundenabled = soundenabled; _root.so.flush(); } function loadSharedObject() { if (_root.so.data.exists) { readthis = _root.so.data.readthis; i = 0; while (i < 9) { achcompleted[i] = _root.so.data.ach[i]; ++i; } i = 0; while (i < 4) { gamestats[i] = _root.so.data.stats[i]; ++i; } levelwon = _root.so.data.levelwon; i = 0; while (i < _root.so.data.keylist.length) { _root.keylist[i] = _root.so.data.keylist[i]; ++i; } musicenabled = _root.so.data.musicenabled; soundenabled = _root.so.data.soundenabled; } else { _root.initPlayer(); } } function clearSharedObject() { _root.initPlayer(); _root.saveSharedObject(); } function checkAchievements(curobj) { if (combo == 8 && !achcompleted[4]) { unlockAchievement(curobj, 4); } if (gametype == 1) { if (score >= 25000 && !achcompleted[0]) { unlockAchievement(curobj, 0); } if (score >= 100000 && !achcompleted[1]) { unlockAchievement(curobj, 1); } if (score >= 300000 && !achcompleted[2]) { unlockAchievement(curobj, 2); } if (bubbles >= 900 && !achcompleted[3]) { unlockAchievement(curobj, 3); } } else { if (gametype == 2) { if (levelwon >= 5 && !achcompleted[5]) { unlockAchievement(curobj, 5); } if (levelwon >= 10 && !achcompleted[6]) { unlockAchievement(curobj, 6); } if (levelwon >= 15 && !achcompleted[7]) { unlockAchievement(curobj, 7); } if (levelwon >= 20 && !achcompleted[8]) { unlockAchievement(curobj, 8); } } } } function unlockAchievement(curobj, achnum) { achcompleted[achnum] = true; _root.playSound('levelup.wav', 100); achstr = achievements[achnum][0]; curobj._parent.ach_anim.ach_win.txtAchName.text = '"' + achstr + '"'; curobj._parent.ach_anim.gotoAndPlay(1); saveSharedObject(); } function createAchievementsMenu(curobj) { curobj.txtName.text = ''; curobj.txtDesc.text = ''; i = 0; while (i < achievements.length) { if (achcompleted[i]) { curobj['ach' + i].gotoAndStop(2); } achstr = achievements[i]; if (i != 0) { curobj.txtName.text += '\n'; curobj.txtDesc.text += '\n'; } curobj.txtName.text += achstr[0]; curobj.txtDesc.text += achstr[1]; ++i; } } function initOptionsMenu(curobj) { if (_root.musicenabled) { curobj.musicon.gotoAndStop(2); } else { curobj.musicoff.gotoAndStop(2); } curobj.musicon.onPress = function () { if (!_root.musicenabled) { _root.musicenabled = true; _root.playMusic('menu.wav', 100, 0); curobj.musicon.gotoAndStop(2); curobj.musicoff.gotoAndStop(1); } _root.playSound('click.wav', 100); }; curobj.musicoff.onPress = function () { if (_root.musicenabled) { _root.musicenabled = false; _root.stopMusic(); curobj.musicon.gotoAndStop(1); curobj.musicoff.gotoAndStop(2); } _root.playSound('click.wav', 100); }; if (_root.soundenabled) { curobj.soundon.gotoAndStop(2); } else { curobj.soundoff.gotoAndStop(2); } curobj.soundon.onPress = function () { if (!_root.soundenabled) { _root.soundenabled = true; curobj.soundon.gotoAndStop(2); curobj.soundoff.gotoAndStop(1); } _root.playSound('click.wav', 100); }; curobj.soundoff.onPress = function () { if (_root.soundenabled) { _root.soundenabled = false; curobj.soundon.gotoAndStop(1); curobj.soundoff.gotoAndStop(2); } }; curobj.keylistening = -1; var keynum = 0; while (keynum < keylist.length) { if (curobj['key' + keynum]) { curobj['key' + keynum].txtKey.text = keycodenames[keylist[keynum]]; curobj['key' + keynum].keynum = keynum; curobj['key' + keynum].onRelease = function () { if (curobj.keylistening == -1) { curobj.keylistening = this.keynum; this.txtKey.text = 'Press a key...'; playSound('click.wav', 100); } else { playSound('error.wav', 100); } }; curobj['key' + keynum].onEnterFrame = function () { if (curobj.keylistening == this.keynum && lastkeypressed) { keylist[this.keynum] = lastkeypressed; this.txtKey.text = keycodenames[keylist[this.keynum]]; curobj.keylistening = -1; playSound('click.wav', 100); } }; } ++keynum; } } function createCustomMenu(curobj) { curobj.canuse = false; i = 0; while (i < 10) { if (i < 5) { px = i * 30 + 70; py = 190; } else { px = (i - 5) * 30 + 70; py = 225; } curobj.attachMovie('menu_num_btn', 'btn_level' + i, curobj.getNextHighestDepth(), {'_x': px, '_y': py}); curclip = curobj['btn_level' + i]; curclip.txtNum.text = i + 1; curclip.curlevel = i; curclip.curobj = curobj; if (i == _root.startlevel) { curclip.gotoAndStop(3); } curclip.onPress = function () { if (this.curobj.canuse) { _root.startlevel = this.curlevel; i = 0; while (i < 10) { if (i != this.curlevel) { this.curobj['btn_level' + i].gotoAndStop(1); } ++i; } this.gotoAndStop(3); } }; curclip.onRollOver = function () { if (this.curobj.canuse) { if (_root.startlevel != this.curlevel) { this.gotoAndStop(2); } } }; curclip.onReleaseOutside = function () { if (this.curobj.canuse) { if (_root.startlevel != this.curlevel) { this.gotoAndStop(1); } } }; curclip.onRollOut = curclip.onReleaseOutside; ++i; } i = 0; while (i < 5) { px = i * 30 + 330; py = 190; curobj.attachMovie('menu_num_btn', 'btn_handicap' + i, curobj.getNextHighestDepth(), {'_x': px, '_y': py}); curclip = curobj['btn_handicap' + i]; curclip.txtNum.text = i * 2; curclip.curhandicap = i * 2; curclip.curobj = curobj; if (i == _root.handicap) { curclip.gotoAndStop(3); } curclip.onPress = function () { if (this.curobj.canuse) { _root.handicap = this.curhandicap; i = 0; while (i < 5) { if (i != this.curhandicap) { this.curobj['btn_handicap' + i].gotoAndStop(1); } ++i; } this.gotoAndStop(3); } }; curclip.onRollOver = function () { if (this.curobj.canuse) { if (_root.handicap != this.curhandicap) { this.gotoAndStop(2); } } }; curclip.onReleaseOutside = function () { if (this.curobj.canuse) { if (_root.handicap != this.curhandicap) { this.gotoAndStop(1); } } }; curclip.onRollOut = curclip.onReleaseOutside; ++i; } } function createHighscoresMenu(curobj) { curobj.curpage = 0; curobj.maxpage = 0; curobj.maxtime = 0; curobj.btn_prev.onRelease = function () { if (curobj.curpage > 0 && curobj.maxpage) { _root.playSound('click.wav', 100); --curobj.curpage; _root.loadScore(curobj, curobj.maxtime, curobj.curpage); } else { _root.playSound('error.wav', 100); } }; curobj.btn_next.onRelease = function () { if (curobj.curpage < curobj.maxpage && curobj.maxpage) { _root.playSound('click.wav', 100); ++curobj.curpage; _root.loadScore(curobj, curobj.maxtime, curobj.curpage); } else { _root.playSound('error.wav', 100); } }; curobj.btn_24hours.onRelease = function () { _root.playSound('click.wav', 100); _root.loadScore(curobj, 86400, 0); }; curobj.btn_alltime.onRelease = function () { _root.playSound('click.wav', 100); _root.loadScore(curobj, 0, 0); }; loadScore(curobj, 0, 0); } function loadScore(curobj, maxtime, page) { curobj.curpage = 0; curobj.maxpage = 0; curobj.maxtime = maxtime; curobj.txtMessage.text = 'Hold on...'; var v2 = new LoadVars(); v2.onLoad = function (success) { if (success) { switch (this.error) { case '0': names = ''; scores = ''; nums = ''; curobj.curpage = parseInt(this.curpage); curobj.maxpage = parseInt(this.maxpage); if (this.scores) { curobj.txtMessage.text = ''; scorestring = this.scores.split('>'); scorelen = scorestring.length; hs = 0; while (hs < 10) { if (hs < scorelen) { curline = scorestring[hs].split('<'); names += curline[0] + '\r'; scores += curline[1] + '\r'; } else { names += '...\r'; scores += '...\r'; } nums += parseInt(this.firstentry) + hs + 1 + '.' + '\r'; ++hs; } } else { curobj.txtMessage.text = 'No highscores were found for this period.'; } curobj.txtNames.text = names; curobj.txtScores.text = scores; curobj.txtNums.text = nums; curobj.txtPages.text = 'Page ' + (curobj.curpage + 1) + ' of ' + (curobj.maxpage + 1); break; case '1': curobj.txtMessage.text = 'SQL Error! Could not load highscores.'; break; case '2': curobj.txtMessage.text = 'Missing data! Operation aborted.'; break; case '3': curobj.txtMessage.text = 'Script called without identifier! Operation aborted.'; break; default: curobj.txtMessage.text = 'Error #' + this.error + '! Operation aborted.'; } } else { curobj.txtMessage.text = 'Connection failed!'; } }; v2.maxtime = curobj.maxtime; v2.page = page; v2.loadmode = 1; v2.sendAndLoad(scorescripturl, v2, 'POST'); } function createScoreSubmitMenu(curobj) { curobj.scoreval = _root.score; curobj.txtScore.text = curobj.scoreval; curobj.canuse = true; curobj.btn_submit.onRelease = function () { if (curobj.canuse) { if (curobj.txtName.text != '') { curobj.canuse = false; _root.playSound('click.wav', 100); _root.sendScore(curobj, curobj.txtName.text, curobj.scoreval); } else { _root.playSound('error.wav', 100); curobj.txtMessage.text = 'Please enter a name to submit your score!'; } } else { _root.playSound('error.wav', 100); } }; } function sendScore(curobj, username, score) { curobj.txtMessage.text = 'Hold on...'; var v2 = new LoadVars(); v2.onLoad = function (success) { if (success) { switch (this.error) { case '0': curobj.txtMessage.text = 'Done!'; curobj._parent.goto = 'highscores'; curobj._parent.play(); break; case '1': curobj.canuse = true; curobj.txtMessage.text = 'SQL Error! Could not load highscores.'; break; case '2': curobj.canuse = true; curobj.txtMessage.text = 'Missing data! Operation aborted.'; break; case '3': curobj.canuse = true; curobj.txtMessage.text = 'Script called without identifier! Operation aborted.'; break; default: curobj.canuse = true; curobj.txtMessage.text = 'Error #' + this.error + '! Operation aborted.'; } } else { curobj.txtMessage.text = 'Connection failed!'; } }; v2.username = username; v2.score = score; v2.loadmode = 2; v2.sendAndLoad(scorescripturl, v2, 'POST'); } function getBubbleFrame(tableval) { var v2 = 30; if (tableval >= 1 && tableval <= 6) { v2 = tableval; return v2; } if (tableval >= 7 && tableval <= 12) { v2 = tableval + 4; return v2; } if (tableval >= 13 && tableval <= 15) { v2 = tableval + 9; } return v2; } function redrawEditorTables(curobj) { var v3; var v2; var v4; v4 = 0; while (v4 < 6) { v3 = 0; while (v3 < 2) { v2 = 0; while (v2 < 2) { if (!(v3 == 1 && v2 == 0)) { curobj.editor_setpack['bubble' + v4 + '-' + v3 + '-' + v2].gotoAndStop(getBubbleFrame(_root.setpack[v4][v3][v2])); } ++v2; } ++v3; } ++v4; } v3 = 0; while (v3 < 2) { v2 = 0; while (v2 < 2) { curobj.editor_set['bubble' + v3 + '-' + v2].gotoAndStop(getBubbleFrame(_root.settable[v3][v2])); ++v2; } ++v3; } v3 = 0; while (v3 < 8) { v2 = 0; while (v2 < 12) { curobj.editor_field['bubble' + v3 + '-' + v2].gotoAndStop(getBubbleFrame(_root.fieldtable[v3][v2])); ++v2; } ++v3; } } function setEditorInterface(curobj, enable) { if (enable) { curobj.btn_load.enabled = true; curobj.btn_save.enabled = true; curobj.btn_clear.enabled = true; curobj.btn_help.enabled = true; curobj.btn_play.enabled = true; curobj.btn_goback.enabled = true; var v2 = 0; while (v2 < 16) { if (v2 < 6) { curobj['set' + v2].enabled = true; } curobj['sel' + v2].enabled = true; ++v2; } curobj.editor_field.enabled = true; curobj.editor_set.enabled = true; curobj.btn_addset.enabled = true; } else { curobj.btn_load.enabled = false; curobj.btn_save.enabled = false; curobj.btn_clear.enabled = false; curobj.btn_help.enabled = false; curobj.btn_play.enabled = false; curobj.btn_goback.enabled = false; var v2 = 0; while (v2 < 16) { if (v2 < 6) { curobj['set' + v2].enabled = false; } curobj['sel' + v2].enabled = false; ++v2; } curobj.editor_field.enabled = false; curobj.editor_set.enabled = false; curobj.btn_addset.enabled = false; } } function createEditorCode() { var v5 = ''; var v3; var v2; var v4; v3 = 0; while (v3 < 8) { v2 = 0; while (v2 < 12) { v5 += _root.fieldtable[v3][v2].toString(16); ++v2; } ++v3; } v4 = 0; while (v4 < 6) { v3 = 0; while (v3 < 2) { v2 = 0; while (v2 < 2) { if (!(v3 == 1 && v2 == 0)) { v5 += _root.setpack[v4][v3][v2].toString(16); } ++v2; } ++v3; } ++v4; } return v5; } function loadEditorCode(editorcode) { var v3; var v2; var v5; var v4 = 0; var v6 = editorcode.length; v3 = 0; while (v3 < 8) { v2 = 0; while (v2 < 12) { if (v4 < v6) { _root.fieldtable[v3][v2] = parseInt(editorcode.charAt(v4), 16); ++v4; } else { _root.fieldtable[v3][v2] = 0; } ++v2; } ++v3; } v5 = 0; while (v5 < 6) { v3 = 0; while (v3 < 2) { v2 = 0; while (v2 < 2) { if (!(v3 == 1 && v2 == 0) && v4 < v6) { _root.setpack[v5][v3][v2] = parseInt(editorcode.charAt(v4), 16); ++v4; } else { _root.setpack[v5][v3][v2] = 0; } ++v2; } ++v3; } ++v5; } } function checkEditorCode(editorcode) { var v3 = true; var v6 = 114; var v4 = editorcode.length; if (v4 != v6) { v3 = false; return v3; } var v2 = 0; while (v2 < v4) { var v1 = editorcode.charCodeAt(v2); if (!(v1 >= 65 && v1 <= 70 || v1 >= 48 && v1 <= 57 || v1 >= 97 && v1 <= 102)) { v3 = false; } ++v2; } return v3; } function editorToLevel() { var v2; var v1; var v3; levels[0] = new Array(2); levels[0][0] = new Array(); v3 = 0; while (v3 < 6) { if (setpack[v3][0][0]) { levels[0][0].push([[0, 0], [0, 0]]); v2 = 0; while (v2 < 2) { v1 = 0; while (v1 < 2) { levels[0][0][v3][v1][v2] = getBubbleFrame(setpack[v3][v2][v1]); if (levels[0][0][v3][v1][v2] == 30) { levels[0][0][v3][v1][v2] = 0; } ++v1; } ++v2; } } ++v3; } levels[0][1] = new Array(12); v1 = 0; while (v1 < 12) { levels[0][1][v1] = new Array(8); v2 = 0; while (v2 < 8) { levels[0][1][v1][v2] = getBubbleFrame(fieldtable[v2][v1]); if (levels[0][1][v1][v2] == 30) { levels[0][1][v1][v2] = 0; } ++v2; } ++v1; } } function initEditor(curobj) { var v7; var v4; var v14; curobj.sel = 1; curobj['sel' + curobj.sel].gotoAndStop(2); v14 = 0; while (v14 < 6) { var v12 = (v14 % 2) * 40; var v13 = Math.floor(v14 / 2) * 40; v7 = 0; while (v7 < 2) { v4 = 0; while (v4 < 2) { if (!(v7 == 1 && v4 == 0)) { var v8 = 'bubble' + v14 + '-' + v7 + '-' + v4; curobj.editor_setpack.attachMovie('bubble', v8, curobj.editor_setpack.getNextHighestDepth(), {'_x': v7 * 20 + v12, '_y': v4 * 20 + v13, '_width': 20, '_height': 20}); var v10 = curobj.editor_setpack[v8]; v10.gotoAndStop(30); } ++v4; } ++v7; } ++v14; } v7 = 0; while (v7 < 2) { v4 = 0; while (v4 < 2) { curobj.editor_set.attachMovie('bubble', 'bubble' + v7 + '-' + v4, curobj.editor_set.getNextHighestDepth(), {'_x': v7 * 20, '_y': v4 * 20, '_width': 20, '_height': 20}); curobj.editor_set['bubble' + v7 + '-' + v4].gotoAndStop(30); ++v4; } ++v7; } v7 = 0; while (v7 < 8) { v4 = 0; while (v4 < 12) { curobj.editor_field.attachMovie('bubble', 'bubble' + v7 + '-' + v4, curobj.editor_field.getNextHighestDepth(), {'_x': v7 * 20, '_y': v4 * 20, '_width': 20, '_height': 20}); curobj.editor_field['bubble' + v7 + '-' + v4].gotoAndStop(30); ++v4; } ++v7; } redrawEditorTables(curobj); v7 = 0; while (v7 < 16) { curobj['sel' + v7].val = v7; curobj['sel' + v7].onRelease = function () { _root.playSound('click.wav', 100); var v3 = 0; while (v3 < 16) { curobj['sel' + v3].gotoAndStop(1); ++v3; } curobj['sel' + this.val].gotoAndStop(2); curobj.sel = this.val; }; ++v7; } v7 = 0; while (v7 < 6) { curobj['set' + v7].val = v7; curobj['set' + v7].onRelease = function () { if (_root.setpack[this.val][0][0]) { _root.playSound('click.wav', 100); var v5 = this.val; while (v5 < 6) { var v4 = 0; while (v4 < 2) { var v3 = 0; while (v3 < 2) { var v6 = 30; var v7 = 0; if (v5 < 5) { v7 = _root.setpack[v5 + 1][v4][v3]; v6 = curobj.editor_setpack['bubble' + (v5 + 1) + '-' + v4 + '-' + v3]._currentframe; } _root.setpack[v5][v4][v3] = v7; curobj.editor_setpack['bubble' + v5 + '-' + v4 + '-' + v3].gotoAndStop(v6); ++v3; } ++v4; } ++v5; } } }; ++v7; } curobj.btn_save.onRelease = function () { _root.playSound('click.wav', 100); curobj.save_window.txtCode.text = createEditorCode(); curobj.save_window._y = 120; _root.setEditorInterface(curobj, false); }; curobj.save_window.btn_close.onRelease = function () { _root.playSound('click.wav', 100); this._parent._y = 1000; _root.setEditorInterface(curobj, true); }; curobj.btn_load.onRelease = function () { _root.playSound('click.wav', 100); curobj.load_window.txtCode.text = ''; curobj.load_window._y = 120; _root.setEditorInterface(curobj, false); }; curobj.load_window.btn_close.onRelease = function () { _root.playSound('click.wav', 100); this._parent._y = 1000; _root.setEditorInterface(curobj, true); }; curobj.load_window.btn_load.onRelease = function () { _root.playSound('click.wav', 100); this._parent._y = 1000; var v3 = curobj.load_window.txtCode.text; if (checkEditorCode(v3)) { _root.loadEditorCode(v3); _root.redrawEditorTables(curobj); _root.setEditorInterface(curobj, true); } else { curobj.error_window._y = 120; } }; curobj.error_window.btn_close.onRelease = function () { _root.playSound('click.wav', 100); this._parent._y = 1000; _root.setEditorInterface(curobj, true); }; curobj.btn_clear.onRelease = function () { _root.playSound('click.wav', 100); var v3; var v2; var v4; v4 = 0; while (v4 < 6) { v3 = 0; while (v3 < 2) { v2 = 0; while (v2 < 2) { _root.setpack[v4][v3][v2] = 0; curobj.editor_setpack['bubble' + v4 + '-' + v3 + '-' + v2].gotoAndStop(30); ++v2; } ++v3; } ++v4; } v3 = 0; while (v3 < 2) { v2 = 0; while (v2 < 2) { _root.settable[v3][v2] = 0; curobj.editor_set['bubble' + v3 + '-' + v2].gotoAndStop(30); ++v2; } ++v3; } v3 = 0; while (v3 < 8) { v2 = 0; while (v2 < 12) { _root.fieldtable[v3][v2] = 0; curobj.editor_field['bubble' + v3 + '-' + v2].gotoAndStop(30); ++v2; } ++v3; } }; curobj.btn_play.onRelease = function () { if (_root.setpack[0][0][0]) { _root.playSound('click.wav', 100); _root.editorToLevel(); _root.setEditorInterface(curobj, false); _root.gametype = 2; _root.puzzlelevel = 0; curobj._parent.goto = 'game'; curobj._parent.play(); } else { curobj.editor_setpack.play(); _root.playSound('error.wav', 100); } }; curobj.btn_goback.onRelease = function () { _root.playSound('click.wav', 100); _root.setEditorInterface(curobj, false); curobj._parent.goto = 'menu'; curobj._parent.play(); }; curobj.btn_help.onRelease = function () { _root.playSound('click.wav', 100); curobj.help._y = 70; _root.setEditorInterface(curobj, false); }; curobj.help.btn_close.onRelease = function () { _root.playSound('click.wav', 100); this._parent._y = 1000; this._parent.gotoAndStop(1); _root.setEditorInterface(curobj, true); }; curobj.editor_field.held = false; curobj.editor_field.onPress = function () { this.held = true; }; curobj.editor_field.onReleaseOutside = function () { this.held = false; }; curobj.editor_field.onRelease = curobj.editor_field.onReleaseOutside; curobj.editor_field.onEnterFrame = function () { if (this.held) { var v4 = Math.floor(this._xmouse / 20); var v3 = Math.floor(this._ymouse / 20); if (v4 >= 0 && v4 < 8 && v3 >= 0 && v3 < 12) { _root.fieldtable[v4][v3] = curobj.sel; curobj.editor_field['bubble' + v4 + '-' + v3].gotoAndStop(getBubbleFrame(curobj.sel)); } } }; curobj.editor_set.held = false; curobj.editor_set.onPress = function () { this.held = true; }; curobj.editor_set.onReleaseOutside = function () { this.held = false; }; curobj.editor_set.onRelease = curobj.editor_set.onReleaseOutside; curobj.editor_set.onEnterFrame = function () { if (this.held) { var v4 = Math.floor(this._xmouse / 20); var v3 = Math.floor(this._ymouse / 20); if (v4 >= 0 && v4 < 2 && v3 >= 0 && v3 < 2 && !(v4 == 1 && v3 == 0)) { _root.settable[v4][v3] = curobj.sel; var v5 = 30; if (curobj.sel >= 1 && curobj.sel <= 6) { v5 = curobj.sel; } else { if (curobj.sel >= 7 && curobj.sel <= 12) { v5 = curobj.sel + 4; } else { if (curobj.sel >= 13 && curobj.sel <= 15) { v5 = curobj.sel + 9; } } } curobj.editor_set['bubble' + v4 + '-' + v3].gotoAndStop(v5); } } }; curobj.btn_addset.onRelease = function () { if (_root.settable[0][0] && _root.settable[0][1] && _root.settable[1][1]) { var v3; var v2; var v5; var v4; v5 = 0; v4 = -1; for (;;) { if (!(v5 < 6 && v4 < 0)) break; if (!_root.setpack[v5][0][0]) { v4 = v5; } ++v5; } if (v4 == -1) { curobj.editor_setpack.play(); _root.playSound('error.wav', 100); } else { _root.playSound('click.wav', 100); v3 = 0; while (v3 < 2) { v2 = 0; while (v2 < 2) { curobj.editor_setpack['bubble' + v4 + '-' + v3 + '-' + v2].gotoAndStop(curobj.editor_set['bubble' + v3 + '-' + v2]._currentframe); curobj.editor_set['bubble' + v3 + '-' + v2].gotoAndStop(30); _root.setpack[v4][v3][v2] = _root.settable[v3][v2]; _root.settable[v3][v2] = 0; ++v2; } ++v3; } } } else { curobj.editor_set.play(); _root.playSound('error.wav', 100); } }; } var musicenabled = true; var soundenabled = true; _root.createEmptyMovieClip('jukebox', _root.getNextHighestDepth()); _root.music = new Sound(_root.jukebox); _root.musicpos = 0; _root.musicloop = 0; _root.musicvol = -1; _root.createEmptyMovieClip('keylistener', _root.getNextHighestDepth()); _root.keylist = new Array(39, 40, 37, 38, 90, 88, 13, 80, 81, 82); _root.keymap = new Array(_root.keylist.length); var keycodenames = new Array('', '', '', '', '', '', '', '', 'Backspace', 'Tab', '', '', '', 'Enter', '', '', 'Shift', 'Control', '', 'Pause/Break', 'Caps Lock', '', '', '', '', '', '', 'Esc', '', '', '', '', 'Spacebar', 'Page Up', 'Page Down', 'End', 'Home', 'Left Arrow', 'Up Arrow', 'Right Arrow', 'Down Arrow', '', '', '', '', 'Insert', 'Delete', '', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '', '', '', '', '', '', '', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '', '', '', '', '', 'Numpad 0', 'Numpad 1', 'Numpad 2', 'Numpad 3', 'Numpad 4', 'Numpad 5', 'Numpad 6', 'Numpad 7', 'Numpad 8', 'Numpad 9', 'Multiply', 'Add', '', 'Subtract', 'Decimal', 'Divide', 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', '', 'F11', 'F12', 'F13', 'F14', 'F15', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Num Lock', 'ScrLk', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '; :', '= +', ',', '- _', '.', '/ ?', '` ~', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '[ {', '\\ |', '] }', '" \'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ''); i = 0; while (i < _root.keylist.length) { _root.keymap[i] = new Array(false, false); ++i; } _root.mousebtn = false; var lastkeypressed = 0; var keyListener = new Object(); keyListener.onKeyDown = function () { lastkeypressed = Key.getCode(); }; keyListener.onKeyUp = function () { lastkeypressed = 0; }; Key.addListener(keyListener); var canvaswidth = 8; var canvasheight = 12; var bubblesize = 30; var gamewidth = canvaswidth * bubblesize; var gameheight = canvasheight * bubblesize; var bubblescore = 50; var icescore = 10; var whitescore = 10; var levelup = 100; var levelspeed = new Array(40, 30, 24, 18, 12, 9, 7, 5, 4, 3); var levelbonus = new Array(1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10); var gamepaused = false; var puzzlewon = false; var score = 0; var bubbles = 0; var combo = 0; var diffmulti = 1; var level = 0; var levelmeter = 0; var gamespeed = 0; var canmove = false; var gamestarted = false; var tokenlist = new Array(10); px = 0; while (px < 10) { tokenlist[px] = false; ++px; } var tokenfound = false; var nextdrops = new Array(2); px = 0; while (px < 2) { nextdrops[px] = new Array(2); py = 0; while (py < 2) { nextdrops[px][py] = new Array(0, 0); ++py; } ++px; } var gametype = 1; var puzzlelevel = 1; var selecteddrop = 0; var handicap = 0; var startlevel = 0; var difficulty = 0; Array; var sponsorlink = 'http://www.keygames.com/?utm_source=games&utm_medium=exclusives&utm_campaign=runicdrops2'; var menuoptions = new Array('Starts the game at the first level with no handicap.', 'Allows you to choose the level and handicap and to toggle the sound on or off.', 'Teaches the fundamentals and controls of the game.', 'A list of achievements you can unlock in the game.', 'A list of highscores from other players.', 'The names of developers and contributors for this game.'); var achievements = new Array(new Array('Good Start', 'Get 25 000 points in Quick Play'), new Array('Gambler', 'Get 100 000 points in Quick Play'), new Array('High Roller', 'Get 300 000 points in Quick Plya'), new Array('Endurance', 'Destroy 900 drops in Quick Play'), new Array('Combo Maniac', 'Do an 8-combo'), new Array('Rookie', 'Beat level 5 in Puzzle mode'), new Array('Champion', 'Beat level 10 in Puzzle mode'), new Array('Hero', 'Beat level 15 in Puzzle mode'), new Array('Puzzle Master', 'Complete Puzzle mode')); var achcompleted = new Array(false, false, false, false, false, false, false, false, false); var gamestats = new Array(0, 0, 0, 0); var readthis = false; var so = SharedObject.getLocal('runic_drops'); so.flush(); var levelwon = 0; var scorescripturl = 'http://daddiejay.awardspace.com/flashgames/runicdrops2.php'; var setpack = new Array(6); pz = 0; while (pz < 6) { setpack[pz] = new Array(2); px = 0; while (px < 2) { setpack[pz][px] = new Array(2); py = 0; while (py < 2) { setpack[pz][px][py] = 0; ++py; } ++px; } ++pz; } var settable = new Array(2); px = 0; while (px < 2) { settable[px] = new Array(2); py = 0; while (py < 2) { settable[px][py] = 0; ++py; } ++px; } var fieldtable = new Array(8); px = 0; while (px < 8) { fieldtable[px] = new Array(12); py = 0; while (py < 12) { fieldtable[px][py] = 0; ++py; } ++px; } var levels = new Array(); levels.push(new Array()); levels.push([[[[2, 0], [1, 1]], [[2, 0], [2, 24]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0], [0, 0, 0, 0, 24, 23, 0, 0]]]); levels.push([[[[3, 0], [3, 6]], [[3, 0], [6, 6]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 3, 0, 0, 0, 0, 0], [0, 0, 6, 6, 23, 0, 0, 0]]]); levels.push([[[[1, 0], [1, 4]], [[1, 0], [3, 3]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 23, 0, 0, 0, 0], [0, 0, 4, 3, 0, 0, 0, 0], [1, 1, 4, 3, 0, 1, 23, 0]]]); levels.push([[[[4, 0], [23, 1]], [[1, 0], [23, 3]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 3, 3], [0, 0, 0, 4, 0, 0, 23, 23], [24, 24, 24, 4, 1, 24, 24, 24], [24, 23, 1, 1, 22, 1, 1, 24]]]); levels.push([[[[2, 0], [2, 1]], [[2, 0], [2, 22]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 24], [24, 0, 0, 1, 0, 0, 0, 24], [24, 24, 24, 2, 0, 0, 24, 24], [24, 1, 1, 23, 1, 23, 1, 24]]]); levels.push([[[[3, 0], [22, 3]], [[2, 0], [1, 1]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [1, 0, 0, 0, 0, 0, 0, 2], [11, 12, 2, 0, 0, 0, 24, 2], [23, 23, 1, 24, 0, 0, 24, 24], [1, 1, 24, 3, 2, 3, 24, 1], [1, 24, 23, 3, 2, 2, 3, 24]]]); levels.push([[[[6, 0], [5, 5]], [[1, 0], [5, 5]], [[1, 0], [1, 5]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 6, 11], [0, 0, 0, 0, 0, 0, 6, 6], [0, 0, 0, 0, 0, 0, 22, 23], [0, 0, 0, 0, 0, 0, 5, 6], [1, 0, 0, 0, 0, 5, 22, 23], [1, 1, 0, 0, 0, 5, 23, 6]]]); levels.push([[[[4, 0], [4, 2]], [[23, 0], [4, 4]], [[1, 0], [4, 1]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 24, 4, 0, 0, 0, 0], [0, 24, 24, 4, 0, 2, 0, 1], [24, 24, 2, 2, 0, 1, 0, 1]]]); levels.push([[[[2, 0], [2, 1]], [[2, 0], [2, 2]], [[1, 0], [1, 1]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 24, 22, 0, 0], [0, 0, 24, 1, 24, 1, 0, 2], [24, 24, 24, 1, 24, 1, 24, 24]]]); levels.push([[[[6, 0], [6, 3]], [[3, 0], [23, 6]], [[3, 0], [3, 3]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 6, 6, 0, 0, 0, 0], [0, 6, 6, 23, 23, 0, 3, 0], [6, 6, 23, 3, 3, 0, 3, 0]]]); levels.push([[[[6, 0], [4, 4]], [[6, 0], [6, 23]], [[1, 0], [4, 6]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [4, 1, 1, 0, 0, 0, 0, 0], [23, 22, 1, 22, 0, 0, 0, 1], [4, 3, 2, 2, 0, 0, 0, 1], [4, 23, 3, 3, 0, 1, 1, 22], [23, 2, 23, 23, 22, 2, 2, 1]]]); levels.push([[[[23, 0], [23, 23]], [[4, 0], [2, 4]], [[16, 0], [14, 4]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 4, 0, 0, 0, 0, 0], [0, 1, 1, 0, 0, 0, 0, 0], [6, 1, 22, 2, 2, 0, 0, 0], [6, 23, 2, 24, 24, 24, 0, 0], [24, 1, 2, 24, 24, 24, 0, 6], [1, 1, 23, 24, 24, 24, 0, 6]]]); levels.push([[[[1, 0], [23, 1]], [[1, 0], [3, 3]], [[23, 0], [1, 3]], [[23, 0], [1, 1]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 4, 0, 0, 0, 6, 0], [0, 0, 4, 0, 0, 0, 6, 0], [0, 23, 1, 0, 0, 0, 1, 23], [24, 23, 4, 23, 0, 23, 6, 23], [24, 23, 4, 23, 23, 23, 6, 24]]]); levels.push([[[[1, 0], [1, 3]], [[2, 0], [2, 2]], [[3, 0], [3, 23]], [[23, 0], [3, 3]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 22, 0, 0, 0, 0, 0], [24, 0, 1, 24, 0, 2, 0, 0], [24, 24, 1, 24, 24, 24, 24, 2]]]); levels.push([[[[2, 0], [2, 1]], [[1, 0], [1, 1]], [[22, 0], [12, 23]], [[5, 0], [2, 5]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 0], [23, 1, 5, 0, 0, 2, 5, 5]]]); levels.push([[[[23, 0], [4, 4]], [[4, 0], [4, 3]], [[23, 0], [23, 3]], [[4, 0], [24, 3]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 4, 0, 0, 0, 0], [0, 0, 0, 4, 0, 0, 0, 0], [4, 3, 0, 3, 0, 0, 0, 3], [23, 23, 24, 24, 24, 23, 23, 24]]]); levels.push([[[[5, 0], [5, 1]], [[22, 0], [1, 1]], [[23, 0], [23, 1]], [[2, 0], [23, 23]], [[2, 0], [2, 2]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 24], [5, 0, 0, 0, 0, 1, 0, 24], [5, 0, 24, 2, 24, 1, 11, 24]]]); levels.push([[[[3, 0], [3, 1]], [[1, 0], [1, 1]], [[5, 0], [6, 5]], [[1, 0], [3, 23]], [[3, 0], [23, 6]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [6, 0, 0, 0, 0, 0, 0, 0], [22, 23, 23, 0, 0, 0, 0, 0], [6, 3, 24, 0, 0, 0, 5, 0], [6, 3, 15, 0, 0, 3, 24, 3], [5, 24, 24, 24, 5, 23, 3, 3]]]); levels.push([[[[3, 0], [2, 2]], [[3, 0], [22, 3]], [[3, 0], [11, 3]], [[6, 0], [14, 23]], [[1, 0], [1, 5]], [[4, 0], [5, 5]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 2], [0, 0, 0, 0, 0, 0, 0, 22], [6, 23, 0, 22, 0, 0, 2, 12], [6, 23, 23, 1, 1, 24, 24, 24], [4, 4, 24, 24, 24, 1, 4, 2]]]); levels.push([[[[4, 0], [1, 1]], [[1, 0], [2, 4]], [[3, 0], [3, 2]], [[4, 0], [5, 5]], [[3, 0], [6, 2]], [[6, 0], [6, 5]]], [[0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [24, 0, 0, 0, 0, 0, 0, 24], [24, 24, 0, 0, 0, 0, 24, 24], [24, 23, 0, 0, 0, 0, 23, 24], [24, 23, 23, 23, 23, 23, 23, 24]]]); _root.emptyMenu(); _root.initKeyMapper(); } // unknown tag 88 length 143 movieClip 17 { } movieClip 18 { } movieClip 19 { } button 25 { on (release) { _root.play(); } } movieClip 28 { frame 1 { _root.stop(); this.stop(); this.onEnterFrame = function () { var v3 = _root.getBytesLoaded() / _root.getBytesTotal(); water._y = 120 - 150 * v3; txtPercent.text = Math.round(v3 * 100) + '%'; if (v3 >= 1) { gotoAndPlay(2); delete this.onEnterFrame; } }; } frame 20 { stop(); } } button 29 { on (release) { _root.getURL('http://daddiejay.newgrounds.com/', '_blank'); } } button 33 { on (release) { _root.getURL(_root.sponsorlink, '_blank'); } } movieClip 55 bubble { } movieClip 56 bubble_anim { frame 1 { stop(); } frame 12 { gotoAndStop('start'); } } movieClip 58 particle3 { } movieClip 59 particle_multi { frame 1 { gotoAndStop(Math.round(Math.random() * 5) + 1); } } // unknown tag 88 length 105 // unknown tag 88 length 105 movieClip 64 { } movieClip 65 combo_anim { frame 16 { this.removeMovieClip(); } } movieClip 67 game_mask { } movieClip 69 { } movieClip 70 nextdrops_anim { frame 16 { stop(); } } movieClip 72 { } movieClip 80 { } movieClip 81 token_burst { frame 2 { symbol.gotoAndStop(this.symbolno); } frame 16 { this.removeMovieClip(); } } movieClip 83 { } movieClip 84 white_recolor { frame 12 { this.removeMovieClip(); } } movieClip 108 { frame 1 { stop(); } } frame 4 { stop(); } movieClip 111 { frame 1 { _parent.stop(); } frame 151 { _parent.play(); this.stop(); } } movieClip 123 { frame 1 { _parent.stop(); } frame 151 { _parent.play(); this.stop(); } } movieClip 124 { instance of movieClip 111 { onClipEvent (release) { _root.getURL(_root.sponsorlink, '_blank'); } } instance of movieClip 123 { onClipEvent (release) { _root.getURL('http://daddiejay.newgrounds.com', '_blank'); } } frame 45 { stop(); _parent.gotoAndPlay('game'); } } frame 6 { stop(); } movieClip 127 { frame 1 { stop(); } } movieClip 129 { } movieClip 131 { } movieClip 133 { } movieClip 138 { frame 1 { stop(); } } movieClip 143 { instance of movieClip 138 { onClipEvent (release) { _root.getURL(_root.sponsorlink, '_blank'); } } } button 144 { on (release) { _root.playSound('click.wav', 100); goto = 'arcade'; play(); } on (rollOver) { menu_label.txtLabel.text = 'Play a quick, arcade-style game.'; menu_label._x = 210; menu_label._y = btn_arcade._y; } on (releaseOutside, rollOut) { menu_label._y = 1000; } } button 145 { on (release) { _root.playSound('click.wav', 100); goto = 'puzzle'; play(); } on (rollOver) { menu_label.txtLabel.text = 'Play through 20 puzzle levels, each tougher than the last.'; menu_label._x = 210; menu_label._y = btn_puzzle._y; } on (releaseOutside, rollOut) { menu_label._y = 1000; } } button 146 { on (release) { _root.playSound('click.wav', 100); goto = 'help'; play(); } on (rollOver) { menu_label.txtLabel.text = 'Teaches you the game\'s fundamentals.'; menu_label._x = 240; menu_label._y = btn_howtoplay._y; } on (releaseOutside, rollOut) { menu_label._y = 1000; } } button 147 { on (release) { _root.playSound('click.wav', 100); goto = 'achievements'; play(); } on (rollOver) { menu_label.txtLabel.text = 'List of achievements you can unlock in the game.'; menu_label._x = 240; menu_label._y = btn_achievements._y; } on (releaseOutside, rollOut) { menu_label._y = 1000; } } button 148 { on (release) { _root.playSound('click.wav', 100); goto = 'options'; play(); } on (rollOver) { menu_label.txtLabel.text = 'Change sound, music, controls and progress options.'; menu_label._x = 240; menu_label._y = btn_options._y; } on (releaseOutside, rollOut) { menu_label._y = 1000; } } button 149 { on (release) { _root.playSound('click.wav', 100); goto = 'credits'; play(); } on (rollOver) { menu_label.txtLabel.text = 'Names of developpers and contributors.'; menu_label._x = 240; menu_label._y = btn_credits._y; } on (releaseOutside, rollOut) { menu_label._y = 1000; } } button 150 { on (release) { _root.playSound('click.wav', 100); goto = 'editor'; play(); } on (rollOver) { menu_label.txtLabel.text = 'Create your own custom puzzle level!'; menu_label._x = 210; menu_label._y = btn_editor._y; } on (releaseOutside, rollOut) { menu_label._y = 1000; } } movieClip 153 { } movieClip 155 { } movieClip 156 { frame 1 { stop(); if (!_root.readthis) { play(); } } frame 91 { stop(); this.onRelease = function () { _root.readthis = true; _root.saveSharedObject(); play(); }; } frame 96 { stop(); } } button 157 { on (release) { _root.playSound('click.wav', 100); _root.getURL(_root.sponsorlink, '_blank'); } on (rollOver) { menu_label.txtLabel.text = 'Play more puzzle games on KeyGames.com!'; menu_label._x = 240; menu_label._y = btn_moregames._y; } on (releaseOutside, rollOut) { menu_label._y = 1000; } } movieClip 160 { } movieClip 172 { } button 173 { on (release) { _root.playSound('click.wav', 100); goto = 'menu'; play(); } } button 174 { on (release) { _root.playSound('click.wav', 100); _root.difficulty = 0; _root.gametype = 1; goto = 'game'; play(); } } button 175 { on (release) { _root.playSound('click.wav', 100); _root.difficulty = 1; _root.gametype = 1; goto = 'game'; play(); } } button 176 { on (release) { _root.playSound('click.wav', 100); _root.difficulty = 2; _root.gametype = 1; goto = 'game'; play(); } } button 177 { on (release) { _root.playSound('click.wav', 100); goto = 'highscores'; play(); } } movieClip 179 { } movieClip 184 { } movieClip 186 { frame 1 { stop(); } } movieClip 192 { frame 1 { var i = 1; while (i <= 20) { if (_root.levelwon >= i - 1) { this['level' + i].gotoAndStop(2); this['level' + i].level_button.levelnum = i; this['level' + i].level_button.curclip = this; this['level' + i].level_button.onRelease = function () { trace('level=' + this.levelnum); }; this['level' + i].level_button.onRollOver = function () { this.curclip.txtLevelNum.text = 'Level ' + this.levelnum; var v2 = ''; switch (Math.floor((this.levelnum - 1) / 4)) { case 0: v2 = 'Water Zone'; break; case 1: v2 = 'Ruins Zone'; break; case 2: v2 = 'Desert Zone'; break; case 3: v2 = 'Forest Zone'; break; case 4: v2 = 'Dungeon Zone'; } if (this.levelnum == 1) { v2 += '\nTutorial Level'; } this.curclip.txtZoneName.text = v2; }; this['level' + i].level_button.onReleaseOutside = function () { this.curclip.txtLevelNum.text = 'Level ...'; this.curclip.txtZoneName.text = '...'; }; this['level' + i].level_button.onRollOut = this['level' + i].level_button.onReleaseOutside; this['level' + i].level_button.onRelease = function () { _root.puzzlelevel = this.levelnum; _root.gametype = 2; _parent.goto = 'game'; _parent.play(); _root.playSound('click.wav', 100); }; } ++i; } } } movieClip 195 { } movieClip 205 { frame 1 { stop(); } } movieClip 207 { } movieClip 212 { frame 1 { stop(); } } movieClip 219 { frame 1 { stop(); } } movieClip 224 { } button 225 { on (release) { gotoAndStop(2); _root.playSound('click.wav', 100); } } button 241 { on (release) { gotoAndStop(1); _root.playSound('click.wav', 100); } } movieClip 242 { frame 1 { stop(); } } movieClip 249 { } movieClip 253 { } movieClip 257 { } movieClip 258 { frame 1 { _root.initEditor(this); } } movieClip 265 { frame 1 { stop(); } } movieClip 274 { } movieClip 275 { frame 1 { _root.initOptionsMenu(this); } } button 276 { on (release) { _root.saveSharedObject(); _root.playSound('click.wav', 100); goto = 'menu'; play(); } } button 277 { on (release) { _root.playSound('click.wav', 100); goto = 'erase'; play(); } } movieClip 286 { } movieClip 287 { frame 60 { _root.colorBurst(fireworks, 45, 15, 1); _root.colorBurst(fireworks, 45, 45, 1); _root.colorBurst(fireworks, 45, 75, 1); } frame 135 { _root.colorBurst(fireworks, 15, 75, 1); _root.colorBurst(fireworks, 45, 75, 1); _root.colorBurst(fireworks, 75, 75, 1); } } movieClip 301 { frame 1 { stop(); _root.readthis = true; _root.saveSharedObject(); } instance of movieClip 224 { onClipEvent (release) { with (_parent) { gotoAndStop(_currentframe + 1); } } } instance of movieClip 224 { onClipEvent (release) { with (_parent) { gotoAndStop(_currentframe - 1); } } } } movieClip 311 { frame 1 { stop(); } } movieClip 333 { } movieClip 334 { frame 1 { stop(); _root.createAchievementsMenu(this); } frame 2 { _root.createAchievementsMenu(this); } } movieClip 338 { } button 339 { on (release) { _root.clearSharedObject(); _root.playSound('click.wav', 100); goto = 'menu'; play(); } } button 340 { on (release) { _root.playSound('click.wav', 100); goto = 'options'; play(); } } movieClip 351 { frame 1 { _root.createHighscoresMenu(this); } } button 352 { on (release) { _root.playSound('click.wav', 100); goto = 'arcade'; play(); } } // unknown tag 88 length 143 button 358 { on (release) { _root.playSound('click.wav', 100); _root.getURL('http://daddiejay.newgrounds.com', '_blank'); } } button 359 { on (release) { _root.playSound('click.wav', 100); _root.getURL('http://ajiman.newgrounds.com', '_blank'); } } button 360 { on (release) { _root.playSound('click.wav', 100); _root.getURL('http://www.keygames.com', '_blank'); } } button 361 { on (release) { _root.playSound('click.wav', 100); _root.getURL('http://www.flashgamelicense.com', '_blank'); } } button 362 { on (release) { _root.playSound('click.wav', 100); _root.getURL('http://tehseph.newgrounds.com', '_blank'); } } movieClip 363 { } movieClip 367 { } movieClip 368 { frame 1 { stop(); } } movieClip 377 { frame 1 { stop(); } } movieClip 379 { } movieClip 383 { } movieClip 385 { } movieClip 386 { } movieClip 395 { } movieClip 398 { } movieClip 401 { frame 1 { stop(); if (!_root.soundenabled) { gotoAndStop(2); } } } movieClip 403 { frame 1 { stop(); if (!_root.musicenabled) { gotoAndStop(2); } } } movieClip 406 { } movieClip 408 { } movieClip 415 { } movieClip 423 { frame 1 { stop(); } } movieClip 424 { frame 1 { stop(); } instance of movieClip 398 { onClipEvent (release) { _root.getURL(_root.sponsorlink, '_blank'); } } instance of movieClip 401 { onClipEvent (release) { if (_root.soundenabled) { _root.soundenabled = false; this.gotoAndStop(2); } else { _root.soundenabled = true; this.gotoAndStop(1); } } } instance of movieClip 403 { onClipEvent (release) { if (_root.musicenabled) { _root.musicenabled = false; _root.stopMusic(); this.gotoAndStop(2); } else { _root.musicenabled = true; _root.playMusic('game.wav', 100, 0); this.gotoAndStop(1); } } } instance of movieClip 406 { onClipEvent (release) { if (_parent.curstate != -1 && _root.gamestarted) { _root.playSound('click.wav', 100); if (_root.canmove) { _parent.canvas_mask._x = 1000; _parent.drop_mask._x = 1000; _parent.effects_mask._x = 1000; _parent.game_paused._alpha = 100; _root.gamepaused = true; _root.canmove = false; } else { _parent.canvas_mask._x = -5; _parent.drop_mask._x = -5; _parent.effects_mask._x = -5; _parent.game_paused._alpha = 0; _root.gamepaused = false; _root.canmove = true; } } } } instance of movieClip 408 { onClipEvent (release) { if (_root.gamestarted) { _root.playSound('click.wav', 100); _parent._parent.gotoAndPlay('gamerestart'); _root.fadeMusic(60); } } } } movieClip 426 { } movieClip 449 { frame 1 { stop(); btn_next.onRelease = function () { gotoAndStop(_currentframe + 1); _root.playSound('click.wav', 100); }; } frame 2 { btn_next.onRelease = function () { gotoAndStop(_currentframe + 1); _root.playSound('click.wav', 100); }; btn_prev.onRelease = function () { gotoAndStop(_currentframe - 1); _root.playSound('click.wav', 100); }; } frame 5 { btn_close.onRelease = function () { _parent.play(); _root.playSound('click.wav', 100); }; btn_prev.onRelease = function () { gotoAndStop(_currentframe - 1); _root.playSound('click.wav', 100); }; } } movieClip 450 { frame 1 { if (_root.puzzlelevel == 1 && _root.gametype == 2) { gotoAndPlay('tutopen'); } else { stop(); } } frame 20 { stop(); } frame 40 { stop(); _root.gamestarted = true; } } movieClip 452 { } movieClip 454 { } movieClip 456 { } movieClip 458 { } movieClip 460 { } movieClip 462 { } movieClip 463 { frame 1 { this.restart = false; this.retry = false; this.nextpuzzle = false; var gamescr = this; gotoAndPlay('gamestart'); } frame 5 { _root.initGame(gameclip); } frame 20 { if (this.restart || this.retry || this.nextpuzzle) { this.restart = false; this.retry = false; this.nextpuzzle = false; } else { _root.playMusic('game.wav', 100, 0); } } frame 50 { stop(); this.press_enter.onEnterFrame = function () { if (_root.keymap[6][0]) { _root.playSound('start.wav', 100); play(); delete this.onEnterFrame; } }; } frame 70 { stop(); if (_root.puzzlelevel != 1 || _root.gametype == 1) { _root.gamestarted = true; } } frame 85 { _root.playSound('clapping.wav', 100); } frame 105 { _root.multiBurst(this, 230, 100); _root.playSound('firework.wav', 100); } frame 110 { _root.multiBurst(this, 130, 130); _root.playSound('firework.wav', 100); } frame 115 { _root.multiBurst(this, 330, 130); _root.playSound('firework.wav', 100); } frame 160 { stop(); this.press_continue.onEnterFrame = function () { if (_root.keymap[8][0]) { gamescr.play(); delete this.onEnterFrame; _root.fadeMusic(30); } else { if (_root.keymap[6][0]) { gamescr.play(); delete this.onEnterFrame; if (_root.puzzlelevel && _root.puzzlelevel < 20) { gamescr.nextpuzzle = true; } else { _root.fadeMusic(30); } } } }; } frame 175 { gotoAndPlay('fadeout'); } frame 180 { gotoAndPlay('fadeout'); } frame 195 { _root.playSound('lose.wav', 100); } frame 255 { stop(); this.press_continue.onEnterFrame = function () { if (_root.keymap[8][0]) { gamescr.play(); delete this.onEnterFrame; _root.fadeMusic(30); } else { if (_root.keymap[6][0]) { gamescr.play(); delete this.onEnterFrame; gamescr.retry = true; } } }; } frame 270 { gotoAndPlay('fadeout'); } frame 275 { gotoAndPlay('fadeout'); } frame 285 { _root.saveSharedObject(); } frame 290 { _root.playSound('lose.wav', 100); _root.fadeMusic(60); } frame 350 { stop(); this.press_continue.onEnterFrame = function () { if (_root.keymap[6][0]) { play(); delete this.onEnterFrame; } }; } frame 365 { gotoAndPlay('fadeout'); } frame 385 { gotoAndPlay('fadeout'); } frame 415 { stop(); if (this.restart || this.retry) { gotoAndPlay('gamestart'); } else { if (this.nextpuzzle) { ++_root.puzzlelevel; gotoAndPlay('gamestart'); } else { _parent.play(); } } } } movieClip 475 { frame 1 { _root.createScoreSubmitMenu(this); } } movieClip 478 { } movieClip 479 { } movieClip 480 { } movieClip 482 { frame 1 { stop(); this.maxframes = _root.getRandom(15, 60); this.curframe = 0; this.onEnterFrame = function () { ++this.curframe; if (this.curframe >= this.maxframes) { delete this.onEnterFrame; play(); } }; } } movieClip 487 { frame 1 { backdrop.timer = 0; backdrop.ecounter = 0; backdrop.onEnterFrame = function () { if (this.timer <= 0) { this.timer = _root.getRandom(5, 15); _root.multiBurst(this, _root.getRandom(0, 600), _root.getRandom(0, 300)); } else { --this.timer; } }; } } button 488 { on (release) { play(); _root.playSound('click.wav', 100); } } movieClip 489 { frame 1 { _root.loadSharedObject(); goto = 'menu'; _root.playMusic('menu.wav', 100, 0); } frame 50 { stop(); } frame 65 { gotoAndPlay(goto); } frame 90 { stop(); curmenu.canuse = true; } frame 105 { gotoAndPlay(goto); } frame 125 { stop(); } frame 140 { gotoAndPlay(goto); } frame 160 { stop(); } frame 175 { gotoAndPlay(goto); } frame 195 { stop(); } frame 210 { gotoAndPlay(goto); } frame 230 { stop(); } frame 245 { gotoAndPlay(goto); } frame 265 { stop(); } frame 280 { gotoAndPlay(goto); } frame 300 { stop(); } frame 315 { gotoAndPlay(goto); } frame 335 { stop(); } frame 350 { gotoAndPlay(goto); } frame 370 { stop(); } frame 385 { gotoAndPlay(goto); } frame 390 { _root.fadeMusic(30); } frame 415 { stop(); } frame 416 { var musicname = 'menu.wav'; var musicloop = 0; if (_root.gametype == 2) { if (_root.puzzlewon && _root.puzzlelevel == 20) { musicname = 'victory.mp3'; musicloop = 1; gotoAndPlay('treasure'); } else { if (!_root.puzzlelevel) { goto = 'editor'; } else { goto = 'puzzle'; } } } else { if (_root.score) { goto = 'addscore'; } else { goto = 'arcade'; } } _root.playMusic(musicname, 100, musicloop); } frame 440 { gotoAndPlay(goto); } frame 460 { stop(); } frame 475 { gotoAndPlay(goto); } frame 510 { stop(); } frame 565 { gotoAndPlay('credits'); } }




http://swfchan.com/26/127166/info.shtml
Created: 25/2 -2019 07:32:31 Last modified: 25/2 -2019 07:32:31 Server time: 29/04 -2024 14:52:39