"I want it so when mouseispressed it plays a random sound file from the three soundfiles preloaded already at the top of the code. at the moment i can only play one sound file at a time "
function preload() {
bird = loadSound('kooka.mp3');
bird2 = loadSound('galah.mp3');
bird3 = loadSound('cuckoo.mp3');
}
function setup() {
createCanvas(windowWidth, windowHeight);
background(0);
}
function draw() {
kooka();
}
function kooka () {
if (mouseIsPressed) {
bird2.playMode('untildone');
bird2.play();
bird2.setVolume(0.3);