You can do this using a condition in the OnWindowScroll interaction. (I have Axure 8 only so I can’t open your file.) Note that you do NOT want to pin the marker that defines where to change states.
OnWindowScroll
IF [[Window.scrollY]] is greater than or equal to [[LVAR_scrollMarker.y]]
Set panel textPanel to State2
ELSE
Set panel textPanel to State1
This assumes LVAR_scrollMarker is a local variable referring to the marker that triggers the scroll.
EDIT:
Now i’m curious. When i want to have another text change (3rd panel state) what do i have to do then? Because I tested it by myself and it now starts to change the states randomly
You can add an AND to the first condition to test if the current scrollY is between the two markers, and then add a second one to see if scrollY is below the second marker:
OnWindowScroll
IF [[Window.scrollY]] is greater than or equal to [[LVAR_scrollMarker1.y]] AND
[[Window.scrollY]] is less than [[LVAR_scrollMarker2.y]]
Set panel textPanel to State2
ELSE IF [[Window.scrollY]] is greater than or equal to [[LVAR_scrollMarker2.y]]
Set panel textPanel to State3
ELSE
Set panel textPanel to State1