Did you put the sound in the sound file?
import greenfoot.*;
import java.awt.Color;
public class SquareWorld extends World
{
private Counter counter;
private HealthBar healthBar;
private Paddle paddle;
private Robot robot;
GreenfootSound backgroundMusic = new GreenfootSound("breathe.mp3");
public SquareWorld()
{
this(null);
backgroundMusic.playLoop();
}
public SquareWorld(Robot inRobot)
{
super(700, 700, 1, true);
setPaintOrder ( Robot.class, Smoke.class );
if (inRobot == null)
{
Counter = new Counter();
healthBar = new HealthBar ("Robot Health", "", 100, 100);
robot = new Robot(counter, healthBar);
}
else
{
counter = inRobot.getCounter();
healthBar = inRobot.getHealthBar();
robot = inRobot;
}
addObject(counter, 100, 678);
addObject(healthBar, 600, 678);
addObject(robot, getWidth()/2, getHeight()-90);
paddle = new Paddle(robot);
addObject(paddle, getWidth()/2, getHeight()-55);
}
private void prepare()
{
addObject(new goldEgg(), 309, 397);
addObject(new goldEgg(), 308, 182);
addObject(new goldEgg(), 458, 259);
addObject(new goldEgg(), 552, 95);
addObject(new goldEgg(), 143, 91);
addObject(new goldEgg(), 142, 258);
addObject(new goldEgg(), 555, 411);
addObject(new goldEgg(), 232, 332);
addObject(new goldEgg(), 346, 286);
addObject(new goldEgg(), 144, 486);
addObject(new goldEgg(), 386, 483);
addObject(new goldEgg(), 553, 259);
addObject(new goldEgg(), 388, 91);
addObject(new yellowEgg(), 389, 181);
addObject(new yellowEgg(), 453, 332);
addObject(new yellowEgg(), 553, 185);
addObject(new yellowEgg(), 230, 184);
addObject(new yellowEgg(), 231, 392);
addObject(new yellowEgg(), 553, 490);
addObject(new blueEgg(), 307, 93);
addObject(new blueEgg(), 143, 332);
addObject(new blueEgg(), 458, 187);
addObject(new blueEgg(), 141, 182);
addObject(new blueEgg(), 381, 395);
addObject(new blueEgg(), 554, 335);
addObject(new blueEgg(), 461, 481);
addObject(new redEgg(), 227, 92);
addObject(new redEgg(), 462, 88);
addObject(new redEgg(), 233, 260);
addObject(new redEgg(), 454, 394);
addObject(new redEgg(), 304, 486);
addObject(new redEgg(), 227, 485);
addObject(new redEgg(), 142, 408);
}
}java.lang.IllegalArgumentException: Could not open sound file: ContinueButton at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:66) at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120) at greenfoot.Greenfoot.playSound(Greenfoot.java:162) at MenuButton.act(MenuButton.java:20) at greenfoot.core.Simulation.actActor(Simulation.java:565) at greenfoot.core.Simulation.runOneLoop(Simulation.java:523) at greenfoot.core.Simulation.runContent(Simulation.java:213) at greenfoot.core.Simulation.run(Simulation.java:203) Caused by: java.io.FileNotFoundException: Could not find file: ContinueButton at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:534) at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99) ... 6 more