This site requires JavaScript, please enable it in your browser!
Greenfoot back
SuperNinja
SuperNinja wrote ...

2017/12/1

Background Music

SuperNinja SuperNinja

2017/12/1

#
I've seen some other discussions, and I've tried most of the code they suggest in there, but I keep getting an error saying that it can't open the mp3 file cause it can't find it. Help please!
GreenfootSound backgroundMusic = new GreenfootSound( "idk.mp3" );
    public TitleScreen()
    {
        // Create a new world with 800x500 cells with a cell size of 1x1 pixels.
        super(800, 500, 1); 
        backgroundMusic.playLoop();
        Greenfoot.start();
    }
danpost danpost

2017/12/1

#
Make sure you have the file located in the 'sounds' folder in the current scenario project folder and that you have the file name correct (case sensitive).
SuperNinja SuperNinja

2017/12/1

#
Thank you I appreciate that, didn't know about the sound folder!
You need to login to post a reply.