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(100, 100); // Move the pen without drawing a line
canvas.graphics.lineTo(200, 200); // Draw the line (this also moves the pen)
addChild(canvas);
}
}
}
|