Actionscript gradient


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var gradientWidth:int = 100;
  2. var gradientHeight:int = 300;
  3. var angle:Number = 0;
  4.  
  5. var matrix:Matrix = new Matrix();
  6. matrix.createGradientBox(gradientWidth, gradientWidth, (Math.PI / 180) * angle, 0, 0);
  7.  
  8. graphics.beginGradientFill(GradientType.LINEAR, [0xefefee, 0xa4a5a7], [1, 1], [0, 255], matrix);
  9. graphics.drawRect(0, 0, gradientWidth, gradientWidth);
  10. graphics.endFill();

URL: http://www.nightdrops.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.