Jump to content
GreenSock

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

Append a reverse()?

Recommended Posts

Is there a way to have reverse appended to the timeline? I'm trying to make a typewriter effect, so when the letters are typed out, it'll reverse it, and type a new sentence.

 

Kind of like you're backspacing the sentence.

Link to comment
Share on other sites

I don't know that I follow what you are trying to achieve exactly. But to answer your question as directly as possible: Yes, you can append a reverse() to a timeline:

 

var tl:TimelineLite = new TimelineLite();
tl.append( TweenLite.to( mc, 1, {x:100}) );
tl.append( TweenLite.to( mc, 1, {y:100}) );
tl.append( TweenLite.delayedCall( 0, tl.reverse) );

 

If you really want to display a series of sentences being typed and erased I would suggest that each sentence animation is contained in a TimelineMax that has {repeat:1, yoyo:true} in its constructor.

 

you would then nest each sentence timeline in a parent timeline and all the sentences would play in succession.

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