A downside of the filter is that, in order to actually modify the color it is glowing with, you have to remove it from the list of a component's filters and then add it back in. Simply changing the color property is not enough.
For all the discussion about rollovers above, the biggest win of using a glow to change colors is the ability to change an image with a color transition. In our case, we have a thumbs up image that changes colors when a user is rated up. The image has a color transition from green to white and then back. Usually, this would be relatively difficult to achieve; with the glow effect, however, we can change the color of the image without needing any additional embedded assets.
<?xml version="1.0" encoding="utf-8"?>
private static const HELPFUL_THUMBS_UP:Class;
private static const THUMBS_UP_DEFAULT_COLOR:Number = 0xC3DA6E;
public var helpfulImageColor:Number = THUMBS_UP_DEFAULT_COLOR;
public function highlight(newColor:Number = NaN):void
if (! isNaN(newColor))
helpfulImageColor = newColor;
public function fadeHighlight():void
* In order for a glow to have its color changed, it needs to be
* removed and re-applied. This function does that for the helpful
* image glow filter.
private function reloadHelpfulImageGlow():void
helpfulImage.filters = null;
helpfulImage.filters = [helpfulImageGlow];
<mx:Parallel id="highlightFader" duration="2000">
<mx:VBox styleName="ratingWrapper" height="24">
<mx:Label id="ratingLabel" styleName="ratingLabel"
<mx:Image id="helpfulImage" styleName="helpfulImage"
Here, we given the color animation a tweenUpdate function that reloads the glow filter on the image. As I mentioned above, this happens because the filter is not reapplied unless you remove it and re-add it. Simply changing the color property of the filter, as the AnimateColor effect does, does not force that refresh. Other than that most of it is pretty self-explanatory. We have a bindable color that is updated continuously by the AnimateColor effect, and we have a parallel effect that updates the label that accompanies it. The component that contains this in our application changes its own background color at the same time, thus making this color change still result in a legible rating.
All in all, glow filters are more useful than simply applying a glow. This technique can be a real keeper for color transitions on images.