Jump to content
Search Community

determin1st

Members
  • Posts

    56
  • Joined

  • Last visited

Posts posted by determin1st

  1. Hello,

     

    Is there a way to run onComplete function of all nested timelines after main timeline finished playing?

     

    I have a two areas at page - one is carousel list (left <- center/current -> right) and second is menu (div with buttons) which slide to left or right. I defined a drag event which unites two effects - carousel slide and menu slide. main timeline is controlled with .progress(X, true) function and after reaching 80% limit and dropping (mouseup), state changes and both effects need to be reset in their onComplete.

     

    The problem is that duration differs (first is 0.4, second is 0.6 - both start at the same time) and first effect doesn't fire onComplete after drop event plays main timeline - .play(null, false).

     

     

    1.jpg.c797c2e63002445c74092d87292487f5.jpg2.jpg.6266488ef5f70194f82c0fa7f5721e64.jpg

     

     

    See the Pen veZoPJ by determin1st (@determin1st) on CodePen

  2. Hello Rodrigo,

     

    thanks for your workaround, but i really like non-imperative-declarative style..

     

    i have a button with hover-gsap-TimelineLite tween-effect witch is invoked inside mouseover -> play(), and reversed inside mouseout -> reverse().

    when this effect completes, onComplete creates a yoyo-tween which applies more animation to this button changing from the same value {scale} as in first effect.

    now, the need is to reverse yoyo-tween to the complete state of first effect and then, to continue reversing first TimelineLite.

     

    maybe i'm going the wrong way doing this [e1->e2, e1<-e2] animation.

    anyway, thanks for reading.

×
×
  • Create New...