|
|||||||
| General Discussion and support for your general issues associated with web design. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
I already got the mouseover script for javascript now all i need to know is how to add sound to it (Look At File !)
__________________
Many people already feared the staff because they banned there *** ! |
|
#2
|
|||
|
|||
|
What if you did:
<head> <script language="JavaScript" type="text/JavaScript"> img1 = new Image(height, width); img1.src = "img1.ext"; img2 = new Image(height, width); img2.src = "img2.ext"; </script> </head> <body> <a href="nowhere.html" onMouseOver="document.image1.src = 'img2.ext';playSound('file.wav', '1');" onMouseOut = "document.image1.src = 'img1.ext';playSound('quiet.wav', '1');"><img name="image1" src="img1.ext"></a> <script language="JavaScript" type="text/JavaScript"> function playSound(file, loop); document.writeln("<bgsound src=\"" + file + "\" loop=\"" + loop + "\">"); return true; } </script> </body> |
|
#3
|
||||
|
||||
|
I found something like that in the HTMl book i had it had the following code
<HTML><HEAD><TITLE>Llumi's big cat dreams<TITLE> <SCRIPT LANGUAGE="javascript"> <!-- littlecat = new image(143,83) littlecat.src = "Real.jpg" bigcat = new image(143,83) bigcat.src = "dream.jpg" // --> </script></head></body> Point at Llumi to see what she's thinking. <a href="nowhere.html" Onmouseover = "document.catpic.src = bigcat.src" Onmouseout = "document.catpic.src = littlecat.src"> <img src="real.jpg" name="catpic" width=143 height=83> </a> </body><html> Thats how it showed it in my book but it never worked !
__________________
Many people already feared the staff because they banned there *** ! |
|
#4
|
||||
|
||||
|
Quote:
__________________
Many people already feared the staff because they banned there *** ! |
|
#5
|
|||
|
|||
|
Quote:
|
|
#6
|
||||
|
||||
|
Quote:
__________________
Many people already feared the staff because they banned there *** ! |
|
#7
|
||||
|
||||
|
<A HREF="YourPage.html" onMouseOver="playSound(0)" onMouseOut="stopSound(0)">Move mouse over to play sound</A>
your link <script LANGUAGE="JavaScript"><!-- var aySound = new Array(); aySound[0] = "laser.wav"; document.write('<BGSOUND ID="auIEContainer">') 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> 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.
__________________
WAR EAGLE! 4 guys rolla (some good asp.net articles)|A browser hack chart, very handy Last edited by PeOfEo; 06-20-2003 at 11:48 PM. |
|
#8
|
||||
|
||||
|
Quote:
http://net4tv.com/voice/Story.cfm?storyID=3413 i found another way to do a sound mouse over there !
__________________
Many people already feared the staff because they banned there *** ! |
|
#9
|
||||
|
||||
|
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.
__________________
WAR EAGLE! 4 guys rolla (some good asp.net articles)|A browser hack chart, very handy |
|
#10
|
|||
|
|||
|
Hi there !!
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 ? tis is the avatar as i got on this site. http://i21.photobucket.com/albums/b2...max9/av-34.gif thanks and could you please respond to me vai email at littlemax9@yahoo.com regards Pieter Last edited by JohnnyGT; 01-30-2006 at 01:56 AM. |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|