Filling a Shape with a Gradient : Shape : Graphics Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Graphics » Shape »

 

Filling a Shape with a Gradient


 

package{
  import flash.display.*;
  import flash.ui.*;
  import flash.geom.*;
  public class Main extends Sprite{
    public function Main(){
        var sampleSprite:Sprite = new Sprite();
        var matrix:Matrix = new Matrix(  );
        matrix.createGradientBox(10010005050);
        var colors:Array = [0xFF00000x0000FF];
        var alphas:Array = [100100];
        var ratios:Array = [0x000xFF];
        sampleSprite.graphics.lineStyle(  );
  //      sampleSprite.graphics.beginGradientFill(GradientType.GRADIENT, colors, alphas, ratios, matrix);
        sampleSprite.graphics.drawCircle(10010050);
        sampleSprite.graphics.endFill(  );
        addChild(sampleSprite);
    }
  }
}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Graphics
» Shape