AS3 Tweener, Simultaneous Transitions and Chained Transitions

Hi There

Can someone help clarify how tweener works regarding achiving the following:

1. Simultaneos Tranistions - So a series of transitions all start/finish at the same time.

2. Chained Transitions - So each transition completes before the next.
Until now i have been using the onComplete parameter to run the next required transition etc

Many thanks

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

i'm not sure what you're asking

if you fiddle with your delay and time variables your can achieve 1 and 2.

can you provide a specific example where you've implemented this and that is not the case?
socrossAuthor Commented:
Blue Genie

Thanks for getting back to me, im probably just asking silly questions.

So how will the following react, will they start and finish at exactly the same time, It just seems that they dont always trigger at the same time and this shows in the transitions! How would you go about ensuring accuracy of your tweens?

Tweener.addTween(mc1, {time:0.2, transition:"easeInQuint", alpha: 1});
Tweener.addTween(mc2, {time:0.2, transition:"easeInQuint", alpha: 1});

I assume the only way to achive to complete a tween before you start a new one is to use the onComplete event?

Tweener.addTween(mc1, {time:0.2, transition:"easeInQuint", alpha: 1, onComplete: function() {
        Tweener.addTween(mc2, {time:0.2, transition:"easeInQuint", alpha: 1});


the two tweens in your example for mc1 and mc2 should start and finish at the same time but of course if there's a lot going on the 1st tween might be slightly quicker because it's triggered first - but there shouldnt' be any glaring discrepencies, that's why i asked if you had a specific file where you found the stuff wasn't working nicely.

in terms of doing something when one Tween is finished, i'd say using the onComplete is a good idea (and since the developers all put that in there for you to use.)

I dont' use tweener (use tweenmax) but  generally I don't like using nested functions so i'd do that a little differently but it shouldn't make any difference in the performance.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.