1. var buttonstate = 0; /* 0 = not clicked | 1 = clicked */
  2. onbuttonclick{
  3. if(buttonstate == 0){
  4. buttonstate = 1;
  5. button.setState("pressed"); /* or hover, whatever its called */
  6. }elseif(buttonstate ==1){
  7. buttonstate = 0;
  8. button.setState("normal");
  9. }
  10. }
Comments powered by Disqus