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

ColorModeSample

see http://gihyo.jp/design/feature/01/frocessing/0002
Get Adobe Flash player
by nutsu 21 Jun 2009
/**
 * 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 );
            }
        }
    }
}