Scrolling a DP vertically while OnWindowScroll

Hej everybody,
I am despairing of an actually simple problem.

If I scroll on the page, then, from a certain position, the scrolling of the website should be replaced by a vertical scrolling of a DP. This means that the website no longer scrolls but I scroll through the states of a DP. As soon as I reach the last state, the website should scroll again. I have tried a lot, but I do not come to the solution.

I hope that someone has the brilliant idea

Here is an example that is not that great… but best I could figure out with straight Axure. You might be able to do better with javascript if you can find something that works well on some site.

Basically, if the dynamic panel is at the top of the window and the state of that dynamic panel is not at the last state, it scrolls the window to it’s location, which works pretty well to cancel out the typical effect of scrolling the page contents. It then moves the dynamic panel by (0, 0) to trigger it to test what state it is in, change to the next state and wait 1 second before doing anything else.

Using the OnScroll event to change states of a dynamic panel is an iffy proposition… Many scroll wheels will load up multiple “scroll calls” like scrolling 3 or 5 lines at a time for easier, faster scrolling. There are not Axure events for OnScrollStart and OnScrollEnd, so it’s hard to kind of capture an “individual scroll” if that makes sense. I tried to slow things down by inserting a delay of 1000 ms between doing anything with an OnScrollDown event…

Scroll To Panel.rp (761.7 KB)