I have a follow up question, Dan.
I’m trying to animate the characters to randomly offset, so doing this on the Source Text level will only apply the colors to the original text correctly. I tried to run it through AI again to apply it to a text animator and it came up with this:
// Define colors
letterColor = [.4784, .4784, .4784]; // letters
numberColor = [.1333, .4275, .7804]; // numbers
symbolColor = [.6196, .2235, .3686]; // symbols
// Get the source text
txt = text.sourceText;
// Get this character
c = txt[textIndex – 1]; // textIndex is 1-based
// Default color
col = symbolColor;
// Test character type
if (c.match(/[A-Za-z]/)) {
col = letterColor;
} else if (c.match(/[0-9]/)) {
col = numberColor;
}
col
But I’m getting that “textIndex is not defined” again. Do you know how to make it work?