Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

stopping bg sound

Status
Not open for further replies.

Seabone

Technical User
Jan 12, 2001
15
CA
Hi there,
I have a site in HTML where the mainpage (done in frames)bg sound loops indefinitely. I have an audio page with links to loops. When you click on a loop, both sounds play over each other.
How can I stop the bg sound when the other sound begins playing and then, perhaps, continue the bg sound afterwards (or not).
Thanks
 
For IE 5.5 at least. . .

Set the bgsound autostart to off and then write a JavaScript function that starts to loop the sound onLoad.

How?

Embed your sounds (all with autostart off) and give them all an ID.

You can use the play() method in a function thus:

function functionname(){
document.all.soundid.play();
}

Use this to write some scripts that turn the looping of the backgound sound off when you play the other sounds and vv.

Hope it helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top