position a shape to the end of a text
Hi, maybe it's not a real problem, I just want to ask you, maybe you have more experiences with this issue.
I'm working with text and shape layers, and don't use anything, just script files. I want to position a shape to the end of a text, position the next text to the 'end' of the shape, etc
The text is changing, and I have to count the positions again and again.
I use the sourceRectAtTime function, to find the end of the text layer, and a constant, to position the shape to the right coordinate. It's ok, but not perfect.
I realized, that the values from sourceRectAtTime are not the best for me. I made a little script (post it here, and of course, there are some exceptions :) :) ) to look how it works, an I find, that last and first characters affect the width more than the others. MAGE.width != AMGE.width, but MAGE.width == MGAE.width
Did you have what can I do - a shorter/easier way - to find the right place for my shapes in the center between two text layers, what are changing? Thank you!
"The text is changing" === Source Text is changing, not position, or anything else
Sounds very complex. If you can upload a picture or two of what you are trying to achieve, perhaps there is a whole different approach someone can suggest for the problem.
It is not an After Effects solution, but I would make this into a font with those shapes as characters, then you could type it in as text and everything else would be pretty straightforward.
I use Fontlab's FontoGrapher but there are some free font creation programs that should do it as well:
Great idea, but I'm afraid, It doesn't work for me, It's a lyric video, and all the 240 words contain these two characters. The Idea, that the shape chracters stays on the screen, and the other parts of the words appear and disappear, with animation, 3d position, opacity, etc, anything, I guess, impossible make it with one textlayer/word :/
I see. So you need the two shapes to smoothly move from one position to the next while the words around them change.
How about creating the words with placehold characters with suitable spacing for the shapes such as bullet and asterisk with spaces on each side (" • " and " * "), then calculating the position of just those characters and animating the position of the shapes to match the positions of the bullet and the asterisk? You wouldn't have to worry about spacing any of the characters in the words, just calculating those two locations in the consecutive words and animating the position of the shapes between them.