Jump to content
Search Community

TimelineMax repeat in as2? (new here)

adamengstrom test
Moderator Tag

Recommended Posts

Hello everybody,

 

I´m new to using the Greensock engines and I completely love them, and I have a question about repeating a timelinemax with as2.

 

I would like the entire sequence to repeat when the last tween is finished, but i just can´t get it to work.

 

Here is the code:

 

import com.greensock.*;

import com.greensock.easing.*;

 

//alpha

 

text2._alpha = 0;

bow2._alpha = 0;

text3._alpha = 0;

bow3._alpha = 0;

 

var myTimeline:TimelineMax = new TimelineMax({repeat:-1});

 

 

myTimeline.insert( new TweenLite.to(text1, 2, {_alpha:0, delay:4, overwrite:false}) );

myTimeline.insert( new TweenLite.to(bow1, 2, {_alpha:0, delay:4, overwrite:false}) );

 

myTimeline.insert( new TweenLite.to(text2, 4, {_alpha:100, delay:7}) );

myTimeline.insert( new TweenLite.to(bow2, 4, {_alpha:100, delay:7}) );

 

myTimeline.insert( new TweenLite.to(text2, 3, {_alpha:0, delay:11, overwrite:false}) );

myTimeline.insert( new TweenLite.to(bow2, 3, {_alpha:0, delay:11, overwrite:false}) );

 

myTimeline.insert( new TweenLite.to(text3, 4, {_alpha:100, delay:14}) );

myTimeline.insert( new TweenLite.to(bow3, 4, {_alpha:100, delay:14}) );

 

myTimeline.insert( new TweenLite.to(text3, 3, {_alpha:0, delay:18, overwrite:false}) );

myTimeline.insert( new TweenLite.to(bow3, 3, {_alpha:0, delay:18, overwrite:false}) );

 

Any help is greatly appreciated and I´m sorry if this subject has been discussed before.

 

/Adam

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