Quantcast
Channel: Adobe Community : All Content - Edge Animate
Viewing all articles
Browse latest Browse all 9897

Adding navigation to parallax scrolling website?

$
0
0

Hello!

 

I'm building a parallax scrolling website, with different sections.  The scrolling in question is quite long, so I have some navigation set up on the side to jump to the needed place on the timeline. 

 

How would I go about this?  I tried using the stop at, but it acts wonky with the scrolling...it jumps to the label, but it doesn't seem to take the scroll navigation control into account.  I also tried using the following code:

 

sym.$("stage").scrollTop(0,2157);

 

...but it jumps to the top of the site, every time, no matter what x/y coordinates I input.  I am using the following code to control the parallax scrolling on the stage: 

 

// 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);

 

Help? 

 

Thanks,

Chad


Viewing all articles
Browse latest Browse all 9897

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>