Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Adding a Superscripted * at end of source text. Center aligned text.

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

    Posted by Chris Jung on September 19, 2019 at 4:20 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

    Tomas Bumbulevičius replied 6 years, 11 months ago 2 Members · 1 Reply
  • 1 Reply
  • Tomas Bumbulevičius

    September 22, 2019 at 9:40 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

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy