Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by jjames

  1. Found a solution: 

    Added/Removed/Moved the following in my JS:


    var isWaterVisible = false; //added


    onRepeat:swapWater //removed

    function swapWater(){} //removed


    water.css("visibility","hidden"); //added to buildAnimation() {}


    tl.to(water.... //all moved inside of buildAnimation() {}
    onComplete: function() {
                if (!isWaterVisible) {
                  water.css("visibility", "visible");
                  isWaterVisible = true;
              } //added to last to. of water molecule right after {alpha:0


    and it works perfect now.. 

  2. I'm having trouble getting the tween.to's in my onRepeat function to sync with my TimelineMax:


    My CodePen is here: http://cdpn.io/kwxIJ //WARNING THERE IS A 3.5 SECOND DELAY AT START


    The Flash tutorial that I'm trying to replace is here: http://www.olympusmicro.com/primer/java/fuelcell/index.html


    On the first run it looks like it's working just fine. 

    Wait for about 2 minutes: You'll notice that the "water" molecule has started translating below it's original point. 

    Many minutes later: The water molecule will just blink in and out at the bottom of the animation. 


    I believe I need to use the onRepeatParams to tell my swapWater function exactly what it should do, or, perhaps that's not the solution. 


    Thanks for any help.