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

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

DeadTris.swf

This is the info page for
Flash #105776

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


Text
Level

Score

Lines

ActionScript [AS1/AS2]

Frame 2
stop();
Frame 3
var unitsize = 20; var unitheight = 20; var unitwidth = 10; var piececount = 0; var piecetype; var oldlines = 0; var speed = 10; var frame = 1; var level = 1; var realpaused = false; var levelspeed = 8; lines = 0; score = 0; moviecliplist = new Array(); xx = new Array("1", "2", "3", "4"); yy = new Array("1", "1", "1", "1"); framecount = 0; var paused = true; var rotatedcount = 0; unitmap = new Array(); var i = 0; while (i < unitwidth) { unitmap[i] = new Array(); unitmap[i][unitheight + 1] = 1; i++; } mouseListener = new Object(); mouseListener.onMouseDown = function () { if (paused && (realpaused == false)) { var _local2 = 0; while (_local2 <= unitheight) { var _local1 = 0; while (_local1 <= unitwidth) { unitmap[_local1][_local2] = undefined; _local1++; } _local2++; } _local2 = 0; while (_local2 < moviecliplist.length) { removeMovieClip(moviecliplist[_local2]); _local2++; } startgame(); } }; Mouse.addListener(mouseListener); keyListener = new Object(); keyListener.onKeyDown = function () { var _local2 = Key.getCode(); if (paused) { if (_local2 == 80) { paused = false; } } else { if (_local2 == 80) { realpaused = true; paused = true; } if (_local2 == 38) { if (piecetype == 0) { if (rotatedcount == 0) { if ((((unitmap[xx[0] + 2][yy[0] - 1] == undefined) && (unitmap[xx[1] + 1][yy[1]] == undefined)) && (unitmap[xx[2]][yy[2] + 1] == undefined)) && (unitmap[xx[3] - 1][yy[3] + 2] == undefined)) { xx[0] = xx[0] + 2; yy[0] = yy[0] - 1; xx[1] = xx[1] + 1; yy[2] = yy[2] + 1; xx[3] = xx[3] - 1; yy[3] = yy[3] + 2; rotatedcount++; } } else if (((((((unitmap[xx[0] - 2][yy[0] + 1] == undefined) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (unitmap[xx[2]][yy[2] - 1] == undefined)) && (unitmap[xx[3] + 1][yy[3] - 2] == undefined)) && (currentpiece._x != 0)) && (currentpiece._x != 20)) && (currentpiece._x != 180)) { xx[0] = xx[0] - 2; yy[0] = yy[0] + 1; xx[1] = xx[1] - 1; yy[2] = yy[2] - 1; xx[3] = xx[3] + 1; yy[3] = yy[3] - 2; rotatedcount = 0; } reposition(); } else if (piecetype == 1) { if (rotatedcount == 0) { if (((unitmap[xx[0] + 1][yy[0] - 1] == undefined) && (unitmap[xx[2] - 1][yy[2] + 1] == undefined)) && (unitmap[xx[3]][yy[3] - 2] == undefined)) { xx[0] = xx[0] + 1; yy[0] = yy[0] - 1; xx[2] = xx[2] - 1; yy[2] = yy[2] + 1; yy[3] = yy[3] - 2; rotatedcount++; } } else if (rotatedcount == 1) { if ((((unitmap[xx[0] - 1][yy[0] + 1] == undefined) && (unitmap[xx[2] - 1][yy[2] - 2] == undefined)) && (unitmap[xx[3]][yy[3] + 1] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; yy[0] = yy[0] + 1; xx[2] = xx[2] - 1; yy[2] = yy[2] - 2; yy[3] = yy[3] + 1; rotatedcount++; } } else if (rotatedcount == 2) { if (((unitmap[xx[0]][yy[0] + 1] == undefined) && (unitmap[xx[2] + 1][yy[2]] == undefined)) && (unitmap[xx[3] - 1][yy[3] + 1] == undefined)) { yy[0] = yy[0] + 1; xx[2] = xx[2] + 1; xx[3] = xx[3] - 1; yy[3] = yy[3] + 1; rotatedcount++; } } else if ((((unitmap[xx[0]][yy[0] - 1] == undefined) && (unitmap[xx[2] + 1][yy[2] + 1] == undefined)) && (unitmap[xx[3] + 1][yy[3]] == undefined)) && (xx[0] != 8)) { yy[0] = yy[0] - 1; xx[2] = xx[2] + 1; yy[2] = yy[2] + 1; xx[3] = xx[3] + 1; rotatedcount = 0; } reposition(); } else if (piecetype == 2) { if (rotatedcount == 0) { if (((unitmap[xx[0] + 1][yy[0] - 1] == undefined) && (unitmap[xx[2] + 1][yy[2]] == undefined)) && (unitmap[xx[3]][yy[3] + 1] == undefined)) { xx[0] = xx[0] + 1; yy[0] = yy[0] - 1; xx[2] = xx[2] + 1; yy[3] = yy[3] + 1; rotatedcount++; } } else if (rotatedcount == 1) { if ((((unitmap[xx[0] - 1][yy[0] + 1] == undefined) && (unitmap[xx[2] + 1][yy[2] - 1] == undefined)) && (unitmap[xx[3]][yy[3] - 2] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; yy[0] = yy[0] + 1; xx[2] = xx[2] + 1; yy[2] = yy[2] - 1; yy[3] = yy[3] - 2; rotatedcount++; } } else if (rotatedcount == 2) { if (((unitmap[xx[0]][yy[0] - 1] == undefined) && (unitmap[xx[2] - 1][yy[2] + 1] == undefined)) && (unitmap[xx[3] - 1][yy[3]] == undefined)) { yy[0] = yy[0] - 1; xx[2] = xx[2] - 1; yy[2] = yy[2] + 1; xx[3] = xx[3] - 1; rotatedcount++; } } else if ((((unitmap[xx[0]][yy[0] + 1] == undefined) && (unitmap[xx[2] - 1][yy[2]] == undefined)) && (unitmap[xx[3] + 1][yy[3] + 1] == undefined)) && (xx[0] != 8)) { yy[0] = yy[0] + 1; xx[2] = xx[2] - 1; xx[3] = xx[3] + 1; yy[3] = yy[3] + 1; rotatedcount = 0; } reposition(); } else if (piecetype == 4) { if (rotatedcount == 0) { if ((unitmap[xx[0] + 1][yy[0] - 2] == undefined) && (unitmap[xx[1] + 1][yy[1]] == undefined)) { xx[0] = xx[0] + 1; yy[0] = yy[0] - 2; xx[1] = xx[1] + 1; rotatedcount++; } } else if (((unitmap[xx[0] - 1][yy[0] + 2] == undefined) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; yy[0] = yy[0] + 2; xx[1] = xx[1] - 1; rotatedcount = 0; } reposition(); } else if (piecetype == 5) { if (rotatedcount == 0) { if (((unitmap[xx[0] + 1][yy[0]] == undefined) && (unitmap[xx[1] + 1][yy[1]] == undefined)) && (unitmap[xx[3]][yy[3] - 2] == undefined)) { xx[0] = xx[0] + 1; xx[1] = xx[1] + 1; yy[3] = yy[3] - 2; rotatedcount++; } } else if ((((unitmap[xx[0] - 1][yy[0]] == undefined) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (unitmap[xx[3]][yy[3] + 2] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; xx[1] = xx[1] - 1; yy[3] = yy[3] + 2; rotatedcount = 0; } reposition(); } else if (piecetype == 6) { if (rotatedcount == 0) { if (unitmap[xx[0] + 1][yy[0] - 1] == undefined) { xx[0] = xx[0] + 1; yy[0] = yy[0] - 1; rotatedcount++; } } else if (rotatedcount == 1) { if (((unitmap[xx[0] - 1][yy[0] + 1] == undefined) && (unitmap[xx[2]][yy[2] - 2] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; yy[0] = yy[0] + 1; yy[2] = yy[2] - 2; rotatedcount++; } } else if (rotatedcount == 2) { if (unitmap[xx[3] - 1][yy[3] + 1] == undefined) { xx[3] = xx[3] - 1; yy[3] = yy[3] + 1; rotatedcount++; } } else if (((unitmap[xx[2]][yy[2] + 2] == undefined) && (unitmap[xx[3] + 1][yy[3] - 1] == undefined)) && (currentpiece._x != 160)) { yy[2] = yy[2] + 2; xx[3] = xx[3] + 1; yy[3] = yy[3] - 1; rotatedcount = 0; } reposition(); } } if ((((((((((_local2 == 39) && (current4piece._x != 180)) && (unitmap[xx[0] - 1][yy[0]] == undefined)) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (unitmap[xx[2] - 1][yy[2]] == undefined)) && (unitmap[xx[3] - 1][yy[3]] == undefined)) && (unitmap[xx[0] + 1][yy[0]] == undefined)) && (unitmap[xx[1] + 1][yy[1]] == undefined)) && (unitmap[xx[2] + 1][yy[2]] == undefined)) && (unitmap[xx[3] + 1][yy[3]] == undefined)) { var _local1 = 0; while (_local1 < 4) { xx[_local1]++; _local1++; } reposition(); } if ((((((((((_local2 == 37) && (currentpiece._x != 0)) && (unitmap[xx[0] - 1][yy[0]] == undefined)) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (unitmap[xx[2] - 1][yy[2]] == undefined)) && (unitmap[xx[3] - 1][yy[3]] == undefined)) && (unitmap[xx[0] + 1][yy[0]] == undefined)) && (unitmap[xx[1] + 1][yy[1]] == undefined)) && (unitmap[xx[2] + 1][yy[2]] == undefined)) && (unitmap[xx[3] + 1][yy[3]] == undefined)) { var _local1 = 0; while (_local1 < 4) { xx[_local1]--; _local1++; } reposition(); } } }; Key.addListener(keyListener); gameover = function () { popup.swapDepths(5000); popup.gotoAndStop(2); realpaused = false; paused = true; }; reposition = function () { currentpiece._x = xx[0] * unitsize; current2piece._x = xx[1] * unitsize; current3piece._x = xx[2] * unitsize; current4piece._x = xx[3] * unitsize; currentpiece._y = yy[0] * unitsize; current2piece._y = yy[1] * unitsize; current3piece._y = yy[2] * unitsize; current4piece._y = yy[3] * unitsize; }; startgame = function () { paused = false; score = 0; lines = 0; level = 1; popup.gotoAndStop(3); newpiece(); }; newpieceattach = function () { if ((((unitmap[3][0] != undefined) || (unitmap[4][0] != undefined)) || (unitmap[5][0] != undefined)) || (unitmap[6][0] != undefined)) { gameover(); } else { oldlines = 0; var _local1 = 0; while (_local1 <= unitheight) { if ((((((((((unitmap[0][_local1] != undefined) && (unitmap[1][_local1] != undefined)) && (unitmap[2][_local1] != undefined)) && (unitmap[3][_local1] != undefined)) && (unitmap[4][_local1] != undefined)) && (unitmap[5][_local1] != undefined)) && (unitmap[6][_local1] != undefined)) && (unitmap[7][_local1] != undefined)) && (unitmap[8][_local1] != undefined)) && (unitmap[9][_local1] != undefined)) { var _local3 = 0; while (_local3 < unitwidth) { removeMovieClip(unitmap[_local3][_local1]); var _local2 = 0; while (_local2 < unitheight) { unitmap[_local3][_local1 - _local2]._y = unitmap[_local3][_local1 - _local2]._y + unitsize; unitmap[_local3][_local1 - _local2] = unitmap[_local3][(_local1 - _local2) - 1]; _local2++; } _local3++; } oldlines++; score = score + (((level * oldlines) * oldlines) * 100); lines++; if (((lines % 10) == 0) && (levelspeed > 1)) { levelspeed--; level++; } } _local1++; } xx[0] = xx[0] + 3; xx[1] = xx[1] + 3; xx[2] = xx[2] + 3; xx[3] = xx[3] + 3; _root.attachMovie("piece", "currentpiece" + piececount, piececount * 4); this["currentpiece" + piececount]._x = xx[0] * unitsize; this["currentpiece" + piececount]._y = yy[0] * unitsize; this["currentpiece" + piececount]._width = unitsize; this["currentpiece" + piececount]._height = unitsize; _root.attachMovie("piece", "current2piece" + piececount, (piececount * 4) + 1); this["current2piece" + piececount]._x = xx[1] * unitsize; this["current2piece" + piececount]._y = yy[1] * unitsize; this["current2piece" + piececount]._width = unitsize; this["current2piece" + piececount]._height = unitsize; _root.attachMovie("piece", "current3piece" + piececount, (piececount * 4) + 2); this["current3piece" + piececount]._x = xx[2] * unitsize; this["current3piece" + piececount]._y = yy[2] * unitsize; this["current3piece" + piececount]._width = unitsize; this["current3piece" + piececount]._height = unitsize; _root.attachMovie("piece", "current4piece" + piececount, (piececount * 4) + 3); this["current4piece" + piececount]._x = xx[3] * unitsize; this["current4piece" + piececount]._y = yy[3] * unitsize; this["current4piece" + piececount]._width = unitsize; this["current4piece" + piececount]._height = unitsize; currentpiece = _root["currentpiece" + piececount]; currentpiece.gotoAndStop(frame); current2piece = _root["current2piece" + piececount]; current2piece.gotoAndStop(frame); current3piece = _root["current3piece" + piececount]; current3piece.gotoAndStop(frame); current4piece = _root["current4piece" + piececount]; current4piece.gotoAndStop(frame); moviecliplist.push(currentpiece); moviecliplist.push(current2piece); moviecliplist.push(current3piece); moviecliplist.push(current4piece); } }; newpiece = function () { rotatedcount = 0; piececount++; var _local2 = Math.floor(Math.random() * 7); frame = _local2 + 1; piecetype = _local2; if (_local2 == 0) { var _local1 = 0; while (_local1 < 4) { xx[_local1] = _local1; yy[_local1] = 0; _local1++; } } else if (_local2 == 1) { xx[0] = 0; yy[0] = 0; xx[1] = 1; yy[1] = 0; xx[2] = 2; yy[2] = 0; xx[3] = 2; yy[3] = 1; } else if (_local2 == 2) { xx[0] = 0; yy[0] = 0; xx[1] = 1; yy[1] = 0; xx[2] = 0; yy[2] = 1; xx[3] = 2; yy[3] = 0; } else if (_local2 == 3) { xx[0] = 0; yy[0] = 0; xx[1] = 0; yy[1] = 1; xx[2] = 1; yy[2] = 1; xx[3] = 1; yy[3] = 0; } else if (_local2 == 4) { xx[0] = 0; yy[0] = 1; xx[1] = 1; yy[1] = 1; xx[2] = 1; yy[2] = 0; xx[3] = 2; yy[3] = 0; } else if (_local2 == 5) { xx[0] = 0; yy[0] = 0; xx[1] = 1; yy[1] = 0; xx[2] = 1; yy[2] = 1; xx[3] = 2; yy[3] = 1; } else if (_local2 == 6) { xx[0] = 0; yy[0] = 0; xx[1] = 1; yy[1] = 0; xx[2] = 1; yy[2] = 1; xx[3] = 2; yy[3] = 0; } newpieceattach(); }; _root.onEnterFrame = function () { framecount++; current4piece._y = (yy[3] - 1) * unitsize; current3piece._y = (yy[2] - 1) * unitsize; current2piece._y = (yy[1] - 1) * unitsize; currentpiece._y = (yy[0] - 1) * unitsize; if (Key.isDown(40) && (!paused)) { score = score + level; speed = 1; } else { speed = levelspeed; } if ((framecount % speed) == 0) { if (!paused) { if ((((unitmap[xx[0]][yy[0] + 1] == undefined) && (unitmap[xx[1]][yy[1] + 1] == undefined)) && (unitmap[xx[2]][yy[2] + 1] == undefined)) && (unitmap[xx[3]][yy[3] + 1] == undefined)) { current4piece._y = yy[3] * unitsize; current3piece._y = yy[2] * unitsize; current2piece._y = yy[1] * unitsize; currentpiece._y = yy[0] * unitsize; var _local1 = 0; while (_local1 < 4) { yy[_local1]++; _local1++; } } else { unitmap[xx[0]][yy[0]] = currentpiece; unitmap[xx[1]][yy[1]] = current2piece; unitmap[xx[2]][yy[2]] = current3piece; unitmap[xx[3]][yy[3]] = current4piece; newpiece(); framecount = 7; } } } };
Frame 4
var unitsize = 20; var unitheight = 20; var unitwidth = 10; var piececount = 0; var piecetype; var oldlines = 0; var speed = 40; var frame = 1; var level = 1; var realpaused = false; var levelspeed = 5; lines = 0; score = 0; moviecliplist = new Array(); xx = new Array("1", "2", "3", "4"); yy = new Array("1", "1", "1", "1"); framecount = 0; var paused = true; var rotatedcount = 0; unitmap = new Array(); var i = 0; while (i < unitwidth) { unitmap[i] = new Array(); unitmap[i][unitheight + 1] = 1; i++; } mouseListener = new Object(); mouseListener.onMouseDown = function () { if (paused && (realpaused == false)) { var _local2 = 0; while (_local2 <= unitheight) { var _local1 = 0; while (_local1 <= unitwidth) { unitmap[_local1][_local2] = undefined; _local1++; } _local2++; } _local2 = 0; while (_local2 < moviecliplist.length) { removeMovieClip(moviecliplist[_local2]); _local2++; } startgame(); } }; Mouse.addListener(mouseListener); keyListener = new Object(); keyListener.onKeyDown = function () { var _local2 = Key.getCode(); if (paused) { if (_local2 == 80) { paused = false; } } else { if (_local2 == 80) { realpaused = true; paused = true; } if (_local2 == 38) { if (piecetype == 0) { if (rotatedcount == 0) { if ((((unitmap[xx[0] + 2][yy[0] - 1] == undefined) && (unitmap[xx[1] + 1][yy[1]] == undefined)) && (unitmap[xx[2]][yy[2] + 1] == undefined)) && (unitmap[xx[3] - 1][yy[3] + 2] == undefined)) { xx[0] = xx[0] + 2; yy[0] = yy[0] - 1; xx[1] = xx[1] + 1; yy[2] = yy[2] + 1; xx[3] = xx[3] - 1; yy[3] = yy[3] + 2; rotatedcount++; } } else if (((((((unitmap[xx[0] - 2][yy[0] + 1] == undefined) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (unitmap[xx[2]][yy[2] - 1] == undefined)) && (unitmap[xx[3] + 1][yy[3] - 2] == undefined)) && (currentpiece._x != 0)) && (currentpiece._x != 20)) && (currentpiece._x != 180)) { xx[0] = xx[0] - 2; yy[0] = yy[0] + 1; xx[1] = xx[1] - 1; yy[2] = yy[2] - 1; xx[3] = xx[3] + 1; yy[3] = yy[3] - 2; rotatedcount = 0; } reposition(); } else if (piecetype == 1) { if (rotatedcount == 0) { if (((unitmap[xx[0] + 1][yy[0] - 1] == undefined) && (unitmap[xx[2] - 1][yy[2] + 1] == undefined)) && (unitmap[xx[3]][yy[3] - 2] == undefined)) { xx[0] = xx[0] + 1; yy[0] = yy[0] - 1; xx[2] = xx[2] - 1; yy[2] = yy[2] + 1; yy[3] = yy[3] - 2; rotatedcount++; } } else if (rotatedcount == 1) { if ((((unitmap[xx[0] - 1][yy[0] + 1] == undefined) && (unitmap[xx[2] - 1][yy[2] - 2] == undefined)) && (unitmap[xx[3]][yy[3] + 1] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; yy[0] = yy[0] + 1; xx[2] = xx[2] - 1; yy[2] = yy[2] - 2; yy[3] = yy[3] + 1; rotatedcount++; } } else if (rotatedcount == 2) { if (((unitmap[xx[0]][yy[0] + 1] == undefined) && (unitmap[xx[2] + 1][yy[2]] == undefined)) && (unitmap[xx[3] - 1][yy[3] + 1] == undefined)) { yy[0] = yy[0] + 1; xx[2] = xx[2] + 1; xx[3] = xx[3] - 1; yy[3] = yy[3] + 1; rotatedcount++; } } else if ((((unitmap[xx[0]][yy[0] - 1] == undefined) && (unitmap[xx[2] + 1][yy[2] + 1] == undefined)) && (unitmap[xx[3] + 1][yy[3]] == undefined)) && (xx[0] != 8)) { yy[0] = yy[0] - 1; xx[2] = xx[2] + 1; yy[2] = yy[2] + 1; xx[3] = xx[3] + 1; rotatedcount = 0; } reposition(); } else if (piecetype == 2) { if (rotatedcount == 0) { if (((unitmap[xx[0] + 1][yy[0] - 1] == undefined) && (unitmap[xx[2] + 1][yy[2]] == undefined)) && (unitmap[xx[3]][yy[3] + 1] == undefined)) { xx[0] = xx[0] + 1; yy[0] = yy[0] - 1; xx[2] = xx[2] + 1; yy[3] = yy[3] + 1; rotatedcount++; } } else if (rotatedcount == 1) { if ((((unitmap[xx[0] - 1][yy[0] + 1] == undefined) && (unitmap[xx[2] + 1][yy[2] - 1] == undefined)) && (unitmap[xx[3]][yy[3] - 2] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; yy[0] = yy[0] + 1; xx[2] = xx[2] + 1; yy[2] = yy[2] - 1; yy[3] = yy[3] - 2; rotatedcount++; } } else if (rotatedcount == 2) { if (((unitmap[xx[0]][yy[0] - 1] == undefined) && (unitmap[xx[2] - 1][yy[2] + 1] == undefined)) && (unitmap[xx[3] - 1][yy[3]] == undefined)) { yy[0] = yy[0] - 1; xx[2] = xx[2] - 1; yy[2] = yy[2] + 1; xx[3] = xx[3] - 1; rotatedcount++; } } else if ((((unitmap[xx[0]][yy[0] + 1] == undefined) && (unitmap[xx[2] - 1][yy[2]] == undefined)) && (unitmap[xx[3] + 1][yy[3] + 1] == undefined)) && (xx[0] != 8)) { yy[0] = yy[0] + 1; xx[2] = xx[2] - 1; xx[3] = xx[3] + 1; yy[3] = yy[3] + 1; rotatedcount = 0; } reposition(); } else if (piecetype == 4) { if (rotatedcount == 0) { if ((unitmap[xx[0] + 1][yy[0] - 2] == undefined) && (unitmap[xx[1] + 1][yy[1]] == undefined)) { xx[0] = xx[0] + 1; yy[0] = yy[0] - 2; xx[1] = xx[1] + 1; rotatedcount++; } } else if (((unitmap[xx[0] - 1][yy[0] + 2] == undefined) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; yy[0] = yy[0] + 2; xx[1] = xx[1] - 1; rotatedcount = 0; } reposition(); } else if (piecetype == 5) { if (rotatedcount == 0) { if (((unitmap[xx[0] + 1][yy[0]] == undefined) && (unitmap[xx[1] + 1][yy[1]] == undefined)) && (unitmap[xx[3]][yy[3] - 2] == undefined)) { xx[0] = xx[0] + 1; xx[1] = xx[1] + 1; yy[3] = yy[3] - 2; rotatedcount++; } } else if ((((unitmap[xx[0] - 1][yy[0]] == undefined) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (unitmap[xx[3]][yy[3] + 2] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; xx[1] = xx[1] - 1; yy[3] = yy[3] + 2; rotatedcount = 0; } reposition(); } else if (piecetype == 6) { if (rotatedcount == 0) { if (unitmap[xx[0] + 1][yy[0] - 1] == undefined) { xx[0] = xx[0] + 1; yy[0] = yy[0] - 1; rotatedcount++; } } else if (rotatedcount == 1) { if (((unitmap[xx[0] - 1][yy[0] + 1] == undefined) && (unitmap[xx[2]][yy[2] - 2] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; yy[0] = yy[0] + 1; yy[2] = yy[2] - 2; rotatedcount++; } } else if (rotatedcount == 2) { if (unitmap[xx[3] - 1][yy[3] + 1] == undefined) { xx[3] = xx[3] - 1; yy[3] = yy[3] + 1; rotatedcount++; } } else if (((unitmap[xx[2]][yy[2] + 2] == undefined) && (unitmap[xx[3] + 1][yy[3] - 1] == undefined)) && (currentpiece._x != 160)) { yy[2] = yy[2] + 2; xx[3] = xx[3] + 1; yy[3] = yy[3] - 1; rotatedcount = 0; } reposition(); } } if ((((((((((_local2 == 39) && (current4piece._x != 180)) && (unitmap[xx[0] - 1][yy[0]] == undefined)) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (unitmap[xx[2] - 1][yy[2]] == undefined)) && (unitmap[xx[3] - 1][yy[3]] == undefined)) && (unitmap[xx[0] + 1][yy[0]] == undefined)) && (unitmap[xx[1] + 1][yy[1]] == undefined)) && (unitmap[xx[2] + 1][yy[2]] == undefined)) && (unitmap[xx[3] + 1][yy[3]] == undefined)) { var _local1 = 0; while (_local1 < 4) { xx[_local1]++; _local1++; } reposition(); } if ((((((((((_local2 == 37) && (currentpiece._x != 0)) && (unitmap[xx[0] - 1][yy[0]] == undefined)) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (unitmap[xx[2] - 1][yy[2]] == undefined)) && (unitmap[xx[3] - 1][yy[3]] == undefined)) && (unitmap[xx[0] + 1][yy[0]] == undefined)) && (unitmap[xx[1] + 1][yy[1]] == undefined)) && (unitmap[xx[2] + 1][yy[2]] == undefined)) && (unitmap[xx[3] + 1][yy[3]] == undefined)) { var _local1 = 0; while (_local1 < 4) { xx[_local1]--; _local1++; } reposition(); } } }; Key.addListener(keyListener); gameover = function () { popup.swapDepths(5000); popup.gotoAndStop(2); realpaused = false; paused = true; }; reposition = function () { currentpiece._x = xx[0] * unitsize; current2piece._x = xx[1] * unitsize; current3piece._x = xx[2] * unitsize; current4piece._x = xx[3] * unitsize; currentpiece._y = yy[0] * unitsize; current2piece._y = yy[1] * unitsize; current3piece._y = yy[2] * unitsize; current4piece._y = yy[3] * unitsize; }; startgame = function () { paused = false; score = 0; lines = 0; level = 1; popup.gotoAndStop(3); newpiece(); }; newpieceattach = function () { if ((((unitmap[3][0] != undefined) || (unitmap[4][0] != undefined)) || (unitmap[5][0] != undefined)) || (unitmap[6][0] != undefined)) { gameover(); } else { oldlines = 0; var _local1 = 0; while (_local1 <= unitheight) { if ((((((((((unitmap[0][_local1] != undefined) && (unitmap[1][_local1] != undefined)) && (unitmap[2][_local1] != undefined)) && (unitmap[3][_local1] != undefined)) && (unitmap[4][_local1] != undefined)) && (unitmap[5][_local1] != undefined)) && (unitmap[6][_local1] != undefined)) && (unitmap[7][_local1] != undefined)) && (unitmap[8][_local1] != undefined)) && (unitmap[9][_local1] != undefined)) { var _local3 = 0; while (_local3 < unitwidth) { removeMovieClip(unitmap[_local3][_local1]); var _local2 = 0; while (_local2 < unitheight) { unitmap[_local3][_local1 - _local2]._y = unitmap[_local3][_local1 - _local2]._y + unitsize; unitmap[_local3][_local1 - _local2] = unitmap[_local3][(_local1 - _local2) - 1]; _local2++; } _local3++; } oldlines++; score = score + (((level * oldlines) * oldlines) * 100); lines++; if (((lines % 10) == 0) && (levelspeed > 1)) { levelspeed--; level++; } } _local1++; } xx[0] = xx[0] + 3; xx[1] = xx[1] + 3; xx[2] = xx[2] + 3; xx[3] = xx[3] + 3; _root.attachMovie("piece", "currentpiece" + piececount, piececount * 4); this["currentpiece" + piececount]._x = xx[0] * unitsize; this["currentpiece" + piececount]._y = yy[0] * unitsize; this["currentpiece" + piececount]._width = unitsize; this["currentpiece" + piececount]._height = unitsize; _root.attachMovie("piece", "current2piece" + piececount, (piececount * 4) + 1); this["current2piece" + piececount]._x = xx[1] * unitsize; this["current2piece" + piececount]._y = yy[1] * unitsize; this["current2piece" + piececount]._width = unitsize; this["current2piece" + piececount]._height = unitsize; _root.attachMovie("piece", "current3piece" + piececount, (piececount * 4) + 2); this["current3piece" + piececount]._x = xx[2] * unitsize; this["current3piece" + piececount]._y = yy[2] * unitsize; this["current3piece" + piececount]._width = unitsize; this["current3piece" + piececount]._height = unitsize; _root.attachMovie("piece", "current4piece" + piececount, (piececount * 4) + 3); this["current4piece" + piececount]._x = xx[3] * unitsize; this["current4piece" + piececount]._y = yy[3] * unitsize; this["current4piece" + piececount]._width = unitsize; this["current4piece" + piececount]._height = unitsize; currentpiece = _root["currentpiece" + piececount]; currentpiece.gotoAndStop(frame); current2piece = _root["current2piece" + piececount]; current2piece.gotoAndStop(frame); current3piece = _root["current3piece" + piececount]; current3piece.gotoAndStop(frame); current4piece = _root["current4piece" + piececount]; current4piece.gotoAndStop(frame); moviecliplist.push(currentpiece); moviecliplist.push(current2piece); moviecliplist.push(current3piece); moviecliplist.push(current4piece); } }; newpiece = function () { rotatedcount = 0; piececount++; var _local2 = Math.floor(Math.random() * 7); frame = _local2 + 1; piecetype = _local2; if (_local2 == 0) { var _local1 = 0; while (_local1 < 4) { xx[_local1] = _local1; yy[_local1] = 0; _local1++; } } else if (_local2 == 1) { xx[0] = 0; yy[0] = 0; xx[1] = 1; yy[1] = 0; xx[2] = 2; yy[2] = 0; xx[3] = 2; yy[3] = 1; } else if (_local2 == 2) { xx[0] = 0; yy[0] = 0; xx[1] = 1; yy[1] = 0; xx[2] = 0; yy[2] = 1; xx[3] = 2; yy[3] = 0; } else if (_local2 == 3) { xx[0] = 0; yy[0] = 0; xx[1] = 0; yy[1] = 1; xx[2] = 1; yy[2] = 1; xx[3] = 1; yy[3] = 0; } else if (_local2 == 4) { xx[0] = 0; yy[0] = 1; xx[1] = 1; yy[1] = 1; xx[2] = 1; yy[2] = 0; xx[3] = 2; yy[3] = 0; } else if (_local2 == 5) { xx[0] = 0; yy[0] = 0; xx[1] = 1; yy[1] = 0; xx[2] = 1; yy[2] = 1; xx[3] = 2; yy[3] = 1; } else if (_local2 == 6) { xx[0] = 0; yy[0] = 0; xx[1] = 1; yy[1] = 0; xx[2] = 1; yy[2] = 1; xx[3] = 2; yy[3] = 0; } newpieceattach(); }; _root.onEnterFrame = function () { framecount++; current4piece._y = (yy[3] - 1) * unitsize; current3piece._y = (yy[2] - 1) * unitsize; current2piece._y = (yy[1] - 1) * unitsize; currentpiece._y = (yy[0] - 1) * unitsize; if (Key.isDown(40) && (!paused)) { score = score + level; speed = 1; } else { speed = levelspeed; } if ((framecount % speed) == 0) { if (!paused) { if ((((unitmap[xx[0]][yy[0] + 1] == undefined) && (unitmap[xx[1]][yy[1] + 1] == undefined)) && (unitmap[xx[2]][yy[2] + 1] == undefined)) && (unitmap[xx[3]][yy[3] + 1] == undefined)) { current4piece._y = yy[3] * unitsize; current3piece._y = yy[2] * unitsize; current2piece._y = yy[1] * unitsize; currentpiece._y = yy[0] * unitsize; var _local1 = 0; while (_local1 < 4) { yy[_local1]++; _local1++; } } else { unitmap[xx[0]][yy[0]] = currentpiece; unitmap[xx[1]][yy[1]] = current2piece; unitmap[xx[2]][yy[2]] = current3piece; unitmap[xx[3]][yy[3]] = current4piece; newpiece(); framecount = 7; } } } };
Frame 5
var unitsize = 20; var unitheight = 20; var unitwidth = 10; var piececount = 0; var piecetype; var oldlines = 0; var speed = 70; var frame = 1; var level = 1; var realpaused = false; var levelspeed = 3; lines = 0; score = 0; moviecliplist = new Array(); xx = new Array("1", "2", "3", "4"); yy = new Array("1", "1", "1", "1"); framecount = 0; var paused = true; var rotatedcount = 0; unitmap = new Array(); var i = 0; while (i < unitwidth) { unitmap[i] = new Array(); unitmap[i][unitheight + 1] = 1; i++; } mouseListener = new Object(); mouseListener.onMouseDown = function () { if (paused && (realpaused == false)) { var _local2 = 0; while (_local2 <= unitheight) { var _local1 = 0; while (_local1 <= unitwidth) { unitmap[_local1][_local2] = undefined; _local1++; } _local2++; } _local2 = 0; while (_local2 < moviecliplist.length) { removeMovieClip(moviecliplist[_local2]); _local2++; } startgame(); } }; Mouse.addListener(mouseListener); keyListener = new Object(); keyListener.onKeyDown = function () { var _local2 = Key.getCode(); if (paused) { if (_local2 == 80) { paused = false; } } else { if (_local2 == 80) { realpaused = true; paused = true; } if (_local2 == 38) { if (piecetype == 0) { if (rotatedcount == 0) { if ((((unitmap[xx[0] + 2][yy[0] - 1] == undefined) && (unitmap[xx[1] + 1][yy[1]] == undefined)) && (unitmap[xx[2]][yy[2] + 1] == undefined)) && (unitmap[xx[3] - 1][yy[3] + 2] == undefined)) { xx[0] = xx[0] + 2; yy[0] = yy[0] - 1; xx[1] = xx[1] + 1; yy[2] = yy[2] + 1; xx[3] = xx[3] - 1; yy[3] = yy[3] + 2; rotatedcount++; } } else if (((((((unitmap[xx[0] - 2][yy[0] + 1] == undefined) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (unitmap[xx[2]][yy[2] - 1] == undefined)) && (unitmap[xx[3] + 1][yy[3] - 2] == undefined)) && (currentpiece._x != 0)) && (currentpiece._x != 20)) && (currentpiece._x != 180)) { xx[0] = xx[0] - 2; yy[0] = yy[0] + 1; xx[1] = xx[1] - 1; yy[2] = yy[2] - 1; xx[3] = xx[3] + 1; yy[3] = yy[3] - 2; rotatedcount = 0; } reposition(); } else if (piecetype == 1) { if (rotatedcount == 0) { if (((unitmap[xx[0] + 1][yy[0] - 1] == undefined) && (unitmap[xx[2] - 1][yy[2] + 1] == undefined)) && (unitmap[xx[3]][yy[3] - 2] == undefined)) { xx[0] = xx[0] + 1; yy[0] = yy[0] - 1; xx[2] = xx[2] - 1; yy[2] = yy[2] + 1; yy[3] = yy[3] - 2; rotatedcount++; } } else if (rotatedcount == 1) { if ((((unitmap[xx[0] - 1][yy[0] + 1] == undefined) && (unitmap[xx[2] - 1][yy[2] - 2] == undefined)) && (unitmap[xx[3]][yy[3] + 1] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; yy[0] = yy[0] + 1; xx[2] = xx[2] - 1; yy[2] = yy[2] - 2; yy[3] = yy[3] + 1; rotatedcount++; } } else if (rotatedcount == 2) { if (((unitmap[xx[0]][yy[0] + 1] == undefined) && (unitmap[xx[2] + 1][yy[2]] == undefined)) && (unitmap[xx[3] - 1][yy[3] + 1] == undefined)) { yy[0] = yy[0] + 1; xx[2] = xx[2] + 1; xx[3] = xx[3] - 1; yy[3] = yy[3] + 1; rotatedcount++; } } else if ((((unitmap[xx[0]][yy[0] - 1] == undefined) && (unitmap[xx[2] + 1][yy[2] + 1] == undefined)) && (unitmap[xx[3] + 1][yy[3]] == undefined)) && (xx[0] != 8)) { yy[0] = yy[0] - 1; xx[2] = xx[2] + 1; yy[2] = yy[2] + 1; xx[3] = xx[3] + 1; rotatedcount = 0; } reposition(); } else if (piecetype == 2) { if (rotatedcount == 0) { if (((unitmap[xx[0] + 1][yy[0] - 1] == undefined) && (unitmap[xx[2] + 1][yy[2]] == undefined)) && (unitmap[xx[3]][yy[3] + 1] == undefined)) { xx[0] = xx[0] + 1; yy[0] = yy[0] - 1; xx[2] = xx[2] + 1; yy[3] = yy[3] + 1; rotatedcount++; } } else if (rotatedcount == 1) { if ((((unitmap[xx[0] - 1][yy[0] + 1] == undefined) && (unitmap[xx[2] + 1][yy[2] - 1] == undefined)) && (unitmap[xx[3]][yy[3] - 2] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; yy[0] = yy[0] + 1; xx[2] = xx[2] + 1; yy[2] = yy[2] - 1; yy[3] = yy[3] - 2; rotatedcount++; } } else if (rotatedcount == 2) { if (((unitmap[xx[0]][yy[0] - 1] == undefined) && (unitmap[xx[2] - 1][yy[2] + 1] == undefined)) && (unitmap[xx[3] - 1][yy[3]] == undefined)) { yy[0] = yy[0] - 1; xx[2] = xx[2] - 1; yy[2] = yy[2] + 1; xx[3] = xx[3] - 1; rotatedcount++; } } else if ((((unitmap[xx[0]][yy[0] + 1] == undefined) && (unitmap[xx[2] - 1][yy[2]] == undefined)) && (unitmap[xx[3] + 1][yy[3] + 1] == undefined)) && (xx[0] != 8)) { yy[0] = yy[0] + 1; xx[2] = xx[2] - 1; xx[3] = xx[3] + 1; yy[3] = yy[3] + 1; rotatedcount = 0; } reposition(); } else if (piecetype == 4) { if (rotatedcount == 0) { if ((unitmap[xx[0] + 1][yy[0] - 2] == undefined) && (unitmap[xx[1] + 1][yy[1]] == undefined)) { xx[0] = xx[0] + 1; yy[0] = yy[0] - 2; xx[1] = xx[1] + 1; rotatedcount++; } } else if (((unitmap[xx[0] - 1][yy[0] + 2] == undefined) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; yy[0] = yy[0] + 2; xx[1] = xx[1] - 1; rotatedcount = 0; } reposition(); } else if (piecetype == 5) { if (rotatedcount == 0) { if (((unitmap[xx[0] + 1][yy[0]] == undefined) && (unitmap[xx[1] + 1][yy[1]] == undefined)) && (unitmap[xx[3]][yy[3] - 2] == undefined)) { xx[0] = xx[0] + 1; xx[1] = xx[1] + 1; yy[3] = yy[3] - 2; rotatedcount++; } } else if ((((unitmap[xx[0] - 1][yy[0]] == undefined) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (unitmap[xx[3]][yy[3] + 2] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; xx[1] = xx[1] - 1; yy[3] = yy[3] + 2; rotatedcount = 0; } reposition(); } else if (piecetype == 6) { if (rotatedcount == 0) { if (unitmap[xx[0] + 1][yy[0] - 1] == undefined) { xx[0] = xx[0] + 1; yy[0] = yy[0] - 1; rotatedcount++; } } else if (rotatedcount == 1) { if (((unitmap[xx[0] - 1][yy[0] + 1] == undefined) && (unitmap[xx[2]][yy[2] - 2] == undefined)) && (currentpiece._x != 0)) { xx[0] = xx[0] - 1; yy[0] = yy[0] + 1; yy[2] = yy[2] - 2; rotatedcount++; } } else if (rotatedcount == 2) { if (unitmap[xx[3] - 1][yy[3] + 1] == undefined) { xx[3] = xx[3] - 1; yy[3] = yy[3] + 1; rotatedcount++; } } else if (((unitmap[xx[2]][yy[2] + 2] == undefined) && (unitmap[xx[3] + 1][yy[3] - 1] == undefined)) && (currentpiece._x != 160)) { yy[2] = yy[2] + 2; xx[3] = xx[3] + 1; yy[3] = yy[3] - 1; rotatedcount = 0; } reposition(); } } if ((((((((((_local2 == 39) && (current4piece._x != 180)) && (unitmap[xx[0] - 1][yy[0]] == undefined)) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (unitmap[xx[2] - 1][yy[2]] == undefined)) && (unitmap[xx[3] - 1][yy[3]] == undefined)) && (unitmap[xx[0] + 1][yy[0]] == undefined)) && (unitmap[xx[1] + 1][yy[1]] == undefined)) && (unitmap[xx[2] + 1][yy[2]] == undefined)) && (unitmap[xx[3] + 1][yy[3]] == undefined)) { var _local1 = 0; while (_local1 < 4) { xx[_local1]++; _local1++; } reposition(); } if ((((((((((_local2 == 37) && (currentpiece._x != 0)) && (unitmap[xx[0] - 1][yy[0]] == undefined)) && (unitmap[xx[1] - 1][yy[1]] == undefined)) && (unitmap[xx[2] - 1][yy[2]] == undefined)) && (unitmap[xx[3] - 1][yy[3]] == undefined)) && (unitmap[xx[0] + 1][yy[0]] == undefined)) && (unitmap[xx[1] + 1][yy[1]] == undefined)) && (unitmap[xx[2] + 1][yy[2]] == undefined)) && (unitmap[xx[3] + 1][yy[3]] == undefined)) { var _local1 = 0; while (_local1 < 4) { xx[_local1]--; _local1++; } reposition(); } } }; Key.addListener(keyListener); gameover = function () { popup.swapDepths(5000); popup.gotoAndStop(2); realpaused = false; paused = true; }; reposition = function () { currentpiece._x = xx[0] * unitsize; current2piece._x = xx[1] * unitsize; current3piece._x = xx[2] * unitsize; current4piece._x = xx[3] * unitsize; currentpiece._y = yy[0] * unitsize; current2piece._y = yy[1] * unitsize; current3piece._y = yy[2] * unitsize; current4piece._y = yy[3] * unitsize; }; startgame = function () { paused = false; score = 0; lines = 0; level = 1; popup.gotoAndStop(3); newpiece(); }; newpieceattach = function () { if ((((unitmap[3][0] != undefined) || (unitmap[4][0] != undefined)) || (unitmap[5][0] != undefined)) || (unitmap[6][0] != undefined)) { gameover(); } else { oldlines = 0; var _local1 = 0; while (_local1 <= unitheight) { if ((((((((((unitmap[0][_local1] != undefined) && (unitmap[1][_local1] != undefined)) && (unitmap[2][_local1] != undefined)) && (unitmap[3][_local1] != undefined)) && (unitmap[4][_local1] != undefined)) && (unitmap[5][_local1] != undefined)) && (unitmap[6][_local1] != undefined)) && (unitmap[7][_local1] != undefined)) && (unitmap[8][_local1] != undefined)) && (unitmap[9][_local1] != undefined)) { var _local3 = 0; while (_local3 < unitwidth) { removeMovieClip(unitmap[_local3][_local1]); var _local2 = 0; while (_local2 < unitheight) { unitmap[_local3][_local1 - _local2]._y = unitmap[_local3][_local1 - _local2]._y + unitsize; unitmap[_local3][_local1 - _local2] = unitmap[_local3][(_local1 - _local2) - 1]; _local2++; } _local3++; } oldlines++; score = score + (((level * oldlines) * oldlines) * 100); lines++; if (((lines % 10) == 0) && (levelspeed > 1)) { levelspeed--; level++; } } _local1++; } xx[0] = xx[0] + 3; xx[1] = xx[1] + 3; xx[2] = xx[2] + 3; xx[3] = xx[3] + 3; _root.attachMovie("piece", "currentpiece" + piececount, piececount * 4); this["currentpiece" + piececount]._x = xx[0] * unitsize; this["currentpiece" + piececount]._y = yy[0] * unitsize; this["currentpiece" + piececount]._width = unitsize; this["currentpiece" + piececount]._height = unitsize; _root.attachMovie("piece", "current2piece" + piececount, (piececount * 4) + 1); this["current2piece" + piececount]._x = xx[1] * unitsize; this["current2piece" + piececount]._y = yy[1] * unitsize; this["current2piece" + piececount]._width = unitsize; this["current2piece" + piececount]._height = unitsize; _root.attachMovie("piece", "current3piece" + piececount, (piececount * 4) + 2); this["current3piece" + piececount]._x = xx[2] * unitsize; this["current3piece" + piececount]._y = yy[2] * unitsize; this["current3piece" + piececount]._width = unitsize; this["current3piece" + piececount]._height = unitsize; _root.attachMovie("piece", "current4piece" + piececount, (piececount * 4) + 3); this["current4piece" + piececount]._x = xx[3] * unitsize; this["current4piece" + piececount]._y = yy[3] * unitsize; this["current4piece" + piececount]._width = unitsize; this["current4piece" + piececount]._height = unitsize; currentpiece = _root["currentpiece" + piececount]; currentpiece.gotoAndStop(frame); current2piece = _root["current2piece" + piececount]; current2piece.gotoAndStop(frame); current3piece = _root["current3piece" + piececount]; current3piece.gotoAndStop(frame); current4piece = _root["current4piece" + piececount]; current4piece.gotoAndStop(frame); moviecliplist.push(currentpiece); moviecliplist.push(current2piece); moviecliplist.push(current3piece); moviecliplist.push(current4piece); } }; newpiece = function () { rotatedcount = 0; piececount++; var _local2 = Math.floor(Math.random() * 7); frame = _local2 + 1; piecetype = _local2; if (_local2 == 0) { var _local1 = 0; while (_local1 < 4) { xx[_local1] = _local1; yy[_local1] = 0; _local1++; } } else if (_local2 == 1) { xx[0] = 0; yy[0] = 0; xx[1] = 1; yy[1] = 0; xx[2] = 2; yy[2] = 0; xx[3] = 2; yy[3] = 1; } else if (_local2 == 2) { xx[0] = 0; yy[0] = 0; xx[1] = 1; yy[1] = 0; xx[2] = 0; yy[2] = 1; xx[3] = 2; yy[3] = 0; } else if (_local2 == 3) { xx[0] = 0; yy[0] = 0; xx[1] = 0; yy[1] = 1; xx[2] = 1; yy[2] = 1; xx[3] = 1; yy[3] = 0; } else if (_local2 == 4) { xx[0] = 0; yy[0] = 1; xx[1] = 1; yy[1] = 1; xx[2] = 1; yy[2] = 0; xx[3] = 2; yy[3] = 0; } else if (_local2 == 5) { xx[0] = 0; yy[0] = 0; xx[1] = 1; yy[1] = 0; xx[2] = 1; yy[2] = 1; xx[3] = 2; yy[3] = 1; } else if (_local2 == 6) { xx[0] = 0; yy[0] = 0; xx[1] = 1; yy[1] = 0; xx[2] = 1; yy[2] = 1; xx[3] = 2; yy[3] = 0; } newpieceattach(); }; _root.onEnterFrame = function () { framecount++; current4piece._y = (yy[3] - 1) * unitsize; current3piece._y = (yy[2] - 1) * unitsize; current2piece._y = (yy[1] - 1) * unitsize; currentpiece._y = (yy[0] - 1) * unitsize; if (Key.isDown(40) && (!paused)) { score = score + level; speed = 1; } else { speed = levelspeed; } if ((framecount % speed) == 0) { if (!paused) { if ((((unitmap[xx[0]][yy[0] + 1] == undefined) && (unitmap[xx[1]][yy[1] + 1] == undefined)) && (unitmap[xx[2]][yy[2] + 1] == undefined)) && (unitmap[xx[3]][yy[3] + 1] == undefined)) { current4piece._y = yy[3] * unitsize; current3piece._y = yy[2] * unitsize; current2piece._y = yy[1] * unitsize; currentpiece._y = yy[0] * unitsize; var _local1 = 0; while (_local1 < 4) { yy[_local1]++; _local1++; } } else { unitmap[xx[0]][yy[0]] = currentpiece; unitmap[xx[1]][yy[1]] = current2piece; unitmap[xx[2]][yy[2]] = current3piece; unitmap[xx[3]][yy[3]] = current4piece; newpiece(); framecount = 7; } } } };
Symbol 8 MovieClip [piece] Frame 1
stop();
Symbol 18 MovieClip Frame 1
function timerHandler() { var _local2 = this; if (!loadingComplete) { var _local3 = _root.getBytesLoaded() / _root.getBytesTotal(); bar._xscale = 100 * _local3; if (_local3 == 1) { loadingComplete = true; if (AUTO_PLAY) { startMovie(); } else { gotoAndStop ("loaded"); } return; } } else { dt = getTimer() - time; time = time + dt; frameAccum = frameAccum + dt; var _local1 = 0; while ((frameAccum >= FRAME_TIME) && (_local1 < MAX_FRAME_SKIP)) { advanceFrame(tankLogo, true, true); advanceFrame(loadingText, false, true); advanceFrame(barGfx, false, true); if (loadingComplete) { advanceFrame(_local2, false, false); } (frameAccum = frameAccum - FRAME_TIME); _local1++; } updateAfterEvent(); } } function advanceFrame(clip, recurse, loop) { var _local1 = clip; var _local2 = loop; var _local3 = recurse; if (!_local1) { } else { _local1.stop(); if (_local1._currentframe == _local1._totalframes) { if (_local2) { _local1.gotoAndStop(1); } } else { _local1.nextFrame(); } if (_local3) { for (childName in _local1) { if (typeof(_local1[childName]) == "movieclip") { advanceFrame(_local1[childName], _local3, _local2); } } } } } function startMovie() { clearInterval(intervalId); _root.play(); } _root.stop(); stop(); var FRAME_TIME = 33.3333333333333; var AUTO_PLAY = false; var MAX_FRAME_SKIP = 5; var loadingComplete; var intervalId; var time; var frameAccum; loadingComplete = false; intervalId = setInterval(this, "timerHandler", FRAME_TIME / 2); frameAccum = 0; time = getTimer(); timerHandler();
Symbol 18 MovieClip Frame 37
startMovie();
Symbol 22 Button
on (release) { _root.gotoAndStop(3); }
Symbol 25 Button
on (release) { _root.gotoAndStop(5); }
Symbol 28 Button
on (release) { _root.gotoAndStop(4); }
Symbol 39 MovieClip Frame 1
stop();

Library Items

Symbol 1 GraphicUsed by:8
Symbol 2 GraphicUsed by:8
Symbol 3 GraphicUsed by:8
Symbol 4 GraphicUsed by:8
Symbol 5 GraphicUsed by:8
Symbol 6 GraphicUsed by:8
Symbol 7 GraphicUsed by:8
Symbol 8 MovieClip [piece]Uses:1 2 3 4 5 6 7
Symbol 9 GraphicUsed by:18
Symbol 10 GraphicUsed by:18
Symbol 11 GraphicUsed by:12 18
Symbol 12 MovieClipUses:11Used by:18
Symbol 13 GraphicUsed by:14
Symbol 14 ButtonUses:13Used by:18
Symbol 15 ShapeTweeningUsed by:18
Symbol 16 ShapeTweeningUsed by:18
Symbol 17 GraphicUsed by:18
Symbol 18 MovieClipUses:9 10 12 14 11 15 16 17Used by:Timeline
Symbol 19 GraphicUsed by:Timeline
Symbol 20 GraphicUsed by:22
Symbol 21 GraphicUsed by:22
Symbol 22 ButtonUses:20 21Used by:Timeline
Symbol 23 GraphicUsed by:25
Symbol 24 GraphicUsed by:25
Symbol 25 ButtonUses:23 24Used by:Timeline
Symbol 26 GraphicUsed by:28
Symbol 27 GraphicUsed by:28
Symbol 28 ButtonUses:26 27Used by:Timeline
Symbol 29 GraphicUsed by:Timeline
Symbol 30 FontUsed by:31 32 33 34 35 36 42 43 44 47 48 49
Symbol 31 TextUses:30Used by:Timeline
Symbol 32 TextUses:30Used by:Timeline
Symbol 33 TextUses:30Used by:Timeline
Symbol 34 EditableTextUses:30Used by:Timeline
Symbol 35 EditableTextUses:30Used by:Timeline
Symbol 36 EditableTextUses:30Used by:Timeline
Symbol 37 GraphicUsed by:39
Symbol 38 GraphicUsed by:39
Symbol 39 MovieClipUses:37 38Used by:Timeline
Symbol 40 SoundUsed by:Timeline
Symbol 41 GraphicUsed by:Timeline
Symbol 42 EditableTextUses:30Used by:Timeline
Symbol 43 EditableTextUses:30Used by:Timeline
Symbol 44 EditableTextUses:30Used by:Timeline
Symbol 45 SoundUsed by:Timeline
Symbol 46 GraphicUsed by:Timeline
Symbol 47 EditableTextUses:30Used by:Timeline
Symbol 48 EditableTextUses:30Used by:Timeline
Symbol 49 EditableTextUses:30Used by:Timeline
Symbol 50 SoundUsed by:Timeline

Instance Names

"popup"Frame 3Symbol 39 MovieClip
"bar"Symbol 18 MovieClip Frame 1Symbol 12 MovieClip

Special Tags

ExportAssets (56)Timeline Frame 1Symbol 8 as "piece"

Labels

"loaded"Symbol 18 MovieClip Frame 2

Dynamic Text Variables

levelSymbol 34 EditableText""
scoreSymbol 35 EditableText""
linesSymbol 36 EditableText""
levelSymbol 42 EditableText""
scoreSymbol 43 EditableText""
linesSymbol 44 EditableText""
levelSymbol 47 EditableText""
scoreSymbol 48 EditableText""
linesSymbol 49 EditableText""




http://swfchan.com/22/105776/info.shtml
Created: 17/3 -2019 05:05:24 Last modified: 17/3 -2019 05:05:24 Server time: 05/05 -2024 07:53:00