-
Switching Effects on & off by a Checkbox controller
Hi,
Im a little stumped here. I need to turn on and off an effect using a checkbox control.
I have searched other ideas where they all suggest controlling an element of the effect such as opacity.
This wont work in my case.
The effect is Fill, where I have 6 Fill effects on one layer. Each Fill effect has a script of its own. So I only want one of the effects on at any one time.
Is there a way to turn on or off the Fill effect?
I have included the script which I have on each effect.
Many thanks in advance!!!!This is on the "Red" Fill effect:
s = thisComp.layer("Colour Controls").effect("STRAP Colour")("Slider")
colors = [[255,255,255],
[179,32,52],
[232,73,27],
[239,125,0],
[252,192,67],
[255,229,150]];
idx = Math.max(Math.min(colors.length-1,Math.round(s)-1),0);
c = colors[idx]/255;
[c[0],c[1],c[2],1]This is on the "Green" Fill effect. There are 6 Fill effects on the one layer.
s = thisComp.layer("Colour Controls").effect("STRAP Colour")("Slider")
colors = [[255,255,255],
[0,104,51],
[19,165,56],
[162,199,59],
[221,223,75],
[255,242,101]];
idx = Math.max(Math.min(colors.length-1,Math.round(s)-1),0);
c = colors[idx]/255;
[c[0],c[1],c[2],1]
