ColorModeSample
see http://gihyo.jp/design/feature/01/frocessing/0002
/**
* Copyright nutsu ( http://wonderfl.net/user/nutsu )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/tpTz
*/
// see http://gihyo.jp/design/feature/01/frocessing/0002
package
{
import frocessing.display.F5MovieClip2D;
[SWF(width=465,height=465,backgroundColor=0xFFFFFF)]
public class ColorModeSample extends F5MovieClip2D
{
public function ColorModeSample()
{
var n:int = 5;
//値の範囲を1:2:4に設定
colorMode( RGB, n, n*2, n*4 );
noStroke();
for ( var i:int = n; i >0; i-- ) {
//塗りの指定
fill( i, i, i );
//円の描画
circle( 465/2, 465/2, 40 * i );
}
}
}
}