Dan Ebberts 936 AE Expressions Coins 82 After Effects Coins 1,794 COW Coins 115 Solve Coins @danebberts • Joined May 2001 • Active 13 hours ago Remove Connection Are you sure you want to remove from your connections? Timeline Profile Connections 33 Photos Forums Points Leader Badges Discussions Replies Favorites Discussions Replies Favorites Forum Replies Created Page 151 of 1081 ← 1 … 150 151 152 … 1,081 → Dan Ebberts April 14, 2020 at 5:58 pm in reply to: changing text color within a “tag” Ah, OK. There’s another JS incompatibility hidden in there. Try it this way: txt = text.sourceText; zws = "\u200b"; idx = 1; i = 0; n = 0; while (idx < textIndex){ if (txt.value[i] == "\r"){ i++; continue; } if (txt.value[i] == zws) n++; i++; idx++; } n%2 ? 100 : 0 Dan Dan Ebberts April 14, 2020 at 5:18 pm in reply to: changing text color within a “tag” Try changing the last line from: if (n%2) 100 else 0 to: n%2 ? 100 : 0 Dan Dan Ebberts April 9, 2020 at 4:52 pm in reply to: Use Source Text as expression Ah, OK–slight change: eval(text.sourceText.value) Dan Dan Ebberts April 8, 2020 at 9:45 pm in reply to: Use Source Text as expression Try it this way: eval(text.sourceText) Dan Dan Ebberts April 8, 2020 at 9:24 pm in reply to: Conditional statements with multiple values and multiple results You can use Math.max() to compare multiple values, like this: Width = Math.max(a.width, b.width, c.width, d.width); That should help simplify things. Dan Dan Ebberts April 4, 2020 at 1:46 am in reply to: Expression to revert tex animation I think if you replace textIndex with: ((textTotal – textIndex)+1) it should go backwards. Dan Dan Ebberts April 2, 2020 at 6:03 pm in reply to: Expression to keep layer centred even if comp size changes Try this: [thisComp.width,thisComp.height]/2 Dan Dan Ebberts April 1, 2020 at 11:27 pm in reply to: using both source text and tracking / character size expressions Hmmm….OK–try it this way: txt = thisComp.layer(“Text 2”).text.sourceText; tracking = thisComp.layer(“Control”).effect(“Tracking”)(“Slider”); fontSize = thisComp.layer(“Control”).effect(“Font Size”)(“Slider”); createStyle().setFontSize(fontSize).setTracking(tracking).setText(txt) Dan Dan Ebberts April 1, 2020 at 9:46 pm in reply to: using both source text and tracking / character size expressions Try this: txt = thisComp.layer(“Text 2”).text.sourceText; tracking = thisComp.layer(“Control”).effect(“Tracking”)(“Slider”); fontSize = thisComp.layer(“Control”).effect(“Font Size”)(“Slider”); newStyle = style.setTracking(tracking); newStyle.setFontSize(fontSize); newStyle.setText(txt); Dan Dan Ebberts April 1, 2020 at 7:28 pm in reply to: Visibility control across multiple comps You can’t control .active (or the eyeball) via expressions. It’s read only. I think you’re stuck with Opacity. Dan Page 151 of 1081 ← 1 … 150 151 152 … 1,081 →