Draw four shapes : Graphics : Graphics Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Graphics » Graphics »

 

Draw four shapes


 

package{
  import flash.display.*;
  
  public class Main extends Sprite{
    public function Main(){
        var linesA:Shape = new Shape();
        var linesB:Shape = new Shape();
        var linesC:Shape = new Shape();
        var linesD:Shape = new Shape();
        
        addChild(linesA);
        addChild(linesB);
        addChild(linesC);
        addChild(linesD);
        
        linesA.x = 100;
        linesA.y = 100;
        linesA.graphics.lineStyle(200100, false, "none""none""round");
        linesA.graphics.lineTo(1000);
        linesA.graphics.lineTo(050);
        
        linesB.x = 250;
        linesB.y = 100;
        linesB.graphics.lineStyle(200100, false, "none""none""none");
        linesB.graphics.lineTo(1000);
        linesB.graphics.lineTo(050);
        
        linesC.x = 100;
        linesC.y = 200;
        linesC.graphics.lineStyle(200100, false, "none""none""miter");
        linesC.graphics.lineTo(1000);
        linesC.graphics.lineTo(050);
        
        linesD.x = 250;
        linesD.y = 200;
        linesD.graphics.lineStyle(200100, false, "none""none""miter"10);
        linesD.graphics.lineTo(1000);
        linesD.graphics.lineTo(050);

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Graphics
» Graphics