The problem I’m having is I’m animating a stroke on with trim paths (which is measured in percentage of completion), and have a text layer writing it on with the path options. The First margin property is measured by length of the path. I plugged in a slider temporarily to adjust this value to re synchronize them after moving the path around. I would much prefer to somehow read the length of the path with another expression so it stays lined up as I adjust the path.
I’m not sure if this helps, but it’s the only thing I can think of. If you copy the path and paste it into the position property of a null, the null will trace out the path at a constant speed over a two second period. So if you have a slider controlling the percentage, you can convert that to pixels traveled with something like this:
Thank you for the quick response. I spend around two hours searching for a quick solution. What I have now would probably be easier to manipulate for my current needs. I saw a response you made on paths to someone else stating there is little you can read with expressions on a path. I am running 2014.1.1 and was hoping this would have been updated in 2014.1.2 like the text bounds thing. Anyway, thanks again. I have much respect for your content on creativecow. 🙂
If I understood correctly you have your stroke going from 0% to 100% and the text layer is following the “moving tip” of the stroke. is that correct?
if it is, then you can do this;
you know the First margin starts and the first margin finish
this should make your text starts and finish at the same time as the stroke appears ( if both the path and the stroke are the same obviously)
on the First margin value //initial margin value
//final margin value
var y= 3086;
//the End trim percentage
var z= thisComp.layer("Shape Layer 1").content("Trim Paths 1").end;