flash on 2010-1-25

by nausicaa
♥0 | Line 25 | Modified 2010-01-25 11:07:44 | MIT License
play

ActionScript3 source code

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

package {
    import flash.display.Sprite;
    import frocessing.core.F5Graphics2D;
    
    [SWF(width=465, height=465, backgroundColor=0)]
    public class FlashTest extends Sprite {
        public function FlashTest() {
            var fg:F5Graphics2D = new F5Graphics2D(graphics);
            //fg.stroke(0xff0f0f, 0.5);
            fg.colorMode("hsv", 465, 1, 465);
            
            for(var i:int=0; i<300; i++){
            		var cx:Number = Math.random()*465;
            		var cy:Number = Math.random()*465;
            		var cr:Number = Math.random()*20;
            		//fg.strokeWeight(Math.random()*4);
            		//fg.stroke(cx, 1, cy);
            		
            		//fg.lineStyle(Math.random()*4, fg.color(cx, 1, cy));
            		
            		if(Math.random() > 0.5){
            			fg.noStroke();
            			fg.fill(cx, 1, cy, 0.5);
            		}else{
            			fg.noFill();
            			fg.strokeWeight(Math.random()*4);
            			fg.stroke(cx, 1, cy, 0.25);
            		}            		
            		
            		//graphics.drawCircle(cx, cy, cr);
            		fg.circle(cx, cy, cr);
            }
            
        }
    }
}