Drawing Curves in a Graphics Object : Curve « Graphics « Flash / Flex / ActionScript






Drawing Curves in a Graphics Object

 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

      var spr:Sprite = new Sprite();
      spr.graphics.beginFill(0x0000ff, 1.0);
      spr.graphics.lineStyle(1, 0x0000ff);
      spr.graphics.moveTo(30, 30);
      spr.graphics.curveTo(180, 20, 250, 30);
      spr.graphics.endFill();
      addChild(spr);

    }
  }
}

        








Related examples in the same category

1.Drawing Curves: curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number)
2.Curve control point