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

正方形の大きさ,色,回転を連続して変化

Get Adobe Flash player
by lenonsun 01 Nov 2011
/**
 * Copyright lenonsun ( http://wonderfl.net/user/lenonsun )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/bfHS
 */

// 正方形の大きさ,色,回転を連続して変化
package 
{
    import flash.display.AVM1Movie;
    import frocessing.display.F5MovieClip2D;
    /**
     * 10個の正方形を大きさと色を変化させて表示
     */
    public class GraphicExample extends F5MovieClip2D
    {
        public function setup() : void
        {
            var i:int, j:int;
            rectMode(CENTER);
            colorMode(HSB,360,100,100,100);
            noFill();
            // 原点をキャンバスの中央に移動
            translate(465/2, 465/2);
            for( i = 0 ; i < 40 ; i++ ) {
                stroke( i * 360 / 40, 100, 100 );
                rotate( radians(135.0 / 40.0));
                rect(0, 0, 100+i*5, 100+i*5);
            }
        }
    }
}