flash on 2009-12-29
♥0 |
Line 30 |
Modified 2009-12-29 13:50:33 |
MIT License
archived:2017-03-20 13:32:42
ActionScript3 source code
/**
* Copyright _ryotaros ( http://wonderfl.net/user/_ryotaros )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/ulag
*/
package {
import flash.display.Sprite;
import frocessing.core.F5Graphics2D;
import frocessing.core.F5C;
[SWF(width = 465, height = 465, backgroundColor =0)]
public class FlashTest extends Sprite {
public function FlashTest() {
var fg:F5Graphics2D = new F5Graphics2D(this.graphics);
fg.stroke( 255,0.1 );
fg.fill( 255, 32, 32, 0.1 );
fg.translate( 232, 232 );
fg.rectMode( F5C.CENTER );
for ( var i:int = 0; i < 48; i ++ ){
fg.rect( 0, 0, 400, 26 );
fg.rotate( Math.PI / 24 );
}
//円沢山描画
//fg.stroke( 0xff2020,0.5 );
var fg2:F5Graphics2D = new F5Graphics2D(this.graphics);
fg2.colorMode("hsv", 465, 1, 465);
//fg.noStroke();
for ( var j:int = 0; j < 300; j++ ){
var cx:Number = Math.random() * 465;
var cy:Number = Math.random() * 465;
var cr:Number = Math.random() * 20;
fg2.noFill();//指定しないとデフォルトでシェイプの塗りは、FFFFFFになる模様。
fg2.strokeWeight( Math.random() * 4 );
fg2.stroke( cx/4, 1, cy );//HSV指定。
//fg.lineStyle( Math.random()*4, fg.color(cx, 1, cy) ); //線の色をfg.colorで指定した場合。s
fg2.circle( cx, cy, cr );
}
}
}
}