Search code examples
javascriptafter-effects

Programmatically change the text of a TextLayer in After Effects


I'm using the After Effects CS3 Javascript API to dynamically create and change text layers in a composition.

Or at least I'm trying to because I can't seem to find the right property to change to alter the actual text of the TextLayer object.


Solution

  • Hmm, must read docs harder next time.

    var theComposition = app.project.item(1);
    var theTextLayer = theComposition.layers[1];
    theTextLayer.property("Source Text").setValue("This text is from code");