xxxxxxxxxx
var song;//Agh, this piece of crap doesn't work :D I am so glad to fail this semester.
function setup() {
song = loadSound('[No Copyright Music] Birdy - KV.mp3');
createCanvas(720, 200);
background(255,100,5);
}
function mousePressed() {
if ( song.isPlaying() ) { // .isPlaying() returns a boolean
song.stop();
background(255,0,0);
} else {
song.play();
background(255,100,5);
}
}