ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

propertyIndex AND sourceText.split question

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chris Scalzo
propertyIndex AND sourceText.split question
on Jun 12, 2018 at 9:00:22 pm

I wanted an expression on a text layer to mark #HASHTAGS and @SocialMediaNames blue. So I added the following code to the amount of color change in a bunch of Range selectors named 0, 1, 2...

When I evalucate the value of x, it is the correct number, but this expression wouldn't work unless I typed a number.

I replaced
y=text.sourceText.split(" ")[x][0];

y=text.sourceText.split(" ")[1][0];

Also, if a gave it text that had two spaces, it through off the split from the value of the range selector.

y=text.sourceText.split(" ")[x][0];
if ((y == "#") || (y == "@")) 100 else 0

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved