sound error :Uncaught exception java/lang/IllegalArgumentException.
If i run the game after adding the following code for adding sound I get the following error:
Starting emulator in execution mode
Running with storage root DefaultColorPhone
Uncaught exception java/lang/IllegalArgumentException.
Any ideas?
Thank you!!!!
import javax.microedition.media.*;
import javax.microedition.media.control.*;
........
private Player explosionSound;
...........
public void run() {
try {
InputStream is = getClass().getResourceAsStream("gameover.mid");
explosionSound= Manager.createPlayer(is,"udio/X-wav");
explosionSound.prefetch();
}
catch (IOException ioe) {
System.out.println(ioe.toString());
}
catch (MediaException me) {
System.out.println(me.toString());
}
}
while(running) {
//do stuff
if (bulletNave.collidesWith(alienSprite,false)) {
try {
explosionSound.start();
} catch (MediaException me) {
System.out.println(me.toString());
}
}
}

