Flash 8 and animating filter effects

I read throught this tutorial:

http://www.kirupa.com/developer/flash8/filter_effects.htm

And it soes pretty much what I am looking for, however. If you change the color of the glow effect suddenly, it doesn’t work right anymore. I changed it from the blue it is set to by default, and changed it to a yellow (FFFFCC). But when i doo that the glow overtakes the text. Does anyone have any idea why this would happen? Or does anyone else know how to animate a filter effect.

I am looking to make a button that will glow (animated, not just a one frame rollover state) when rolled over.

Let me know if anyone has any insight on this:cyborg:.

You have to set the Alpha to 0 first then it won’t be visible until you rollover - see the changes in Bold below:
(Note: when you add these changes, right after you type “gf.” you should see a list of properties you can mess with!)

import flash.filters.GlowFilter;
var gf:GlowFilter = new GlowFilter(0xffff00, 0, 3, 3, 5, 3, false, false);
kText.filters = [gf];
kText.onRollOver = function() {
** gf.alpha=100;**
this.onEnterFrame = function() {
if (gf.blurX < 20) {
gf.blurX++;
gf.blurY++;
} else {
delete this.onEnterFrame;
}
this.filters = [gf];
};
};
kText.onRollOut = function() {
gf.alpha=0;
this.onEnterFrame = function() {
this.filters = [gf];
if (gf.blurX > 3) {
gf.blurX–;
gf.blurY–;
} else {
delete this.onEnterFrame;
}
};
};

With a little tweaking, that seemed to work. Thanks for the info and help. I was curious, now if I want to put in a sound effect for that rollover, how would I script that in?

File->Import the .wav file into your library and slap it onto a new layer in a keyframe wherever you want it works good for short sounds.

Oh, thanks. I thought for some reason I needed to script it in. But that works. I guess I was making it more complicated than it needed to be. Thanks for all the help.