Jump to content
Search Community

TLFTextField borderColor Tween

JacobHaitsma test
Moderator Tag

Recommended Posts

Quick question.

 

I'm trying to use TweenMax to (smoothly) tween the borderColor property of my TLFTextField from one uint to another, and have had no luck so far. I can't quite figure out where to go from here:

 

 

TweenMax.to(textField, 1, borderColor: ?? });

 

Any help would be appreciated.

 

Thanks in advance!

Jacob

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums.

 

I don't have a lot of experience with TLFText as it had lots of issues when it first came out.

However, a quick look at the AS3 docs shows that the TLFTextField must have border = true in order to see the border.

 

Specifies the color of the text field border. The default value is 0x000000 (black). This property can be retrieved or set, even if there currently is no border, but the color is visible only if the text field has the border property set to true.

 

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/text/TLFTextField.html#borderColor

 

If that doesn't help, please provide a very simple fla that we can use for testing. Zip it and attach it to this thread using the "more reply options" buttons.

 

Thanks!

Link to comment
Share on other sites

I did a little exploring. This will work great using the hexColors plugin

 

import com.greensock.*;


//txt is a TLFTextField on the stage


txt.border = true;
txt.borderColor = 0xff0000;
txt.borderWidth = 12;


TweenMax.to(txt, 4, {hexColors:{borderColor:0x0000ff}});
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...