-
Use a slider to underline a particular word in a block of text
Hi,
I’m wanting to create a set up where I can use a rectangular shape layer to underline a word in a block of text, the word being chosen by use of a slider that delineates the index number of the word in the block of text.
Eg. if the slider is set to 3, then the third word is selected to be underlined.
Has anyone created something like this?
What I need to do to the rectangle, in something like pseudocode, is this:
On the position of the rectangle:
s = the value of the slider
px = the x position of the word with the index of (s)
py = the y position of the word with the index of (s)
[px,py]
On the scale[1] value of the rectangle:
s = the value of the slider
w = length of the word with the index of (s) <ideally something skin to the sourceRectAtTime function, only just for the word rather than the whole text layer>
h = 5
[h,w]
Is something like this even possible? It seems you can pull and index number from the words in a block of text, if the expression is applied to an expression property on a text layer, but I can’t work out how to delineate an index number to refer to.
Any help would be greatly appreciated.
– Ben