Guys, is there a way to trigger animation when scroll to a specific page? I am using PageComponent, but it seems there is no specific events associated with PageComponent function?
Hey Sherwin Dai - you can check for the currentPage within the "change:currentPage" event to trigger an animation when viewing a specific page. Say one of your page layers is titled "homePage", then you could write the following:
page.on "change:currentPage", ->____if page.currentPage is homePage...
Thank you for the explanation, will try tonight
Sorry for jumping in: Is it possible to write "else if" under "page.on "change:currentPage", ->"?
I actually use a list of parallel if statements to trigger animation when flipping to different pages, for example:
page.on "change:currentPage", ->____if page.currentPage is page1......____if page.currentPage is page2......____if page.currentPage is page3......
No need to use else if on my case.
I see. Thanks for replying! I haven't tried yet but will see what happens :)