Object Glow Filter Class

package
{
    /** import filters **/
    import flash.filters.GlowFilter;

    /** import diplay **/
    import flash.display.DisplayObject;

    public class ObjectGlow
    {
        /** add glow to the display object **/
        public static function Glow($object:DisplayObject, $color:Number, $alpha:Number, $blurX:Number, $blurY:Number, $strength:Number, $quality:int, $inner:Boolean = false, $knockout:Boolean = false):void
        {
             var $filter:GlowFilter = new GlowFilter($color, $alpha, $blurX, $blurY, $strength, $quality, $inner, $knockout);
             $object.filters 	    = [$filter];
        }
    }
}
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s