CalifNina
06-03-2003, 07:57 PM
I've almost got it figured out! Had two previous posts last evening and earlier today on trying to get sound files to preload and play -- but no answers. I just discovered something -- if someome would please read the scenario and advise how to begin to troubleshoot.
I learned the original code is actually correct even though it had not worked for me.Here's what took place:
(1) Within my original HTML file (with other javascript routines and HTML tags that work fine), I have a particular script routine in the HEAD section for preloading and playing audio files, then later in the BODY is where it actually gets called.... When I run this HTML file the audio files have not ever been heard or play when I 'mouseover' or 'onclick.' I did not notice the sound files even being preloaded.
(2) Just for grins - I copy/pasted ONLY the single script routine from the HEAD section and the single corresponding code from the BODY section and placed both in a separate HTML file (I made no changes to the code) - NOTHING ELSE was included in this new file, no other HTML code or javascript code. ---> I then ran this new file ... guess what? ---> everything worked!!
(3) So I now know for sure the code works properly.This is where I'm stumped. In essence, the same code within my original HTML file will not play audio (maybe it's not preloading), BUT if I take that same code, separate into another file and run it, I then actually see an indicator showing sound files are preloading. After that, all onmouseover's and onclicks work; I hear every sound file that has been setup.
I'VE COME A LONG WAY AND KNOW I'M REAL CLOSE AT LAST!! :D
QUESTION: Tips on what to look for in my original HTML file that is preventing this preload/play audio script from not working with everything else?? Some direction to get me started in initial troubleshooting pls.
I learned the original code is actually correct even though it had not worked for me.Here's what took place:
(1) Within my original HTML file (with other javascript routines and HTML tags that work fine), I have a particular script routine in the HEAD section for preloading and playing audio files, then later in the BODY is where it actually gets called.... When I run this HTML file the audio files have not ever been heard or play when I 'mouseover' or 'onclick.' I did not notice the sound files even being preloaded.
(2) Just for grins - I copy/pasted ONLY the single script routine from the HEAD section and the single corresponding code from the BODY section and placed both in a separate HTML file (I made no changes to the code) - NOTHING ELSE was included in this new file, no other HTML code or javascript code. ---> I then ran this new file ... guess what? ---> everything worked!!
(3) So I now know for sure the code works properly.This is where I'm stumped. In essence, the same code within my original HTML file will not play audio (maybe it's not preloading), BUT if I take that same code, separate into another file and run it, I then actually see an indicator showing sound files are preloading. After that, all onmouseover's and onclicks work; I hear every sound file that has been setup.
I'VE COME A LONG WAY AND KNOW I'M REAL CLOSE AT LAST!! :D
QUESTION: Tips on what to look for in my original HTML file that is preventing this preload/play audio script from not working with everything else?? Some direction to get me started in initial troubleshooting pls.