ScrollX on dynamic panel

I have a scrollable dynamic panel (horizontal). Inside there are three areas. What I wanted to achieve is that when you scroll and the area gets to arrow it does something. But I struggle to figure out how to get the value of scroll. How to define if an arrow is pointing area. First, I thought to do if statements (IF area1 is greater than X px AND area is less than X px than do this. But I can not make scroll to work. Bellow, I have my RP file so you could see. I did try with scrollX but no luck. Can anyone help me, please?

scrollX.rp (94.4 KB)

Hi Jerry000!

Hmm, I’ve tested out using an ScrollX value in this file, and found that if I used the scrolling dynamic panel’s [[This.ScrollX]] function to set a variable value OnScroll, I could use some additional conditional logic to check the value of the global variable and fire different actions:

The second and third cases in this OnScroll event check whether the global variable has a value greater than or equal to “955”, or if the variable has a value less than “955”. When the conditions for one of these cases are met, the “Arrow” dynamic panel (a dynamic panel version of the file’s arrow icon widget), sets the panel state to “State1” or “State2”.

scrollX-edited.rp (101.6 KB)

Please let me know if the attached file and interactions work correctly on your end! Thank you!