Jump to content
Search Community

Cannot update totalDuration of timelineLite [SOLVED]

mattmoon test
Moderator Tag

Recommended Posts

Hello,

 

First off I want to tell you how much your product has simplified my life. THANK YOU VERY MUCH! But now I have hit a sort of road block. I am building a "image-stitched" video like presentation with timelineLite and I need to be able to update the duration of the timeline to the duration of my audio file after I build the timeline. Every time I set a duration it doesn't seem to get honored. I can trace the totalDuration before the set and it is always the same after also. Any ideas? i looked through the timelinelite code and it looks as if it set the timescale should i try to just manually set the timescale myself?

Link to comment
Share on other sites

Yes - if you think about it, the totalDuration shouldn't be able to be manually set because it reflects the duration of all the tweens that you put into it. In other words, imagine you put 3 back-to-back 1-second tweens into the timeline. totalDuration would be 3. But if you just force it to 6, does that mean you want it to override all the durations of every tween in the timeline? This would not only slow things down as it would have to loop through and change them all, but it could also be very cumbersome when dealing with the tweens because then what if you add another tween to the end? Do you want to remember the totalDuration of 6 and force everything to run shorter or do you want to allow the timeline to expand to 7 seconds now? And the other 1-second tweens that you added previously were doubled, so would you want the duration of the new one to be doubled as well, making totalDuration 8 seconds? See how it gets very messy?

 

So the answer is yes, adjust timeScale to make it last however long you want. It's a much cleaner solution.

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