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

ColorFLunky RGB drawer

/**
 * Copyright alexnotkin ( http://wonderfl.net/user/alexnotkin )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/r5vQ
 */

// forked from air_tn's flash on 2010-2-17
package {
    import flash.events.MouseEvent;
    import flash.display.Bitmap;
    import flash.events.Event;
    import flash.display.Sprite;
    import frocessing.core.F5BitmapData2D;
    
        
        private var fb:F5BitmapData2D;
        
        public function F5BitmapDataSample1() {
            fb= new F5BitmapData2D(465,465,false,0);
           // fb.noStroke();
            fb.colorMode("hsv",1.0);
            fb.blendMode="hardlight";
            addChild(new Bitmap(fb.bitmapData));
            stage.addEventListener(Event.ENTER_FRAME,enterframe);
            stage.addEventListener(MouseEvent.MOUSE_DOWN,mousedown);           
        }
        private function enterframe(e:Event):void{
                fb.beginDraw();
                fb.fill( 0xFFFF0F*Math.random()*0.1, 20+Math.random(), 20+Math.random(), 1 );
                fb.circle( mouseX, mouseY, Math.random()*50);
                fb.endDraw();
        }
        private function mousedown(e:MouseEvent):void{
                fb.bitmapData.fillRect(fb.bitmapData.rect,0);
        }
    }
}