PDA

View Full Version : TextFormat class in AS3



jdat
October 9th, 2009, 06:54 AM
Hi,
I am still learning the ropes with AS3. I have a navigation bar that changes the colour of the text when you rollover it, at the moment I get an inner glow to the text. I would like to amend the following code so that I don't get a glow around the text when I roll over it, I would just like a solid colour with no glow.

I found this code and I have tried it in my site and it does indeed have the glow around the text. What would I need to amend in the code below to remove the glow and have a solid colour for the text? I think the TextFormat class may need to be used but I am unsure how to use it within my code below:

var navBtnGlow:GlowFilter = new GlowFilter(0xFF3198, 1, 1, 15, 1, 2, true, false);

navBar_mc.addEventListener(MouseEvent.MOUSE_OVER, navOverF);
navBar_mc.addEventListener(MouseEvent.MOUSE_OUT, navOutF);

function navOverF (event:MouseEvent):void
{
event.target.filters = [navBtnGlow];

navBar_mc.setChildIndex(event.target as MovieClip, 1);
dropMenus_mc.gotoAndStop(navBar_mc.getChildAt(1).n ame);
}

function navOutF (event:MouseEvent):void
{
event.target.filters = [];
}

Any help you can provide is greatly appreciated.
Many thanks
Jdat.