To make a button that stops or starts a music loop (variable name: “music”) depending on whether the music is playing already, create a true/false variable (in this case, “musicplaying”) and change it with the button: on (release) { if (musicplaying == true) { music.stop(); musicplaying = false; } else { music.stop(); // guard against [...]


February 27, 2010
6 Comments