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

2022/4/25

Problem playing sounds (MP3).

Harrypotamus Harrypotamus

2022/4/25

#
Whenever I try and put in a sound effect into my game, I get a looping terminal window until I remove the lines: private GreenfootSound footstep; footstep = new GreenfootSound("footsteps.mp3"); All it ponts me to is this line, and the world constructor. How do I fix this so I can play sounds in my game?
Harrypotamus Harrypotamus

2022/4/25

#
I tried just putting the line: Greenfoot.playSound("Footsteps.mp3"); wherever I needed, but it doesn't play a sound at all.
Harrypotamus Harrypotamus

2022/4/25

#
I managed to partially fix the issue. It doesn't crash anymore, but it won't play the sound.
danpost danpost

2022/4/26

#
Harrypotamus wrote...
I managed to partially fix the issue. It doesn't crash anymore, but it won't play the sound.
You need to show the codes you are using -- all fields and methods related to or using the sound.
Harrypotamus Harrypotamus

2022/4/26

#
I got it to work soon after I posted this, thanks!
You need to login to post a reply.