Try something like this:
            private function drawBox():void{

                var fillType:String = GradientType.LINEAR;
                var colors:Array = [0xFF0000, 0x0000FF];
                var alphas:Array = [1, 1];
                var ratios:Array = [0x00, 0xFF];
                var matr:Matrix = new Matrix();
                matr.createGradientBox(20, 20, 0, 0, 0);
                var spreadMethod:String = SpreadMethod.PAD;
                  var cornerRadius : Number = 10;
                  var aBox:Shape = new Shape();
                  var c:UIComponent = new UIComponent();
                  aBox.graphics.beginGradientFill(fillType, colors, alphas,
ratios, matr, spreadMethod);
                aBox.graphics.drawRoundRect (0, 0, 300, 300, 10, 10);

                aBox.graphics.endFill();
                c.addChild(aBox);
                box.addChild(c);


            }


2008/3/12, lytvynyuk <[EMAIL PROTECTED]>:
>
>   Why
>     var fillColors : Array = [ 0xFF0000, 0xFFFF00];
>     var fillAlphas : Number = 1.0;
>     var cornerRadius : Number = 10;
>     graphics.clear ();
>     drawRoundRect (0, 0, unscaledWidth, 20, cornerRadius,
>     fillColors, fillAlphas,horizontalGradientMatrix(0, 0, unscaledWidth,
>     unscaledHeight));
>
> and
>
>     var fillColors : Array = [ 0xFF0000, 0xFFFF00, 0x0000FF ];
>     var fillAlphas : Number = 1.0;
>     var cornerRadius : Number = 10;
>     graphics.clear ();
>     drawRoundRect (0, 0, unscaledWidth, 20, cornerRadius,
>     fillColors, fillAlphas,horizontalGradientMatrix(0, 0, unscaledWidth,
>     unscaledHeight));
>
> doesn't???!
>  
>



-- 
Daniel Lopes - Area Criações
www.areacriacoes.com.br
* * * * * * * * * * * * * * * * * * * * * * * * * * *
55 (31) 3077-4560   /   55 (31) 8808-8748
Av. Cícero Idelfonso, 50.
João Pinheiro. CEP: 30530-000
Belo Horizonte - MG - Brasil.

Reply via email to