• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit Search
0

Changing specific words in a line of text using the drop down menu

Explorer ,
Aug 26, 2022 Aug 26, 2022

Copy link to clipboard

Copied

I am using a drop down menu to change a line of text but, I can't alter the styling of the text without altering the entire line. I only need to change one or two words of the line with my drop down so is there a way to make it only change the words in a selected range?

 

I normally just have multiple versions of the text layer and use the drop down to toggle their opacity but I'd like to get this on one layer if possible.

 

Thanks

TOPICS
Expressions , How to

Views

98

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Aug 26, 2022 Aug 26, 2022

The get Functions allows you to obtain the text style from any character; not just the first character. The getStyle function allows for two arguments, index and atTime.

text.sourceText.getStyleAt(index, atTime);

More info here - 
https://helpx.adobe.com/after-effects/using/expressions-text-properties.html

The main limitation is with being able to have only one textStyle per Text Layer when working with Text Layer Style Expressions.
HTH


Votes

Translate

Translate
LEGEND ,
Aug 26, 2022 Aug 26, 2022

Copy link to clipboard

Copied

Long and short: No. This is a known issue/ limitation of text style expressions. As soon as you change the source text with an expression, the source formatting is lost and only the style of the first letter is used. Stick with splitting layers.

 

Mylenium

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 26, 2022 Aug 26, 2022

Copy link to clipboard

Copied

That's a shame, thanks anyway

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Aug 26, 2022 Aug 26, 2022

Copy link to clipboard

Copied

The get Functions allows you to obtain the text style from any character; not just the first character. The getStyle function allows for two arguments, index and atTime.

text.sourceText.getStyleAt(index, atTime);

More info here - 
https://helpx.adobe.com/after-effects/using/expressions-text-properties.html

The main limitation is with being able to have only one textStyle per Text Layer when working with Text Layer Style Expressions.
HTH


Motion Graphics Brand Guidelines & Motion Graphics Responsive Design Toolkits

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 28, 2022 Aug 28, 2022

Copy link to clipboard

Copied

LATEST

Could you use a Text Animator's Range option with an expression based on the dropdown value?  

dropdown.png

The value of the dropdown menu returns from 1 onwards, but the range value counts the first word as 0.  In the range start  expression, you just need to pickwhip the dropdown value, then add -1

The End value is just +1 of the start, with the Advanced settings using the index and words as options.

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines