Jump to content
Search Community

MrTea

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by MrTea

  1. I'll need to do more testing to confirm the issue but I think it's due to the order in which the scripts are pulled in. This seems to cause the issue:

     

        <script src="//cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.3/ScrollMagic.js"></script>
        <script src="http://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/plugins/debug.addIndicators.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/plugins/animation.gsap.min.js"></script>
        <script src="js/TweenMax.min.js"></script>

    While this fixes it:

     

      <script src="js/TweenMax.min.js"></script>
        <script src='https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.3/ScrollMagic.min.js'></script>
        <script src='https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/plugins/animation.gsap.js'></script>
        <script src='https://cdnjs.cloudflare.com/ajax/libs/ScrollMagic/2.0.5/plugins/debug.addIndicators.min.js'></script>
    • Thanks 1
  2. Thanks for the swift reply. I'd seen this property and assume it would be set like this:

    var tween = TweenMax.staggerFrom(targetDivs, 2, { opacity: 0, immediateRender: false }, 0.5),

    However, this makes no difference - the stagger still runs on pageLoad rather than waiting for the scrollmagic trigger. Is the above the correct way to implement this? 

  3. I'm trying to get a staggerFrom animation to occur on a scrollmagic event with the following code however, the stagger always seems to happen instantly on page load rather than waiting for the scroll magic event to fire. 

     

     var tween = TweenMax.staggerFrom(targetDivs, 2, { opacity: 0 }, 0.5),
             scene = new ScrollMagic.Scene({
                 triggerElement: element,
                 reverse: false,
             });
    
            scene.setTween(tween)
            scene.addTo(this.controller)
            scene.addIndicators({ name: "staggering" });
    
            this.scenes.push(scene);

    Using other simple tweens like this work as expected without any issues:

    var tween = TweenMax.from(element, .75, { opacity: 0, x: -40 })

    Is there anything specific about 'staggerFrom' which would stop this from working? 

×
×
  • Create New...