In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

10 PRINT CHR$(205.5+RND(1)); : GOTO 10.

A Flash version of the classic 10 PRINT CHR$(205.5+RND(1)); : GOTO 10.
inspired by http://www.bogost.com/blog/talk_of_10_print.shtml
and https://forum.processing.org/topic/challenge-processing-variations-of-10-print-chr-205-5-rnd-1-goto-10

The challenge is to get the labyrinth look by using as little code as possible
Of course the biggest problem here is all the boilerplate stuff.
Feel free to create a shorter one.

Author: Mario Klingemann

v2: shaved off a few more chars
Get Adobe Flash player
by Quasimondo 04 Dec 2012
/**
 * Copyright Quasimondo ( http://wonderfl.net/user/Quasimondo )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/zd8e
 */

package {
    
    // A Flash version of the classic 10 PRINT CHR$(205.5+RND(1)); : GOTO 10.
    // inspired by http://www.bogost.com/blog/talk_of_10_print.shtml
    // and https://forum.processing.org/topic/challenge-processing-variations-of-10-print-chr-205-5-rnd-1-goto-10
    //
    // The challenge is to get the labyrinth look by using as little code as possible
    // Of course the biggest problem here is all the boilerplate stuff.
    // Feel free to create a shorter one.
    //
    // Author: Mario Klingemann
    //
    // v2: shaved off a few more chars
    
    import flash.text.TextFormat;
    import flash.utils.setTimeout;
    import flash.text.TextField;
    import flash.display.Sprite;
    
    public class Q extends Sprite {
        
        var t:TextField;
        function Q(){
            var f:TextFormat=new TextFormat();
            f.leading=-4;
            f.letterSpacing=-1;
            addChild(t=new TextField()).width=400;
            t.wordWrap=t.autoSize="left";
            t.defaultTextFormat=f;
            d();
        }
        
        // this is very very dirty, but the shortest I could get it so far
        function d(){t.text+=['╱','╲'][Math.random()*2&1];setTimeout(d,1)}

      // this is not so dirty and does not create warnings, but of course it is not as short:
      //  public function e(){t.appendText(['/','\\'][Math.random()*2&1]);setTimeout(d,1);}
    }
}