Random sound/midifile with a button

Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Reply

Join Date: Jul 2006
Posts: 4
Reputation: krakselikrox is an unknown quantity at this point 
Solved Threads: 0
krakselikrox krakselikrox is offline Offline
Newbie Poster

Random sound/midifile with a button

 
0
  #1
Aug 15th, 2006
a question about javascript.

I have found out how to get a random picture every time you push a button (without refreshing the page). Is it at all possible to do that with
soundfiles, (and how)? I have tried i feel like everything but i can't get it to work.
Any help about this will be much appriciated.

Tim
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 434
Reputation: FC Jamison is on a distinguished road 
Solved Threads: 20
Team Colleague
FC Jamison's Avatar
FC Jamison FC Jamison is offline Offline
Posting Pro in Training

Re: Random sound/midifile with a button

 
0
  #2
Aug 15th, 2006
Wouldn't you use basically the same code, except calling the sound files instead of images?

Bear in mind that sound files take much longer to download, so the transition won't be immediate.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 4
Reputation: krakselikrox is an unknown quantity at this point 
Solved Threads: 0
krakselikrox krakselikrox is offline Offline
Newbie Poster

Re: Random sound/midifile with a button

 
0
  #3
Aug 15th, 2006
hmm, have tried that, but can't get it to work. Do you preload sounds/midifiles the way you do it with images, or how would you write that?
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 434
Reputation: FC Jamison is on a distinguished road 
Solved Threads: 20
Team Colleague
FC Jamison's Avatar
FC Jamison FC Jamison is offline Offline
Posting Pro in Training

Re: Random sound/midifile with a button

 
0
  #4
Aug 15th, 2006
I wouldn't go preloading multiple 4MB files. Look into streaming formats.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 4
Reputation: krakselikrox is an unknown quantity at this point 
Solved Threads: 0
krakselikrox krakselikrox is offline Offline
Newbie Poster

Re: Random sound/midifile with a button

 
0
  #5
Aug 16th, 2006
well, the midifiles i wan't to preload are about 4 k each. Can it be done, and how?

Thanks
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 434
Reputation: FC Jamison is on a distinguished road 
Solved Threads: 20
Team Colleague
FC Jamison's Avatar
FC Jamison FC Jamison is offline Offline
Posting Pro in Training

Re: Random sound/midifile with a button

 
0
  #6
Aug 16th, 2006
This page might be of some help...

http://www.microsoft.com/mind/0398/how0398.asp
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 4
Reputation: krakselikrox is an unknown quantity at this point 
Solved Threads: 0
krakselikrox krakselikrox is offline Offline
Newbie Poster

Re: Random sound/midifile with a button

 
0
  #7
Aug 22nd, 2006
ok, found out. The problem it seemed was to get them to play. With embeds its written one way in IE, and another in Safari (which i'm using). Thanks for the help though.
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 163
Reputation: grunge man is an unknown quantity at this point 
Solved Threads: 2
grunge man grunge man is offline Offline
Junior Poster

Re: Random sound/midifile with a button

 
0
  #8
Aug 23rd, 2006
Hi
THE ONLY WAY TO MOVE IN THE FUTURE IS TO ABSTRACT IN THE PAST
(My interpretation of abstract, is, to change something little by little until it morphs into something new)
Reply With Quote Quick reply to this message  
Join Date: Mar 2006
Posts: 163
Reputation: grunge man is an unknown quantity at this point 
Solved Threads: 2
grunge man grunge man is offline Offline
Junior Poster

Re: Random sound/midifile with a button

 
0
  #9
Aug 23rd, 2006
oops i said that in the wrong window sorry bout that
THE ONLY WAY TO MOVE IN THE FUTURE IS TO ABSTRACT IN THE PAST
(My interpretation of abstract, is, to change something little by little until it morphs into something new)
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum


Views: 1880 | Replies: 8
Thread Tools Search this Thread



Tag cloud for JavaScript / DHTML / AJAX
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC