ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Position & Size of a word

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Yaniv Cahoua
Position & Size of a word
on Jan 16, 2018 at 5:17:26 pm

Hi !
is there a way to get the position and size of a word inside a paragraph if I only know it's index ?
I am looking for an expression that will help me position a rectangular shape behind a specific word, when I only know the index of the specific word in a sentence.

thanks !!!!

http://www.yanivcahoua.com


Return to posts index

Scott McGee
Re: Position & Size of a word
on Jan 18, 2018 at 8:36:51 am

Someone was asking a different question, but the tutorial they posted should guide you in the right direction.

https://forums.creativecow.net/thread/227/37693

sourceRectAtTime()

As long as you are on CS6 or above, this should help you achieve what you want. If not, if you search sourceRectAtTime(), there's plenty of tutorials that can help, but he covers what I think you need.


Return to posts index

Yaniv Cahoua
Re: Position & Size of a word
on Jan 18, 2018 at 8:41:00 am

Well thank you for the help but I don't think sourceRectAtTime is available on the first CC version of AE (12)....
Also I am not sure how it would help me get the coordinate of on one inside a block of text.

http://www.yanivcahoua.com


Return to posts index


Scott McGee
Re: Position & Size of a word
on Jan 18, 2018 at 9:22:30 am

https://forums.creativecow.net/readpost/227/37008

https://forums.creativecow.net/readpost/227/37558

I know this thread is how to colour a single word, but this could point you in the right direction to maybe highlighting a singular word instead.


Return to posts index

Kalleheikki Kannisto
Re: Position & Size of a word
on Jan 20, 2018 at 12:58:21 pm

It still requires SourceRectAtTime(), but I'm thinking you could have another layer that gets its source text from the beginning part of your text up to the word you're looking for, and get the sourceRect width from that layer. Then you can get the single word width with the same technique with another text layer. Untested.

Kalleheikki Kannisto
Senior Graphic Designer


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]