bri Posted December 21, 2010 Share Posted December 21, 2010 Hello, I need to create a horizontal gallery, which automatically scrolls right to left. For example, 6 elements. In a moment of time can be seen only 3. When there is an element of the right number 6, followed immediately have to go item number 1. (For example, we see elements: 4, 5, 6. And next time: 5, 6, 1. An so on) How i can do it ? p.s. Sorry for bad English (it's google translate) Link to comment Share on other sites More sharing options...
GreenSock Posted December 22, 2010 Share Posted December 22, 2010 There are certainly ways to accomplish this with sequencing tweens, but I think a much more flexible, cleaner solution is to build a class that handles positioning your gallery items based on a specific parameter which can be tweened. For example, a "progress" property that can be set manually or tweened by TweenLite/Max which causes the items to automatically get repositioned accordingly. Maybe setting "progress" to 0.5 would make the gallery scroll to halfway through the entire gallery. Or an "index" property that could be set to skip to a particular item in the Gallery.I created a simple example of this concept and attached it here. You can tween the "progress" to any value, and it will make all the adjustments for you. This makes it very simple to control easing too. And the included example shows an "index" property as well that can be set or tweened as much as you want.To those who were always curious about this type of thing, download the example and see for yourself. It's relatively simple actually, while at the same time giving you plenty of flexibility. wrapping_gallery_sample.zip Link to comment Share on other sites More sharing options...
bri Posted December 22, 2010 Author Share Posted December 22, 2010 thank you! Link to comment Share on other sites More sharing options...
Carl Posted December 23, 2010 Share Posted December 23, 2010 gee whiz that thing is neat. i know I wouldn't have thought of that approach. Link to comment Share on other sites More sharing options...
creepco Posted August 20, 2013 Share Posted August 20, 2013 Is the sample file still somewhere I could download? It would be super helpful. Thanks! Link to comment Share on other sites More sharing options...
Carl Posted August 20, 2013 Share Posted August 20, 2013 Jack's post above has been updated to include the link to the sample files. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now