HTML5 New - Could Use a Hand with HTML5 Deployment

J

Joe Mahma

Guest
Hello, Yoyo:

I've been loving GameMaker and have built my first HTML5 game. But I have a sound problem. Everything works great except for the first sound.

For example, most of my buttons use the same sound effect. When the game first loads to the screen, however, the first button click has no sound. After that first press, all other button clicks have sound. And this is the same even if I press other buttons that have different sound effects: the first press has no sound.

I do have my sound effects in an audio group, and I tried loading the group in the creation event of my game controller, but the first button click is still silent.

Any thoughts?
 

chamaeleon

Member
Hello, Yoyo:

I've been loving GameMaker and have built my first HTML5 game. But I have a sound problem. Everything works great except for the first sound.

For example, most of my buttons use the same sound effect. When the game first loads to the screen, however, the first button click has no sound. After that first press, all other button clicks have sound. And this is the same even if I press other buttons that have different sound effects: the first press has no sound.

I do have my sound effects in an audio group, and I tried loading the group in the creation event of my game controller, but the first button click is still silent.

Any thoughts?
Apparently browsers these days does not want to play sounds until you have interacted with the page to ensure that you cannot annoy people without their permission. I've seen people having an initial room that asks the user if they want sound on or off, and it serves as both allowing the user the choice as well as registering that first interaction so sound can play, before proceeding to the rest of your game.
 
J

Joe Mahma

Guest
Yeah, that's what I'm seeing to -- everywhere. The thing is, I found this guy who put his game on his website, and when I go there, the sound is working. I wrote to him in the comments of his YouTube page, but you know how that goes. I heard it can be done through extensions, but I can't figure out extensions.

Anyway, I'm going to do what you suggest. If anyone else knows how to get around this, please let me know. I'll update my game. . .

Thanks chamaeleon.
 
Last edited by a moderator:
Top