-
Applying range selector opacity to a modified source text string
Hi everyone,
I have a text box with a paragraph of text in it. The overall effect I want is that the words fade in in the order they appear in the paragraph/source text, but their actual position in the text box is jumbled/rearranged randomly.
I can make the text string be re-arranged randomly pretty easily like so:
mystring=text.sourceText;
newtext=(mystring.split(‘ ‘).sort(() => Math.floor(Math.random() * Math.floor(3)) – 1).join(‘ ‘));
newtext
But then when I apply a range selector to it to make the opacity fade in, the range applies to the re-arranged text, not the original sourcetext string in its original order (no surprises there I guess).
Is there anyway to use an expression or the range selector to make the opacity range apply to the words in their original order? Not the newtext order?
Or is there another way to achieve this effect?
Thanks