Jump to content
GreenSock

anotheruser

change the global timeline duration without changing timescale

Recommended Posts

Hi

 

I have a timeline with two tweens

the two tweens are 8 seconds each and repeat is set to be -1 so that it is infinite

 

so the timeline's whole time is now showing as infinite . 

I want to set the timeline time to a specific amount without actually changing the timescale

 

timeline.set({}, {}, time); will work , it works only if the time is greater not lesser. how to actually achieve this?

Link to comment
Share on other sites

Hey @anotheruser,

 

Sorry - was not focused, thought too complex

 

59 minutes ago, anotheruser said:

just need the time to stop and end play at 10 seconds 

 

Maybe like this ???

 

See the Pen abOPvgp by mikeK (@mikeK) on CodePen

 

Happy tweening ...

Mikel

  • Like 2
Link to comment
Share on other sites

Hi @mikel

 

i am sure about the delayed call , but what am asking is am trying to get the toal progress 

so if the repeat is more the total progress will be somewhat like 0.8-0.7 while you pause it in the end 

 

i want the progress to be 1 when we pause

Link to comment
Share on other sites

Hey @anotheruser,

 

Then try:    action.pause(2); 

 

Kind regards

Mikel

Link to comment
Share on other sites

20 minutes ago, anotheruser said:

i want the progress to be 1 when we pause

So you want the timeline to jump to the end state?

 

Or after 10 seconds do you want the timeline to complete its current timeline and then pause at the end? For example, if a timeline takes 3 seconds to complete and you call the method at 10 seconds then it finishes its last repeat and ends at time 12.

  • Like 1
Link to comment
Share on other sites

Hey,

 

I just remembered an older example - here only as a joke.

 

See the Pen abOPmMY by mikeK (@mikeK) on CodePen

 

The associated thread 

 

 

Happy tweening - its fun  ...

Mikel

  • Like 1
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.
×