画图

import flash.display.Shape;



var shape:Shape = new Shape  ;



shape.graphics.lineStyle(1,0,1);

shape.graphics.beginFill(0xff0000);

//填充;

shape.graphics.moveTo(-50,-25);

shape.graphics.lineTo(0,-25);

shape.graphics.lineTo(0,-50);

shape.graphics.lineTo(50,0);

shape.graphics.lineTo(0,50);

shape.graphics.lineTo(0,25);

shape.graphics.lineTo(-50,25);

shape.graphics.lineTo(-50,-25);

shape.graphics.endFill();



shape.x = 100;

shape.y = 100;

addChild(shape);

你可能感兴趣的:(图)