Jump to content
Search Community

Horizontal infinite Gallery

bri test
Moderator Tag

Recommended Posts

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

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

  • 2 years later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...