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

ColorSetting

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/zTdM
 */

// see http://gihyo.jp/design/feature/01/frocessing/0002
package  
{
    import frocessing.display.F5MovieClip2D;
    
    [SWF(width=465,height=465,backgroundColor=0xFFFFFF)]
    public class ColorSetting extends F5MovieClip2D
    {
        public function ColorSetting() 
        {
            //線と塗りの色指定
            
            //■ RGB
            //stroke( red, green, blue, alpha  )
            //fill( red. green, blue, alpha  )
            stroke( 204, 0, 0 );
            fill( 255, 153, 51 );
            circle( 90, 90, 50 );
            
            //透明度
            stroke( 204, 0, 0, 1.0 );
            fill( 255, 153, 51, 1.0 );
            circle( 225, 90, 50 );
            
            stroke( 0, 0, 0, 0.2 );
            fill( 51, 153, 255, 0.5 );
            circle( 245, 90, 50 );
            
            //------------------------------------
            
            //■ グレースケール
            //stroke( gray, alpha )
            //fill( gray, alpha )
            stroke( 0 );
            fill( 127 );
            circle( 90, 230, 50 );
            
            //透明度
            stroke( 0, 1.0 );
            fill( 127, 1.0 );
            circle( 225, 230, 50 );
            
            stroke( 0, 0.2 );
            fill( 255, 0.5 );
            circle( 245, 230, 50 );
            
            //------------------------------------
            
            //■ 24bitカラー
            //stroke( 0xRRGGBB, alpha )
            //fill( 0xRRGGBB, alpha )
            stroke( 0xCC0000 );
            fill( 0xFF9933 );
            circle( 80, 370, 50 );
            
            //透明度
            stroke( 0x000000, 0.2 );
            fill( 0x3399FF, 0.5 );
            circle( 100, 370, 50 );
            
            //■ 32bitカラー
            //stroke( 0xAARRGGBB )
            //fill( 0xAARRGGBB )
            stroke( 0xFFCC0000 );
            fill( 0xFFFF9933 );
            circle( 225, 370, 50 );
            
            stroke( 0x33000000 );
            fill( 0x7F3399FF );
            circle( 245, 370, 50 );
            
            //■ 線の無効
            noStroke();
            fill( 200 );
            circle( 365, 370, 50 );
            
            //■ 塗りの無効
            noFill();
            stroke(0);
            circle( 385, 370, 50 );
        }
    }
}