路。先画一圈线,然后添加滤镜。
var vec:Vector.Vector.<Point>=new Vector.<Point>(); var lines:Sprite=new Sprite(); var i:int; for (i = 0; i < 20; i ++) { var radius:Number = (i <= 2 || i == 19)? 50*2 : ((Math.random() * 25 + 50)*2); vec.push(new Point(Math.cos(Math.PI * i / 10) * radius, Math.sin(Math.PI * i / 10) * radius)); } lines.graphics.lineStyle(2, 0xFFFFFF, 1); lines.graphics.moveTo(vec[0].x,vec[0].y); for(i=1;i<vec.length;i++){ lines.graphics.lineTo(vec[i].x,vec[i].y); } lines.graphics.lineTo(vec[0].x,vec[0].y); lines.filters = [new GlowFilter(0x4A4A4A, 1, 20, 20, 100, 2), new GlowFilter(0xD9C364, 1, 15, 15, 3, 2),new GlowFilter(0x53BA37, 1, 50, 50, 3, 2)]; addChild(lines); lines.x=lines.y=200;
发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。