Macのアクア風球体をActionScriptで描いてみました。
それっぽい所までは行ったのですが、なんか少し違うというか、透明感が足りない気がします。
package practice { import flash.display.Sprite; import flash.geom.ColorTransform; [SWF(width = "450", height = "450", backgroundColor = "0xffffff", fps = "30")] public class Button04 extends Sprite{ public function Button04() { var b:AquaButton = new AquaButton(100); b.x = b.y = 120; addChild(b); b = new AquaButton(100, new ColorTransform(0, 1, 0, 1, 0, 0, 0, 0)); b.x = 340; b.y = 120; addChild(b); b = new AquaButton(100,new ColorTransform(1, 0, 0, 1, 0, 0, 0, 0)); b.x = 120; b.y = 340; addChild(b); b = new AquaButton(100,new ColorTransform(0.5, 0.5, 0, 1, 126, 126, 0, 0)); b.x = 340; b.y = 340; addChild(b); } } } import flash.display.GradientType; import flash.display.Sprite; import flash.filters.BlurFilter; import flash.filters.GlowFilter; import flash.geom.ColorTransform; import flash.geom.Matrix; import flash.geom.ColorTransform; import flash.geom.Transform; class AquaButton extends Sprite { private var rad:Number; private var bt:Sprite; public function AquaButton(r:Number, c:ColorTransform = null) { rad = r; shadow(); bt=button(); hlight(); if (c != null) { var trans:Transform = new Transform(bt); trans.colorTransform = c; } } private function shadow():void { var s:Sprite = new Sprite(); s.graphics.beginFill(0x000000, 1); s.graphics.drawCircle(0, 0, rad); s.graphics.endFill(); var glow:GlowFilter = new GlowFilter(0xaaaaaa, 1.0, 16, 16, 2, 1, false, false); s.filters = [glow]; addChild(s); } private function button():Sprite { var s:Sprite = new Sprite(); var matrix:Matrix = new Matrix(); matrix.createGradientBox(2*rad, 2*rad, Math.PI/2, -rad, -rad); s.graphics.beginGradientFill(GradientType.LINEAR, [0x0013a4, 0x66E6FF], [1.0, 1.0], [0, 255], matrix); s.graphics.drawCircle(0, 0, rad); s.graphics.endFill(); var glow:GlowFilter = new GlowFilter(0x0013a4, 0.8, 32, 32, 1, 1, true, false); s.filters = [glow]; addChild(s); return s; } private function hlight():void { var s:Sprite = new Sprite(); var matrix:Matrix = new Matrix(); matrix.createGradientBox(rad, rad, Math.PI/2, -rad, -rad); s.graphics.beginFill(0xffffff, 0.6); s.graphics.drawCircle(0, 0, rad/2); s.graphics.endFill(); s.y = -rad / 1.5; s.scaleY = 0.6; s.alpha = 0.6; bt.addChild(s); } }