Button actions using JavaScript
Hi,
I'm creating an interactive Bingo board so my student can complete activities at home. The parent will click the button to mark done.
I found the following code to change the color of a button.
If only once then set the fill color as blue and then apply the following JavaScript code as the MouseUp event of the button:
event.target.fillColor = color.green;
If you want it to change back and forth, use this code:
event.target.fillColor = (color.equal(color.blue, event.target.fillColor)) ? color.green : color.blue;
Is there a way to add to the change back and forth code to add words. I want add the word 'Done'? Blue would be blank. Once the button is clicked, it would change to green and the word done would appear. I actually would prefer yellow but I will just change the word.
Also, is there a way to add the same property to all buttons at once or do I need to add the script to each bingo board?
I really would like a transparent circle to cover the square but that is a little too advanced for me right now!
Thank you for your help!!!
