I have a Spark List component mwith a Horizontal Layout, which I use for showing a slideshow of images.
The user can scroll the slides by clicking on two buttons or by dragging on the List (The project is mobile but it will be also exported as air project).
I need the slides to be perfectly centered in the viewport (the list and each slide are 1024px width) and I want to avoid that two slides are partially showed.
It's quite easy to achieve this when i perform scroll with buttons, becuase I always scroll by 1024px at time.
Things get harder when the user scrolls by dragging on the list (performing a classic mouse drag as well as a swipe gesture on the mobile device), because it could leave the list in an "intermediate" state in which two slides are partially displayed.
What I would like to know if there's some kind of event which is fired when the user stops to scroll and then read the position of the scroll so I can decide how much to scroll so to display only one slide.
do you know if there's this kind of event?
Thanks in advance!!
http://forums.adobe.com/people/ShongrundenShongrunden, THANK YOU SO MUCH!!!!!!
I use the touchInteractionEnd event and it works perfectly!!!!
It was driving me crazy.
Yesterday I set up a workaround but it was really heavy: A timer that every 500ms checks the horizontalScrollPosition of the List and if the position is equal to the previous horizontalScrollPosition I call a function that center the slide.
This was quite tricky , and worked quite wellm but with the touchInteractionEnd now things get much more better.
Thanks so much again!!!!