<p>I have 6 sound files (1.wav 2.wav etc..) of which 3 different ones have to be heard each time the web page opens. The numbers are selected randomly.
I have tried multiple "embeds" but only the last sound selected gets produced.
I have also tried javascript routines that fiddle the bgsound attribute, however, I was not able to produce more than one sound at a time.
The sounds are required to play either automatically on page open or they can be triggered by a click on a button or link, however, only one click is acceptable for the three sounds.
Is there another way to do this? suggestions very welcome.</p>

[{'answer_id': 82154, 'author': 'Cetra', 'author_id': 15087, 'author_profile': 'https://Stackoverflow.com/users/15087', 'pm_score': 2, 'selected': False, 'text': "<p>I would use Flash if i'm trying to add sound into a webpage, you can embed a flash document with no width or height so it will be invisible but still play noise.</p>\n"}, {'answer_id': 82157, 'author': 'Paul Tomblin', 'author_id': 3333, 'author_profile': 'https://Stackoverflow.com/users/3333', 'pm_score': 1, 'selected': False, 'text': "<p>I've got a good idea: <strong>DON'T</strong>!</p>\n\n<p>I hate web sites that play sounds without my telling them to.  I use a multi-tabbed browser, and a multi-tasking operating system, and you don't have control of my computer, so don't assume you can play a sound without interfering with other things I'm doing.</p>\n"}, {'answer_id': 82159, 'author': 'diciu', 'author_id': 2811, 'author_profile': 'https://Stackoverflow.com/users/2811', 'pm_score': 0, 'selected': False, 'text': "<p>A browser will split page loading into multiple items and thus it's likely to load all sounds at once using multiple threads. I think what you're trying to accomplish is impossible.</p>\n"}, {'answer_id': 82181, 'author': 'Ilya Kochetov', 'author_id': 15329, 'author_profile': 'https://Stackoverflow.com/users/15329', 'pm_score': 3, 'selected': False, 'text': '<p>A simple Flash would do the trick better than anything else.\nHowever please consider that unless you develop your page for the Intranet application and the feature was specifically requested by the users it will most likely go against the best usability practices for web.\nMost users consider the pages which produce sounds to be very distractive and if the sound is produced on the page load the most likely will not be able to turn it off.\nIf you want to embed some sound in your page you may allow the user to turn it on explicitely.</p>\n'}, {'answer_id': 82222, 'author': 'Kent Fredric', 'author_id': 15614, 'author_profile': 'https://Stackoverflow.com/users/15614', 'pm_score': 0, 'selected': False, 'text': '<p>I know this is a bit exorbitant, but the number of combinations are not overly excessive. If you pre-blend the wav files into a series of files and just name them as follows</p>\n\n<pre><code>1_2_3, 1_2_3, 1_2_5, 1_2_6 \n1_3_4, 1_3_5, 1_3_6\n1_4_5, 1_4_6\n2_3_4, 2_3_5, 2_3_6, \n2_4_5, 2_4_6,\n2_5_6\n3_4_5, 3_4_6,\n3_5_6,\n4_5_6\n</code></pre>\n\n<p>( fortunately not too many combinations )</p>\n\n<p>and then as long as you do:</p>\n\n<pre><code>   $n = [ randomnumber , randomnumber , randomnumber ]; \n   $n = sort $n; \n   file = "$n[0]_$n[1]_$n[2].wav"   \n</code></pre>\n\n<p>that should get it working. </p>\n\n<p>Noted many people are opposed to sound and depending on what technique you use to play it it may/may not work for all, but that\'s probably a feature we should get browsers to enforce, because some people like being able to hear sounds ( shocking, but true ). </p>\n'}, {'answer_id': 82255, 'author': 'Eric  DeLabar', 'author_id': 7556, 'author_profile': 'https://Stackoverflow.com/users/7556', 'pm_score': 1, 'selected': False, 'text': '<p>If you\'re not against using a JavaScript framework to play a sound scriptaculous provides an API for playing sounds.</p>\n\n<p><a href="http://github.com/madrobby/scriptaculous/wikis/sound" rel="nofollow noreferrer">http://github.com/madrobby/scriptaculous/wikis/sound</a></p>\n'}, {'answer_id': 231416, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 0, 'selected': False, 'text': '<p>Adding Sounds - HTML Lessons\nHTML MUSIC / MEDIA CODE - Sound\n<a href="http://html-lesson.blogspot.com/2008/06/music-media-code-sound.html" rel="nofollow noreferrer">http://html-lesson.blogspot.com/2008/06/music-media-code-sound.html</a></p>\n'}, {'answer_id': 231465, 'author': 'Karl', 'author_id': 2932, 'author_profile': 'https://Stackoverflow.com/users/2932', 'pm_score': 2, 'selected': False, 'text': '<p>Check out <a href="http://www.schillmania.com/projects/soundmanager2/" rel="nofollow noreferrer">Sound Manager 2</a> an invisible flash movie that you can use to play sounds. It allows you to load and play multiple sounds.</p>\n\n<p>To do what you wish to accomplish I would re-encode the wav files as mp3s (so that they download faster and Sound Manager can play them). Then use javascript to get sound manager to create the sounds and play them in a random order. You can listen to the onfinish event of each sound to start playing the next sound.</p>\n'}]
['https://Stackoverflow.com/questions/82141', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/15588/']