`
ch_kexin
  • 浏览: 875488 次
  • 性别: Icon_minigender_2
  • 来自: 青岛
社区版块
存档分类
最新评论

AS3 简单的箭头画法

 
阅读更多
var arrowLayer :Shape;

上箭头:
_arrowLayer = new Shape();
_arrowLayer.graphics.lineStyle(2,0,1);
_arrowLayer.graphics.beginFill(0xffff00);
_arrowLayer.graphics.moveTo(-25,50);
_arrowLayer.graphics.lineTo(-25,0);
_arrowLayer.graphics.lineTo(-50,0);
_arrowLayer.graphics.lineTo(0,-50);
_arrowLayer.graphics.lineTo(50,0);
_arrowLayer.graphics.lineTo(25,0);
_arrowLayer.graphics.lineTo(25,50);
_arrowLayer.graphics.lineTo(-25,50);
_arrowLayer.graphics.endFill();

下箭头:
_arrowLayer = new Shape();
_arrowLayer.graphics.lineStyle(2,0,1);
_arrowLayer.graphics.beginFill(0xffff00);
_arrowLayer.graphics.moveTo(25,-50);
_arrowLayer.graphics.lineTo(25,0);
_arrowLayer.graphics.lineTo(50,0);
_arrowLayer.graphics.lineTo(0,50);
_arrowLayer.graphics.lineTo(-50,0);
_arrowLayer.graphics.lineTo(-25,0);
_arrowLayer.graphics.lineTo(-25,-50);
_arrowLayer.graphics.lineTo(25,-50);
_arrowLayer.graphics.endFill();
右箭头:
_arrowLayer = new Shape();
_arrowLayer.graphics.lineStyle(1,0,1);
_arrowLayer.graphics.beginFill(0xffff00);
_arrowLayer.graphics.moveTo(-50,-25);
_arrowLayer.graphics.lineTo(0,-25);
_arrowLayer.graphics.lineTo(0,-50);
_arrowLayer.graphics.lineTo(50,0);
_arrowLayer.graphics.lineTo(0,50);
_arrowLayer.graphics.lineTo(0,25);
_arrowLayer.graphics.lineTo(-50,25);
_arrowLayer.graphics.lineTo(-50,-25);
_arrowLayer.graphics.endFill();
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics