Can we loop the sound so that it repeats again till the game ends?


1 | Counter counter = new Counter(); |
1 | Greenfoot.playSound( "bgmusic.mp3" ); |
1 2 | GreenfootSound bgMusic = new GreenfootSound( "bgmusic.mp3" ); bgMusic.playLoop(); |
1 2 3 4 5 6 7 8 9 | public void started() { bgMusic.playLoop(); } public void stopped() { bgMusic.pause(); } |