So i'm making my own game right? So I Wanted the Main Menu and The Option Menu to have the same music and it does, fine. but i also wanted to have a different song for the actual game. But, it keeps playing the Loop even into the game, and I just want to know how to stop the music when i go into the game... Quick replies please!
this is the main menu code,
Please help!
GreenfootSound MenuMusic = new GreenfootSound("MainMenu.wav");
/**
* Constructor for objects of class Map.
*
*/
public Map()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(1500, 850, 1);
}
public void started()
{
MenuMusic.playLoop();
}
public void stopped()
{
MenuMusic.stop();
}
