AS3: beginGradientFIll() doesn't make me a gradient!

后端 未结 3 450
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-14 21:44

I\'m trying to render a circle with a radial gradient but I can\'t seem to figure it out.

var bkgdGrad:Shape = new Shape();
bkgdGrad.graphics.beginGradientFi         


        
3条回答
  •  自闭症患者
    2021-01-14 22:24

    create a gradient box with a new Matrix object and assign the new matrix object to your beginGradientFill matrix parameter:

    flash.geom.Matrix.createGradientBox()


    [EDIT]: here's a simple online tutorial that should help explain more:

    Drawing Gradients Programatically in AS3

提交回复
热议问题