Jump to content
Search Community

Noobie Q re alpha tween Please HELP!

khw2010 test
Moderator Tag

Recommended Posts

noobie q:

 

I have created, or proffered some code to fade in mcTxt8 for a few secs, then fade out; then fade in mcTxt9 for a few secs then fade out; After this I need to fade in mcTxt10 and end the animation. I know the code below isn't correct or as smooth as it should be, (there is lag time btw mcTxt9 & 10, which I don't like) any suggestions? Thanks!

 

var clips:Array = [mcTxt8, mcTxt9];

var timeline:TimelineMax = new TimelineMax({repeat:0});

timeline.insertMultiple( TweenMax.allFrom(clips, 6, {autoAlpha:0}, 5), 1);

timeline.insertMultiple( TweenMax.allTo(clips, 3, {autoAlpha:0}, 5), 5);

timeline.append (TweenMax.from(mcTxt10,1,{autoAlpha:0}));

Link to comment
Share on other sites

If the allFrom() and allTo() stuff makes things a little too difficult for you to understand intuitively, there's nothing wrong with listing out the tweens like this:

 

var tl:TimelineLite = new TimelineLite();
tl.append( TweenMax.from(mcTxt8, 6, {autoAlpha:0}) );
tl.append( TweenMax.to(mcTxt8, 3, {autoAlpha:0}) );
tl.append( TweenMax.from(mcTxt9, 6, {autoAlpha:0}) );
tl.append( TweenMax.to(mcTxt9, 3, {autoAlpha:0}) );
tl.append( TweenMax.from(mcTxt10, 6, {autoAlpha:0}) );

 

And feel free to use the "offset" parameter in the append() method to space them out wherever you want. See the video at http://www.greensock.com/timeline-basics/ to learn the basics.

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