# Vertical infinite scroll

Go to solution Solved by akapowl,

## Recommended Posts

Hello!
Please tell me what needs to be done to keep the blocks moving indefinitely vertically?

I tried to adjust the vertical change of blocks, but they update when they reach the height of one word, and not the height of the block

See the Pen MWOjpgR by Daniyar01 (@Daniyar01) on CodePen

##### Share on other sites

• Solution

Hello @Daniyarkz

It looks to me like you tried to re-write the horizontalLoop helper function from the docs to make it work vertically?

I'm not sure it would be as easy as that, as I saw @GreenSock craft another version of a helper function specifically for vertical looping in this thread.

Here is one way you could utilize it to fit the logic you were trying to implement in your example.

I'm not sure if this is the best way to do it, but it works. Maybe it will help. Happy tweening!

See the Pen LYORWLW by akapowl (@akapowl) on CodePen

Edit:

And just now I saw the comment in the code, that the 'speed can be positive or negative (in pixels per second)'.

So this actually gets quite a bit easier in the end.

See the Pen RwjGVWq by akapowl (@akapowl) on CodePen

• 4
##### Share on other sites

12 hours ago, akapowl said:

Hello @Daniyarkz

It looks to me like you tried to re-write the horizontalLoop helper function from the docs to make it work vertically?

I'm not sure it would be as easy as that, as I saw @GreenSock craft another version of a helper function specifically for vertical looping in this thread.

Here is one way you could utilize it to fit the logic you were trying to implement in your example.

I'm not sure if this is the best way to do it, but it works. Maybe it will help. Happy tweening!

Edit:

And just now I saw the comment in the code, that the 'speed can be positive or negative (in pixels per second)'.

So this actually gets quite a bit easier in the end.

Thank you so much! You helped a lot!

• 1