In AE I have a text layer with a starting value of "0" and an adjustment layer I've brought over from PPro that has the markers that I need to reference. I'm trying to create a counter by writing an expression that will increase by 1 the text layer value for each marker in the adjustment layer.
I've written several expressions for the text layer's Source Text property...
...but none of them seem to work. I've tried:
Code: Select all
var marks = thisComp.marker;
for (var i; i <= marks.numKeys; i++){
text.sourceText.valueAtTime(marks.key(i).time, (text.sourceText.value +1));
}
and another based on
Code: Select all
while (x < thisComp.duration) {code to adjust text at each marker}
I'm new to AE scripting and expressions, but have dabbled in JavaScript and powershell and I have the docs for AE expressions and scripting available so this seems like it should be fairly simple yet I can't seem to figure this out. I'm not looking for a complete solution, just help on where I'm going wrong.
EDIT: To make things more frustrating, I can achieve the effect manually.