# beginGradientFill()?

**URL:** <https://forum.kirupa.com/t/begingradientfill/244785>\
**Category:** Uncategorized\
**Created:** [November 21, 2007, 6:04pm UTC](https://forum.kirupa.com/t/begingradientfill/244785 "2007-11-21T18:04:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![daidai](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/daidai/32/3087_2.png) [@daidai](https://forum.kirupa.com/u/daidai)\
**Post date:** [November 21, 2007, 6:04pm UTC](https://forum.kirupa.com/t/begingradientfill/244785/1 "2007-11-21T18:04:02Z")

</div>

```auto
 
     import flash.geom.*
     import flash.display.*
 
     var fillType:String = GradientType.LINEAR;
     var colors:Array = [0xFF0000, 0x0000FF];
     var alphas:Array = [100, 100];
     var ratios:Array = [0x00, 0xFF];
     var matr:Matrix = new Matrix();
     matr.createGradientBox(20, 20, 0, 0, 0);
     var spreadMethod:String = SpreadMethod.PAD;
     up.graphics.beginGradientFill(fillType, colors, alphas, ratios, matr, spreadMethod);  
     up.graphics.drawRect(410,115,10,10);
     up.graphics.endFill ();

```

all Im after is a gradient that is white on the bottom horizontal and gradually gets to black at the top, this above, taken from Flash’s help is confusing the hell out of me. can anyone help? i dont know how to make it…  
thanks  
dai2
