Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
naveen

multiple callbacks onComplete() , .reverse() not working properly

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi am using multiple callbacks onComplete() , .reverse() not working properly

 

for example : 

 

var myTween = new TweenMax.to([element1,element2,element3], 0.5 ,{"left" : "0px", "top" : "03x"}).eventCallback("onComplete",function(){

     myTween =    aboutCircle.empty(200);
        TweenMax.to([element,element1,element2,element3], 0.5, {"display":"none"}).eventCallback("onComplete",function(){
            TweenMax.to(aboutCircle, 0.5 , {rotationY:"+=180", "left" : "0px", "top":"0px","width":"500px","height":"500px"}).eventCallback("onComplete",function(){  
            })
        }) 
    });
 
 
i want reverse for it myTween.reverse();
Link to post
Share on other sites

Hi naveen  :)

 

- you need TimelineMaxTimelineLite 

 

- display isn't a tweenable property , you can use autoAlpha , like this : 

//fade out and set visibility:hidden
TweenLite.to(element, 2, {autoAlpha:0});

//in 2 seconds, fade back in with visibility:visible
TweenLite.to(element, 2, {autoAlpha:1, delay:2});

- there isn't any necessary to pas property name in double quotations , pls check CSSPlugin Doc. : http://greensock.com/docs/#/HTML5/Plugins/CSSPlugin/

 

- btw maybe onReverseComplete can help you too , list of .eventCallback() : http://greensock.com/docs/#/HTML5/GSAP/TweenLite/eventCallback/

  • Like 2
Link to post
Share on other sites

Yup, Diaco is right. 

Our timeline tools are what you need if you want to play a sequence backwards and fowards.

In addition to those links, be sure to watch this video to get started: http://greensock.com/sequence-video

  • Like 1
Link to post
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.

×