forked from: 赤から緑へのグラデーション

by Erinco157 forked from 赤から緑へのグラデーション (diff: 6)
CENTERにするのが思いつかなくて大変だった。
♥0 | Line 16 | Modified 2011-10-31 16:06:55 | MIT License
play

ActionScript3 source code

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

// forked from lenonsun's 赤から緑へのグラデーション
// 赤から緑へのグラデーション
package 
{
    import frocessing.display.F5MovieClip2D;
    /**
     * lineを使った赤から緑へのグラデーション
     * @author shmdmoto
     */
    public class GraphicExample extends F5MovieClip2D
    {
        public function setup() : void
        {
            var x:Number;
                for( x =465 ; x >=0 ; x-- ) {
                stroke(0, 255*x/465,255 - 255*x/465);
                rectMode(CENTER);
                rect(232,232, x, x);

            }
        }
    }
}