as3实现渐变圆角矩形
超棒的渐变圆角矩形特效,可自行改变圆角的度数和渐变效果,值得收藏。
源码效果:
AS3源码:
var myMatrix:Matrix = new Matrix(); myMatrix.createGradientBox(250, 250,0.6, 0, 150); var myColors:Array = [0xFFCC66,0xFF3300 ]; var myAlphaS:Array = [100, 100]; var myRalphaS:Array = [0, 225]; graphics.beginGradientFill(GradientType.LINEAR, myColors, myAlphaS, myRalphaS, myMatrix); graphics.drawRoundRectComplex(50,50,300,300,10,10,10,10);
转自:http://www.ffsnet.net/html/63.html