flash on 2009-9-15

by bigfish
♥0 | Line 21 | Modified 2009-09-15 23:58:56 | MIT License
play

ActionScript3 source code

/**
 * Copyright bigfish ( http://wonderfl.net/user/bigfish )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/1PNY
 */

package {
	import flash.geom.Matrix;
	import flash.display.Graphics;
    import flash.display.Sprite;
[SWF(backgroundColor="0xCCCCCC", width="800", height="600", frameRate="30")]
    public class FlashTest extends Sprite {
        public function FlashTest() {
			var _width:Number = 200;
			var _height:Number = 50;

            // write as3 code here..
			var headerHeight:Number = 50;
            var g:Graphics = graphics;
			var gm:Matrix = new Matrix();
			var gradientType:String = "linear";
			gm.createGradientBox(_width, _height/2, Math.PI/2, 0, 0);
			var highlightColors:Array = [0xFF0000, 0xFF0000];
			g.lineStyle();
			g.beginGradientFill(gradientType, highlightColors, [1, 0], [0,255] , gm);
			g.drawRect(1,1, _width-2, (headerHeight-2)/2);
        }
    }
}