I have some native display objects inside a scrollview, and some UI elements overlapping the scrollview for aesthetics. Obviously this creates the issue that native elements render above everything else, so when scrolling, these elements currently end up overlapping the UI bits.
To combat, I'm wanting to hide the elements when they get too close to the edge. Aesthetically this'll be fine because they're already rendered with transparent backgrounds on top of standard display objects so it'll just mean they stop being editable when they're about to go over the edge, which isn't going to be an issue for anybody.
Seems this is trickier than I'd expected though!
I'm using a listener to catch scroll events, and within the listener I can access event phase values, but how would I access the getContentPosition() of the scrollview from within this listener?
My plan is to use the scrollviews getContentPosition() and the individual display object positions to figure out an offset and use that to determine how close the element is to the edge of the scrollview itself... there isn't a more 'proper' approach I'm guessing?