Gradient Glow

Actionscript:
  1. var colors:Array = [0xFF0000, 0x666699, 0x223322, 0xCCCCDD, 0xFFEEFF];
  2. var alphas:Array = [0, 1, 1, 1, 1];
  3. var ratios:Array = [0, 50, 100, 200, 255]
  4. var filter:GradientGlowFilter = new GradientGlowFilter(0, 0, colors, alphas, ratios, 30, 30, 1, 2, "full", true);
  5.  
  6. var circles:Shape = new Shape();
  7.  
  8.  for (var i:int = 0; i<30; i++){
  9.   with(circles.graphics) beginFill(0xFF0000), drawCircle(Math.random()*500, Math.random()*400,10+Math.random()*40);
  10.  }
  11.  addChild(circles);
  12.  
  13.  circles.filters = [filter];

I don't see GradientGlowFilter used much. But with some tweaking you can probably get some decent stuff out of it.

This entry was posted in Graphics and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*