flash on 2011-2-23

by fakestar0826
♥0 | Line 14 | Modified 2011-02-23 01:20:18 | MIT License
play

ActionScript3 source code

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

package {
    import flash.geom.Matrix;
    import flash.display.GradientType;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var matrix:Matrix = new Matrix();
            matrix.createGradientBox(100, 100, Math.PI / 4, 100, 100);
            graphics.beginGradientFill(GradientType.RADIAL, [0xFF0000, 0x0000FF, 0xFFFFFF], [1, 1, 1], [0, 128, 255], matrix);
            graphics.drawRect(100, 100, 100, 100);
            graphics.endFill();
        }
    }
}