Jump to content
Search Community

colorMatrixFilter on text field

rondog test
Moderator Tag

Recommended Posts

I am trying to apply a colorMatrix filter on a text field and it doesn't seem to be working

 

private function menuOver(e:MouseEvent):void
{
TweenLite.to(e.target.txt,0.5,{colorMatrixFilter:{colorize:0xffffff},ease:Expo.easeOut});
TweenLite.to(e.target.bg,0.5,{colorMatrixFilter:{colorize:0x3299FF},ease:Expo.easeOut});
}

 

The bg changes color, but the text does not. Any ideas?

Link to comment
Share on other sites

Is your text dark (originally)? Remember, colorMatrixFilter is like looking through a colored piece of glass (at its default settings at least). So if you look at something black through a red piece of glass, it would still look black. So it sounds like you might have misunderstood how it works - it's NOT the same as a tint which changes the color of every pixel to a particular color. You can, however, change the brightness in addition to colorizing it to get the effect you're after. For example, if your text is black you could colorMatrixFilter:{colorize:0xFF0000, brightness:3} to make the red more obvious/bright. If you're just trying to make things whiter, though, why not just tween the brightness by itself to a very high number? Just a thought.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...