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!

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: