AS3 画三角形

var shape:Sprite=new Sprite();
addChild(shape);
shape.graphics.beginFill(0xff0000, 1);
shape.graphics.lineStyle(2);
shape.graphics.moveTo(200,200);
shape.graphics.lineTo(100,300);
shape.graphics.lineTo(300,300);
shape.graphics.lineTo(200, 200);
shape.graphics.endFill();

 

你可能感兴趣的:(as3)