Create Gradient box : Gradient : Graphics Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » Graphics » Gradient »

 

Create Gradient box


 

import flash.display.GradientType;
import flash.display.Sprite;
import flash.geom.Matrix;
     
class Ball extends Sprite {

     public function Ball() {
          var colors:Array = [];
          var pMatrix:Matrix = new Matrix();
          pMatrix.createGradientBox(70700, -45, -32);
          graphics.beginGradientFill(GradientType.RADIAL, [0xFF0000,0x330000][1,1][0,0xFF], pMatrix);
          graphics.drawCircle(0025);
          graphics.endFill();
     }

}

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo Graphics
» Gradient