Drawing a Straight Line : Graphics : Graphics Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Graphics » Graphics »

 

Drawing a Straight Line


 

package{
  import flash.display.*;
  
  public class Main extends Sprite{
    public function Main(){
        var shape:Shape = new Shape ();
        shape.graphics.lineStyle(00xFF0000);
        shape.graphics.lineTo(1000);
        shape.graphics.lineTo(100100);
        shape.graphics.lineStyle(00xFF0000);
        shape.graphics.moveTo(100100);
        shape.graphics.lineTo(150100);
        shape.graphics.moveTo(200100);
        shape.graphics.lineTo(250100);
        shape.graphics.moveTo(125200);
        shape.graphics.lineTo(225200);
        addChild(shape);

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Graphics
» Graphics