Facebook
From tasty, 1 Week ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 36
  1.     let playYamahata = select('.item__yamahata');
  2.     playYamahata.addEventListener('click', function () {
  3.  
  4.         if(returned_yamahata.isActive()){
  5.             // tween is active so do something
  6.             TweenMax.killChildTweensOf(returned_yamahata);
  7.         } else {
  8.             // tween is not active so do something
  9.             TweenMax.killChildTweensOf(returned_yamahata);
  10.             returned_yamahata.progress(0);
  11.         }
  12.  
  13.         returned_yamahata.reversed() ? returned_yamahata.play():returned_yamahata.reverse();
  14.  
  15.         returned_yamahata.eventCallback("onComplete", function () {
  16.             returned_yamahata.restart();
  17.         });