ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Add characters at the beginning of the second line

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Muhammed Şamil Tekin
Add characters at the beginning of the second line
on Jan 23, 2020 at 3:05:25 pm
Last Edited By Muhammed Şamil Tekin on Jan 24, 2020 at 8:44:08 am

Hello,
I want to do this;

If first character in first line in text box (") add two space to beginning of the second line.

For example my text is;



I want;



Sorry for bad English.


Return to posts index

Andrei Popa
Re: Add characters at the beginning of the second line
on Jan 24, 2020 at 1:10:08 pm

You can do this:

Add a text animator to your layer. Go to Range Selector>Advance> and change Units to Index and Based on to Lines.
Set Start to 1.

Now, if you want only second line to be moved to the right, set End to 2. If you want all your subsequent lines to go a bit to the right, set this End value to something high(the max number of lines you will ever have. Let's say 10).

Now go to Animator 1> Position and modify the first value of the position until you are happy with the result(this will vary based on your font and font size). You should do this with a text that starts with ".

Now alt+click this Animator1>Position and add this as an expression. You need to copy-paste the double quotes inside that expression because some fonts have different in/out quotes.

text.sourceText.substring(0,1) == '“' ? value : [0,0];

Andrei
My Envato portfolio.


Return to posts index

Muhammed Şamil Tekin
Re: Add characters at the beginning of the second line
on Jan 24, 2020 at 2:00:08 pm

Thank you very much for your help. Your solution worked fine.


Return to posts index

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