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

by lenonsun forked from 赤から緑へのグラデーション (diff: 7)
赤から青へのグラデーション

lineを使った赤から青へのグラデーション
♥0 | Line 15 | Modified 2011-10-29 21:05:16 | MIT License
play

ActionScript3 source code

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

// 赤から青へのグラデーション
package 
{
    import frocessing.display.F5MovieClip2D;
    /**
     * lineを使った赤から青へのグラデーション
     */
    public class GraphicExample extends F5MovieClip2D
    {
        public function setup() : void
        {
            var x:Number;
            for( y = 0 ; y <= 465 ; x++ ) {
                stroke(255 - 255*x/465, 0 , 255*x/465);
                line(0, y, 465, y);  
                
            }
        }
    }
}