ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Can't change the backgroundColor of a ScriptUI Panel Button Element...

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Marten Zander
Can't change the backgroundColor of a ScriptUI Panel Button Element...
on Dec 21, 2015 at 2:51:56 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?


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]