-
Typewriter Blinking Cursor Console combined with parentText and parentStyle?
Hi gang,
I’m hitting my head against the desk here trying to figure out where I’m going wrong!
I’ve basically got a master text layer whose SourceText properties are editable in an Essential Graphics template. I then have lots of pre-comped text layers which all use the parentText and parentStyle of that master layer so they all take the same font, style, size, and faux style as the master.
This is the expression I’ve used on the Source Text of all those pre-comped text layers:
var parentText = comp("MASTERCOMP").layer("MASTERTEXT")(2)(1);
var parentStyle = comp("MASTERCOMP").layer("MASTERTEXT")(2)(1).style;
parentStyle.setText( parentText )I’ve been asked to add a blinking cursor to the template, so I’ve tried simply adding Ae’s Typewriter Blinking Cursor Console preset to the layer, but it creates a conflict with the existing parent text and style expression I’ve been using. Any idea how I can allow the pre-comped text layers to take the font style of MASTERTEXT while also allowing it to receive the animation properties of the cursor preset? Here is what I have currently:
var parentText = comp("MASTERCOMP").layer("MASTERTEXT")(2)(1);
var parentStyle = comp("MASTERCOMP").layer("MASTERTEXT")(2)(1).style;
parentStyle.setText( parentText )var t = text.sourceText;
var l = t.length;
var a = effect("Animation")(1);
var b = effect("Cursor On/Off")(1);
var c = ["|","_","—","<",">","«","»","^"];
var d = effect("Cursor Shape")(1).value;
var reveal = t.slice(0, l*linear(a,0,100,0,1));
if(b == 0){
reveal;
} else {
reveal + c[d-1];
};