Skip to content

AS3 – Add Outline to MovieClip

public static function addOutline(obj:*, color:uint, thickness:int = 2):void {
	var outline:GlowFilter = new GlowFilter();
	outline.blurX = outline.blurY = thickness;
	outline.color = color;
	outline.quality = BitmapFilterQuality.HIGH;
	outline.strength = 100;
	var filterArray:Array = new Array();
	filterArray.push(outline);
	obj.filters = filterArray;
}

Post a Comment

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