I am trying to help a friend with his Uni Project by creating an image map which plays audio clips he created when you hover over different parts of the image. I just do not know what I seem to be getting wrong, any help is much appreciated!
HTML:
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="DLL MUSIC SIM.css">
<script type="text/javascript" src="DLL MUSIC SIM.js"></script>
<title>Daddy Long Legs Music Simulator</title>
</head>
<body>
<img src="https://photos-4.dropbox.com/t/2/AAD7kArwYwyj90InSvhwMX09saAeNWEh4czxGRe2JjinjQ/12/150613124/png/32x32/1/_/1/2/First%20Draft.png/EJKfmnMYRCACKAI/xur8HIDxW2Qob1IEtNOndWn1TSPxcVdIxuzxDGr1BxY?size=2048x1536&size_mode=3" alt="" usemap="#DrumMap" />
<img id="draft" width="1652" height="971" alt="">
<map name="map">
<area shape="poly" coords="685,480,695,678,993,684,983,472" nohref="nohref" onmouseover="changeClip('drum1');"/>
</map>
<audio id="drum1"><source src="https://www.dropbox.com/s/i85f9q7qruar91m/Track%201%20Drums.wav?dl=0" type="audio/wav"></source></audio>
</body>
</html>
CSS:
body{
background-color: black;
}
area {
display: none;
}
#audio {
display: none;
}
JS:
function playClip(clip) {
document.getElementById(note).play();
}
function pauseAudio() {
audio.pause() onmouseout;
}
I have been looking this up for a while now though not any further forward, thanks in advance!