Not just Actionscript noodlings


23 May

Creating gradient background


If you’ve ever wanted to create a block of filled colour with a gradient for a background, similiar to the standard Flex background, then here you go:

var mat:Matrix = new Matrix();
var bg:Sprite = new Sprite();
mat.createGradientBox( stage.stageWidth, stage.stageHeight, Math.PI * .5 );
bg.graphics.beginGradientFill( GradientType.LINEAR, [ 0xFFFFFF, 0x000000 ], [ 1, 1 ], [ 0, 255 ], mat );
bg.graphics.drawRect( 0, 0, stage.stageWidth, stage.stageHeight );
bg.graphics.endFill();
addChild( bg );

22 May

Hello and welcome


I lost my last blog to the wonderful server crash of 08 and now I’ve decided to start back up again with added goodness for all the family.

This is mainly a place for my Actionscript experiments and code snippets…


No Response Filed under: talk