Copy link to clipboard
Copied
Question : Does the Text Object have a Word Index Property?
What I'm trying to achieve :
You type in a line of text, and via Essential Graphics/Param slider, you select a specific word in that line of text, based on the index, to then be able to give it another color, or to return position/size params to generate a bounding box.
In other words: I type in "This is an example", link an expression to the word index property of the text field, set it to 4 (which would be "example") and then be able to set ONLY the selected word's formatting properties to Bold, #00FF00, etc ...
Am I asking too much?
I can easily see multiple uses for this, if it hasn't been implemented yet.
Anyone? Anyone? Adobe? Anyone? 😉
Copy link to clipboard
Copied
Simply set the text animator's mode to word and the textIndex and other such stuiff will respond accordingly.
Mylenium
Copy link to clipboard
Copied
It needs to be driven by expressions, therefor I need the object property.
Copy link to clipboard
Copied
You can use RegExp to get the word count:
var count = myString.split(/\b[^\s]+\b/).length