A shape with evenly rounded corners : Gradient « Graphics « Flash / Flex / ActionScript






A shape with evenly rounded corners

 


package{
  import flash.display.*;
  
  public class Main extends Sprite{
    public function Main(){
        var shape:Shape = new Shape();
        addChild(shape);
        shape.graphics.beginFill(0x000000, 1);
        shape.graphics.drawRoundRect(0, 0, 100, 100, 10, 20);
        shape.graphics.endFill();
    }
  }
}

        








Related examples in the same category

1.Line Gradient Test
2.Create Gradient box
3.Create a Ball by using the Gradient
4.Applying Gradients to Lines
5.Set line gradient style with Matrix
6.lineGradientStyle("linear", [0xFFFF00, 0x00FFFF], [100, 100], [0x00, 0xFF], mxBox, "reflect", "linearRGB")
7.lineGradientStyle("radial", [0xFFFF00, 0x00FFFF], [100, 100], [0x00, 0xFF], mxBox, "pad", "linearRGB")
8.lineGradientStyle("radial", [0xFFFF00, 0x00FFFF], [100, 100], [0x00, 0xFF], mxBox, "pad", "linearRGB", 1)
9.Applying Gradient Fills
10.Rotating Objects with Filters