package { import flash.geom.Matrix; import flash.display.GradientType; import flash.display.Graphics; import flash.display.Sprite; public class FlashTest extends Sprite { public function FlashTest() { var g:Graphics=graphics; var matrix:Matrix=new Matrix(); matrix.createGradientBox(465,465,45,0,0); g.beginGradientFill(GradientType.LINEAR,[0xff0000,0x0000ff],[1,1],[0,255],matrix); g.drawRect(0,0,465,465); g.endFill(); } } }