I have an actor called Sound1, with this code
if (Greenfoot.mouseClicked(this))
Greenfoot.playSound("dog");
when i click the img(the actor) i get this
java.lang.IllegalArgumentException: Could not open sound file: dog
at greenfoot.sound.SoundExceptionHandler.handleIOException(SoundExceptionHandler.java:67)
at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:120)
at greenfoot.Greenfoot.playSound(Greenfoot.java:163)
at Sunet1.act(Sunet1.java:18)
at greenfoot.core.Simulation.actActor(Simulation.java:604)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:562)
at greenfoot.core.Simulation.runContent(Simulation.java:221)
at greenfoot.core.Simulation.run(Simulation.java:211)
Caused by: java.io.FileNotFoundException: Could not find file: dog
at greenfoot.util.GreenfootUtil.getURL(GreenfootUtil.java:551)
at greenfoot.sound.SoundFactory.createSound(SoundFactory.java:99)
... 6 more
the file "dog" is a WAV file