Streaming live at 10am (PST)

Can I add variable to the 'while page is scrolling' interaction?

Hi everyone!
I use the ‘while page is scrolling’ interaction to make a horizontal scroll - and it works fine : )

I want the horizontal scroll to end exactly when the last item ends. For that I use the 'while page is scrolling - X axis move interaction, but the problem is that I dont have a real number for the width of the whole scroll.
the width of the Items in the scroll is defined by the height of the items which uses Viewport Height - So I need to calculate the width of the scroll with java script and give it a variable but I cant insert a variable in the X axis in the ‘while page is scrolling’ interaction.

do you have any idea how I can solve it??
Thanks a lot!
Nir


https://nirs-amazing-project-5e61d1.webflow.io/


https://preview.webflow.com/preview/nirs-amazing-project-5e61d1?utm_medium=preview_link&utm_source=designer&utm_content=nirs-amazing-project-5e61d1&preview=3ce59165dd933e8d429c4330a173ac62&mode=preview

You could try setting the end of the scroll to around 95% in Interactions?

Hi Danny!
It works !
I tried it already but apparently I forgot to change the start number to % as well so it didnt work.

Thank you!

No problem. If you wouldn’t mind and marking the solution. :upside_down_face: