To move the drawing pen without drawing any line at all, use moveTo( ). : Graphics : Graphics Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Graphics » Graphics »

 

To move the drawing pen without drawing any line at all, use moveTo( ).


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

        var canvas:Shape = new Shape(  );   // Create the Shape to draw in
        canvas.graphics.lineStyle(1);     // Set the stroke to 1 point, black
        canvas.graphics.moveTo(100100)// Move the pen without drawing a line
        canvas.graphics.lineTo(200200)// Draw the line (this also moves the pen)
        addChild(canvas);

    }
  }
}

        



Leave a Comment / Note


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


Flash / Flex / ActionScript examples

 Navioo Graphics
» Graphics