ヘブン状態っぽいグラデ
ヘブン状態!
//ヘブン状態!
package
{
import flash.display.Sprite;
import flash.display.Shape;
import flash.display.GradientType;
import flash.display.SpreadMethod;
import flash.display.InterpolationMethod;
import flash.geom.Matrix;
// [SWF(backgroundColor="0xeeffee", frameRate="20")]
public class MatrixHeven extends Sprite
{
public function MatrixHeven()
{
init();
}
private function init():void
{
var color : Array = [0xFF00CC, 0x6666CC, 0x99FF66, 0xffffff, 0x99FF66, 0x6666CC, 0xFF00CC];
var alpha : Array = [1, 1, 1, 1, 1, 1, 1];
var ratio : Array = [0, 42, 84, 127, 169, 211, 255];
var mt1 : Matrix = new Matrix();
mt1.createGradientBox(470, 400);
var mtheven : Shape = new Shape();
mtheven.graphics.lineStyle(1);
mtheven.graphics.lineGradientStyle(GradientType.LINEAR, color, alpha, ratio, mt1, SpreadMethod.PAD, InterpolationMethod.LINEAR_RGB );
mtheven.graphics.beginGradientFill(GradientType.LINEAR, color, alpha, ratio, mt1, SpreadMethod.PAD, InterpolationMethod.LINEAR_RGB );
mtheven.graphics.drawRect(0, 0, 470, 400);
mtheven.graphics.endFill();
mtheven.x = 0;
mtheven.y = 0;
addChild(mtheven);
}
}
}