Create a circle shape : Circle : Graphics Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Graphics » Circle »

 

Create a circle shape


 

package {
  import flash.display.*;
  public class DisplayListExample extends Sprite {
    public function DisplayListExample(  ) {
      var red:Shape = createCircle0xFF000010 );
      red.x = 10;
      red.y = 20;
      var green:Shape = createCircle0x00FF0010 );
      green.x = 15;
      green.y = 25;
      var blue:Shape = createCircle0x0000FF10 );
      blue.x = 20;
      blue.y = 20;
      
      var container1:Sprite = new Sprite(  );
      container1.addChildred );
      container1.addChildgreen );
      container1.addChildblue );
      
      addChildcontainer1 );
      
      var container2:Sprite = new Sprite(  );
      addChildcontainer2 );
      
      container2.addChildred );
    }
    
    public function createCirclecolor:uint, radius:Number ):Shape {
      var shape:Shape = new Shape(  );
      shape.graphics.beginFillcolor );
      shape.graphics.drawCircle00, radius );
      shape.graphics.endFill(  );
      return shape;
    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Graphics
» Circle