my sound is still playing when i switching world and before i run the game
private GreenfootSound bgMusic = new GreenfootSound("nameOfTheFile.something");
public void started()
{
bgMusic.playLoop();
}
public void stopped()
{
bgMusic.pause();
}
public void nextLevel()
{
bgMusic.stop();
Greenfoot.setWorld(new NameOfTheOtherWorld());
}