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

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

amazingadventure.swf

This is the info page for
Flash #96176

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


Text
text

Text

reset

edit

play

ActionScript [AS1/AS2]

Frame 1
function play_game(a) { game.load_story(a); game._visible = true; editor._visible = false; } function edit_game() { game._visible = false; editor._visible = true; } editor._visible = false; game._visible = false;
Symbol 3 Button
on (release) { load_path(story); }
Symbol 8 Button
on (release) { _parent.load_path(path); }
Symbol 11 Button
on (release) { _root.edit_game(); }
Symbol 14 MovieClip Frame 1
function clear_buttons() { while (buttons.length) { var x = buttons.pop(); x.removeMovieClip(); } } function add_button(a) { var x = (buttons.length + 3); button.duplicateMovieClip("button" + x, x); var y = eval ("button" + x); y.path = a; y.text = a.title; y._x = 200; y._y = 100 + (x * 24); buttons.push(y); } function load_paths_from(a) { clear_buttons(); var x = 0; while (x < a.paths.length) { add_button(a.paths[x]); x++; } if (x == 0) { add_button(story); } } function load_path(a) { text = a.text; load_paths_from(a); } function load_story(a) { story = a; load_path(story); } button._visible = false; buttons = new Array(); story = null;
Symbol 17 Button
on (release) { _root.play_game(load_story(text)); }
Symbol 19 MovieClip Frame 1
function find_newline(a, s) { var x = 0; var y = 0; x = a.indexOf("\r", s); y = a.indexOf(newline, s); if (x == -1) { return(y); } if (y == -1) { return(x); } if (x < y) { return(x + 1); } return(y); } function path(a) { var end = 0; end = find_newline(a, 0); if (end == -1) { end = a.length; } this.title = a.substring(0, end); this.text = a.substring(end, a.length); this.paths = new Array(); } function load_path(a) { text = a.text; load_paths_from(a); } function story_loader(a) { this.story = a; this.s = 0; this.e = 0; this.indent = 0; } function load_story(a) { var x = 0; var z = new Array(); var loader = new story_loader(a); loader.get_next(); z.push(loader.get_path()); while (loader.get_next()) { x = loader.get_indent(); while (x < z.length) { z.pop(); } z.push(z[z.length - 1].add_path(loader.get_path())); } z[0].title = "Restart"; return(z[0]); } text = "start\nwelcome to text adventure\n>begin adventure\nyou are now having an adventure\n>>go to castle\nyou are now at castle\n\nbut drawbridge is up\n>>>look around\nyou are eaten by a manticore\n>>>make loud noises\nyou are eaten by a manticore\n>>go to forest\nyou are eaten by a manticore\n>>go to death mountain\nyou enjoy nice picnic at death mountain\n\nbut you invited a manticore\n>>>isnt that dangerous\nyou are eaten by a manticore\n>credits\nmade by some guy\n>>is there any way to make an option to go back?\nno"; path.prototype.add_path = function (a) { this.paths.push(a); return(a); }; story_loader.prototype.get_next = function () { var x = 0; this.e++; this.s = this.e; while (this.e < this.story.length) { this.e = find_newline(this.story, this.e); if (this.e == -1) { this.e = this.story.length; x = 1; break; } if (this.story.charAt(this.e + 1) == ">") { x = 1; break; } this.e++; } if (x) { x = 0; while (this.story.charAt(this.s + x) == ">") { x++; } if (!x) { return(0); } this.indent = x; this.s = this.s + x; return(1); } return(0); }; story_loader.prototype.get_path = function () { return(new path(this.story.substring(this.s, this.e))); }; story_loader.prototype.get_indent = function () { return(this.indent); }; _root.play_game(load_story(text));

Library Items

Symbol 1 GraphicUsed by:Timeline
Symbol 2 GraphicUsed by:3 11 17
Symbol 3 ButtonUses:2Used by:14
Symbol 4 FontUsed by:5 9 12 13 16 18
Symbol 5 EditableTextUses:4Used by:14
Symbol 6 GraphicUsed by:8
Symbol 7 GraphicUsed by:8
Symbol 8 ButtonUses:6 7Used by:10
Symbol 9 EditableTextUses:4Used by:10
Symbol 10 MovieClipUses:8 9Used by:14
Symbol 11 ButtonUses:2Used by:14
Symbol 12 TextUses:4Used by:14
Symbol 13 TextUses:4Used by:14
Symbol 14 MovieClipUses:3 5 10 11 12 13Used by:Timeline
Symbol 15 GraphicUsed by:19
Symbol 16 EditableTextUses:4Used by:19
Symbol 17 ButtonUses:2Used by:19
Symbol 18 TextUses:4Used by:19
Symbol 19 MovieClipUses:15 16 17 18Used by:Timeline

Instance Names

"game"Frame 1Symbol 14 MovieClip
"editor"Frame 1Symbol 19 MovieClip
"button"Symbol 14 MovieClip Frame 1Symbol 10 MovieClip

Dynamic Text Variables

textSymbol 5 EditableText"text"
textSymbol 9 EditableText"Text"
textSymbol 16 EditableText""




http://swfchan.com/20/96176/info.shtml
Created: 24/3 -2019 00:06:23 Last modified: 24/3 -2019 00:06:23 Server time: 28/04 -2024 08:32:43