I'm sure I'm attracting bugs today or something similar. Anyway, the scenario is chucking out the following error:
java.lang.IllegalArgumentException: Format of sound file not supported: ChompNoise.wav
at greenfoot.Greenfoot.playSound(Greenfoot.java:141)
at Boy.eatFood(Boy.java:109)
at Boy.act(Boy.java:73)
at greenfoot.core.Simulation.runOneLoop(Simulation.java:288)
at greenfoot.core.Simulation.run(Simulation.java:158)
...basically, it's moaning because the wav file you're using isn't a type supported by java. The easiest way of solving this that I've found is to go into audacity (google for it if you haven't got it already, great free audio editing program), import the sound and then export it to wav using the default settings. I've always managed to get sounds working this way, though some people have reported it hasn't worked. Either way, it's worth a try :-)
2009/5/23