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 ); GradientType.LINEAR, [ 0xFFFFFF, 0x000000 ], [ 1, 1 ], [ 0, 255 ], mat ); 0, 0, stage.stageWidth, stage.stageHeight );;
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