0 Replies Latest reply on Aug 21, 2014 6:20 PM by byChadWelch

    Parallax:  Can you make a symbol timeline scroll with the main timeline?

    byChadWelch

      Howdy everyone!

       

      I searched around for quite some time, and I haven't been able to find the answer I'm looking for.

       

      Basically, I'm creating a parallax style scrolling website for my personal portfolio.  I have different sections, for things like visual development, graphic design, etc.  I have a symbol for the header, with an internal animation timed to the main timeline, which transitions between the titles of the sections as the user scrolls down to that area.

       

      The animation is timed already...is there a way to make the symbol timeline scroll at the same rate as someone navigating the main timeline?  This is the code that I am using to have the navigation controlled by the scrollbar:

       

      // scrolling controls animation

       

      var animationHeight = 24000

      var stageHeight = sym.$("Stage").height()

      var scrollPos = sym.$("Stage").scrollTop();

      var duration = sym.getDuration();

      var percent = scrollPos / (animationHeight - stageHeight);

      var time = duration * percent;

       

      // Update timeline

      sym.stop(time);

       

      It works beautifully, except that the symbol doesn't follow with the main timeline. 

       

      Thanks very much in advance!

      Chad Welch