for文応用②

by N.YUUKI forked from for文応用① (diff: 3)
グラデーション
♥1 | Line 15 | Modified 2012-05-17 02:00:06 | MIT License
play

ActionScript3 source code

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

// forked from N.YUUKI's for文応用①
// forked from shmdmoto's 赤から緑へのグラデーション
// forked from shmdmoto's 赤から緑へのグラデーション
package 
{
    import frocessing.display.F5MovieClip2D;
    /**
     * lineを使った赤から緑へのグラデーション
     * @author shmdmoto
     */
    public class GraphicExample extends F5MovieClip2D
    {
        public function setup() : void
        {
            var x:Number;
            for( x = 0 ; x <= 465 ; x++ ) {
                stroke(255-255*x/465, 0,255*x/465);
                line(0, x, 465, x);
            }
        }
    }
}