View Full Version : javascript sound layering?

10-03-2003, 10:59 PM
just wanting to know if it is possible to play 2 sounds at the same time, or start one and then playing another without the first one being turned off, in javascript or like scripting using IE6.

10-04-2003, 12:06 AM
Yes...Try this:
<EMBED SRC="sound1.wav" autostart="true"
hidden="true" loop="false">
<EMBED SRC="sound2.mp3" autostart="true"
hidden="true" loop="false">
Dunno why you'd want to hear 2 sounds at the same time 'cause it turns out garbled...Nevertheless, ytou can also mix 2 or 20 sounds in one file with an editor.

Chitty bang bang we love youuuuuuuuuuuu. :D

10-04-2003, 12:08 AM
Oh..you want to bloat...I mean play with js? Dunno :D

10-13-2003, 01:10 AM
I am creating a game that uses audio files as an added effect. with this game i want to be able to play multiple sounds at one time without one turning off so the other one can play. I use the <embed> for all my sounds, which helps with loading, but i can still only play one sound at a time.
for example, i have a timer for the game, when it reaches red, a sound file plays that says "hurry up" well this sounds is approx. 3-4 seconds long. but at the same time the player is clicking on images that when clicked on makes sounds them selves that are only .5-1 second in length. i dont want the " hurry up" sound being stop prematurly so that the click sound can play. i am currently using the script:

<embed src='loser.mp3' autostart=false hidden=true loop=false MASTERSOUND>
function playS(snd){

i also tried the


but it doesnt wnat to work for me.