Scroll variable text lenghts
Hey Pros!
I'm searching for an expression that scrolls a text sideways based on its length.
Let's say you have these two texts: «Sample» and «This is a longer sample».
The composition has a defined width that allows the shorter text «Sample» do be displayed in full length but the longer one will be cutted off somewhere in the middle of «…longer…».
My idea is to have the text scroll by from the start to its end, based on the length of the text. So, the beginning of the scentence will be shown and starts scrolling sideways until it reaches its end.
What I found are various ways to do this with a fixed length to scroll (100px to the right, …). But because I need to do this for a lot of texts it would be great to have an expression on the text layer, rewrite the text and render out the new one without manually change the scrolling position each time.
When having a shorter text like «Sample», the text can just stay where it is without moving.
Does someone have an idea how I could get this done?
Thanks in advance!
