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

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

Snake On A Plane.swf

This is the info page for
Flash #38464

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


Text
SCORE!

Score:

Highest:

highscore

WE GOT MOTHA
FUCKIN' SNAKES!

[ON] [OFF]
TheComet-Seppeku - TheComet

[ON] [OFF]
Press 'Z' to Toggle Music

[ON] [OFF]
TheComet-Seppeku - TheComet

[ON] [OFF]
Press 'Z' to Toggle Music

A GAME BY FAT_LIFEGUARD

SNAKE ON A
PLANE

START

speed

growth

Mouse Follow

Mode:

Speed:

Growth:

A GAME BY FAT_LIFEGUARD

NEW HIGH SCORE!!!

high

ActionScript [AS1/AS2]

Frame 2
function makeSnake(Void) { snake.push(attachMovie("head", "head", 50000)); head._x = 275; head._y = 190; snake.push(attachMovie("seg" + Math.floor((Math.random() * 3) + 1), "seg" + segments, segments)); snake[1]._x = snake[0]._x + 11.3; snake[1]._y = snake[0]._y; segments++; snake.push(snakeMC.attachMovie("tail", "tail", 1)); snake[2]._x = snake[1]._x + 11.3; snake[2]._y = snake[1]._y; } function moveCycle(Void) { if (!pauseMove) { var _local3 = snake.length - 1; while (_local3 >= 1) { var _local7 = snake[_local3]; var _local4 = snake[_local3 - 1]; _local7._rotation = _local4._rotation; _local7._x = _local4._x; _local7._y = _local4._y; _local3--; } } else { pauseMove = false; var _local5 = snake[2]; var _local7 = snakeMC.attachMovie(_local5.type, _local5._name, segments); _local7._rotation = _local5._rotation; _local7._x = _local5._x; _local7._y = _local5._y; _local5.removeMovieClip(); snake.splice(2, 1, _local7); } if (classic) { head._rotation = direction; } else { var _local8 = angle(head._x, head._y, _root._xmouse, _root._ymouse) - 180; _local8 = angleDiff(head._rotation, _local8); head._rotation = head._rotation + Math.max(-30, Math.min(_local8, 30)); } head._x = head._x - (Math.cos(head._rotation * dtr) * 15); head._y = head._y - (Math.sin(head._rotation * dtr) * 15); addSegs(); if (headHit() || (!playBox.hitTest(head._x, head._y, false))) { pause = true; if (score > high) { high = score + 1; nextFrame(); this.onEnterFrame = function () { snake.pop().removeMovieClip(); this.wait++; if ((snake.length == 0) && (wait > 100)) { gotoAndStop (3); delete this.onEnterFrame; } }; } else { this.onEnterFrame = function () { snake.pop().removeMovieClip(); if (snake.length == 0) { gotoAndStop (3); delete this.onEnterFrame; } }; } } if (target.hitTest(head._x, head._y, true)) { var _local6 = target._currentframe; while (target._currentframe == _local6) { target.gotoAndStop(Math.floor(Math.random() * 5) + 1); } targetPlace(); segsToAdd = segsToAdd + growth; score = score + 100; } } function headHit(Void) { var _local3 = head._x; var _local2 = head._y; var _local6 = new Object({x:-20, y:0}); head.localToGlobal(_local6); var _local5 = (_local6.x - _local3) / 10; var _local4 = (_local6.y - _local2) / 10; _local3 = _local3 - (_local5 * 10); _local2 = _local2 - (_local4 * 10); var _local1 = 0; while (_local1 <= 14) { if (snakeMC.hitTest(_local3, _local2, true)) { return(true); } _local3 = _local3 + _local5; _local2 = _local2 + _local4; _local1++; } return(false); } function addSegs(Void) { if (segsToAdd > 0) { segments++; snake.splice(1, 0, attachMovie("seg" + Math.floor((Math.random() * 3) + 1), "seg" + segments, segments)); snake[1]._x = head._x; snake[1]._y = head._y; snake[1]._rotation = head._rotation; segsToAdd--; pauseMove = true; } } function targetPlace(Void) { var _local1 = 50; do { target._x = 40 + Math.round(Math.random() * 420); target._y = 25 + Math.round(Math.random() * 275); _local1--; } while (targetCheck() && (_local1 > 0)); if (_local1 <= 0) { trace("Safety time out."); } } function targetCheck(Void) { if (target.hitTest(head._x, head._y, true)) { return(true); } var _local4 = Math.ceil(target._width / 4); var _local3 = Math.ceil(target._height / 4); var _local2 = 0; while (_local2 <= _local4) { var _local1 = 0; while (_local1 <= _local3) { if (snakeMC.hitTest(target._x + (_local2 * 4), target._y + (_local1 * 4), true)) { return(true); } _local1++; } _local2++; } return(false); } function angle(x1, y1, x2, y2) { var _local3 = x2 - x1; var _local2 = y2 - y1; var _local1 = Math.atan(_local2 / _local3) * rtd; if (_local3 < 0) { if (_local2 < 0) { _local1 = _local1 - 180; } else { _local1 = _local1 + 180; } } return(_local1); } function angleDiff(angle1, angle2) { var _local1 = angle2 - angle1; while (_local1 > 180) { _local1 = _local1 - 360; } while (_local1 < -180) { _local1 = _local1 + 360; } return(_local1); } _global.dtr = (Math.PI/180); _global.rtd = 1 / dtr; new FPSTracker(2); var speed = 5; var growth = 5; var classic = true; var snakeMC = createEmptyMovieClip("snakeMC", 0); var snake = new Array(); var segments = 2; var segsToAdd = 0; var pauseMove = false; var pause; var wait; var direction = 0; score = 0; high = 0; var dirTurn = new Object(); dirTurn.onKeyDown = function () { if (Key.isDown(37) && (head._rotation != 180)) { direction = 0; } else if (Key.isDown(39) && (head._rotation != 0)) { direction = 180; } else if (Key.isDown(38) && (head._rotation != -90)) { direction = 90; } else if (Key.isDown(40) && (head._rotation != 90)) { direction = -90; } }; var music = new Sound(_root); music.attachSound("music"); music.start(1, 5000); music.onKeyDown = function () { if (Key.getCode() == 90) { if (this.getVolume() == 100) { this.setVolume(0); _root.musicDisp.gotoAndPlay(161); } else { _root.musicDisp.gotoAndPlay(1); this.setVolume(100); } } }; Key.addListener(music); var contextMenu = new ContextMenu(); contextMenu.hideBuiltInItems(); _root.menu = contextMenu;
Frame 3
stop(); score = 0; direction = 0;
Frame 4
makeSnake(); targetPlace(); pause = false; wait = 50; this.onEnterFrame = function () { if (!pause) { if (wait < 1) { moveCycle(); wait = speed; } else { wait--; } score++; } }; Key.addListener(dirTurn);
Frame 5
stop();
Symbol 5 MovieClip [seg2] Frame 1
var type = "seg2";
Symbol 7 MovieClip [seg3] Frame 1
var type = "seg3";
Symbol 9 MovieClip [seg1] Frame 1
var type = "seg1";
Symbol 22 MovieClip [target] Frame 1
stop();
Symbol 32 Button
on (release) { getURL ("http://www.newgrounds.com", "blank"); }
Symbol 37 Button
on (release) { _root.play(); }
Symbol 38 MovieClip Frame 1
_root.stop(); PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100; if (PercentLoaded != 100) { bar._xscale = PercentLoaded; } else { gotoAndStop ("loaded"); }
Symbol 38 MovieClip Frame 2
gotoAndPlay (1);
Symbol 96 MovieClip [__Packages.FPSTracker] Frame 0
class FPSTracker { var fps1, fps2, fps3, fps4, fps5, format, trackerClip; function FPSTracker (placement, font, size, color) { if (placement == undefined) { placement = 3; } if (font == undefined) { font = "Sydnie"; } if (size == undefined) { size = 20; } if (color == undefined) { color = 0; } frames = 0; fps1 = (fps2 = (fps3 = (fps4 = (fps5 = 0)))); format = new TextFormat(); format.size = size; format.font = font; format.color = color; trackerClip = _root.createEmptyMovieClip("FPSTracker", 1000000); trackerClip.dad = this; switch (placement) { case 1 : trackerClip.createTextField("display", 1, 0, 0, 200, size * 1.5); trackerClip._x = 0; trackerClip._y = 0; format.align = "left"; break; case 2 : trackerClip.createTextField("display", 1, -200, 0, 200, size * 1.5); trackerClip._x = Stage.width; trackerClip._y = 0; format.align = "right"; break; case 3 : trackerClip.createTextField("display", 1, -200, (-size) * 1.5, 200, size * 1.5); trackerClip._x = Stage.width; trackerClip._y = Stage.height; format.align = "right"; break; case 4 : trackerClip.createTextField("display", 1, 0, (-size) * 1.5, 200, size * 1.5); trackerClip._x = 0; trackerClip._y = Stage.height; format.align = "left"; break; default : trace("Invalid placement parameter"); } trackerClip.display.selectable = false; trackerClip.onEnterFrame = function () { this.dad.frames++; }; setInterval(measure, 200, this); } function measure(tracker) { with (tracker) { fps5 = fps4; fps4 = fps3; fps3 = fps2; fps2 = fps1; fps1 = frames; frames = 0; trackerClip.display.text = (((fps1 + fps2) + fps3) + fps4) + fps5; trackerClip.display.setTextFormat(format); } } var frames = 0; }
Symbol 43 MovieClip Frame 1
this.onEnterFrame = function () { _x = (_x + 2); if (_x > 560) { this._y = Math.random() * 530; this.gotoAndStop(Math.floor(Math.random() * 4) + 2); this._x = -this._width; } }; gotoAndStop(Math.floor(Math.random() * 4) + 2);
Symbol 66 MovieClip Frame 160
gotoAndPlay (1);
Symbol 66 MovieClip Frame 320
gotoAndPlay (161);
Symbol 74 Button
on (release) { _root.nextFrame(); }
Symbol 79 Button
on (release) { speed = Math.min(10, speed + 1); _root.speed = 10 - speed; }
Symbol 80 Button
on (release) { growth = Math.min(10, growth + 1); _root.growth = growth; }
Symbol 81 Button
on (release) { if (_root.classic) { mode = "Mouse Follow"; _root.classic = false; } else { mode = "Classic Arrows"; _root.classic = true; } }
Symbol 82 Button
on (release) { speed = Math.max(1, speed - 1); _root.speed = 10 - speed; }
Symbol 83 Button
on (release) { growth = Math.max(1, growth - 1); _root.growth = growth; }
Symbol 90 MovieClip Frame 1
speed = 10 - _root.speed; growth = _root.growth; if (_root.classic) { mode = "Classic Arrows"; } else { mode = "Mouse Follow"; }
Symbol 95 MovieClip Frame 1
hscoredisp = _root.score;

Library Items

Symbol 1 Sound [music]
Symbol 2 GraphicUsed by:3
Symbol 3 MovieClip [head]Uses:2
Symbol 4 GraphicUsed by:5
Symbol 5 MovieClip [seg2]Uses:4
Symbol 6 GraphicUsed by:7
Symbol 7 MovieClip [seg3]Uses:6
Symbol 8 GraphicUsed by:9
Symbol 9 MovieClip [seg1]Uses:8
Symbol 10 GraphicUsed by:11
Symbol 11 MovieClip [tail]Uses:10
Symbol 12 BitmapUsed by:13
Symbol 13 GraphicUses:12Used by:22
Symbol 14 BitmapUsed by:15
Symbol 15 GraphicUses:14Used by:22
Symbol 16 BitmapUsed by:17
Symbol 17 GraphicUses:16Used by:22
Symbol 18 BitmapUsed by:19
Symbol 19 GraphicUses:18Used by:22
Symbol 20 BitmapUsed by:21
Symbol 21 GraphicUses:20Used by:22
Symbol 22 MovieClip [target]Uses:13 15 17 19 21Used by:Timeline
Symbol 23 GraphicUsed by:Timeline
Symbol 24 GraphicUsed by:38
Symbol 25 GraphicUsed by:26
Symbol 26 MovieClipUses:25Used by:38
Symbol 27 GraphicUsed by:38
Symbol 28 GraphicUsed by:31 32
Symbol 29 GraphicUsed by:31 32
Symbol 30 GraphicUsed by:31 32
Symbol 31 MovieClipUses:28 29 30Used by:32
Symbol 32 ButtonUses:31 28 29 30Used by:38
Symbol 33 GraphicUsed by:37
Symbol 34 GraphicUsed by:37
Symbol 35 GraphicUsed by:37
Symbol 36 GraphicUsed by:37
Symbol 37 ButtonUses:33 34 35 36Used by:38
Symbol 38 MovieClipUses:24 26 27 32 37Used by:Timeline
Symbol 96 MovieClip [__Packages.FPSTracker]
Symbol 39 GraphicUsed by:43
Symbol 40 GraphicUsed by:43
Symbol 41 GraphicUsed by:43
Symbol 42 GraphicUsed by:43
Symbol 43 MovieClipUses:39 40 41 42Used by:Timeline
Symbol 44 GraphicUsed by:Timeline
Symbol 45 GraphicUsed by:Timeline
Symbol 46 GraphicUsed by:Timeline
Symbol 47 FontUsed by:48 49 50 51 56 72 84 85 86 87 88 89 93 94
Symbol 48 EditableTextUses:47Used by:Timeline
Symbol 49 TextUses:47Used by:Timeline
Symbol 50 TextUses:47Used by:Timeline
Symbol 51 EditableTextUses:47Used by:Timeline
Symbol 52 GraphicUsed by:Timeline
Symbol 53 GraphicUsed by:54
Symbol 54 MovieClipUses:53Used by:Timeline
Symbol 55 GraphicUsed by:Timeline
Symbol 56 TextUses:47Used by:Timeline
Symbol 57 BitmapUsed by:58
Symbol 58 GraphicUses:57Used by:Timeline
Symbol 59 BitmapUsed by:60
Symbol 60 GraphicUses:59Used by:Timeline
Symbol 61 FontUsed by:62 63 64 65 67 91
Symbol 62 TextUses:61Used by:66
Symbol 63 TextUses:61Used by:66
Symbol 64 TextUses:61Used by:66
Symbol 65 TextUses:61Used by:66
Symbol 66 MovieClipUses:62 63 64 65Used by:Timeline
Symbol 67 EditableTextUses:61Used by:Timeline
Symbol 68 FontUsed by:69
Symbol 69 TextUses:68Used by:Timeline
Symbol 70 GraphicUsed by:90
Symbol 71 GraphicUsed by:74
Symbol 72 TextUses:47Used by:74
Symbol 73 GraphicUsed by:74
Symbol 74 ButtonUses:71 72 73Used by:90
Symbol 75 GraphicUsed by:90
Symbol 76 GraphicUsed by:79 80 81 82 83
Symbol 77 GraphicUsed by:79 80 81 82 83
Symbol 78 GraphicUsed by:79 80 81 82 83
Symbol 79 ButtonUses:76 77 78Used by:90
Symbol 80 ButtonUses:76 77 78Used by:90
Symbol 81 ButtonUses:76 77 78Used by:90
Symbol 82 ButtonUses:76 77 78Used by:90
Symbol 83 ButtonUses:76 77 78Used by:90
Symbol 84 EditableTextUses:47Used by:90
Symbol 85 EditableTextUses:47Used by:90
Symbol 86 EditableTextUses:47Used by:90
Symbol 87 TextUses:47Used by:90
Symbol 88 TextUses:47Used by:90
Symbol 89 TextUses:47Used by:90
Symbol 90 MovieClipUses:70 74 75 79 80 81 82 83 84 85 86 87 88 89Used by:Timeline
Symbol 91 EditableTextUses:61Used by:Timeline
Symbol 92 GraphicUsed by:95
Symbol 93 TextUses:47Used by:95
Symbol 94 EditableTextUses:47Used by:95
Symbol 95 MovieClipUses:92 93 94Used by:Timeline

Instance Names

"target"Frame 2Symbol 22 MovieClip [target]
"playBox"Frame 2Symbol 54 MovieClip
"musicDisp"Frame 2Symbol 66 MovieClip
"bar"Symbol 38 MovieClip Frame 1Symbol 26 MovieClip

Special Tags

ExportAssets (56)Timeline Frame 1Symbol 1 as "music"
ExportAssets (56)Timeline Frame 1Symbol 3 as "head"
ExportAssets (56)Timeline Frame 1Symbol 5 as "seg2"
ExportAssets (56)Timeline Frame 1Symbol 7 as "seg3"
ExportAssets (56)Timeline Frame 1Symbol 9 as "seg1"
ExportAssets (56)Timeline Frame 1Symbol 11 as "tail"
ExportAssets (56)Timeline Frame 1Symbol 22 as "target"
ExportAssets (56)Timeline Frame 1Symbol 96 as "__Packages.FPSTracker"
ExportAssets (56)Timeline Frame 2Symbol 22 as "target"
ExportAssets (56)Timeline Frame 3Symbol 22 as "target"
ExportAssets (56)Timeline Frame 4Symbol 22 as "target"
ExportAssets (56)Timeline Frame 5Symbol 22 as "target"

Labels

"loaded"Symbol 38 MovieClip Frame 3

Dynamic Text Variables

scoreSymbol 48 EditableText"SCORE!"
highSymbol 51 EditableText"highscore"
speedSymbol 84 EditableText"speed"
growthSymbol 85 EditableText"growth"
modeSymbol 86 EditableText"Mouse Follow"
hscoredispSymbol 94 EditableText"high"




http://swfchan.com/8/38464/info.shtml
Created: 13/5 -2019 05:54:03 Last modified: 13/5 -2019 05:54:03 Server time: 15/05 -2024 05:09:20