danpost wrote...
I guess I forgot to start the music after setting the 'bgm' field in the 'play' method. Modify the method to this:
public static void play()
{
if (bgm == null || !bgm.isPlaying())
{
bgm = new GreenfootSound(soundFiles[Greenfoot.getRandomNumber(soundFiles.length)]);
bgm.play();
}
}