Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
rondog

colorMatrixFilter on text field

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

Ok, I've changed it from 0xffffff to a different color like red and it works. If I try anything close to white it doesn't work..I tried f1f1f1 and f2f2f2 and they both didn't work.

Link to comment
Share on other sites

I would use tint, however, I have a drop shadow on the text and if I tint it, it changes the color of the shadow too

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.
×