Jump to content
Search Community

AS2 tweening nested "delay" and "onComplete" not working as expected

reinhat test
Moderator Tag

Recommended Posts

Hi, I am working on a flash training presentation including a number tweens which need to appear one after another, mainly texts and some photos flying in or fading out while trying to control the timing of the elements with delay property. I have noticed however that when "delay" used in conjunction with "onComplete" callbacks the delays are somewhat missing and not processed. So instead of delaying the start of the animation and then only do onComplete when it ends it seems like the script is disregarding the delay properties an proceeds immedeately with onComplete callback functions. Please see example below:

 

//animations part 1

TweenLite.to(girl, 1, {_alpha:100, ease:Linear.easeNone, delay:1.5});
TweenLite.to(planTab, 0.7, {_y:417, ease:Linear.easeNone, delay:3.5});
TweenLite.to(text_1, 0.5, {_x:394, _alpha:100, ease:Linear.easeOut, delay:4});
TweenLite.to(text_2_Anim, 0.5, {_x:395, _alpha:100, ease:Linear.easeOut, onComplete:myFunction1, delay:4.3});

 

//animations part 2 - need to start with about 2 second delay after previous set so the previous texts can be read
function myFunction1() {
    TweenLite.to(text_2_Anim, 0.5, {_x:435, _alpha:0, ease:Linear.easeOut, delay:2.5, onComplete:text_2_Anim.nextFrame()});
    TweenLite.to(text_2_Anim, 0.5, {_x:395, _alpha:100, ease:Linear.easeOut, delay:3});
    TweenLite.to(benefitsTab, 0.5, {_alpha:100, ease:Linear.easeNone, onComplete:myFunction2, delay:3});
}

 

//animations part 3

function myFunction2() {

    //more tweens here.

}

 

Any ideas on why it is happening?

Thanks, Attila

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums.

 

Sorry to hear you are experiencing problems.

 

First, please verify that you have the latest version of the platform 12.0.9 available here:

http://www.greensock.com/?download=GSAP-AS2

 

If you still have trouble, please reduce your file to 1 or 2 tweens and simple onComplete on a tween with a delay... something very simple. Once you get replicate the problem in a very basic implementation just zip your files and attach them here. Use the "More Reply Option" button.

 

We will be happy to look into it.

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