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

2015/2/19

Background Music Help?

shooterbooth shooterbooth

2015/2/19

#
I am trying to make a game with background music. I want it to start when I click run (in the past it has always started when I compile) and I want to end the game when the song ends. I am sort of a beginner to programming so any help or suggestions on how to go about doing this would be greatly appreciated. Thanks
danpost danpost

2015/2/19

#
In order to be able to check to see if the sound is still playing or not, you need to create a GreenfootSound object. Using the Greenfoot class method 'playSound' does not give you the capability to control or make checks on the sound. After creating the object, use the GreenfootSound methods to control and check it (refer to its documentation).
You need to login to post a reply.