-
get number from another comp into Dan’s Universal Counter
Hi guys,
I am trying to make this automated ranking system.

I have 1 comp named ‘CHANGE_TEXT’ where I can input names and scores.
Inside another comp I have a Textfield with follwing code on the source text. I have animated it with drop in by character.
comp("CHANGE_TEXT").layer("01_firstname").text.sourceTextFor the score I have used Dan’s Universal code
numDecimals = 0;
commas = true
dollarSign = false;
beginCount = 0;
endCount = 250;
dur = 1.5;t = time - inPoint;
s = linear (t, 0, dur, beginCount, endCount).toFixed(numDecimals);prefix = "";
if (s[0] == "-"){
prefix = "-";
s = s.substr(1);
}
if(dollarSign) prefix += "$";if (commas){
decimals = "";
if (numDecimals > 0){
decimals = s.substr(-(numDecimals + 1));
s = s.substr(0,s.length - (numDecimals + 1));
}
outStr = s.substr(-s.length, (s.length-1)%3 +1);
for (i = Math.floor((s.length-1)/3); i > 0; i--){
outStr += "," + s.substr(-i*3,3);
}
prefix + outStr + decimals;
}else{
prefix + s;
}I would like to have the endCount to reference a input from the Change_TEXT comp.
But this doesn’t work:
numDecimals = 0;
commas = true
dollarSign = false;
beginCount = 0;
endCount = comp(“CHANGE_TEXT”).layer(“01_count”).text.sourceText;
dur = 1.5;Any suggestions?