Known Participant
November 4, 2022
Question
Font Style Error
- November 4, 2022
- 1 reply
- 512 views
Hi again guys 🙂
I have been using one expression for a few months and worked fine, but I just tried it in another project and I am receiving an error which I don't understand.
I a trying to 'copy' the style of layer 'A' and be read by layer 'B'. However, a 'style error' is appearing and I don't know why, because is the sae expression I used in other projects...
(I attached the screenshot in case this one has no quality)
Here is the code I used:
sl=effect("Slider Control")("Slider");
if(effect("Up/Down")("Checkbox")==1){
Tt=sl-time+1;
}else{
if(time<sl){Tt=time}else{Tt=sl}
}
sec=Math.floor(Tt%60);
min=Math.floor(Tt/60);
function Zero(n){
if(n<10) return ("0"+n) else return n;
}
if(Tt>0){
Zero(min)+":"+Zero(sec)}
else
{"00:00"};
txt = thisComp.layer("FONT").text.sourceText.style;
style.setFont(txt.font).setFontSize(txt.fontSize).setText(sl)
I hope you guys can help me, thank you!
