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

グラディーション

Get Adobe Flash player
by takenosin 19 May 2010
    Embed
/**
 * Copyright takenosin ( http://wonderfl.net/user/takenosin )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/iMHB
 */

package {
    import flash.display.Sprite;
    import flash.display.GradientType;
    import flash.events.MouseEvent;
    import flash.geom.Matrix;
    
    public class GradientFill extends Sprite {
        public function GradientFill() {
            // write as3 code here..
            graphics.lineStyle(1);
            var colors:Array = [0xffffff,0xff0000];
            var alphas:Array = [1,1];
            var ratios:Array = [0,255];
            var matrix:Matrix = new Matrix();
            matrix.createGradientBox(465,465,0,0,0);
            graphics.beginGradientFill(GradientType.LINEAR,colors,alphas,ratios,matrix);
            graphics.drawRect(0,0,465,465);
            graphics.endFill();
            
        }
    }
}