I am creating a video with text that is revealed as it crosses a line in the center of the frame. I was originally just using shape layers to "block" the side of the line where I wanted the text hidden and then animating the text across the line, but this became troublesome when I needed to reverse the direction of the text and have it change as it crosses back again.
How do you solve this issue? I need to have the text cross back and forth across the line and change each time.
The easiest way to do this is to use a shape layer or a solid as a track matte. Here's how I would set up a composition where text moved from top to bottom and changed as it passed a line in the middle.
To avoid having to create an additional pair of track matte's and text layers you could keyframe the source text and offset the changes when each of the text layers were hidden. Parenting the text layers to the null would allow you move both text layers in sync with without having to copy keyframes or work out expressions. You then just time the change in the source text so the words change when the layers are hidden. It would look something like this: