Hi folks - trying to prototype an infinite scrolling set of pages where once the last page scrolls off screen it slides in at the very bottom.
I'm trying to use the Page Component to implement a simple logic of:
0 screen starts with pageOne
1 scroll pageOne off screen
2 scroll pageTwo on screen
3 move pageOne below pageTwo
4 scroll pageOne on screen
5 back to #1
What I have trouble with is:
A) not able to track the pageOne.y cause when I'm looking at it in
print "PAGE onMove"
it constantly shows 0 (zero) even though when I mouse over pageOne in the layers panel I see its y set to -720 (once it is scrolled off scree)
B) trying to update pageOne.y to 720 to move it at the bottom of the screen does not cause the layer to change its y coordinates even after page.updateContent() is called
C) I like to know when a certain page stops scrolling and tried to listen to pageOne.onScrollEnd -> etc but it seems the scroll events are not firing upon page scroll stop so how can I listen if a page snapped into place? The page.on "change:currentPage", -> fires as soon as the pages start moving but I want to know when a particular page stopped moving.
Here's the code I have so far - appreciate any insight into how the Page Component works and how could I possible prototype an infinite scroll with repositioning AND re-useing the pages. Thanks!