-
Scripting: strange behavior of the textDocument Object ?
Hi,
can anyone tell me, why the following script doesn’t work correctly. I copy/pasted it straight from the AE Scripting Guide CS6. Some of the values, but not all of them are assigned to the source text. It seems like it only works for the text-string and the justification … (My System: OSX 10.7.4, AE CS6 german version)thx
J.var myComp = app.project.items.addComp(“Text”,1000,1000,1,10,25);
var myTextLayer = myComp.layers.addText();textProp = myTextLayer.property(“Source Text”);
var textDocument = textProp.value;
myString = “Happy holidays!”;
textDocument.resetCharStyle();
textDocument.fontSize = 100;
textDocument.fillColor = [1, 0, 0];
textDocument.strokeColor = [0, 1, 0];
textDocument.strokeWidth = 2;
textDocument.font = “Times”;
textDocument.strokeOverFill = true;
textDocument.applyStroke = true;
textDocument.applyFill = true;
textDocument.text = myString;
textDocument.justification = ParagraphJustification.CENTER_JUSTIFY;
textDocument.tracking = 50;
textProp.setValue(textDocument);