Skip to main content
Leo Miller989
Participant
February 7, 2026
Answered

Seeking Help: Proper JSFL Syntax for Setting 'Advanced' Color Mode Properties on Frames

  • February 7, 2026
  • 1 reply
  • 29 views

I am trying to use JSFL to adjust an instance's Advanced Color Mode (Alpha).

My Action:
I manually select a keyframe on the timeline, then in the Frame Properties panel, under "Color Effect" -> "Advanced", I adjust the Alpha value there.

The Problem:

  1. I tried using getDocumentDOM().setInstanceAlpha(60), but this only adjusts the transparency in the "Object" tab, which is not what I want. I need to modify the Alpha property as seen in the "Frame" tab's Color Effect.
  2. I tried capturing the code from the History panel, but it generated getDocumentDOM().setElementProperty(%S, %S), which throws an "Argument is invalid" error when played back.
  3. I also tried getDocumentDOM().setElementProperty("alpha", 50), but it had no effect.

I have checked the official tutorials but couldn't find the correct property names for this specific panel.

My Question:
Could any experts tell me the correct JSFL syntax to adjust the Alpha transparency within the "Frame" (Color Effect) panel? 

Correct answer Mario_CR

Try  layer.getColorTransformAtFrame()and layer.setColorTransformAtFrame()

 

Example from the documentation:

The following example copies the color transform of the first frame and sets it to the tenth frame:

var myCxform = an. getDocumentDOM(). getTimeline(). layers[0].getColorTransformAtFrame (0);

an.getDocumentDOM().getTimeline().layers[0]. setColorTransformAtFrame (9, myCxform);

https://github.com/AdobeDocs/developers-animatesdk-docs/blob/master/Layer_object/layer17.md

1 reply

Mario_CR
Community Expert
Mario_CRCommunity ExpertCorrect answer
Community Expert
February 9, 2026

Try  layer.getColorTransformAtFrame()and layer.setColorTransformAtFrame()

 

Example from the documentation:

The following example copies the color transform of the first frame and sets it to the tenth frame:

var myCxform = an. getDocumentDOM(). getTimeline(). layers[0].getColorTransformAtFrame (0);

an.getDocumentDOM().getTimeline().layers[0]. setColorTransformAtFrame (9, myCxform);

https://github.com/AdobeDocs/developers-animatesdk-docs/blob/master/Layer_object/layer17.md

Leo Miller989
Participant
February 9, 2026

Thank you so much! I used the setColorTransformAtFrame() method you mentioned to successfully adjust the transparency in the frame panel—the result exceeded my expectations, and I'm thrilled!😄
I’ll later use a parameterized approach to fine-tune these values.

var tl = an.getDocumentDOM().getTimeline();

var customCxform = {

    colorAlphaPercent: 55,

    colorRedPercent: 100,

    colorGreenPercent: 100,

    colorBluePercent: 100,

    colorAlphaAmount: 0,

    colorRedAmount: 0,

    colorGreenAmount: 0,

    colorBlueAmount: 0

};

tl.layers[0].setColorTransformAtFrame(0, customCxform);

Mario_CR
Community Expert
Community Expert
February 9, 2026

You’re welcome, glad I could help.