# Automatic Filter Animation using Tween Class

**URL:** <https://forum.kirupa.com/t/automatic-filter-animation-using-tween-class/194744>\
**Category:** flash\
**Created:** [July 25, 2006, 10:48pm UTC](https://forum.kirupa.com/t/automatic-filter-animation-using-tween-class/194744 "2006-07-25T22:48:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mifuyne](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mifuyne/32/2611_2.png) [@Mifuyne](https://forum.kirupa.com/u/Mifuyne)\
**Post date:** [July 25, 2006, 10:48pm UTC](https://forum.kirupa.com/t/automatic-filter-animation-using-tween-class/194744/1 "2006-07-25T22:48:16Z")

</div>

Sorry guys, I’m at a loss at how to go about doing this. I’ve been following the “[Using the Tween Class Part II". I even looked at the "[URL=“http://www.kirupa.com/developer/flash8/filter\_effects.htm”]Applying and Animating Filter Effects](http://www.kirupa.com/developer/actionscript/tween_part2.htm)”. Both of them don’t offer much insights to animating a filter effect without the use of rollovers.

What I’m hoping to achieve is that the glow filter animates **after** the object it’s attached to finishes its animation.

So far, I’ve got the glow effect to show up. However, I can’t get it to animate after the object’s motion has finished. The following is how I have the codes set up:

```auto
import mx.transitions.Tween;
import mx.transitions.easing.*;
import flash.filters.GlowFilter;

var gf:GlowFilter = new GlowFilter(0xB3B3B3, 25, 3, 3, 3, 2, false, false);
var gfBX:Tween = new Tween(gf, "blurX", Elastic.easeOut, 5, 5, 1, true);
var gfBY:Tween = new Tween(gf, "blurY", Elastic.easeOut, 5, 5, 1, true);

var lCScaleY:Tween = new Tween(lCCon, "_yscale", Bounce.easeOut, 0, 100, 1.5, true);

lcScaleY.onMotionFinished = function() {
    gfBX.continueTo(30, 2);
    gfBY.continueTo(30, 2);
};

gfBX.onMotionChanged = function() {
    lCCon.filters = [gf];
};

```

Somehow I feel the answer to this problem of mine is pretty obvious…but I’m not seeing the answer =/

If you guys can shed any light on this, that’d be great 😃

Thanks for your time :}
