?
Solved

Playing sounds and manipulating sound files

Posted on 2006-10-29
5
Medium Priority
?
160 Views
Last Modified: 2012-08-14
Hi.

Firstly, this is for audible alerts so is a valid reason for having sound on a page :)

I have 2 basic questions.

1. I am getting the name of the particular sound file required by reading an external file. I need this sound to play just once and to be totally embedded in the page and invisible. When it needs to sound i want to use something like

document.getElementById('soundfile').src = "'sounds/"+thissound+".wav'";

to alter the sound according to the value of 'thissound' retreived. I just can't figure out IE/FF code where the required src can be swapped at will. This must be fully cross-browser compatible.

2. Is there any way to retreive a combination of sound files and play one after the other? eg get a file for sound 'Hello' and then another for 'John' and then play them back to back to create 'Hello John'? Obviously I'm simplifying here but just wondered if possible to do.

Many thx





0
Comment
Question by:robertybob
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 30

Expert Comment

by:third
ID: 17830713
0
 

Author Comment

by:robertybob
ID: 17831014
Yup - I found that on Google a while back - problem is none of them work satisfactorily, hence the question here.

However it seems it was a mistake in my element IDs not the JS all sorted anyway.
0
 

Author Comment

by:robertybob
ID: 17831152
ok - all sorted - sry :)

Just simply used a timeout before swapping the sound file again. Would be nice to actually timie it to kick in directly after the previous one has ended but is good enough for the purpose.

0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 18016179
PAQed with points refunded (250)

Computer101
EE Admin
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question