Jump to content
Search Community

Removing tween from timeline and altering duration

ramezrafla test
Moderator Tag

Recommended Posts

Hi Jack,

Thanks for a great product.

Quick question - I searched the forum but could not find the answer.

 

I have a timelineMax object. While the timeline is running, I am removing a tween that should reduce the duration of the timeline. However, during debugging, I still see the same duration as before.

 

How would I go about removing a tween from the timeline live and refresh it so it reflects the right duration? How about the converse, adding a tween live?

 

Thanks in advance for your great help. Proud to be a club member!

Link to comment
Share on other sites

Hm, could you post an example FLA that demonstrates the issue? I'm not able to reproduce the problem. Here's my super-simple sample code:

 

var t:TimelineLite = new TimelineLite();
t.append( new TweenLite(mc1, 1, {y:0}) );
var tween:TweenLite = new TweenLite(mc2, 1, {y:0});
t.append(tween);
trace(t.duration); //traces 2
t.remove(tween);
trace(t.duration); //traces 1

 

You should have no problem adding/removing stuff even while the timeline is in progress.

  • Thanks 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.
×
×
  • Create New...