– single page layout
-fixed div header with links to page sections
-fancy jquery (or some such library) smooth scrolling effect.– when the page scrolls to a section the link image (or flash movie) is going to depict that with a “you are visiting this section” state of being.– if the visitor scrolls by hand instead of clicking a link I need the link images in the header to change automatically to show where the user is.
my question:
Ideally I would like to execute code when a specific anchor is within the top 250 pixels of the page. Is this possible?
this is probably a step in the right direction: [url]http://mattkruse.com/javascript/anchorposition/source.html
So something like this:
Listen for the Y coordinates of #anchor1
if thing.as3 was not the last thing loaded
+ y coordinates = 0-300 (anything between 0 and 300)
load thing.as3 file and apply it to the movie.
(or control MC from javascript)
Else:
load otherthing.as3 file and apply it to the movie.
(or control MC from javascript)
otherwise how do I achieve something close?