function auPreload() {
if (!ver4) return;
if (NS) auEmb = new Layer(0,window);
else {
Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>";
document.body.insertAdjacentHTML("BeforeEnd",Str);
}
var Str = '';
for (i=0;i<aySound.length;i++)
Str += "<EMBED SRC='"+aySound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"
if (IE) auEmb.innerHTML = Str;
else {
auEmb.document.open();
auEmb.document.write(Str);
auEmb.document.close();
}
auCon = IE? document.all.auIEContainer:auEmb;
auCon.control = auCtrl;
}
function auCtrl(whSound,play) {
if (IE) this.src = play? aySound[whSound]:'';
else eval("this.document.embeds[whSound]." + (play? "play()":"stop()"))
}
function playSound(whSound) { if (window.auCon) auCon.control(whSound,true); }
function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); }
//-->
</script>
I just saw this on another site. Ok it will play a sound 'lazer.wav' whenver you roll a mouse over a link with the event handler code in it. It also preloads these sounds.
Its pretty nifty give it a try. You should just be able to combine your event handlers though to get the desired affect with an image roll over too though.
function auPreload() {
if (!ver4) return;
if (NS) auEmb = new Layer(0,window);
else {
Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>";
document.body.insertAdjacentHTML("BeforeEnd",Str);
}
var Str = '';
for (i=0;i<aySound.length;i++)
Str += "<EMBED SRC='"+aySound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"
if (IE) auEmb.innerHTML = Str;
else {
auEmb.document.open();
auEmb.document.write(Str);
auEmb.document.close();
}
auCon = IE? document.all.auIEContainer:auEmb;
auCon.control = auCtrl;
}
function auCtrl(whSound,play) {
if (IE) this.src = play? aySound[whSound]:'';
else eval("this.document.embeds[whSound]." + (play? "play()":"stop()"))
}
function playSound(whSound) { if (window.auCon) auCon.control(whSound,true); }
function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); }
//-->
</script>
I just saw this on another site. Ok it will play a sound 'lazer.wav' whenver you roll a mouse over a link with the event handler code in it. It also preloads these sounds.
Its pretty nifty give it a try. You should just be able to combine your event handlers though to get the desired affect with an image roll over too though.
that doesnt pre-load though There are three or four similar but different methods you can use I guess. Similar but bifferent... I guess thats a new peoism right there lol similar but different.
can someone please help me do a mouse sound over for my avatar.
i am not the best of computer literate but know little bits from seing other work on it !
my avatar is a boy on a trike(3 wheeler) doing a drift slide and would like it to have sound if my friends move their mouse over it like tires squeling !!
could you please help me or do something with it and i could link it to my club site ?
Bookmarks