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

2016/3/14

Background music

MyHeadHurts MyHeadHurts

2016/3/14

#
In my game I have multiple levels with different music on each, but how do I get the music to change only when I change worlds? I'm also wondering if there is any way to keep the music from playing until I run the scenario, right now it plays as soon as I open the program.
danpost danpost

2016/3/14

#
You can use the World class method 'started' to get the music to start when the program is started. Please refer to the World class API documentation for information on this method. You can look the code to my BgMusic Actor Class Demo scenario to see how the music can be controlled. You can even just import the BGMusic class into your project and use it yourself (it was created as a support class).
You need to login to post a reply.