ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Right aligned text - sourceRectAtTime

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Lucy-Rae Naylor
Right aligned text - sourceRectAtTime
on Feb 7, 2019 at 10:30:16 am

First of all I'm not very versed in code, just know my way to get by..
I have a lower third which I need to come on from the right, and be right aligned.

For the left lower third I've just used..

Size:
"s =thisComp.layer("Text Duplicate (No Effect)");
x = s.sourceRectAtTime(time-s.inPoint,true).width + 200;
y = s.sourceRectAtTime(time-s.inPoint,true).height + 50;

[x,y]"

Position:
"content("Rectangle 1").content("Rectangle Path 1").size/2"

This works great for left, but I just can't seem to work out how to make it work for right alignment?
Any help would be greatly appreciated!


Return to posts index

Scott McGee
Re: Right aligned text - sourceRectAtTime
on Feb 8, 2019 at 2:15:14 pm

Hey Lucy,

Try this

content("Rectangle 1").content("Rectangle Path 1").size/1

I'd normally set my anchor point to achieve this rather than put it in the position of the shaper layer contents.

so my anchor point would use this to do the exact same thing. Spent a few minutes looking at yours and daft as it sounds. Soon as you put /1 it works.

r = sourceRectAtTime();
[r.left + r.width, r.top]

Hope that helps


Return to posts index

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