ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Adding a Superscripted * at end of source text. Center aligned text.

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chris Jung
Adding a Superscripted * at end of source text. Center aligned text.
on Sep 19, 2019 at 4:20:19 pm

Hi,

I've been trying to add a superscripted * at the end of a sentence by using this expression:

x=thisComp.layer("SText").sourceRectAtTime(time,true).width + thisComp.layer("SText").transform.position[0] + effect("x Offset")("Slider");

y=thisComp.layer("SText").sourceRectAtTime(time,true).height + thisComp.layer("SText").transform.position[1] + effect("y Offset")("Slider");

[x,y];

It works well for left justified text, but I need to have my text center aligned. Whats the best way to center the type with the added *?

Please let me know!
Thanks


Return to posts index

Tomas Bumbulevičius
Re: Adding a Superscripted * at end of source text. Center aligned text.
on Sep 22, 2019 at 9:40:21 am

Hey Chris, below is a different approach which might be a bit easier to work with.

1. Add '*' to the end of your texts layers source, by hand, or by expression to text source text.sourceText + "*"
2. Apply Text Animation to the text layer.
3. Set 'Units' to be 'Index', based on 'Characters'.
4. In 'Range Selector', to start add text.sourceText.length-1. To end text.sourceText.length
5. Add 'Scale' and 'Position' properties to animator.
6. Adjust their values to properly fit position.
7. Alternatively, you could adjust anchor point position of the group, but above option will be easier and more convenient.

Now if you want to add '*' only at certain time, you could affect this by adding animation.

Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer - Dynamic Text Boxes Template with a Live Preview


Return to posts index

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