Basic sounds question

F

Fabian

First, I have never even attempted to use sounds in a web page (even as
basic html) before. I'm totally green at this bit. Please assume that
anyone who is reaching the page in question is already expecting a
multimedia extravaganza, and possibly reading the files from a CD.



I assume the following is correct to preload a sound file?

preload = new Sound();
preload.src = "filename.wav";

How do I make a sound file play in response to a javascript event?

Does playing sound files affect the focus at all?

Which sound formats are best to use from a multiplatform usability poit
of view? The critical goal is to work on windows with ie6 and nn7 (I can
test these), but I'd like it to be as broad-based as possible beyond
that. I want to assume that no special plugins have/need to be
installed.
 
J

Jim Ley

I assume the following is correct to preload a sound file?

preload = new Sound();
preload.src = "filename.wav";


Why would you assume that? Is the way to preload chickens:

preload=new Chicken()
preload.src="bantam"

? Of course not.

The way to suggest a client download a sound URI is :

preload = new Image();
preload.src = "filename.wav";

However that's only a tiny part of preloading, you need to sort out
all the caching too.
Does playing sound files affect the focus at all?

That would depend on how you do it...
I want to assume that no special plugins have/need to be
installed.

not all browsers have a sound capability. either using an embed or
iframe element is probably the most guaranteed method.

Jim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top