Jump to content
Search Community

Basic Timeline Max Question. [SOLVED]

ej23 test
Moderator Tag

Recommended Posts

Hello Everybody.

 

I was hoping someone could answer, what is probably a very simple question in regards to Timeline Max, so here it is:

 

Basically what I am trying to do is delay the restart of my timeline, after an external SWF (child) is removed.

 

I don't have a problem getting the time line to restart, it just starts before some of my other tweens are finished.

 

Again this is probably real simple, but I can't for the life of me figure this out.

 

Here is the code if it's even needed.

 


TheArrows.restart(); 

//////////////////////This what I would like delayed./////////////

 

 

The code above is the last line of a function, which has about 7 tweens. The timeline though starts to play before these tweens end.

 

 

Any ideas?

 

Thanks in advance for any sort of help.

Link to comment
Share on other sites

There are a lot of ways to do this, so it's tough to say what's best without seeing the rest of your code. But here are some options:

 

1) Use a delayedCall like:

 

TweenLite.delayedCall(1, myTimeline.restart); //delays for 1 second

 

2) Use the repeat and repeatDelay like:

 

var tl:TimelineMax = new TimelineMax({repeat:1, repeatDelay:1});
...

 

3) Make the original TimelineMax instance have a delay, and then when you restart(), tell it to include that delay:

 

var tl:TimelineMax = new TimelineMax({delay:1});
...
tl.restart(true);

 

4) If you have other tweens that need to finish first, dump them into a TimelineLite and then append() your other timeline (nest it). That way, it'll finish as soon as the others are done.

 

Does that help?

Link to comment
Share on other sites

Perfect! Many Thanks!

 

Yes Timeline Lite & Max are definitely the way to go.

Being new to AS3 coding, there is probably a lot I have to learn before I can fully realize Timeline Lite & Max's full potential, but so far, it has been extremely helpful.

Thanks again for your help, and Greensock

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