Jump to content
Search Community

Jon

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by Jon

  1. I'd like to have a fromTo TweenMax run a function prior to executing its animations to determine whether it should perform the animations or remain in its current state.

     

    The tween will always execute once, but repeat/revert animations should be governed by a function.

     

    I've tried playing around with onUpdate and .pause(), but am not having any luck.

     

    My code is looking something like this:

     

    onUpdateParams: ["{self}"],
    onUpdate: function(tween) {
      if (some_condition) {
        tween.pause();
      } else {
        tween.play();
      }
    }
    

     

     

×
×
  • Create New...