By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,600 Members | 1,861 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,600 IT Pros & Developers. It's quick & easy.

Basic sounds question

P: n/a
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[i] = new Sound();
preload[i].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.
--
--
Fabian
Visit my website often and for long periods!
http://www.lajzar.co.uk

Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Fri, 5 Dec 2003 07:11:33 +0900, "Fabian" <la****@hotmail.com>
wrote:
I assume the following is correct to preload a sound file?

preload[i] = new Sound();
preload[i].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.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.