Closed Thread Icon

Topic awaiting preservation: audio problem (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8950" title="Pages that link to Topic awaiting preservation: audio problem (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: audio problem <span class="small">(Page 1 of 1)</span>\

 
new user
Neurotic (0) Inmate
Newly admitted

From: N Ireland
Insane since: Nov 2003

posted posted 11-19-2003 13:04

Hi
This might be a long shot as i dont know a thing about javascript but maybe someone here can help me out with whatever info i have to provide

I have a loading page with a progress bar / div that moves as the images are loading, when the images are all complete the loading bar flashes on and off using this >> setTimeout("loadObj.hide()",500) it also has var hide & var show further up the page setTimeout("loadObj.show()",500)
thats related to this

I want to add code to the show hide part so that when the div flashes a sound is also made at the same time using a wav or midi file. Does anyone have some code that would work using the same show hide method that the flashing div uses or something that can be grafted into the original code to do what im after?
Preferably i would like the sound to happen when the hide instruction is given and not when the show is used , that way it just does it once and stops after that ,otherwise it will be playing continuously

I have this code i found which works but you have to use a mouse to make it play
can it be modified to what i want? and can it be made so no mouse is needed? and it runs off the var hide command so i works when this original code setTimeout("loadObj.hide()",500) does?
i know this info is a bit vague especially with the originalcode i want to add to but since i dont know a thing about coding im trying to make it as less complicated for myself as i can by just inserting another piece and not re writing anything

<head>

<script>
var aySound = new Array();
aySound[0] = "MY_SOUND.wav";

document.write('<BGSOUND ID="auIEContainer">')
IE = (navigator.appVersion.indexOf("MSIE"))
{
auCon = IE? document.all.auIEContainer:auEmb;
auCon.control = auCtrl;
}
function auCtrl(whSound,play) {
if (IE) this.src = play? aySound[whSound]:'';
}
function playSound(whSound) { if (window.auCon) auCon.control(whSound,true); }
function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); }

</script>
</head>
<body>
<A HREF="javascript laySound(0);">Click here to play sound</A>
</body>

thanks

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-20-2003 20:41

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

dl748
Obsessive-Compulsive (I) Inmate

From: Michigan
Insane since: Oct 2003

posted posted 11-22-2003 01:33

you can only "mix" if you os or soundcard supports audio mixing.

Win95 and Win98 with a generic sound will prolly not have audio mixing (prolly ME too)

Windows 2000/XP now support software based mixing, even if you soundcard does not support it.

XWindows(Linux/unix) also has the same problems

InI
Paranoid (IV) Mad Scientist

From: Somewhere over the rainbow
Insane since: Mar 2001

posted posted 11-24-2003 07:15

The poster has demanded we remove all his contributions, less he takes legal action.
We have done so.
Now Tyberius Prime expects him to start complaining that we removed his 'free speech' since this message will replace all of his posts, past and future.
Don't follow his example - seek real life help first.

« BackwardsOnwards »

Show Forum Drop Down Menu