Jump to content
Search Community

appendMultiple start same time.

bonassus test
Moderator Tag

Recommended Posts

I thought i had this figured out but i can't get this to work this morning.

How do I get these three tweens to all start at the same time and have the same duration? Now the first to appendMultiples start at the same time but move different distances so the end times are different.

throwprops?

section6Tl.appendMultiple(TweenMax.allTo([m.numberBox1, m.numberInput1 ],-globalTweenTime, {y:"-15", ease:_model.theEase}));
section6Tl.appendMultiple(TweenMax.allTo([m.numberBox2, m.numberInput2 ],globalTweenTime, {x:"-100", ease:_model.theEase}));
section6Tl.append(TweenMax.to(m.areaBack, globalTweenTime, {width:250,height:120,x:110,y:80,ease:_model.theEase}));

 

 

Thanks

Link to comment
Share on other sites

When you append() or appendMultiple(), it inserts the tweens at the end of the timeline. Since you have 3 different append calls, your tweens are getting inserted one-after-the-other. If you want to put them all at the same spot in the timeline, you can simply use the insert()/insertMultiple() methods which allow you to define an exact time/place to put the tweens:

var insertTime:Number = section6Tl.duration;
section6Tl.insertMultiple( TweenMax.allTo([m.numberBox1, m.numberInput1 ], globalTweenTime, {y:"-15", ease:_model.theEase}), insertTime);
section6Tl.insertMultiple( TweenMax.allTo([m.numberBox2, m.numberInput2 ], globalTweenTime, {x:"-100", ease:_model.theEase}), insertTime);
section6Tl.insert( TweenMax.to(m.areaBack, globalTweenTime, {width:250,height:120,x:110,y:80,ease:_model.theEase}), insertTime);

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