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

2014/1/21

playing sounds/music in background

Banjo Banjo

2014/1/21

#
Hey guys, can anyone help ? I've managed to work through the 6 tutorials but now want to play some music in the background of the game, is this possible? if so how do I program it. Any help appreciated, Thanks, Banjo
deathburrito16 deathburrito16

2014/1/21

#
you could just do
Greenfoot.playSound(mySoung.wav)
//the extension can be different
in the act() method.
davmac davmac

2014/1/21

#
in the act() method.
Do not do that in the act method, or you will end up with the song playing over itself multiple times. Do it the world's started() method, for instance.
You need to login to post a reply.