Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

source text set value at time

Explorer ,
Oct 26, 2015 Oct 26, 2015

Hey,

I am a begginer at AE scripting. I'd like to change text color over time. I have already done this with f.e. scale property. I'd like to do the same with color. So until now Ive changed the color once:

    //CHANGING SOURCE TEXT PROPERTIES {{{

        var compSourceText = comp.layer(1).property("Source Text");

        var compTextValue = compSourceText.value;

       

        compTextValue.fillColor = [1,  0,  0];

        compSourceText.setValue(compTextValue);   

    // }}}  

How can I change it at given time? Like here:

var compScaleProperty = comp.layer(1).property("Scale");

       

        compScaleProperty.setValueAtTime(5, [360, 360]);

        compScaleProperty.setValueAtTime(5.4,  [370, 370]);

        compScaleProperty.setValueAtTime(5.8,  [380, 380]);

        compScaleProperty.setValueAtTime(6.2,  [400, 400]);

        compScaleProperty.setValueAtTime(6.6,  [420, 420]);

        compScaleProperty.setValueAtTime(7,  [440, 440]);

I'd be very grateful for any help

TOPICS
Scripting
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 26, 2015 Oct 26, 2015

I think you do it pretty much the same way:

var compSourceText = comp.layer(1).property("Source Text");

var compTextValue = compSourceText.value;

compTextValue.fillColor = [1,  0,  0];

compSourceText.setValueAtTime(0,compTextValue);  

compTextValue.fillColor = [0, 1,  0];

compSourceText.setValueAtTime(1,compTextValue);

etc.

Dan

Translate
Community Expert ,
Oct 26, 2015 Oct 26, 2015

I think you do it pretty much the same way:

var compSourceText = comp.layer(1).property("Source Text");

var compTextValue = compSourceText.value;

compTextValue.fillColor = [1,  0,  0];

compSourceText.setValueAtTime(0,compTextValue);  

compTextValue.fillColor = [0, 1,  0];

compSourceText.setValueAtTime(1,compTextValue);

etc.

Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 27, 2015 Oct 27, 2015

Works just fine:) Thanks. Is there a way to obtain a smooth transition between colors in time?

A

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 27, 2015 Oct 27, 2015
LATEST

I think you'd have to use a Fill Color Animator to do that.

Dan

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines