I want to add music to my title screen, but I can not get the music to play. Here is my code. Any suggestions?
GreenfootSound music = new GreenfootSound("TitleMusic.wav"); public void backgroundMusic(){ music.playLoop(); } public void titleScreen(){ if(getBackground()==image1){ backgroundMusic(); setBackground(image2); Greenfoot.delay(25); } else if(getBackground()==image2){ setBackground(image3); Greenfoot.delay(13); }