We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.
Hi, I need help making my button field alternate between yellow and red when it's clicked. TIA
As 'Mouse UP' event of button field add this:
event.target.fillColor = (color.equal(color.yellow, event.target.fillColor)) ? color.red : color.yellow;
Hi, Nesa i need help again.
I have text field which i want to set fill and text colors to be RGB color opposites ( if value is 0 fill is black and text is white)
depending on field value,and if field value is higher then 255 it should be 255.Can you help pls?
Sure, you can use this:
if(event.value > 255)
event.value = 255;
var a = event.value;
var b = 255-a;
event.target.fillColor = ["RGB",a/255,a/255,a/255];
event.target.textColor = ["RGB",b/255,b/255,b/255];