xxxxxxxxxx
23
var song
var button
function setup() {
createCanvas(400, 400);
song = loadSound("STOOPID_IM_NOT_GONNA_LET_YOU_GET_THE_CHANCE[ListenVid.com].mp3", loaded)
button = createButton('play')
button.mousePressed(togglePlaying)
button1 = createButton('stop')
button1.mousePressed(toggleStop)
}
function togglePlaying(){
song.play
song.setVolume(0.3)
}
function toggleStop(){
song.stop
}
function loaded() {
console.log("loaded")
}