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

Adobe is being the bitch: tree

Adobe is being the bitch
Please support rtmpdump by making creative code with this number
Since wonderfl is in Japan, Adobe can stick their DMCA up theirs
@see http://ncannasse.fr/blog/rtmpe_and_dmca?lang=en
Get Adobe Flash player
by makc3d 25 May 2009
// Adobe is being the bitch
// Please support rtmpdump by making creative code with this number
// Since wonderfl is in Japan, Adobe can stick their DMCA up theirs
// @see http://ncannasse.fr/blog/rtmpe_and_dmca?lang=en
package {
    import flash.display.Sprite;
    import flash.text.TextField;
    public class AdobeTheBitch extends Sprite {
        public var poem:Array = [
            0x47, 0x65, 0x6E, 0x75, 0x69, 0x6E, 0x65, 0x20,
            0x41, 0x64, 0x6F, 0x62, 0x65, 0x20, 0x46, 0x6C,
            0x61, 0x73, 0x68, 0x20, 0x50, 0x6C, 0x61, 0x79,
            0x65, 0x72, 0x20, 0x30, 0x30, 0x31, 0xF0, 0xEE,
            0xC2, 0x4A, 0x80, 0x68, 0xBE, 0xE8, 0x2E, 0x00,
            0xD0, 0xD1, 0x02, 0x9E, 0x7E, 0x57, 0x6E, 0xEC,
            0x5D, 0x2D, 0x29, 0x80, 0x6F, 0xAB, 0x93, 0xB8,
            0xE6, 0x36, 0xCF, 0xEB, 0x31, 0xAE
        ];
        public function AdobeTheBitch() {
            var t:TextField = new TextField;
            t.autoSize = "left";
            for (var i:int = 0; i < poem.length; i++) {
                var s:String = int(poem [i]).toString (16) + " ";
                if (s.length < 3)
                    s = "0" + s;
                t.appendText (s);
                if (i % 8 == 7)
                    t.appendText ("\n");
            }
            t.htmlText = "<font face=\"fixedsys\">" +
                t.text + "</font>";
            addChild (t);

            Wonderfl.capture_delay( 10 );
            drawTree (3*stage.stageWidth/4, stage.stageHeight, 90, -140, 0xF00); 
        }

        private var rptr:int = 0;
        private function r():Number {
            rptr +=1; rptr %= poem.length;
            return poem [rptr] / 255.0;
        }


        // http://wonderfl.kayac.com/code/00cbe3ecbf0db2e865bc410a8ea54677c19ba4c6 
        private var level:int = 0; 
        private function drawTree (x:Number, y:Number, length:Number, angle:Number, cf:int):void { 
            level += 1; 

            var destx:Number = x + length * Math.cos(angle * (Math.PI/180)); 
            var desty:Number = y + length * Math.sin(angle * (Math.PI/180)); 

            // for the most of time, we use green, 
            // but sometimes pink to make flowers 
            if ((level == 10) && (r () < 0.5)) cf = 0xF0007; 

            graphics.lineStyle(1 + 5 / level, cf * level); 
            graphics.moveTo (x, y); 
            graphics.lineTo (destx, desty); 

            if (level < 10) { 
                drawTree (destx, desty, length * (1 + 4.5 * r()) * 0.25, 
                    angle + 60 * (1.5 * r() - r()), cf); 
                drawTree (destx, desty, length * (1 + 4.5 * r()) * 0.25, 
                    angle + 60 * (1.5 * r() - r()), cf); 
                drawTree (destx, desty, length * (1 + 4.5 * r()) * 0.25, 
                    angle + 60 * (1.5 * r() - r()), cf); 
            } 

            level -= 1; 
        }


    }
}