Jump to content
Search Community

Use of Tint

FJO test
Moderator Tag

Recommended Posts

Hi all!!

 

I am using the TweenLite.to for changing the tint of some (UI components) buttons:

 

TweenLite.to(myButton, 0, {tint:0xe3a400,alpha:1});

 

but I don't know how to apply the tint change to just the color of the button but not the color of the text in the labels.

 

Any ideas?

Link to comment
Share on other sites

Thank you Ahrengot for the hint!! ;)

 

It's not really working because once you apply the tint Tween it tints the whole object (Button and wrapper). :(

 

Why am I using the tint Tween to change the color of the button? Because I don't see a clear and simple way to change the background color of a UI built-in Button programatically using AS3. :?

 

Recently I have discover the colorTransform method (not the one provided with the Tween tool) but the results are the same, it change the color of the background and the text in the label.

 

I'm really stuck with this. :(

Link to comment
Share on other sites

You must separate the text from the background that you're wanting to tint either by doing that inside the button itself (not sure how and don't have time to research) or just set your button's label to blank and put your own TextField on top of the button. You could wrap them in a Sprite to make it easier to move them together too, but the point is that you then have a button background that you can tween that's separate from your text.

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