This content has been marked as final. Show 2 replies
I've done some digging into the class definition for the horizontallist and learned that it has a protected method called scrollHorizontally. I created an as class and overrode that method to see if it would do what I needed and it seems like it would. However, I'm not clear on how to adjust the parameters. Here's what I was able to make of the parameters by using Alert.show(pos.toString() + ":" + deltaPos.toString() + ":" + scrollUp.toString())
scrollHorizontally(pos:int, deltaPos:int, scrollUp:Boolean)
When scrollUp is true, it scrolls right, when false, it scrolls left. It seems that deltaPos is always 1, but I'm not sure what that's referring to. When I scroll back and forth the pos value increments by one and starts at zero, so for 5 scrolls to the right my alert is showing 1:1:true, 2:1:true, 3:1:true, 4:1:true, 5:1:true. So, does anyone know how I determine what the value should be for the first parameter, pos? Thanks.
After some more digging I found that this.iterator.bookmark.getViewIndex() will give me the index of the item to the left most position that is viewable. What I can't figure out how to do is get the index of the item to the right that is still viewable to determine if I should scroll to the left any further. I've gone through all the properties in debug mode and I can't seem to find anything that would give me that info. Does anyone have any ideas? Thanks.