Jump to content
Search Community

Tween:Alpha [SOLVED]

Luigi Vercotti test
Moderator Tag

Recommended Posts

Hello

 

Wondering why is that happenning?

When I use this code...

 

time_txt.visible = true;
TweenMax.fromTo(time_txt, 1,{alpha:0},{alpha:1});

in preview mode the mc "time_text" will flick...show first then goes from alpha 0 to 1

 

but when I use this code...

 

time_txt.visible = true;
time_txt.alpha = 0;
TweenLite.to (time_txt, 2, {alpha:1});

it is working fine, but what it is interesting that somewhere else when I use the first option mentioned above it works fine but in this case...not...why...any idea please?

Link to comment
Share on other sites

By default, the tween doesn't render for the first time until the next ENTER_FRAME event is fired in your SWF (after the tween is created). If you want it to render immediately, though, you can do that by setting immediateRender:true in your vars object, like:

 

TweenMax.fromTo(time_txt, 1,{alpha:0}, {alpha:1, immediateRender:true});

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