I am making a game where there is a song playing in the background, and i am trying to use the constructor function to start the sound. Here is my code:
GreenfootSound level1 = new GreenfootSound("level1.mp3");
public MAIN(){
level1.play();
}
but when I run the game it plays the song many times one after another. I think the constructor function is calling it more than one time but I don't know why

