ActionScript 3 AS3曲线绘图API和Glow
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ActionScript 3 AS3曲线绘图API和Glow相关的知识,希望对你有一定的参考价值。
var lineDrawing:MovieClip = new MovieClip();
this.addChild(lineDrawing);
lineDrawing.graphics.lineStyle(1, 0x000000, 1 );
lineDrawing.graphics.beginFill( 0x990000, 1 );
lineDrawing.graphics.moveTo(100,100);
lineDrawing.graphics.lineTo(100,200);
lineDrawing.graphics.lineTo(300,200);
lineDrawing.graphics.lineTo(300,100);
lineDrawing.graphics.curveTo(200,0, 100,100); //the first two numbers are your control point for the curve
///Glow Filter
var glow:GlowFilter = new GlowFilter();
glow.color = 0x009900;
glow.alpha = 1;
glow.blurX = 25;
glow.blurY = 25;
var dropShadow:DropShadowFilter = new DropShadowFilter();
dropShadow.color = 0x000000;
dropShadow.blurX = 10;
dropShadow.blurY = 10;
dropShadow.angle = 0;
dropShadow.alpha = 0.5;
dropShadow.distance = 25;
var filtersArray:Array = new Array(glow, dropShadow);
lineDrawing.filters = filtersArray;
以上是关于ActionScript 3 AS3曲线绘图API和Glow的主要内容,如果未能解决你的问题,请参考以下文章
ActionScript 3 具有径向梯度的AS3绘图圆
ActionScript 3 鼠标事件使用AS3的简单绘图应用程序
ActionScript 3 使用文件参考API的AS3文件参考管理器类
ActionScript 3 使用AS3中的FileReference API上传MP3
ActionScript的椭圆曲线加密
AS3曲线绘制API和Glow