股墓山庄

专注于AS3,JavaScript 每天一点进步,坚持...
  博客园  :: 首页  :: 新随笔  :: 联系 :: 管理

AS3 画三角形

Posted on 2012-05-24 16:19  股墓山庄庄主  阅读(484)  评论(0编辑  收藏  举报
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();