views:

420

answers:

1

I'm not sure if this is possible but I want to achieve the following.

Using the default browser scrollbars, I would like to either control a timeline in flash or send _global variables into flash. I also need to detect if the scrollbar is going up or down.

Any help would be much appreciated.

Thanks

A: 

You probably need to expose an external interface to JavaScript. Then you can use the window.onscroll method to communicate the scroll events.

Robert Massa
Do you know if using window.onscroll can also detect scroll direction and even perhaps scroll velocity?
David Okuniev
You can use window.pageYOffset to get the current Y position, you can compare this to the last value to get the direction or vector for velocity. It might be better to do this using a timer instead of the scroll event.
Robert Massa