Created
September 22, 2015 17:07
-
-
Save lmccart/4f0a80d4f5fd08d471d6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var bobAudio; | |
var annAudio; | |
function preload() { | |
bobAudio = loadSound('beatbox.mp3'); | |
annAudio = loadSound('beatbox.mp3'); | |
} | |
function setup() { | |
} | |
function draw() { | |
if (bobAudio.isPlaying() == false && annAudio.isPlaying() == false) { | |
fill(0); | |
} else { | |
fill(255); | |
} | |
ellipse(width/2, height/2, 50, 50); | |
} | |
function mousePressed() { | |
bobAudio.play(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment