-
Automating a text block to slide up or down
Couldn’t find a previous solution that quite matches my situation, or one I could adjust to fit.
Building a TV tag mogrt and I have a circle shape and a text block of separate animating text layers that lives in the circle. The layers are precomped but need to remain as separate layers. The height is naturally variable depending on the title length (1 line or 2 line) and if the optional marketing line has text or not. The title block precomp has been cropped to the size of the shape circle and is parented so it stays with the circle in one of its three predetermined positions (screen left, screen right, center). Hopefully that all makes sense.
Now I need the text block to stay vertically centered to the circle. I’ve used sourceRectAtTime on each text layer and combined them to get the total height of the text block. Easy enough. I have the height of the circle, of course. Now I figure there’s some way to take that information and use it to adjust the Anchor Point Y value of the precomp (which, again, currently matches the center of the circle) so the text block slides up/down to remain vertically centered no matter what the text is. Been experimenting a couple hours and feel I’m no closer to a solution. I have everything else wired up and working, it’s just this last detail preventing me from wrapping it up.
Any suggestions on automating this?