0

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

David Okuniev
  • 143
  • 1
  • 1
  • 4

1 Answers1

0

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
  • 4,345
  • 1
  • 32
  • 44
  • Do you know if using window.onscroll can also detect scroll direction and even perhaps scroll velocity? – David Okuniev Aug 03 '09 at 15:24
  • 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 Aug 04 '09 at 07:03