2
\$\begingroup\$

I'm trying to play music in the background for my opening menu, but cant seem to find a tutorial specifically on how to play a music file. Does anyone know how this can be accomplished?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$
@Override
public void init(GameContainer gc) throws SlickException {
    Music openingMenuMusic = new Music("res/openingMenuMusic.ogg");

    openingMenuMusic.loop();
}

http://slick.cokeandcode.com/javadoc/org/newdawn/slick/Music.html

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .