Combined Code
frame 1 {
var song = random(4);
switch (parseInt(song)) {
case 0:
moot = new Sound(this);
moot.attachSound('desert');
moot.start(0, 1000);
break;
case 1:
moot = new Sound(this);
moot.attachSound('bells');
moot.start(0, 1000);
break;
case 2:
moot = new Sound(this);
moot.attachSound('beautiful');
moot.start(0, 1000);
break;
case 3:
moot = new Sound(this);
moot.attachSound('band');
moot.start(0, 1000);
break;
default:
moot = new Sound(this);
moot.attachSound('desert');
moot.start(0, 1000);
}
}
frame 199 {
function loop() {
clearInterval(timer);
gotoAndPlay(2);
}
stop();
var time = Math.floor(Math.random() * 30001) + 30000;
var timer = setInterval(loop, parseInt(time));
}