User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 375,171 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,135 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 1137 | Replies: 8
Reply
Join Date: Jul 2006
Posts: 4
Reputation: krakselikrox is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
krakselikrox krakselikrox is offline Offline
Newbie Poster

Help Random sound/midifile with a button

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2004
Location: Hemet, CA
Posts: 427
Reputation: FC Jamison is on a distinguished road 
Rep Power: 5
Solved Threads: 17
Colleague
FC Jamison's Avatar
FC Jamison FC Jamison is offline Offline
Posting Pro in Training

Re: Random sound/midifile with a button

  #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  
Join Date: Jul 2006
Posts: 4
Reputation: krakselikrox is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
krakselikrox krakselikrox is offline Offline
Newbie Poster

Re: Random sound/midifile with a button

  #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  
Join Date: Jun 2004
Location: Hemet, CA
Posts: 427
Reputation: FC Jamison is on a distinguished road 
Rep Power: 5
Solved Threads: 17
Colleague
FC Jamison's Avatar
FC Jamison FC Jamison is offline Offline
Posting Pro in Training

Re: Random sound/midifile with a button

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

Re: Random sound/midifile with a button

  #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  
Join Date: Jun 2004
Location: Hemet, CA
Posts: 427
Reputation: FC Jamison is on a distinguished road 
Rep Power: 5
Solved Threads: 17
Colleague
FC Jamison's Avatar
FC Jamison FC Jamison is offline Offline
Posting Pro in Training

Re: Random sound/midifile with a button

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

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

Re: Random sound/midifile with a button

  #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  
Join Date: Mar 2006
Posts: 147
Reputation: grunge man is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 2
grunge man grunge man is offline Offline
Junior Poster

Re: Random sound/midifile with a button

  #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  
Join Date: Mar 2006
Posts: 147
Reputation: grunge man is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 2
grunge man grunge man is offline Offline
Junior Poster

Re: Random sound/midifile with a button

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

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

All times are GMT -4. The time now is 11:57 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC