Hallo
Ich hab eine Frage zu java Script:
Ich kenn mich leider nicht gut in dieser Sprache aus, hab mit Image
Ready eine Image Map in java script erzeugt:
Code
<script type="text/javascript">
function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}
var preloadFlag = false;
function preloadImages() {
if (document.images) {
Telefon2_01_Imagemap_06_over = newImage("Bilder/Telefon2_01-Imagemap_06_ove.gif");
Telefon2_01_Imagemap_01_over = newImage("Bilder/Telefon2_01-Imagemap_01_ove.gif");
Telefon2_01_Imagemap_02_over = newImage("Bilder/Telefon2_01-Imagemap_02_ove.gif");
Telefon2_01_Imagemap_03_over = newImage("Bilder/Telefon2_01-Imagemap_03_ove.gif");
Telefon2_01_Imagemap_05_over = newImage("Bilder/Telefon2_01-Imagemap_05_ove.gif");
Telefon2_01_Imagemap_04_over = newImage("Bilder/Telefon2_01-Imagemap_04_ove.gif");
preloadFlag = true;
}
}
// -->
</script>
<style>
body, td {font-family:verdana,arial; font-size:11px; color: #000000}
.white {font-family:verdana,arial; font-size:11px; color: #FFFFFF}
a {font-family:verdana,arial; font-size:11px; color: #000000; text-decoration: none}
a:hover {font-family:verdana,arial; font-size:11px; color: #FFFFFF; text-decoration: none}
.special {font-family:verdana,arial; font-size:11px; color: #EDA745}
</style>
</head>
<body bgcolor="#7D833C" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="preloadImages();" >
<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td width="770" height="70" colspan="3"></td>
</tr>
<tr>
<td>
[img]Bilder/Telefon2_01.gif[/img]
<map name="Telefon2_01_Map">
<area shape="circle" alt="" coords="87,429,10" href="#"
onmouseover="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_06_ove.gif'); return true;"
onmouseout="changeImages('Telefon2_01', 'Bilder/Telefon2_01.gif'); return true;"
onmousedown="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_06_ove.gif'); return true; "
onmouseup="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_06_ove.gif'); return true;">
<area shape="circle" alt="" coords="344,401,18" href="#"
onmouseover="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_05_ove.gif'); return true;"
onmouseout="changeImages('Telefon2_01', 'Bilder/Telefon2_01.gif'); return true;"
onmousedown="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_05_ove.gif'); return true;"
onmouseup="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_05_ove.gif'); return true;">
<area shape="circle" alt="" coords="402,402,18" href="#"
onmouseover="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_04_ove.gif'); return true;"
onmouseout="changeImages('Telefon2_01', 'Bilder/Telefon2_01.gif'); return true;"
onmousedown="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_04_ove.gif'); return true;"
onmouseup="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_04_ove.gif'); return true;">
<area shape="circle" alt="" coords="284,400,18" href="#"
onmouseover="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_03_ove.gif'); return true;"
onmouseout="changeImages('Telefon2_01', 'Bilder/Telefon2_01.gif'); return true;"
onmousedown="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_03_ove.gif'); return true;"
onmouseup="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_03_ove.gif'); return true;">
<area shape="circle" alt="" coords="142,266,13" href="http://www.gamesweb.com" target="_blank"
onmouseover="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_02_ove.gif'); return true;"
onmouseout="changeImages('Telefon2_01', 'Bilder/Telefon2_01.gif'); return true;"
onmousedown="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_02_ove.gif'); return true;"
onmouseup="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_02_ove.gif'); return true;">
<area shape="circle" alt="" coords="87,266,13" href="http://www.el-cuerpo.com" target="_blank"
onmouseover="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_01_ove.gif'); return true;"
onmouseout="changeImages('Telefon2_01', 'Bilder/Telefon2_01.gif'); return true;"
onmousedown="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_01_ove.gif'); return true;"
onmouseup="changeImages('Telefon2_01', 'Bilder/Telefon2_01-Imagemap_01_ove.gif'); return true;">
</map></td>
Alles anzeigen
ich möchte nun bei "onmousedown" einen Klingelton.wav ertönen lassen.
Ist es egal ob .mp3, .wav oä. ????
Kann mir da bitte jemand weiterhelfen