Copy link to clipboard
Copied
Hello, this is my first post. I am not very good at expressions, but I was trying to show words of a phrase one by one animating the scale of each word from 80 to 100 using expressions. Each word must be justified in the center of the composition, I would also like to have a control on how fast the words appear. So far I managed to make the words appear one by one using the split method with array, but I am having trouble with the scale.
Here is some of the code:
sourceText
if (effect("EnableWord")("Checkbox") == 1) {
calcDur = thisLayer.outPoint-thisLayer.inPoint;
dur = Math.round(calcDur);
text = text.sourceText.split(" ");
lg = text.length;
x = ease(sourceTime(),0,dur-1,0,lg-1);
text[Math.round(x)];
} else { value };
scale code:
calcDur = thisLayer.outPoint-thisLayer.inPoint;
dur = Math.round(calcDur);
text = text.sourceText.split(" ");
lg = text.length;
x = linear(sourceTime(),0,dur,80,100);
[x,x];
Copy link to clipboard
Copied
Why would you do something with expressions, that can easily be done with a bunch of stacked text animators and a few keyframes? That aside there is no point in posting partial code. E.g. we simply do not know what your "sourceTime" is even supposed to be. And what actually isn't working with the scaling? You need to explain better. that and of course I honestly think you are wasting your time, making something very simple extremely complicated. I would strongly suggest you look into text animatoirs and read the online help on that subject.
Mylenium
Copy link to clipboard
Copied
If you want to scale up a word at a time all you have to do is type scale in the Effects and Presets panel, scroll down to Up By Word, select the text layer, and double click the animation preset. The next step is to select the text layer and press the U key twice to reveal all the modified properties, then adjust the position of the keyframes and set the scale to 80, 80. As long as the paragraph is set to Center justify, you're done. It will take about 30 seconds.
If you want to control this animation with an expression instead of keyframes then just add a timing expression to the Range Selector Start property. The only reasonable way to animate the scale of an individual word in a string of words is to use the scale text animator so you just as well just the preset and be done with it.
If that does not solve your problem then I don't understand what you are trying to accomplish.