Javascript code
============
Write this in .aspx page.
<script language=”JavaScript”><!–
// Sound on Mouseover javascript supplied by http://www.hypergurl.com
var aySound = new Array();
// PLACE YOUR SOUND FILES BELOW
aySound[0] = “sound002.wav”;
aySound[1] = “sound003.wav”;
aySound[2] = “sound004.wav”;
aySound[3] = “sound005.wav”;
aySound[4] = “sound006.wav”;
aySound[5] = “sound007.wav”;
aySound[6] = “sound008.wav”;
aySound[7] = “sound009.wav”;
aySound[8] = “sound010.wav”;
// Don’t alter anything 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’ LOOP=’TRUE’ HIDDEN=’TRUE’>”
if (IE) auEmb.innerHTML = Str;
else {
auEmb.document.open();
auEmb.document.write(Str);
auEmb.document.close();
}
auCon = IE? document.all.soundfiles: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>
<!– –>
=============
Code in ASP.NET
=============
<td width=”51%” valign=”top” class=”nav”><div><a href=”#” class=”htext2″ onmouseover=”playSound(0)” onmouseout=”stopSound(0)”>– Command Altitude<br />
</a>
<br />
<a href=”#” class=”htext2″ onmouseover=”playSound(2)” onmouseout=”stopSound(2)”>–Command Heading</a><br />
<br />
</div>
<div><a href=”#” class=”htext2″ onmouseover=”playSound(3)” onmouseout=”stopSound(3)”>–Command Speed</a>
<br />
<br />
<a href=”#” class=”htext2″ onmouseover=”playSound(4)” onmouseout=”stopSound(4)”>–Override</a> </div>
</td>
<td width=”51%” valign=”top” class=”nav”><div><a href=”#” class=”htext2″ onmouseover=”playSound(5)” onmouseout=”stopSound(5)”>–Permanent Override<br />
</a>
<br />
</div>
<div><a href=”#” class=”htext2″ onmouseover=”playSound(6)” onmouseout=”stopSound(6)”>–Temporary Override</a><br />
<br />
</div>
<div class=”htext2″>–<a href=”#” class=”htext2″ onmouseover=”playSound(7)” onmouseout=”stopSound(7)”>Cruise</a><br />
</div>
<div>
<br />
<a href=”#” class=”htext2″ onmouseover=”playSound(8)” onmouseout=”stopSound(8)”>–Manual Heading</a></div></td>
</tr>
</table>
</td>
Any doubts mail me: radhek@gmail.com
Blogged with Flock
Tags: Javascript, ASP.NET