Hexagora Forum
Hexagora Forum
Home | Profile | Active Topics | Members | Search | FAQ
 All Forums
 Dynamic HTML Editor
 Dynamic HTML Editor
 Sound on image when mouse is over

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert Email Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
joep Posted - 24 Mar 2004 : 20:43:06
Hi there,
is there any advise for what I want ?
When the mouse is over a image, I want to hear a sound.
Sound has to stop when mouse is out.
Thx !!
Joep.
5   L A T E S T    R E P L I E S    (Newest First)
Pelle Posted - 26 Mar 2004 : 15:56:34
Welcome joep!

jrwebb01 Posted - 25 Mar 2004 : 21:18:47
Hi De!

That is very kind. Thank you.

It is always a pleasure to help others explore and discover this remarkable web page editor. I wish I could do more.

Joe

n/a Posted - 25 Mar 2004 : 17:31:34
Thanks Joe!

Your posts are always useful!!!!!!
jrwebb01 Posted - 25 Mar 2004 : 15:38:46
Hi Joep:

Try this script inserted into the <body> of your page:

<script LANGUAGE="JavaScript"><!--
var aySound = new Array();
// Below: source for sound files to be preloaded
aySound[0] = "sound1.wav";
aySound[1] = "sound2.wav";
// DO NOT edit below this line
IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;
NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0;
ver4 = IE||NS? 1:0;
onload=auPreload;
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>
<a href="#" onMouseOver="playSound(0)" onMouseOut="stopSound(0)">sound 1</a>
<a href="#" onMouseOver="playSound(0)" onMouseOut="stopSound(0)">sound 2</a>

It is one of many useful scripts you will find at http://javascript.programmershelp.co.uk

Hope this helps. Good luck :)

Joe
s.dav Posted - 25 Mar 2004 : 08:55:12
This feature will be supported in Dynamic HTML Editor Version 2.0.

You can do it using an HTML object and insert code by hands :-)

Hexagora Forum © s.dav Go To Top Of Page
Snitz Forums 2000