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

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

metallica snake.swf

This is the info page for
Flash #69023

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


Text
CLICK TO START

ActionScript [AS1/AS2]

Frame 1
function addPiece() { var p = this.attachMovie("piece", "piece" + aPieceList.length, aPieceList.length); p._x = aPieceList[aPieceList.length - 1]._x; p._y = aPieceList[aPieceList.length - 1]._y; aPieceList.push(p); } function moveFood() { var moveIt = true; while (moveIt) { food._x = Math.floor(Math.random() * uwh) * unit; food._y = Math.floor(Math.random() * uwh) * unit; moveIt = false; var i = 0; while (i < aPieceList.length) { if ((aPieceList[i]._x == food._x) && (aPieceList[i]._y == food._y)) { moveIt = true; } i++; } } } function gameOver() { delete this.onEnterFrame; tScore.text = "You Lose. Score: " + score; canMove = false; } function startGame() { var i = (aPieceList.length - 1); while (i >= 0) { aPieceList[i].removeMovieClip(); aPieceList.pop(); i--; } score = 0; var p = this.attachMovie("piece", "piece" + aPieceList.length, aPieceList.length); aPieceList.push(p); p._x = 10 * unit; p._y = 10 * unit; var food = this.attachMovie("food", "food", -1); var c = 0; moveFood(); var startingLength = 3; var i = 1; while (i < startingLength) { addPiece(); i++; } this.onEnterFrame = function () { canMove = true; tScore.text = score; var i = (aPieceList.length - 1); while (i > 0) { aPieceList[i]._x = aPieceList[i - 1]._x; aPieceList[i]._y = aPieceList[i - 1]._y; i--; } if (dir == 0) { aPieceList[0]._y = aPieceList[0]._y - unit; } else if (dir == 1) { aPieceList[0]._x = aPieceList[0]._x - unit; } else if (dir == 2) { aPieceList[0]._y = aPieceList[0]._y + unit; } else if (dir == 3) { aPieceList[0]._x = aPieceList[0]._x + unit; } if ((aPieceList[0]._y / unit) == 20) { aPieceList[0]._y = 0; } else if ((aPieceList[0]._y / unit) == -1) { aPieceList[0]._y = 19 * unit; } else if ((aPieceList[0]._x / unit) == -1) { aPieceList[0]._x = 19 * unit; } else if ((aPieceList[0]._x / unit) == 20) { aPieceList[0]._x = 0; } if ((aPieceList[0]._x == food._x) && (aPieceList[0]._y == food._y)) { score = score + ((10 * aPieceList.length) / 2); moveFood(); addPiece(); } var i = 1; while (i < aPieceList.length) { if ((aPieceList[0]._x == aPieceList[i]._x) && (aPieceList[0]._y == aPieceList[i]._y)) { gameOver(); } i++; } }; } var unit = 15; var uwh = 20; var canMove = false; var dir = 2; var score = 0; aPieceList = new Array(); mouseListener = new Object(); mouseListener.onMouseDown = function () { if (!canMove) { canMove = true; startGame(); } }; Mouse.addListener(mouseListener); k = new Object(); k.onKeyDown = function () { var k = Key.getCode(); if (((k == 38) && (dir != 2)) && (canMove)) { dir = 0; canMove = false; } else if (((k == 37) && (dir != 3)) && (canMove)) { dir = 1; canMove = false; } else if (((k == 40) && (dir != 0)) && (canMove)) { dir = 2; canMove = false; } else if (((k == 39) && (dir != 1)) && (canMove)) { dir = 3; canMove = false; } }; Key.addListener(k);

Library Items

Symbol 1 GraphicUsed by:2
Symbol 2 MovieClip [body]Uses:1
Symbol 3 GraphicUsed by:4
Symbol 4 MovieClip [food]Uses:3
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClip [piece]Uses:5
Symbol 7 GraphicUsed by:Timeline
Symbol 8 FontUsed by:9
Symbol 9 EditableTextUses:8Used by:Timeline
Symbol 10 SoundUsed by:Timeline

Instance Names

"tScore"Frame 1Symbol 9 EditableText

Special Tags

ExportAssets (56)Timeline Frame 1Symbol 2 as "body"
ExportAssets (56)Timeline Frame 1Symbol 4 as "food"
ExportAssets (56)Timeline Frame 1Symbol 6 as "piece"




http://swfchan.com/14/69023/info.shtml
Created: 10/4 -2019 17:16:42 Last modified: 10/4 -2019 17:16:42 Server time: 27/04 -2024 13:36:59