这东西不太可能只用滤镜来实现,实实在在用程序画出来还差不多。
LZ不要想的太死板,有些东西需要动脑筋才能实现
package
{
import flash.display.Graphics;
import flash.display.Shape;
import flash.display.Sprite;
import flash.display.GradientType;
import flash.geom.Matrix;
/**
* ...
* @author Fox
*/
public class CrystalBall extends Sprite
{
//private var _light:Graphics;
private var _r:Number;
/**
* 构造函数
* @param Radius
*/
public function CrystalBall(Radius:Number= 50)
{
_r = Radius;
init();
}
/**
* 初始化
*/
private function init():void
{
var _alp:Array = [1, 1];
var _col:Array = [0xC2FE12,0x0F7B41];
var _rat:Array = [0,255];
var _matr:Matrix = new Matrix();
var _scolR:Number = int(_r*2);
_matr.createGradientBox(_scolR, _scolR,0, -_r, 0);
this.graphics.beginGradientFill(GradientType.RADIAL, _col, _alp, _rat, _matr);
this.graphics.drawCircle(0, 0, _r);
this.graphics.endFill();
var _light:Shape= new Shape();
_col = [0xFFFFFF, 0xFFFFFF];
_alp = [0.8, 0];
_rat = [0, 180];
_matr.createGradientBox(_r*0.1, _r,Math.PI*0.5, 0, -_r);
_light.graphics.beginGradientFill(GradientType.LINEAR, _col, _alp, _rat,_matr);
_light.graphics.drawCircle(0, -_r * 0.42, _r * 0.8);
_light.graphics.endFill();
_light.scaleY = 0.75;
this.addChild(_light);
}
}
}
分享到:
相关推荐
标题 "http://topkinghat.iteye.com/blog/840706" 提到的博客链接实际上指向了“姜铁”的个人博客文章,而描述中的 "NULL" 暂无具体信息。不过,标签“源码”和“工具”暗示了这篇博客可能涉及到软件开发的源代码...
NULL 博文链接:https://laravel.iteye.com/blog/2175915
NULL 博文链接:https://bnmnba.iteye.com/blog/2322332
smack 源码分析一(android上实现长连接) http://wangqinghua123.iteye.com/blog/1341355 http://www.push-notification.mobi/get_api_key.php android smack源码分析——接收消息以及如何解析消息: ...
博文链接:https://jackzhangyunjie.iteye.com/blog/202349
http://www.iteye.com/topic/699515 主题:Swing是一把刀 http://www.iteye.com/topic/702804 主题:Swing第二刀:枝间新绿一重重 http://www.iteye.com/topic/707540 主题:Swing第二小刀刀:星星之火可以燎原 ...
NULL 博文链接:https://itace.iteye.com/blog/2306140
NULL 博文链接:https://wy649898543.iteye.com/blog/1423655
NULL 博文链接:https://ownraul.iteye.com/blog/1277047
NULL 博文链接:https://zw7534313.iteye.com/blog/426799
博文链接:https://wdfan.iteye.com/blog/197543
NULL 博文链接:https://zyn-zyn.iteye.com/blog/1163148
博文链接:https://balaschen.iteye.com/blog/82579
与标题一致的描叙,你值得拥有,确实很值。来赚分啦。 参考下面大侠而来 ...http://hi.baidu.com/xinshenbuning2/item/e94226de7517fe1ed78ed0b1 http://www.blogjava.net/lizongbo/archive/2006/12/04/85433.html
NULL 博文链接:https://yizhilong28.iteye.com/blog/1161027
NULL 博文链接:https://zzz299.iteye.com/blog/691049
博文链接:https://avery-leo.iteye.com/blog/213980
NULL 博文链接:https://adaqian.iteye.com/blog/1987456
NULL 博文链接:https://fantaxy025025.iteye.com/blog/896867