beginGradientFill Rotate problem

I’m trying to rotate my gradient, but I can’t get this work, I need some help.

import flash.geom.Matrix;
this.createEmptyMovieClip("mShape", 1);
mShape._x = 100;
mShape._y = 100;
var mxBox:Matrix = new Matrix();
drawRoundedRectangle(mShape, 240, 180, 10, 0x99FF00, 100);
function drawRoundedRectangle(target_mc:MovieClip, boxWidth:Number, boxHeight:Number, cornerRadius:Number, fillColor:Number, fillAlpha:Number):Void {
    with (target_mc) {
        moveTo(cornerRadius, 0);
  mShape.lineStyle(2, 0, 100, false, "none", "none", "round");
  mShape.beginGradientFill("linear", [0xFFFFFF, 0x1C232C, 0x232D38], [100, 100, 100], [0, 150, 200], mxBox, "reflect", "LinearRGB", 1);
  //beginFill(fillColor, fillAlpha);
        lineTo(boxWidth - cornerRadius, 0);
        curveTo(boxWidth, 0, boxWidth, cornerRadius);
        lineTo(boxWidth, cornerRadius);
        lineTo(boxWidth, boxHeight - cornerRadius);
        curveTo(boxWidth, boxHeight, boxWidth - cornerRadius, boxHeight);
        lineTo(boxWidth - cornerRadius, boxHeight);
        lineTo(cornerRadius, boxHeight);
        curveTo(0, boxHeight, 0, boxHeight - cornerRadius);
        lineTo(0, boxHeight - cornerRadius);
        lineTo(0, cornerRadius);
        curveTo(0, 0, cornerRadius, 0);
        lineTo(cornerRadius, 0);
        endFill();
    }
}

Thanks

is this what you mean…


var rad = (Math.PI/2) //Rotation in Radians
var cosrad = Math.cos(rad);
var sinrad = Math.sin(rad);
var mxBox = new Matrix(cosrad,sinrad,-sinrad,cosrad,0,0);

yes!, thanks!