title: Multi-Color changing button using javascript in a pdf
body: <p>I can't seem to get any further with this.  I'm more of a graphics guy than a programmer.<br>
  I need a button to cycle from white to grey to red to black to white again each time the button is pressed.  There will be over one hundred of these buttons in one pdf file.<br>
  This is what I have tried so far:</p>
  
  <pre><code>if (this.getField("Button1").fillColor = ["RGB",1,1,1])
    {
    app.alert({ cMsg: "Switch to Grey", });
    this.getField("Button1").fillColor = ["RGB",.5,.5,.5];
    };
  
  if (this.getField("Button1").fillColor = ["RGB",.5,.5,.5])
    {
    app.alert({ cMsg: "Switch to Red", });
    this.getField("Button1").fillColor = ["RGB",1,0,0];
    };
  
  if (this.getField("Button1").fillColor = ["RGB",1,0,0])
    {
    app.alert({ cMsg: "Switch to Black", });
    this.getField("Button1").fillColor = ["RGB",0,0,0];
    };
  
  if (this.getField("Button1").fillColor = ["RGB",0,0,0])
    {
    app.alert({ cMsg: "Switch to White", });
    this.getField("Button1").fillColor = ["RGB",1,1,1];
    };
  </code></pre>
  
  <p>Is this possible?
  Thanks</p>