There is only playSound method, but not stopSound method. How can I stop it?


1 | GreenfootSound sound = new GreenfootSound( "filename" ); // the filename is the same as the one you would use in the playSound method; |
1 2 3 4 5 | sound.start(); //start playing the sound; sound.stop(); //stop playing the sound; sound.playLoop(); //plays the sound over and over again; //also you can use any other mehtod from the GreenfootSound class; |