as3.0学习小记(1)

      flashcs3 2006-11-17 11:21

慢慢地看,看一点是一点,发在这里,留个记号(忘性大~~)

as3.0里面flash.display.Graphic,可以直接用代码绘制圆,矩形,椭圆,圆角矩形.

var square:Sprite=new Sprite();
square.graphics.beginFill(0x00ff00);
//square.graphics.drawCircle(100,100,50);//画圆
//square.graphics.drawRect(200,200,100,80);//画矩形
//square.graphics.drawEllipse(100,100,200,100);画椭圆

square.graphics.drawRoundRect(100,100,200,100,50,50);//圆角矩形
square.graphics.endFill();
addChild(square)

标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commenttime}{commentauthor}

{CommentUrl}
{commentcontent}