flash on 2011-10-19

by y_tama
from http://www.project-nya.jp/modules/weblog/details.php?blog_id=1075
♥0 | Line 27 | Modified 2011-10-19 17:31:07 | MIT License
play

ActionScript3 source code

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

package {
//from http://www.project-nya.jp/modules/weblog/details.php?blog_id=1075
    import frocessing.display.F5MovieClip2D;

    [SWF(backgroundColor="#000000", width="320", height="320", frameRate="30")]

    public class Main extends F5MovieClip2D {
        // プロパティ
        private static var dots:uint = 5;
        private static var radian:Number = 2*Math.PI/dots;
        private var angle:uint = 0;
        private static var speed:uint = 1;

        // コンストラクタ
        public function Main() {
        }

        // メソッド
        public function setup():void {
            colorMode(HSV, dots, 1, 1);
            rectMode(CENTER);
            noStroke();
        }
        public function draw():void {
            translate(160, 160);
            rotate((angle - 90)*Math.PI/180);
            for (var n:uint = 0; n < dots; n++) {
                rotate(radian);
                fill(n, 1, 1);
                circle(120, 0, 10);
            }
            angle += speed;
        }

    }

}