画图

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);
posted on 2011-01-06 11:23  602147629  阅读(184)  评论(0编辑  收藏  举报