loop image scrolling
I build an horizontal scrolling for images with YAHOO.util.Scroll. It
works find but i want the animation loop and scroll img #1, img#2,
img#3, img#1, img#2, etc.
Any idea ?
>I build an horizontalscrolling for images with YAHOO.util.Scroll. It
>works find but i want theanimation loop and scroll img #1, img#2,
>img#3, img#1, img#2,etc.
>Yes, You'll need three <div>s for the current, previous and next image (page#1, page#2, page#3)
>Any idea ?
Around these, You have another div (pages). That is the one You actually animate.Finally You'll need a "window", that Your visitors look through; a div with overflow:hiddennow You can animate "pages" and in the onComplete() event prepare for the next animation; i.e. eithermove one of the outer divs to the other side or add a new one.It's like in a theater where the effect of a marching regiment is created by the actors running back to thestart point behind the stage.I have used this in a calendar like application.I clear the divs that go out of sight in order to save memory but that probably would not be necessary.In your case You would probably have an array of ImageLinks holding the current index and making it restartfrom either end when falling over the outer egdes.You can see it here:login with 1000 and no password and go to the tab "Gleitbogen".Due to the heavy tables, the effect became poor but with less content it runs very smoothYou also might like to have a look at this lightbox. I don't know if it supports infinite loopingbut it looks nice:Hope that helpsFrank
- You can see it here:login with 1000 and no password and go to the tab "Gleitbogen".Due to the heavy tables, the effect became poor but with less content it runs very smoothsorry. the link is