Suppressing onscroll actions when user scrolls quickly down the page

Hello. I am using the OnWindowScroll event to trigger a series of reveal/hide actions as the user scrolls vertically down the page. Each is triggered when the variable window.scrollY equals a particular value range. The issue is that sometimes the user will scroll quickly down the page and not pause for my reveal/hide actions. When this occurs I would like to suppress these reveal/hide actions so that it doesn’t look like a series of crazy flashing animations. I don’t want to set off any seizures in my test subjects. Any help or suggestions is greatly appreciated.

I don’t think there is a way to directly determine the speed of window scrolling–as in an environment property or variable. You might be able to determine how many milliseconds elapse between hitting your value ranges, using the [[Now.getTime()]] function. However, a simpler approach might be to add a delay before firing your animations or show/hide actions–or better yet, a delay before deciding if an animation or change is appropriate.

Here’s what I’m thinking… Say that when a user scrolls down to “Area B” a dynamic panel, “PanelB” should change state (maybe growing in size and pushing widgets down the page.) You could use this trigger point to call a Wait 200 ms action, then fire a hidden button click or utilize an otherwise unused event, like Rotate PanelB by 0 degrees (thus no actual rotation, but the Rotated event gets fired.) This event would have a conditional case to evaluate [[Window.scrollY]], and if the scroll is still within “Area B” range (scroll has been slow enough in that intervening 200 ms) then change the state, else do nothing. Of course the 200 ms is fairly arbitrary–you may need to play around with the amount of delay (how long to wait in order to evaluate the amount of scroll.)

Sorry. I meant to say thank you, but got wrapped up in the prototype testing. I really liked this solution…and I tried it out…but couldn’t get it working nicely with multiple actions firing off as the user scrolled down the page. The issue was that it would still fire them off , but just once the scroll paused at the bottom of the screen. Hard to explain and it might have been a timing thing, but I needed to move on. Would be fun to come back to this and figure it out. Thanks @mbc66.