• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 395
  • Last Modified:

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

S
0
socross
Asked:
socross
  • 2
1 Solution
 
blue-genieCommented:
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?
0
 
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});
}});


Thanks

S
0
 
blue-genieCommented:
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.



0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now