Tried;
UI.openURL(‘javascript_with_html5_audio.html')
With the “UI.openURL” I can activate the HTML5 audio using the javascript code but, this action deselects my UI::WebDialog to open the new "html" and it makes the game unplayable.
Although with that method all the sounds overlay with each other without any problem. Also since multiple sounds are being called constantly the browser is left with too much opened windows tabs (not good).
If I then use;
UI.openURL(‘sound.wav')
This will also deselect the UI::WebDialog to open the audio player.
I am trying to figure how to make this work by combining the UI.play_sound with UI.start_timer using this code;
if (params['z'].to_i < 0 ) then
UI.start_timer(0, false) { UI.play_sound @ball_sound;}
end ;
I have not achieved what I want, which is too concurrently overlay sounds one on top of each other without it clipping the sound. Although being able to delay or repeat the sound is nice.
The “animation ‘block’ suggestion…I am not sure how to try that at the moment so I will research a little bit more to see if I can figure it out.
Thanks everyone for reply...I will keep trying to solve this.