Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Can’t change the backgroundColor of a ScriptUI Panel Button Element…

  • Can’t change the backgroundColor of a ScriptUI Panel Button Element…

    Posted by Marten Zander on December 21, 2015 at 2:51 pm

    Hey guys,

    I am just working on my first After Effects Script. I also want to provide a user friendly UI and I want to customize it to get a unique look.

    Now I am trying to change the background Color of my Button. This is what I got so far:


    var applyGrp = pixual.palette.add('group', undefined);
    applyGrp.alignment = [ScriptUI.Alignment.FILL,ScriptUI.Alignment.FILL];

    var applyBtn = applyGrp.add('button', undefined, 'Apply', {name: 'apply'});
    applyBtn.alignment = [ScriptUI.Alignment.FILL,ScriptUI.Alignment.FILL];

    applyGrp.addEventListener('mouseover', changeBtnColor, false);

    function changeBtnColor(){
    var applyGFX = applyGrp.graphics;
    var applyGFX_bgColor = applyGFX.newPen(applyGFX.BrushType.SOLID_COLOR, [0,1,0], 1);

    applyGFX.backgroundColor = applyGFX_bgColor;
    }

    I don’t get an error when compiling but it doesn’t work. What am I doing wrong?

    Marten Zander replied 10 years, 7 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy