Change text color in text box

Hi -

How do I change the color of the text that’s already in a text box ?

I currently have this, which works but I’d like it to change the color of the text that’s already there rather than have to add the text -“sometext” in the code below, if possible.

Thanks.

 
       //r1 is  result 1 text
       doc.getElement("r1").setText("<span style='font-size:14px;color:#407f13;'>sometext</span>");

     }

Hi,

You can use this script doc.getElement('r1').setProperty('color', '#407f13');
You can also create an additional timeline, add a Text Color keyframe to that timeline to change the text color, and run that timeline when you want to change the text color.

Regards

Ah I see. Thank you.