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

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

Tetris.swf

This is the info page for
Flash #189381

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


Text
loading

loading.

loading..

loading...

play

<P ALIGN="CENTER"><FONT FACE="Verdana" SIZE="11" COLOR="#000000">www.neave.com/games</FONT></P>

1

start at level:

ok

lines

level

level

score

lines

0

0

score

0

quit

pause

yes

no

quit game?

game over

if you are logged
in your score
has been saved!

paused

LAST 10

next 10

NAME

SCORE

ActionScript [AS1/AS2]

Frame 1
stop(); Stage.showMenu = false; startLevel = 1; this.onEnterFrame = function () { sofar = this.getBytesLoaded(); total = this.getBytesTotal(); if (sofar == total) { delete this.onEnterFrame; nextFrame(); } };
Frame 2
String.prototype.addCommas = function () { var len = this.length; var str = ""; var i = 0; while (i <= len) { str = this.charAt(len - i) + str; if ((((i % 3) == 0) && (i > 0)) && (i < len)) { str = "," + str; } i++; } return(str); }; so = SharedObject.getLocal("neaveTetris"); if (!playerName.length) { playerName = so.data.playerName; } score = 0; level = startLevel; this.onKeyDown = function () { if (Key.getCode() == 81) { getURL ("javascript:window.close();"); } }; Key.addListener(this);
Frame 3
function checkBtns() { if (startLevel < 2) { DnBtn._alpha = 50; DnBtn.enabled = false; } else if (startLevel > 9) { UpBtn._alpha = 50; UpBtn.enabled = false; } else { UpBtn._alpha = (DnBtn._alpha = 100); UpBtn.enabled = (DnBtn.enabled = true); } } stop(); checkBtns();
Frame 4
function startFall() { timeout = setInterval(down, speed); } function stopFall() { clearInterval(timeout); } function drawBlock(num, blockPos) { B[blockPos].gotoAndStop(num + 1); } function drawNextBlock(num, blockPos) { N[blockPos].gotoAndStop(num + 1); } function drawThisShape() { if (moved) { var i = 0; while (i < 4) { drawBlock(0, block[i]); i++; } } else { moved = true; } var i = 0; while (i < 4) { blockPos = shape[((thisShape * 16) + (rotation * 4)) + i]; block[i] = ((((blockPos >> 2) * 6) + blockPos) + xPos) + yPos; drawBlock(thisShape + 1, block[i]); i++; } } function drawNextShape() { nextShape = int(Math.random() * 7); var i = 0; while (i < 11) { drawNextBlock(0, i); i++; } var i = 0; while (i < 4) { drawNextBlock(nextShape + 1, shape[(nextShape * 16) + i]); i++; } } function collision(x, y, rot) { var i = 0; while (i < 4) { blockPos = shape[((thisShape * 16) + (rot * 4)) + i]; if (flag[((((blockPos >> 2) * 6) + blockPos) + x) + y] != 0) { return(true); } i++; } return(false); } function left() { var i = 0; while (i < 4) { var x = (block[i] - yPos); while (x >= 0) { if (x == 0) { return(undefined); } x = x - 10; } i++; } if (!collision(xPos - 1, yPos, rotation)) { xPos--; drawThisShape(); } } function right() { var i = 0; while (i < 4) { var x = (block[i] - yPos); while (x >= 0) { if (x == 9) { return(undefined); } x = x - 10; } i++; } if (!collision(xPos + 1, yPos, rotation)) { xPos++; drawThisShape(); } } function rotate(clockwise) { testRot = rotation; if (clockwise) { testRot++; } else { testRot--; } if (testRot == 4) { testRot = 0; } else if (testRot == -1) { testRot = 3; } var i = 0; while (i < 4) { blockPos = shape[((thisShape * 16) + (testRot * 4)) + i]; var x = ((((blockPos >> 2) * 6) + blockPos) + xPos); while (x >= -1) { if (((x == -1) && (xPos < 0)) || ((x == 0) && (xPos > 6))) { return(undefined); } x = x - 10; } i++; } if ((((((blockPos >> 2) * 6) + blockPos) + xPos) + yPos) > 179) { return(undefined); } if (!collision(xPos, yPos, testRot)) { rotation = testRot; drawThisShape(); Snd.gotoAndPlay("popHi"); } } function down() { if (gameOver || (simult)) { return(undefined); } score++; if (((block[3] - xPos) < 170) && (!collision(xPos, yPos + 10, rotation))) { yPos = yPos + 10; drawThisShape(); } else { var i = 0; while (i < 4) { flag[block[i]] = thisShape + 1; i++; } simult = 0; var y = 0; while (y < 180) { var x = 0; while (x < 10) { if (flag[x + y] == 0) { break; } if (x == 9) { stopFall(); var i = 0; while (i < 10) { B[i + y].Bang.y = y; B[i + y].Bang.play(); i++; } simult++; lines++; } x++; } y = y + 10; } if (simult) { Snd.gotoAndPlay("win"); switch (simult) { case 1 : score = score + (level * 40); break; case 2 : score = score + (level * 100); break; case 3 : score = score + (level * 300); break; case 4 : score = score + (level * 1200); } } scoreTxt = String(score).addCommas(); if (collision(xPos, yPos, rotation) && (yPos == -10)) { gameOver = true; stopFall(); Snd.gotoAndPlay("end"); Quitter.gotoAndStop(2); Quitter._visible = true; } else { level = int(lines / 10) + startLevel; speed = ((level < 10) ? (600 - (level * 50)) : 100); xPos = 3; yPos = -10; rotation = 0; moved = false; thisShape = nextShape; if (!simult) { drawNextShape(); drawThisShape(); Snd.gotoAndPlay("popLo"); } } } updateAfterEvent(); } function pause() { if (gameOver || (Quitter._visible)) { return(undefined); } Snd.gotoAndPlay("popMed"); B._visible = !((Unpause._visible = (paused = !paused))); if (paused) { stopFall(); } else { startFall(); } } function quit() { if (gameOver) { return(undefined); } Snd.gotoAndPlay("popMed"); stopFall(); B._visible = (Unpause._visible = false); Quitter._visible = (paused = true); } this.onKeyDown = function () { if (gameOver || (simult)) { return(undefined); } var keyCode = Key.getCode(); switch (keyCode) { case 80 : pause(); break; case 81 : quit(); } if (!paused) { switch (keyCode) { case Key.LEFT : left(); break; case Key.RIGHT : right(); break; case Key.DOWN : this.onEnterFrame = down; break; case Key.UP : case 88 : rotate(true); break; case 90 : rotate(false); } } updateAfterEvent(); }; this.onKeyUp = function () { delete this.onEnterFrame; }; Key.addListener(this); gameOver = true; paused = (moved = false); score = (scoreTxt = (lines = (thisShape = (nextShape = (rotation = 0))))); level = startLevel; speed = ((level < 10) ? (600 - (level * 50)) : 100); xPos = 3; yPos = -10; shape = new Array(5, 6, 9, 10, 5, 6, 9, 10, 5, 6, 9, 10, 5, 6, 9, 10, 4, 5, 6, 9, 1, 4, 5, 9, 1, 4, 5, 6, 1, 5, 6, 9, 4, 5, 9, 10, 2, 5, 6, 9, 4, 5, 9, 10, 2, 5, 6, 9, 5, 6, 8, 9, 1, 5, 6, 10, 5, 6, 8, 9, 1, 5, 6, 10, 4, 5, 6, 8, 0, 1, 5, 9, 2, 4, 5, 6, 1, 5, 9, 10, 4, 5, 6, 10, 1, 5, 8, 9, 0, 4, 5, 6, 1, 2, 5, 9, 4, 5, 6, 7, 1, 5, 9, 13, 4, 5, 6, 7, 1, 5, 9, 13); block = new Array(0, 0, 0, 0); flag = new Array(); var i = 18; while (i >= 0) { var j = 0; while (j < 10) { var k = ((i * 10) + j); B.attachMovie("Block", k, k, {_x:j * 20, _y:i * 20}); flag[k] = 0; j++; } i--; } var i = 0; while (i < 3) { var j = 0; while (j < 4) { var k = ((i * 4) + j); N.attachMovie("Block", k, k, {_x:j * 20, _y:i * 20}); j++; } i++; }
Instance of Symbol 64 MovieClip "Quitter" in Frame 16
onClipEvent (load) { _visible = false; }
Instance of Symbol 67 MovieClip "Unpause" in Frame 16
onClipEvent (load) { _visible = false; }
Frame 24
stop(); drawNextShape(); thisShape = nextShape; drawThisShape(); drawNextShape(); gameOver = false; startFall();
Frame 25
stop();
Frame 26
function showScores() { var i = 10; while (i > 0) { var n = scoreboard["name" + (page + i)]; var s = scoreboard["score" + (page + i)]; var L = this["Line" + i]; L.RankTxt.text = (page + i) + "."; L.NameTxt.text = (n.length ? (n.toLowerCase()) : "-"); L.ScoreTxt.text = (s.length ? (s.addCommas()) : "-"); L.RankTxt.textColor = (L.NameTxt.textColor = (L.ScoreTxt.textColor = ((playerName.length && (n.toLowerCase() == playerName.toLowerCase())) ? 16777215 : 7833770))); L._visible = true; Loading._visible = false; i--; } } stop(); page = 0; maxScore = 100; BackBtn._visible = (NextBtn._visible = false); scoreboard = new LoadVars(); if (score) { scoreboard.score = score; scoreboard.name = (playerName.length ? (playerName.toLowerCase()) : ""); } scoreboard.game = "tetris"; scoreboard.sendAndLoad("http://localhost/games/games_score_lite.php", scoreboard, "POST"); scoreboard.onLoad = function (success) { if (success) { if (Boolean(scoreboard.success)) { NextBtn._visible = true; showScores(); } else { Loading.errorMsg = scoreboard.errorMsg.toLowerCase(); Loading.gotoAndStop(2); } } else { Loading.errorMsg = "could not load scores."; Loading.gotoAndStop(2); } }; score = 0;
Symbol 2 MovieClip Frame 1
stop();
Symbol 2 MovieClip Frame 7
x = Number(_parent._name) - y; with (_root) { var j = y; while (j > 0) { drawBlock((flag[x + j] = flag[(x + j) - 10]), x + j); j = j - 10; } if (!x) { simult--; } if (!simult) { drawNextShape(); drawThisShape(); startFall(); } }
Symbol 10 MovieClip [Block] Frame 1
stop();
Symbol 11 MovieClip [pnFlashGames] Frame 1
#initclip 1 pnFlashGames = function () { this.gid = _root.pn_gid; }; pnFlashGames.prototype.getUserInfo = function () { }; pnFlashGames.prototype.getUserInfo_Result = function () { }; pnFlashGames.prototype.storeScore = function (score) { varsObj = new LoadVars(); varsObj.score = score; varsObj.func = "storeScore"; varsObj.gid = this.gid; varsObj.type = "user"; varsObj.module = "pnFlashGames"; varsObj.parent = this; varsObj.onLoad = this.storeScore_Result; varsObj.sendAndLoad("index.php", varsObj, "POST"); }; pnFlashGames.prototype.storeScore_Result = function (success) { if (this.opSuccess == "true") { } }; Object.registerClass("pnFlashGames", pnFlashGames); #endinitclip
Symbol 21 Button
on (press) { Key.removeListener(this); play(); }
Symbol 24 Button
on (release) { getURL ("http://www.neave.com/games/", "_blank"); }
Symbol 27 MovieClip Frame 12
stop();
Symbol 31 Button
on (press) { play(); }
Symbol 33 Button
on (press) { startLevel++; checkBtns(); }
Symbol 34 Button
on (press) { startLevel--; checkBtns(); }
Symbol 39 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 3
stop();
Symbol 39 MovieClip Frame 5
stop();
Symbol 39 MovieClip Frame 7
stop();
Symbol 39 MovieClip Frame 9
stop();
Symbol 51 Button
on (press) { quit(); }
Symbol 53 Button
on (press) { pause(); }
Symbol 56 Button
on (press, keyPress "y") { tellTarget ("/") { stopFall(); }; gotoAndStop (2); }
Symbol 58 Button
on (press, keyPress "n") { _visible = false; _root.pause(); }
Symbol 63 Button
on (press) { delete scoreboard; tellTarget ("/") { gotoAndStop (2); }; }
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 2
stop(); pnConnector.storeScore(_parent.score); _root.PauseBtn._visible = (_root.QuitBtn._visible = false);
Instance of Symbol 65 MovieClip "Hit" in Symbol 67 MovieClip Frame 1
on (press) { _root.pause(); }
Symbol 70 Button
on (press) { delete scoreboard; gotoAndStop (2); }
Symbol 72 Button
on (press) { page = page - 10; if (page < 0) { page = 0; } if (page < 10) { BackBtn._visible = false; } NextBtn._visible = true; showScores(); }
Symbol 74 Button
on (press) { page = page + 10; if (page > maxScore) { page = maxScore; } if (page > (maxScore - 20)) { NextBtn._visible = false; } BackBtn._visible = true; showScores(); }
Symbol 80 MovieClip Frame 1
_visible = false;
Symbol 82 MovieClip Frame 1
stop(); errorMsg = "";

Library Items

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

Instance Names

"Dots"Frame 1Symbol 18 MovieClip
"Logo"Frame 2Symbol 27 MovieClip
"UpBtn"Frame 3Symbol 33 Button
"DnBtn"Frame 3Symbol 34 Button
"Snd"Frame 4Symbol 39 MovieClip
"B"Frame 4Symbol 40 MovieClip
"N"Frame 4Symbol 40 MovieClip
"QuitBtn"Frame 15Symbol 51 Button
"PauseBtn"Frame 15Symbol 53 Button
"Quitter"Frame 16Symbol 64 MovieClip
"Unpause"Frame 16Symbol 67 MovieClip
"BackBtn"Frame 25Symbol 72 Button
"NextBtn"Frame 25Symbol 74 Button
"Line1"Frame 25Symbol 80 MovieClip
"Line2"Frame 25Symbol 80 MovieClip
"Line3"Frame 25Symbol 80 MovieClip
"Line4"Frame 25Symbol 80 MovieClip
"Line5"Frame 25Symbol 80 MovieClip
"Line6"Frame 25Symbol 80 MovieClip
"Line7"Frame 25Symbol 80 MovieClip
"Line8"Frame 25Symbol 80 MovieClip
"Line9"Frame 25Symbol 80 MovieClip
"Line10"Frame 25Symbol 80 MovieClip
"Loading"Frame 25Symbol 82 MovieClip
"Bang"Symbol 10 MovieClip [Block] Frame 1Symbol 2 MovieClip
"pnConnector"Symbol 64 MovieClip Frame 2Symbol 11 MovieClip [pnFlashGames]
"Hit"Symbol 67 MovieClip Frame 1Symbol 65 MovieClip
"ScoreTxt"Symbol 80 MovieClip Frame 1Symbol 77 EditableText
"NameTxt"Symbol 80 MovieClip Frame 1Symbol 78 EditableText
"RankTxt"Symbol 80 MovieClip Frame 1Symbol 79 EditableText
"Dots"Symbol 82 MovieClip Frame 1Symbol 18 MovieClip

Special Tags

Protect (24)Timeline Frame 10 bytes ""
ExportAssets (56)Timeline Frame 1Symbol 10 as "Block"
ExportAssets (56)Timeline Frame 1Symbol 11 as "pnFlashGames"
ExportAssets (56)Timeline Frame 16Symbol 11 as "pnFlashGames"

Labels

"popLo"Symbol 39 MovieClip Frame 2
"popMed"Symbol 39 MovieClip Frame 4
"popHi"Symbol 39 MovieClip Frame 6
"win"Symbol 39 MovieClip Frame 8
"end"Symbol 39 MovieClip Frame 10

Dynamic Text Variables

startLevelSymbol 28 EditableText"1"
linesSymbol 46 EditableText"0"
levelSymbol 47 EditableText"0"
scoreTxtSymbol 49 EditableText"0"
errorMsgSymbol 81 EditableText""




http://swfchan.com/38/189381/info.shtml
Created: 15/10 -2018 17:21:50 Last modified: 15/10 -2018 17:21:50 Server time: 22/12 -2024 19:07:48