Hello, I have been having problems with adding background music to my game. For some reason I can not import the music into the game from the sound folder an error comes up:
Caused by: java.io.FileNotFoundException: Could not find file: Disconnect_Music.mp3
at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:554)
at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
... 12 more
This is my code:
In addition, I trying to work with gifs to animate my character, however I am having trouble finding the greenfoot commands, is there somewhere I can look to give me a broader understanding of gif manipulation and integration
public void music(){
Greenfoot.playSound("energy.wav");
if (musicTimer == 100000){
Greenfoot.playSound("Disconnect_Music.mp3");
}
if (musicTimer == 20000){
Greenfoot.playSound("Fade_Music.mp3");
}
if( musicTimer == 30000){
Greenfoot.playSound("Titans_Music.mp3");
}*/
