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

A
Very
Merry Christmas!


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

Evil Switch.swf

This is the info page for
Flash #24765

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


Text
SWAP TILES TO CREATE
MATCHING SETS OF THREE OR MORE.
SETS (COMBOS) ARE REMOVED AND ADDED
TO THE SOUL SAVER (LOWER RIGHT)
EXTRA BONUS POINTS AWARDED
FOR SOUL SAVER COMBOS
PRESS SPACE TO BEGIN

P L A Y   A G A I N

S U B M I T   S C O R E

ActionScript [AS1/AS2]

Frame 1
_global.ipb_get_gname = function () { var _local3 = _root._url; var _loc5 = ""; var _local2 = ""; var _loc6 = (_local3.lastIndexOf("\\") + 1); if ((_loc6 == -1) || (_loc6 == 0)) { _loc6 = _local3.lastIndexOf("/") + 1; } var _local1 = _loc6; var _loc7 = String(_local3).length; while (_local1 < String(_local3).length) { _local2 = _local3.charAt(_local1); if (_local2 == ".") { break; } _loc5 = _loc5 + _local2; _local1++; } return(_loc5); }; ipb_gname = _global.ipb_get_gname(); xx = new LoadVars(); xx.onLoad = function (success) { if (success) { _global.ipb_scoreVar = this.scoreVar; } }; fname = ((("arcade/gamedata/" + ipb_gname) + "/") + ipb_gname) + ".txt"; xx.load(fname);
Frame 2
Array.prototype.getItemIndex = function (tItem) { var _local3 = this.length; var _local2 = 0; while (_local2 < _local3) { if (this[_local2] == tItem) { return(_local2); } _local2++; } return(-1); }; this.goto = function (tStr) { _global.gGameState = tStr; this.gotoAndPlay(tStr); }; this.setKeys = function () { this.keyDetect = new Object(); this.keyDetect.onKeyDown = function () { keyPressed(Key.getCode() == 38, Key.getCode() == 40, Key.getCode() == 37, Key.getCode() == 39, Key.getCode() == 32); }; Key.addListener(this.keyDetect); this.pKeyDelay = 0; this.pKeyActive = true; }; this.setKeyInt = function () { }; this.clearKeyInt = function () { this.pKeyActive = true; clearInterval(this.pKeyDelay); }; this.keyPressed = function (aUp, aDown, aLeft, aRight, aAction) { switch (gGameState) { case "menu" : if (aAction) { this.soul_mc.clearMap(); this.goto("newGame"); } break; case "newGame" : if (aAction) { this.goto("game"); } break; case "game" : this.grid_mc.selector_mc.moveSelect(aRight - aLeft, aDown - aUp); if (!aAction) { break; } this.grid_mc.selector_mc.pressSelect(); } }; this.setKeys(); this.goto("menu");
Frame 9
stop();
Frame 15
stop();
Frame 21
this.init = function () { this.grid_mc.loadGrid(5); }; this.init(); stop();
Frame 22
this.gameover_mc.gotoAndStop("full");
Frame 44
this.goto("menu");
Symbol 77 MovieClip Frame 1
if (yy.savescore == 1) { if (ipb_score == undefined) { ipb_score = eval (_global.ipb_scoreVar); } xx = new LoadVars(); xx.arcadegid = _root.ibpro_gameid; xx.gscore = ipb_score; xx.gname = _global.ipb_get_gname(); xx.enscore = (ipb_score * yy.randchar) ^ yy.randchar2; xx.send("index.php?autocom=arcade&do=savescore", "_self", "POST"); stop(); } _global.ipbSend = function (ipb_score) { _root._visible = false; _root.enabled = false; xx = new LoadVars(); yy = new LoadVars(); xx.sendAndLoad("index.php?autocom=arcade&do=verifyscore", yy, "POST"); };
Symbol 15 MovieClip [mc.tile] Frame 1
this.init = function () { this._x = this.pPos.x; this._y = this.pPos.y; if (this._parent._name == "grid_mc") { var _local2 = Math.floor(this.pNum / 8); var _local3 = this.pNum - (Math.floor(this.pNum / 8) * 8); this._y = (-80 - ((8 - _local2) * 100)) - (_local3 * 15); } else { this._y = this._y - 160; } this.pSpeedX = 0; this.pSpeedY = 0; this.pLandTest = false; this.pCenter = new Object(); this.pCenter.x = (this.pCenter.y = 0); this.pAngle = 0; this.pAngleStep = 0.628318530717959; this.pDirection = 1; this.pDepth = this.getDepth(); this.pState = 0; this.gotoAndStop(this.pColour + 1); }; this.scaleTile = function () { this.pSpeedY = 0; this.pState = 4; this.addEnterFrame(); }; this.destroyTile = function () { this.pSpeedX = 0; this.pSpeedY = Math.random() * -8; this.pState = 5; this.addEnterFrame(); }; this.startTile = function () { this._x = this.pPos.x; this._y = this.pPos.y; this._xscale = 100; this._yscale = 100; this._alpha = 100; var _local2 = Math.floor(this.pNum / 8); var _local3 = this.pNum - (Math.floor(this.pNum / 8) * 8); this.pSpeedY = 15; this.pLandTest = false; this.pState = 1; this.addEnterFrame(); this.gotoAndStop(this.pColour + 1); this._parent.tileDropDone(); }; this.renewTile = function (n, c) { this.pPos.y = -140 + (40 * Math.floor(n / 8)); this._x = pPos.x; this._y = -250; this.pNum = n; this.pColour = c; this.gotoAndStop(this.pColour + 1); this.pSpeedY = 0; this.pState = 1; this.addEnterFrame(); }; this.hideTile = function () { this._y = this.pPos.y - 160; this.pState = 0; this.removeEnterFrame(); }; this.placeTile = function (tY, tC) { this._xscale = 100; this._yscale = 100; this._y = this.pPos.y - tY; this.pColour = tC; this.gotoAndStop(this.pColour + 1); this.pSpeedY = 0; this.pState = 1; this.addEnterFrame(); }; this.dropTile = function (d, tId) { this.pPos.y = this.pPos.y + (d * 40); this.pNum = this.pNum + (d * 8); this.pSpeedY = 0; this.pState = 1; this.addEnterFrame(); }; this.removeTile = function () { this.pSpeedY = 0; this.pState = 3; this.addEnterFrame(); }; this.moveTile = function (aX, aY, aDir, aNewNum) { this.pCenter.x = this.pPos.x - ((this.pPos.x - aX) / 2); this.pCenter.y = this.pPos.y - ((this.pPos.y - aY) / 2); this.pDirection = aDir; switch (true) { case this.pPos.x < aX : this.pAngle = -3.14159265358979; break; case this.pPos.x > aX : this.pAngle = 0; break; case this.pPos.y < aY : this.pAngle = -1.5707963267949; break; case this.pPos.y > aY : this.pAngle = (Math.PI/2); } this.pPos.x = aX; this.pPos.y = aY; this.pNum = aNewNum; this.pState = 2; this.addEnterFrame(); }; this.removeEnterFrame = function () { delete this.onEnterFrame; }; this.addEnterFrame = function () { this.onEnterFrame = function () { switch (this.pState) { case 1 : this.pSpeedY = Math.min(this.pSpeedY + 2, 50); this._y = this._y + this.pSpeedY; if (this._y >= this.pPos.y) { this._y = this.pPos.y; this.pState = 0; this._parent.tileDropDone(); } break; case 2 : this.pAngle = this.pAngle + (this.pAngleStep * this.pDirection); this._x = this.pCenter.x + (Math.cos(this.pAngle) * 20); this._y = this.pCenter.y + (Math.sin(this.pAngle) * 20); if (Math.abs(this._x - this.pPos.x) < 1) { if (Math.abs(this._y - this.pPos.y) < 1) { this._x = this.pPos.x; this._y = this.pPos.y; this.pState = 0; this._parent.tileSwapDone(); } } break; case 3 : this.pSpeedY = this.pSpeedY + 10; this._xscale = this._xscale - this.pSpeedY; this._yscale = this._yscale - this.pSpeedY; if (this._xscale <= 0) { this._xscale = 100; this._yscale = 100; this._y = -180; this.pState = 0; this._parent.tileClearDone(); } break; case 4 : this.pSpeedY = this.pSpeedY + 5; this._xscale = this._xscale - this.pSpeedY; this._yscale = this._yscale - this.pSpeedY; if (this._xscale <= 0) { this._xscale = 0; this._yscale = 0; this.pState = 0; this._parent.tileScaleDone(); } break; case 5 : this.pSpeedY = Math.min(this.pSpeedY + 2, 50); this._x = this._x + this.pSpeedX; this._y = this._y + this.pSpeedY; if (this._y < 180) { break; } this.pState = 0; this._parent.tileDestroyDone(); } if (pState == 0) { this.removeEnterFrame(); } }; }; this.init(); stop();
Symbol 20 MovieClip [mc.selector] Frame 1
this.init = function () { this.pPosX = (this.pPosY = 3); this.pPosNum = (this.pPosY * 8) + this.pPosX; this._x = 20 + ((this.pPosX - 4) * 40); this._y = 20 + ((this.pPosY - 4) * 40); this.pSelection = -1; this.pActive = false; this.pVisible = true; this.hilite1_mc._visible = false; this.hilite2_mc._visible = false; this.hilite3_mc._visible = false; this.hilite4_mc._visible = false; this.hideSelector(); this.pSelectSnd = new Sound(this); this.pSelectSnd.attachSound("snd.select"); }; this.setActive = function (tState) { this.pActive = tState; if (tState) { this._x = 20 + ((this.pPosX - 4) * 40); this._y = 20 + ((this.pPosY - 4) * 40); } }; this.hideSelector = function () { this._y = -200; }; this.removeSelector = function () { this.removeMovieClip(); }; this.moveSelect = function (aX, aY) { this.pPosX = this.pPosX + aX; this.pPosY = this.pPosY + aY; this.pPosX = Math.max(0, Math.min(7, this.pPosX)); this.pPosY = Math.max(0, Math.min(7, this.pPosY)); this._x = 20 + ((this.pPosX - 4) * 40); this._y = 20 + ((this.pPosY - 4) * 40); if (this.pSelection != -1) { if (this.pSelection != ((this.pPosY * 8) + this.pPosX)) { this._parent.swapBlocks(this.pSelection, (this.pPosY * 8) + this.pPosX); this.pSelection = -1; this.gotoAndStop("hilite"); this.hilite1_mc._visible = false; this.hilite2_mc._visible = false; this.hilite3_mc._visible = false; this.hilite4_mc._visible = false; } } }; this.pressSelect = function () { if (this.pActive) { if (this.pSelection == -1) { this.pSelection = (this.pPosY * 8) + this.pPosX; this.gotoAndStop("select"); this.hilite1_mc._visible = true; this.hilite2_mc._visible = true; this.hilite3_mc._visible = true; this.hilite4_mc._visible = true; this.pSelectSnd.start(); } else { this.pSelection = -1; this.gotoAndStop("hilite"); this.hilite1_mc._visible = false; this.hilite2_mc._visible = false; this.hilite3_mc._visible = false; this.hilite4_mc._visible = false; } } }; this.init();
Symbol 20 MovieClip [mc.selector] Frame 4
stop();
Symbol 24 MovieClip [mc.number] Frame 1
this.numbers_mc.stop(); this.init = function () { if (this.pId == undefined) { this.pTotal = 0; } else if (this.pId != 1) { this._x = -20; } else { this.pTotal = 0; } if (this.pId < 5) { this.attachMovie("mc.number", "num_mc", 0); this.num_mc.pId = this.pId + 1; this.num_mc.pSnapping = this.pSnapping; } }; this.step = function (tStep) { this.pTotal = this.pTotal + (tStep * 30); this.setTo(this.pTotal); }; this.setValue = function (t) { this.pTotal = t * 30; this.setTo(this.pTotal); }; this.setTo = function (tY) { var _local2 = tY % 300; var _local4 = -(_local2 - (_local2 % 30)); this.numbers_mc._y = -(_local2 - (_local2 % 30)); this.num_mc.setTo(tY / 10); }; this.init(); stop();
Symbol 51 Button
on (release) { this.goto("newGame"); }
Symbol 53 MovieClip Frame 2
this.init = function () { this.attachMovie("mc.number", "nums_mc", 1); this.nums_mc.pId = 1; this.nums_mc.pSnapping = true; this.nums_mc._x = 141; this.nums_mc._y = 17; this.nums_mc._xscale = 80; this.nums_mc._yscale = 80; this.pScore = 0; this.pBonus = 0; this.pLevel = 0; }; this.getScore = function () { return(this.pScore); }; this.updateScore = function (t) { this.pScore = this.pScore + ((t * 5) * this.pBonus); this.nums_mc.setValue(this.pScore); }; this.updateBonus = function (t) { this.pBonus++; this.bonus_mc.setValue(this.pBonus); }; this.clearBonus = function (t) { this.pBonus = 0; this.bonus_mc.setValue(this.pBonus); }; this.updateLevel = function () { this.pLevel++; this.level_mc.setValue(this.pLevel); }; this.init(); this.updateLevel();
Symbol 53 MovieClip Frame 5
this.stop();
Symbol 60 MovieClip Frame 1
this.timerMask_mc._yscale = 0; this.init = function () { if (this.pPause == undefined) { this.pPause = true; this.pSpeed = 0.2; this.pTime = 100; this.pStep = 100; } }; this.increaseSpeed = function () { this.pSpeed = this.pSpeed + 0.02; }; this.addTimer = function (t) { this.pTime = this.pTime + (t * 1.5); this.pStep = this.pTime; this.drawTimer(); }; this.resetTimer = function () { this.pPause = true; this.pStep = 100; this.pTime = 100; }; this.pauseTimer = function () { delete onEnterFrame; this.pPause = true; }; this.resumeTimer = function () { this.onEnterFrame = animate; this.pPause = false; }; this.fire = function () { this.pauseTimer(); this._parent.grid_mc.gameOver(); this._parent.grid_mc.selector_mc.removeSelector(); }; this.drawTimer = function () { if (this.pTime > 100) { this.pTime = 100; } else if (this.pTime < 0) { this.pTime = 0; this.fire(); } if (this.pTime <= this.pStep) { this.pStep = this.pStep - 2; this.timerMask_mc._yscale = 100 - this.pTime; } }; this.animate = function () { this.pTime = this.pTime - this.pSpeed; this.drawTimer(); }; this.init(); stop();
Symbol 60 MovieClip Frame 14
this.fire(); this.gotoAndStop(1);
Symbol 63 MovieClip Frame 2
function SmallGrid(aRange) { this.init(); } SmallGrid.prototype.init = function () { this.pData = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0); }; SmallGrid.prototype.reorder = function () { x = 0; while (x < 3) { var _local3 = 0; y = 0; while (y < 3) { var _local2 = x + (y * 3); if (this.pData[_local2] == 0) { _local3++; } else if (_local3 > 0) { this.pData[_local2 - (_local3 * 3)] = this.pData[_local2] + 0; this.pData[_local2] = 0; } y++; } x++; } }; SmallGrid.prototype.clearGrid = function () { var _local2 = 0; while (_local2 < 9) { this.pData[_local2] = 0; _local2++; } }; SmallGrid.prototype.checkGrid = function () { var _local5; var _local4; var _local3; var _local2; var _local6 = new Array(); _local5 = 0; while (_local5 < 9) { _local4 = _local5 - Math.floor(_local5 / 3); _local3 = _local5 % 3; _local2 = this.getCellColour(_local4); if (_local2 != 0) { if ((this.getCellColour(_local4 + 1) == _local2) && (this.getCellColour(_local4 + 2) == _local2)) { _local6.push(_local4, _local4 + 1, _local4 + 2); } } _local2 = this.getCellColour(_local3); if (_local2 != 0) { if ((this.getCellColour(_local3 + 3) == _local2) && (this.getCellColour(_local3 + 6) == _local2)) { _local6.push(_local3, _local3 + 3, _local3 + 6); } } _local5 = _local5 + 4; } return(_local6); }; SmallGrid.prototype.removeBlocks = function () { var _local9 = new Array([], []); var _local10 = this.pData.slice(); var _local3 = this.pColours.slice(); var _local5; var _local2; var _local8; var _local7 = 6; while (_local7 < 9) { _local5 = 0; _local2 = _local7 + 0; _local8 = 0; while (_local2 >= 0) { if (_local10[_local2] == 0) { if (_local3.length == 0) { _local3 = this.pColours.slice(); } else { var _local4 = _local3[Math.round(Math.random() * (_local3.length - 1))]; _local3.splice(_local3.getItemIndex(_local4), 1); } var _local6 = (_local7 - 6) + (_local8 * 3); _local9[1].push(new Array(_local2, _local6, _local4)); this.pData[_local6] = _local4; _local8++; _local5++; } else if (_local5 > 0) { _local9[0].push(new Array(_local2, _local5)); this.pData[_local2 + (_local5 * 3)] = _local10[_local2]; } _local2 = _local2 - 3; } _local7++; } return(_local9); }; SmallGrid.prototype.checkBlocks = function (tCellNum) { var _local12; var _local11; var _local6; var _local14; var _local16; var _local15; var _local17; var _local3; var _local7; var _local8; var _local10; var _local9; _local12 = new Array(); _local11 = new Array(); _local6 = this.getCellColour(tCellNum); _local14 = Math.floor(tCellNum / 3); _local16 = 2 - _local14; _local15 = tCellNum - (Math.floor(tCellNum / 3) * 3); _local17 = 2 - _local15; _local7 = 1; while (_local7 <= _local14) { _local3 = tCellNum - (_local7 * 3); if (this.getCellColour(_local3) == _local6) { _local11.push(_local3); } else { break; } _local7++; } _local8 = 1; while (_local8 <= _local16) { _local3 = tCellNum + (_local8 * 3); if (this.getCellColour(_local3) == _local6) { _local11.push(_local3); } else { break; } _local8++; } _local10 = 1; while (_local10 <= _local15) { _local3 = tCellNum - _local10; if (this.getCellColour(_local3) == _local6) { _local12.push(_local3); } else { break; } _local10++; } _local9 = 1; while (_local9 <= _local17) { _local3 = tCellNum + _local9; if (this.getCellColour(_local3) == _local6) { _local12.push(_local3); } else { break; } _local9++; } var _local13 = new Array(); _local13.push(tCellNum); if (_local12.length >= 2) { _local13 = _local13.concat(_local12); _parent.scores_mc.updateBonus(); _parent.scores_mc.updateScore(_local12.length + 1); _parent.fuse_mc.addFuse(_local12.length + 1); updateBlockCount(); } if (_local11.length >= 2) { _local13 = _local13.concat(_local11); _parent.scores_mc.updateBonus(); _parent.scores_mc.updateScore(_local11.length + 1); _parent.fuse_mc.addFuse(_local11.length + 1); updateBlockCount(); } if (_local13.length > 1) { var _local18 = _local13.length; var _local4 = 0; while (_local4 < _local18) { this.pData[_local13[_local4]] = 0; _local4++; } } return(_local13); }; SmallGrid.prototype.swapBlocks = function (tCellID1, tCellID2) { var _local3 = this.getCellColour(tCellID1); var _local2 = this.getCellColour(tCellID2); this.pData[tCellID1] = _local2; this.pData[tCellID2] = _local3; }; SmallGrid.prototype.fillGrid = function () { var _local3; var _local5; var _local6; var _local4; var _local2 = 0; while (_local2 < 9) { _local3 = this.pColours.slice(); if (Math.round(_local2 % 3) > 1) { _local6 = this.getCellColour(_local2 - 1); if ((_local6 - this.getCellColour(_local2 - 2)) == 0) { _local4 = _local3.getItemIndex(_local6); _local3.splice(_local4, 1); } } if (Math.floor(_local2 / 3) > 1) { _local5 = this.getCellColour(_local2 - 3); if ((_local5 - this.getCellColour(_local2 - 6)) == 0) { _local4 = _local3.getItemIndex(_local5); _local3.splice(_local4, 1); } } this.pData[_local2] = _local3[Math.round(Math.random() * (_local3.length - 1))]; _local2++; } }; SmallGrid.prototype.getCellColour = function (aNum) { var _local2 = this.pData[aNum]; return(_local2); }; SmallGrid.prototype.setCellColour = function (aId, aColour) { this.pData[aId] = aColour + 0; }; SmallGrid.prototype.printGrid = function () { var _local3 = ""; var _local4 = 0; while (_local4 < 3) { _local3 = ""; var _local2 = 0; while (_local2 < 3) { _local3 = _local3 + this.getCellColour((_local4 * 3) + _local2); _local2++; } _local4++; } }; this.init = function () { this.pGrid = new SmallGrid(); this.pBlockCount = 0; this.pSpaces = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0); this.pTileLocs = new Array(9); this.pTileCheck = 0; this.pClearedTiles = new Array(); this.setMask(this.soulMask_mc); var _local3; var _local2 = 0; while (_local2 < 9) { _local3 = new Object(); _local3.pNum = _local2; _local3.pPos = new Object(); _local3.pPos.x = -40 + (40 * (_local2 % 3)); _local3.pPos.y = 40 - (40 * Math.floor(_local2 / 3)); _local3.pColour = _local2 + 1; this.attachMovie("mc.tile", ("t" + _local2) + "_mc", _local2, _local3); this.pTileLocs[_local2] = ("t" + _local2) + "_mc"; _local2++; } }; this.clearMap = function () { var _local2 = 0; while (_local2 < 9) { this[this.pTileLocs[_local2]].hideTile(); this.pSpaces[_local2] = 0; _local2++; } this.pBlockCount = 0; this.pGrid.clearGrid(); }; this.addTile = function (tTileC) { if (this.pBlockCount < 9) { this.pBlockCount++; var _local2 = this.pSpaces.getItemIndex(0); this[this.pTileLocs[_local2]].placeTile(140, tTileC); this.pSpaces[_local2] = 1; this.pGrid.setCellColour(_local2, tTileC); this.pTileCheck++; } }; this.tileScaleDone = function () { if ((--this.pTileCheck) == 0) { var _local8 = this.pClearedTiles.length / 3; var _local6 = 0; while (_local6 < _local8) { var _local7 = this.pClearedTiles[_local6 * 3]; if (_local7 < 6) { if (_local7 == (this.pClearedTiles[(_local6 * 3) + 1] - 1)) { var _local4 = 0; while (_local4 < 3) { var _local5 = ((_local6 * 3) + _local4) % 3; var _local3 = 0; var _local2 = _local5; while (_local2 < (_local5 + 7)) { if (this.pSpaces[_local2] == 0) { _local3++; } else if (_local3 > 0) { this[this.pTileLocs[_local2]].hideTile(); this[this.pTileLocs[_local2 - (_local3 * 3)]].placeTile(40, this.pGrid.getCellColour(_local2)); this.pSpaces[_local2] = 0; this.pSpaces[_local2 - (_local3 * 3)] = 1; this.pTileCheck++; } _local2 = _local2 + 3; } _local4++; } this.pGrid.reorder(); } } _local6++; } } }; this.tileDropDone = function () { if ((--this.pTileCheck) == 0) { var _local3 = this.pGrid.checkGrid(); var _local4 = _local3.length; if (_local4 > 0) { this.pClearedTiles.splice(0); var _local2 = 0; while (_local2 < _local4) { this[this.pTileLocs[_local3[_local2]]].scaleTile(); this.pGrid.setCellColour(_local3[_local2], 0); this.pSpaces[_local3[_local2]] = 0; this.pBlockCount--; this.pClearedTiles.push(_local3[_local2]); this.pTileCheck++; _local2++; } if (this._parent._currentframe > 16) { this._parent.scores_mc.updateScore(100); } } } }; this.init(); stop();
Symbol 66 MovieClip Frame 53
this._parent.demoSoul_mc.addTile(4);
Symbol 79 Button
on (release) { this._parent.gotoAndPlay("exit"); }
Symbol 75 Button
on (release) { _root.score = _root.scores_mc.pScore; _global.ipbSend(_root.score); }
Symbol 68 MovieClip Frame 1
stop();
Symbol 68 MovieClip Frame 25
stop();
Symbol 71 MovieClip Frame 2
function GameGrid(aRange) { this.init(aRange); } GameGrid.prototype.init = function (aRange) { this.pData = new Array(64); }; GameGrid.prototype.setRange = function (aRange) { this.pColours = [1, 2, 3, 4, 5, 6, 7, 8].slice(0, aRange); this.fillGrid(); }; GameGrid.prototype.checkGrid = function () { var _local4; var _local3; var _local11; var _local12; var _local5; var _local9; var _local10; var _local6 = new Array(); _local12 = 0; _local11 = _local12; _local3 = _local11; _local4 = _local3; _local5 = 0; while (_local5 < 64) { _local9 = ((_local5 < 63) ? ((_local5 * 8) % 63) : (_local5)); _local10 = this.getCellColour(_local9); if (_local10 == _local12) { _local3++; } else { _local12 = _local10; if (_local3 > 2) { var _local7 = 1; while (_local7 <= _local3) { _local6.push(_local9 - (_local7 * 8)); _local7++; } _parent.scores_mc.updateBonus(); _parent.scores_mc.updateScore(_local3); _parent.pirate_mc.parrot_mc.playCombo(); _parent.timer_mc.addTimer(_local3); updateBlockCount(); } _local3 = 1; } if (_local9 > 55) { if (_local3 > 2) { var _local7 = 0; while (_local7 < _local3) { _local6.push(_local9 - (_local7 * 8)); _local7++; } _parent.scores_mc.updateBonus(); _parent.scores_mc.updateScore(_local3); _parent.pirate_mc.parrot_mc.playCombo(); _parent.timer_mc.addTimer(_local3); updateBlockCount(); } _local3 = 0; } _local10 = this.getCellColour(_local5); if (_local10 == _local11) { _local4++; } else { _local11 = _local10; if (_local4 > 2) { var _local7 = 1; while (_local7 <= _local4) { _local6.push(_local5 - _local7); _local7++; } _parent.scores_mc.updateBonus(); _parent.scores_mc.updateScore(_local4); _parent.pirate_mc.parrot_mc.playCombo(); _parent.timer_mc.addTimer(_local4); updateBlockCount(); } _local4 = 1; } if (((_local5 + 1) % 8) == 0) { if (_local4 > 2) { var _local7 = 0; while (_local7 < _local4) { _local6.push(_local5 - _local7); _local7++; } _parent.scores_mc.updateBonus(); _parent.scores_mc.updateScore(_local4); _parent.pirate_mc.parrot_mc.playCombo(); _parent.timer_mc.addTimer(_local4); updateBlockCount(); } _local4 = 0; } _local5++; } if (_local6.length > 1) { var _local13 = _local6.length; var _local8 = 0; while (_local8 < _local13) { if (this.getCellColour(_local6[_local8]) == 0) { _local6.splice(_local8, 1); _local13--; _local8--; } else { this.pData[_local6[_local8]] = 0; } _local8++; } } return(_local6); }; GameGrid.prototype.removeBlocks = function () { var _local9 = new Array([], []); var _local10 = this.pData.slice(); var _local3 = this.pColours.slice(); var _local5; var _local2; var _local8; var _local7 = 56; while (_local7 < 64) { _local5 = 0; _local2 = _local7 + 0; _local8 = 0; while (_local2 >= 0) { if (_local10[_local2] == 0) { if (_local3.length == 0) { _local3 = this.pColours.slice(); } else { var _local4 = _local3[Math.round(Math.random() * (_local3.length - 1))]; _local3.splice(_local3.getItemIndex(_local4), 1); } var _local6 = (_local7 - 56) + (_local8 * 8); _local9[1].push(new Array(_local2, _local6, _local4)); this.pData[_local6] = _local4; _local8++; _local5++; } else if (_local5 > 0) { _local9[0].push(new Array(_local2, _local5)); this.pData[_local2 + (_local5 * 8)] = _local10[_local2]; } _local2 = _local2 - 8; } _local7++; } return(_local9); }; GameGrid.prototype.checkBlocks = function (tCellNum) { var _local12; var _local11; var _local6; var _local14; var _local16; var _local15; var _local17; var _local3; var _local7; var _local8; var _local10; var _local9; _local12 = new Array(); _local11 = new Array(); _local6 = this.getCellColour(tCellNum); _local14 = Math.floor(tCellNum / 8); _local16 = 7 - _local14; _local15 = tCellNum - (Math.floor(tCellNum / 8) * 8); _local17 = 7 - _local15; _local7 = 1; while (_local7 <= _local14) { _local3 = tCellNum - (_local7 * 8); if (this.getCellColour(_local3) == _local6) { _local11.push(_local3); } else { break; } _local7++; } _local8 = 1; while (_local8 <= _local16) { _local3 = tCellNum + (_local8 * 8); if (this.getCellColour(_local3) == _local6) { _local11.push(_local3); } else { break; } _local8++; } _local10 = 1; while (_local10 <= _local15) { _local3 = tCellNum - _local10; if (this.getCellColour(_local3) == _local6) { _local12.push(_local3); } else { break; } _local10++; } _local9 = 1; while (_local9 <= _local17) { _local3 = tCellNum + _local9; if (this.getCellColour(_local3) == _local6) { _local12.push(_local3); } else { break; } _local9++; } var _local13 = new Array(); _local13.push(tCellNum); if (_local12.length >= 2) { _local13 = _local13.concat(_local12); _parent.scores_mc.updateBonus(); _parent.scores_mc.updateScore(_local12.length + 1); _parent.timer_mc.addTimer(_local12.length + 1); updateBlockCount(); } if (_local11.length >= 2) { _local13 = _local13.concat(_local11); _parent.scores_mc.updateBonus(); _parent.scores_mc.updateScore(_local11.length + 1); _parent.timer_mc.addTimer(_local11.length + 1); updateBlockCount(); } if (_local13.length > 1) { _parent.soul_mc.addTile(_local6); var _local18 = _local13.length; var _local4 = 0; while (_local4 < _local18) { this.pData[_local13[_local4]] = 0; _local4++; } } return(_local13); }; GameGrid.prototype.swapBlocks = function (tCellID1, tCellID2) { var _local3 = this.getCellColour(tCellID1); var _local2 = this.getCellColour(tCellID2); this.pData[tCellID1] = _local2; this.pData[tCellID2] = _local3; }; GameGrid.prototype.fillGrid = function () { var _local3; var _local5; var _local6; var _local4; var _local2 = 0; while (_local2 < 64) { _local3 = this.pColours.slice(); if (Math.round(_local2 % 8) > 1) { _local6 = this.getCellColour(_local2 - 1); if ((_local6 - this.getCellColour(_local2 - 2)) == 0) { _local4 = _local3.getItemIndex(_local6); _local3.splice(_local4, 1); } } if (Math.floor(_local2 / 8) > 1) { _local5 = this.getCellColour(_local2 - 8); if ((_local5 - this.getCellColour(_local2 - 16)) == 0) { _local4 = _local3.getItemIndex(_local5); _local3.splice(_local4, 1); } } this.pData[_local2] = _local3[Math.round(Math.random() * (_local3.length - 1))]; _local2++; } }; GameGrid.prototype.getCellColour = function (aNum) { var _local2 = this.pData[aNum]; return(_local2); }; GameGrid.prototype.printGrid = function () { var _local3 = ""; var _local4 = 0; while (_local4 < 8) { _local3 = ""; var _local2 = 0; while (_local2 < 8) { _local3 = _local3 + this.getCellColour((_local4 * 8) + _local2); _local2++; } _local4++; } }; this.init = function () { this.pBlockCount = 0; this.pLevelEnd = false; this.pRange = 0; this.pLevel = 1; this.attachMovie("mc.selector", "selector_mc", 10000); this.pGrid = new GameGrid(8); this.pTileLocs = new Array(64); this.pTileCheck = 0; this.pSwappedTiles = new Array(2); this.pClearedTiles = new Array(); this.setMask(this.tileMask_mc); this.pComboSnd = new Sound(this); this.pComboSnd.attachSound("snd.combo"); this.pErrorSnd = new Sound(this); this.pErrorSnd.attachSound("snd.error"); this.pSwishSnd = new Sound(this); this.pSwishSnd.attachSound("snd.swish"); this.pBellsSnd = new Sound(this); this.pBellsSnd.attachSound("snd.bells"); var _local3; var _local2 = 0; while (_local2 < 64) { _local3 = new Object(); _local3.pNum = _local2; _local3.pPos = new Object(); _local3.pPos.x = -140 + (40 * (_local2 % 8)); _local3.pPos.y = -140 + (40 * Math.floor(_local2 / 8)); _local3.pColour = 1; this.attachMovie("mc.tile", ("t" + _local2) + "_mc", _local2, _local3); this.pTileLocs[_local2] = ("t" + _local2) + "_mc"; _local2++; } }; this.printTileLocs = function () { var _local6 = 0; while (_local6 < 8) { var _local4 = ""; var _local3 = 0; while (_local3 < 8) { var _local5 = (_local6 * 8) + _local3; var _local2 = this.pTileLocs[_local5]; _local2 = _local2.slice(1, -3); _local4 = (_local4 + _local2) + ", "; _local3++; } _local6++; } }; this.updateBlockCount = function () { this.pComboSnd.start(); this.pBlockCount++; if (this.pLevel < 5) { this.pLevelEnd = this.pBlockCount >= 20; } }; this.gameOver = function () { this.pTileCheck = 0; var _local2 = 0; while (_local2 < 64) { this[this.pTileLocs[_local2]].destroyTile(); this.pTileCheck++; _local2++; } this.pBellsSnd.start(); }; this.tileDestroyDone = function () { if ((--this.pTileCheck) == 0) { this._parent.gameover_mc.gotoAndPlay("end"); } }; this.swapBlocks = function (aB1, aB2, aReturn) { this.selector_mc.setActive(false); var _local5 = -140 + (40 * (aB1 % 8)); var _local7 = -140 + (40 * Math.floor(aB1 / 8)); var _local8 = this.pTileLocs[aB1]; var _local4 = -140 + (40 * (aB2 % 8)); var _local6 = -140 + (40 * Math.floor(aB2 / 8)); var _local9 = this.pTileLocs[aB2]; if (_local4 != _local5) { var _local10 = ((_local4 > _local5) * 2) - 1; } else { var _local10 = ((_local6 > _local7) * 2) - 1; } this[_local8].moveTile(_local4, _local6, _local10, aB2); this[_local9].moveTile(_local5, _local7, _local10, aB1); this.pSwappedTiles[0] = aB1; this.pSwappedTiles[1] = aB2; if (!aReturn) { this.pSwishSnd.start(); this.pTileCheck = 2; } else { this.pErrorSnd.start(); this.selector_mc.setActive(true); } this.pTileLocs[aB1] = _local9; this.pTileLocs[aB2] = _local8; this.pGrid.swapBlocks(aB1, aB2); }; this.tileClearDone = function () { if ((--this.pTileCheck) == 0) { var _local3 = this.pGrid.removeBlocks(); var _local4 = this.pTileLocs.slice(); var _local9 = _local3[0].length; var _local2 = 0; while (_local2 < _local9) { var _local5 = _local3[0][_local2][0]; var _local6 = _local3[0][_local2][1]; this[_local4[_local5]].dropTile(_local6, _local5); this.pTileLocs[_local5 + (_local6 * 8)] = _local4[_local5]; this.pTileCheck++; _local2++; } _local9 = _local3[1].length; _local2 = 0; while (_local2 < _local9) { var _local5 = _local3[1][_local2][0]; var _local7 = _local3[1][_local2][1]; var _local8 = _local3[1][_local2][2]; this[_local4[_local5]].renewTile(_local7, _local8); this.pTileLocs[_local7] = _local4[_local5]; this.pTileCheck++; _local2++; } } }; this.tileScaleDone = function () { if ((--this.pTileCheck) == 0) { this._parent.scores_mc.clearBonus(); this._parent.scores_mc.updateLevel(); this.pRange = Math.min(++this.pRange, 8); this.loadGrid(this.pRange); this._parent.timer_mc.increaseSpeed(); this.pLevelEnd = false; } }; this.tileDropDone = function () { if ((--this.pTileCheck) == 0) { var _local3 = this.pGrid.checkGrid(); var _local4 = _local3.length; this.pTileCheck = 0; this.pClearedTiles.splice(0); if (_local4 > 2) { var _local2 = 0; while (_local2 < _local4) { this[this.pTileLocs[_local3[_local2]]].removeTile(); this.pClearedTiles.push(_local3[_local2]); this.pTileCheck++; _local2++; } } if (_local4 == 0) { if (this.pLevelEnd) { var _local2 = 0; while (_local2 < 64) { this[this.pTileLocs[_local2]].scaleTile(); this.pTileCheck++; _local2++; } this.pLevel++; this._parent.soul_mc.clearMap(); } else { this._parent.scores_mc.clearBonus(); this.selector_mc.setActive(true); this._parent.timer_mc.resumeTimer(); if (this.pBlockCount == 0) { this.pBellsSnd.start(); } } } } }; this.tileSwapDone = function () { if ((--this.pTileCheck) == 0) { this._parent.timer_mc.pauseTimer(); var _local4 = this.pGrid.checkBlocks(this.pSwappedTiles[0]); var _local3 = this.pGrid.checkBlocks(this.pSwappedTiles[1]); var _local5 = _local4.length; var _local6 = _local3.length; if (!((_local5 > 2) || (_local6 > 2))) { this.swapBlocks(this.pSwappedTiles[1], this.pSwappedTiles[0], 1); this._parent.timer_mc.resumeTimer(); } else { this.pTileCheck = 0; this.pClearedTiles.splice(0); if (_local5 > 2) { var _local2 = 0; while (_local2 < _local5) { this[this.pTileLocs[_local4[_local2]]].removeTile(); this.pClearedTiles.push(_local4[_local2]); this.pTileCheck++; _local2++; } } if (_local6 > 2) { var _local2 = 0; while (_local2 < _local6) { this[this.pTileLocs[_local3[_local2]]].removeTile(); this.pClearedTiles.push(_local3[_local2]); this.pTileCheck++; _local2++; } } } } }; this.loadGrid = function (tRange) { this.pRange = tRange; this._parent.timer_mc.resetTimer(); this.pGrid.setRange(tRange); this.pBlockCount = 0; var _local3; var _local2 = 0; while (_local2 < 64) { _local3 = this[("t" + _local2) + "_mc"]; _local3.pNum = _local2; _local3.pPos.x = -140 + (40 * (_local2 % 8)); _local3.pPos.y = -140 + (40 * Math.floor(_local2 / 8)); _local3.pColour = this.pGrid.getCellColour(_local2); this.pTileLocs[_local2] = ("t" + _local2) + "_mc"; _local3.startTile(); _local2++; } this.pTileCheck = 64; }; this.init(); stop();

Library Items

Symbol 77 MovieClipUsed by:Timeline
Symbol 1 Sound [snd.swish]
Symbol 2 Sound [snd.select]
Symbol 3 Sound [snd.error]
Symbol 4 Sound [snd.combo]
Symbol 5 Sound [snd.bells]
Symbol 6 GraphicUsed by:15
Symbol 7 GraphicUsed by:15 66
Symbol 8 GraphicUsed by:15
Symbol 9 GraphicUsed by:15 66
Symbol 10 GraphicUsed by:15 66
Symbol 11 GraphicUsed by:15
Symbol 12 GraphicUsed by:15
Symbol 13 GraphicUsed by:15
Symbol 14 GraphicUsed by:15
Symbol 15 MovieClip [mc.tile]Uses:6 7 8 9 10 11 12 13 14
Symbol 16 GraphicUsed by:17
Symbol 17 MovieClipUses:16Used by:20 66
Symbol 18 GraphicUsed by:19 66
Symbol 19 MovieClipUses:18Used by:20
Symbol 20 MovieClip [mc.selector]Uses:17 19
Symbol 21 GraphicUsed by:24 51 59
Symbol 22 GraphicUsed by:23
Symbol 23 MovieClipUses:22Used by:24
Symbol 24 MovieClip [mc.number]Uses:21 23Used by:53
Symbol 25 GraphicUsed by:Timeline
Symbol 26 GraphicUsed by:Timeline
Symbol 27 GraphicUsed by:Timeline
Symbol 28 GraphicUsed by:Timeline
Symbol 29 GraphicUsed by:Timeline
Symbol 30 GraphicUsed by:Timeline
Symbol 31 GraphicUsed by:Timeline
Symbol 32 GraphicUsed by:Timeline
Symbol 33 GraphicUsed by:Timeline
Symbol 34 GraphicUsed by:Timeline
Symbol 35 GraphicUsed by:38 43 45
Symbol 36 GraphicUsed by:38 43 45
Symbol 37 GraphicUsed by:38 43 45
Symbol 38 MovieClipUses:35 36 37Used by:Timeline
Symbol 39 GraphicUsed by:Timeline
Symbol 40 GraphicUsed by:Timeline
Symbol 41 GraphicUsed by:Timeline
Symbol 42 GraphicUsed by:Timeline
Symbol 43 MovieClipUses:37 35 36Used by:Timeline
Symbol 44 GraphicUsed by:46
Symbol 45 MovieClipUses:36 37 35Used by:46
Symbol 46 MovieClipUses:44 45Used by:Timeline
Symbol 47 GraphicUsed by:Timeline
Symbol 48 GraphicUsed by:51
Symbol 49 GraphicUsed by:51
Symbol 50 GraphicUsed by:51
Symbol 51 ButtonUses:48 49 50 21Used by:Timeline
Symbol 52 GraphicUsed by:53
Symbol 53 MovieClipUses:52 24Used by:Timeline
Symbol 54 GraphicUsed by:Timeline
Symbol 55 GraphicUsed by:Timeline
Symbol 56 GraphicUsed by:Timeline
Symbol 57 GraphicUsed by:60
Symbol 58 GraphicUsed by:60
Symbol 59 MovieClipUses:21Used by:60
Symbol 60 MovieClipUses:57 58 59Used by:Timeline
Symbol 61 GraphicUsed by:62
Symbol 62 MovieClipUses:61Used by:63
Symbol 63 MovieClipUses:62Used by:Timeline
Symbol 64 FontUsed by:65
Symbol 65 TextUses:64Used by:Timeline
Symbol 66 MovieClipUses:9 7 10 17 18Used by:Timeline
Symbol 67 GraphicUsed by:68
Symbol 76 GraphicUsed by:79
Symbol 73 FontUsed by:78 74
Symbol 78 TextUses:73Used by:79
Symbol 79 ButtonUses:76 78Used by:68
Symbol 72 GraphicUsed by:75
Symbol 74 TextUses:73Used by:75
Symbol 75 ButtonUses:72 74Used by:68
Symbol 68 MovieClipUses:67 79 75Used by:Timeline
Symbol 69 GraphicUsed by:70
Symbol 70 MovieClipUses:69Used by:71
Symbol 71 MovieClipUses:70Used by:Timeline

Instance Names

"scores_mc"Frame 10Symbol 53 MovieClip
"timer_mc"Frame 10Symbol 60 MovieClip
"demoSoul_mc"Frame 10Symbol 63 MovieClip
"gameover_mc"Frame 16Symbol 68 MovieClip
"grid_mc"Frame 16Symbol 71 MovieClip
"soul_mc"Frame 16Symbol 63 MovieClip
"hilite1_mc"Symbol 20 MovieClip [mc.selector] Frame 1Symbol 19 MovieClip
"hilite2_mc"Symbol 20 MovieClip [mc.selector] Frame 1Symbol 19 MovieClip
"hilite3_mc"Symbol 20 MovieClip [mc.selector] Frame 1Symbol 19 MovieClip
"hilite4_mc"Symbol 20 MovieClip [mc.selector] Frame 1Symbol 19 MovieClip
"numbers_mc"Symbol 24 MovieClip [mc.number] Frame 1Symbol 23 MovieClip
"level_mc"Symbol 53 MovieClip Frame 1Symbol 24 MovieClip [mc.number]
"timerMask_mc"Symbol 60 MovieClip Frame 1Symbol 59 MovieClip
"soulMask_mc"Symbol 63 MovieClip Frame 2Symbol 62 MovieClip
"tileMask_mc"Symbol 71 MovieClip Frame 2Symbol 70 MovieClip

Special Tags

Protect (24)Timeline Frame 10 bytes ""
ExportAssets (56)Timeline Frame 1Symbol 1 as "snd.swish"
ExportAssets (56)Timeline Frame 1Symbol 2 as "snd.select"
ExportAssets (56)Timeline Frame 1Symbol 3 as "snd.error"
ExportAssets (56)Timeline Frame 1Symbol 4 as "snd.combo"
ExportAssets (56)Timeline Frame 1Symbol 5 as "snd.bells"
ExportAssets (56)Timeline Frame 1Symbol 15 as "mc.tile"
ExportAssets (56)Timeline Frame 1Symbol 20 as "mc.selector"
ExportAssets (56)Timeline Frame 1Symbol 24 as "mc.number"
ExportAssets (56)Timeline Frame 10Symbol 24 as "mc.number"
ExportAssets (56)Timeline Frame 10Symbol 24 as "mc.number"
ExportAssets (56)Timeline Frame 10Symbol 24 as "mc.number"
ExportAssets (56)Timeline Frame 10Symbol 24 as "mc.number"
ExportAssets (56)Timeline Frame 10Symbol 24 as "mc.number"

Labels

"init"Frame 2
"menu"Frame 5
"newgame"Frame 10
"game"Frame 16
"exit"Frame 22
"hilite"Symbol 20 MovieClip [mc.selector] Frame 4
"select"Symbol 20 MovieClip [mc.selector] Frame 9
"start"Symbol 60 MovieClip Frame 2
"end"Symbol 68 MovieClip Frame 2
"full"Symbol 68 MovieClip Frame 11




http://swfchan.com/5/24765/info.shtml
Created: 24/5 -2019 13:43:10 Last modified: 24/5 -2019 13:43:10 Server time: 23/12 -2024 02:17:50