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/68711372?noj=FRM68711372-22DC" width="1" height="1"></div>

the-road-less-taken.swf

This is the info page for
Flash #98455

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


Text
TIMELEFT:

0

LEVEL:

0

R

RR
RR

5

reset

retry

The Road
Less Taken

start

ActionScript [AS1/AS2]

Frame 1
var lastmoved = 0; var counter = 0; var max_time = 200; var player = new GridObject(player_mc, {}, {x:1, y:0}); var baddies = new Array(); var nextMove = -1; var keyListener_obj = new Object(); var soundOn = true; var playing = false; Key.addListener(keyListener_obj); keyListener_obj.onKeyDown = function () { switch (Key.getCode()) { case 38 : nextMove = GridObject.UP; return; case 40 : nextMove = GridObject.DOWN; return; case 37 : nextMove = GridObject.LEFT; return; case 39 : nextMove = GridObject.RIGHT; return; case 13 : if (!alert._visible) { break; } alert.retry_btn.onRelease(); } }; alert._visible = false; welcome._visible = false; moveGrid = function (obj) { obj.mc._x = (35 + (35 * obj.pos.x)) + (0.17 * ((max_time / 2) - obj.mc._xscale)); obj.mc._y = (350 - (35 * obj.pos.y)) + (0.17 * ((max_time / 2) - obj.mc._xscale)); }; movePossible = function (move, pos) { switch (move) { case GridObject.UP : return(pos.y != 9); case GridObject.DOWN : return(pos.y != 0); case GridObject.LEFT : return(pos.x != 0); case GridObject.RIGHT : return(pos.x != 2); } return(false); }; checkWin = function () { if ((player.pos.x == 1) && (player.pos.y == 9)) { for (var _local1 in player.moves) { } newRound(); } }; transformMove = function (move) { if (move == GridObject.UP) { return(GridObject.DOWN); } if (move == GridObject.DOWN) { return(GridObject.UP); } return(move); }; makeAlert = function (message) { playSound(2); retryRound(); alert._visible = true; alert.message.text = message; playing = false; }; playSound = function (num) { if (soundOn) { kirupaSound = new Sound(this); switch (num) { case 0 : kirupaSound.attachSound("pop"); break; case 1 : kirupaSound.attachSound("cling"); break; case 2 : kirupaSound.attachSound("clong"); } kirupaSound.start(); } }; start = function () { welcome._visible = true; }; reset = function () { var _local1 = 0; while (_local1 < baddies.length) { removeMovieClip(baddies[_local1].mc); _local1++; } baddies = new Array(); retryRound(); }; retryRound = function () { var _local1 = 0; while (_local1 < baddies.length) { baddies[_local1].pos = {x:1, y:9}; moveGrid(baddies[_local1]); _local1++; } counter = 0; lastmoved = 0; nextMove = -1; player.pos = {x:1, y:0}; player.moves = {}; moveGrid(player); level_txt.text = baddies.length; }; newRound = function () { var _local3 = "bad" + baddies.length; duplicateMovieClip (bad, _local3, this.getNextHighestDepth()); baddies.push(new GridObject(_root[_local3], player.moves, {x:1, y:9})); _root[_local3].number.text = baddies.length; player.moves = new Object(); retryRound(); playSound(1); }; alert.retry_btn.onRelease = function () { alert._visible = false; playing = true; retryRound(); playSound(0); }; alert.reset_btn.onRelease = function () { alert._visible = false; playing = true; reset(); playSound(0); }; alert.sound_btn.onRelease = function () { soundOn = !soundOn; alert.wave.gotoAndStop(2); if (soundOn) { alert.wave.gotoAndStop(1); } }; welcome.start_btn.onRelease = function () { welcome._visible = false; alert.retry_btn.onRelease(); }; this.onEnterFrame = function () { if (playing) { counter++; var _local2 = max_time - counter; player_mc._xscale = _local2 / 2; player_mc._yscale = _local2 / 2; moveGrid(player); time_txt.text = _local2; if (_local2 == 0) { makeAlert("Out of Time!"); } checkWin(); var _local1 = 0; while (_local1 < baddies.length) { if (baddies[_local1].timeToMove(counter)) { if ((baddies[_local1].pos.x < 0) || (baddies[_local1].pos.y > 9)) { baddies[_local1].traceMoves(); } moveGrid(baddies[_local1]); if (player.checkCollision(baddies[_local1])) { makeAlert("Collision!"); } } _local1++; } if (movePossible(nextMove, player.pos)) { player.addMove(counter, transformMove(nextMove)); player.makeMove(nextMove); lastmoved = counter; moveGrid(player); nextMove = -1; _local1 = 0; while (_local1 < baddies.length) { if (player.checkCollision(baddies[_local1])) { makeAlert("Collision!"); } _local1++; } } } }; start();
Symbol 22 Button
on (release) { getURL ("http://www.rrrrthats5rs.com", "_blank"); }
Symbol 35 MovieClip Frame 1
stop();
Symbol 35 MovieClip Frame 2
stop();
Symbol 40 MovieClip [__Packages.GridObject] Frame 0
class GridObject extends Object { var mc, moves, pos; function GridObject (mc, moves, pos) { super(); this.mc = mc; if (!moves) { moves = new Object(); } if (!pos) { pos = {x:0, y:0}; } this.moves = moves; this.pos = pos; } function addMove(counter, move) { moves["c" + counter] = move; } function checkCollision(other) { if ((pos.x == other.pos.x) && (pos.y == other.pos.y)) { return(true); } return(false); } function makeMove(move) { switch (move) { case UP : pos.y = pos.y + 1; break; case DOWN : pos.y = pos.y - 1; break; case LEFT : pos.x = pos.x - 1; break; case RIGHT : pos.x = pos.x + 1; } } function timeToMove(counter) { var _local2 = moves["c" + counter]; if (_local2 != undefined) { makeMove(_local2); return(true); } return(false); } function traceMoves() { for (var _local2 in moves) { trace((("moves." + _local2) + " = ") + moves[_local2]); } } static var UP = 0; static var DOWN = 1; static var LEFT = 2; static var RIGHT = 3; }

Library Items

Symbol 1 Sound [clong]
Symbol 2 Sound [cling]
Symbol 3 Sound [pop]
Symbol 4 GraphicUsed by:10  Timeline
Symbol 5 GraphicUsed by:6
Symbol 6 MovieClipUses:5Used by:Timeline
Symbol 7 GraphicUsed by:10
Symbol 8 FontUsed by:9 11 12 13 14 24 37
Symbol 9 EditableTextUses:8Used by:10
Symbol 10 MovieClipUses:7 4 9Used by:Timeline
Symbol 11 TextUses:8Used by:Timeline
Symbol 12 EditableTextUses:8Used by:Timeline
Symbol 13 TextUses:8Used by:Timeline
Symbol 14 EditableTextUses:8Used by:Timeline
Symbol 15 GraphicUsed by:22
Symbol 16 FontUsed by:17 20 21
Symbol 17 TextUses:16Used by:22
Symbol 18 GraphicUsed by:22
Symbol 19 GraphicUsed by:22
Symbol 20 TextUses:16Used by:22
Symbol 21 TextUses:16Used by:22
Symbol 22 ButtonUses:15 17 18 19 20 21Used by:Timeline
Symbol 23 GraphicUsed by:36 39
Symbol 24 EditableTextUses:8Used by:36
Symbol 25 GraphicUsed by:27
Symbol 26 GraphicUsed by:27
Symbol 27 ButtonUses:25 26Used by:36 39
Symbol 28 FontUsed by:29 30 38
Symbol 29 TextUses:28Used by:36
Symbol 30 TextUses:28Used by:36
Symbol 31 GraphicUsed by:32
Symbol 32 ButtonUses:31Used by:36
Symbol 33 GraphicUsed by:35
Symbol 34 GraphicUsed by:35
Symbol 35 MovieClipUses:33 34Used by:36
Symbol 36 MovieClipUses:23 24 27 29 30 32 35Used by:Timeline
Symbol 37 TextUses:8Used by:39
Symbol 38 TextUses:28Used by:39
Symbol 39 MovieClipUses:23 37 27 38Used by:Timeline
Symbol 40 MovieClip [__Packages.GridObject]

Instance Names

"player_mc"Frame 1Symbol 6 MovieClip
"bad"Frame 1Symbol 10 MovieClip
"time_txt"Frame 1Symbol 12 EditableText
"level_txt"Frame 1Symbol 14 EditableText
"alert"Frame 1Symbol 36 MovieClip
"welcome"Frame 1Symbol 39 MovieClip
"number"Symbol 10 MovieClip Frame 1Symbol 9 EditableText
"message"Symbol 36 MovieClip Frame 1Symbol 24 EditableText
"reset_btn"Symbol 36 MovieClip Frame 1Symbol 27 Button
"retry_btn"Symbol 36 MovieClip Frame 1Symbol 27 Button
"sound_btn"Symbol 36 MovieClip Frame 1Symbol 32 Button
"wave"Symbol 36 MovieClip Frame 1Symbol 35 MovieClip
"start_btn"Symbol 39 MovieClip Frame 1Symbol 27 Button

Special Tags

FileAttributes (69)Timeline Frame 1Access local files only, Metadata not present, AS1/AS2.
ExportAssets (56)Timeline Frame 1Symbol 1 as "clong"
ExportAssets (56)Timeline Frame 1Symbol 2 as "cling"
ExportAssets (56)Timeline Frame 1Symbol 3 as "pop"
ExportAssets (56)Timeline Frame 1Symbol 40 as "__Packages.GridObject"




http://swfchan.com/20/98455/info.shtml
Created: 22/3 -2019 12:56:15 Last modified: 22/3 -2019 12:56:15 Server time: 22/12 -2024 10:17:08