Hintergrundmusik stop & start ! help pls!

Status
Nicht offen für weitere Antworten.

phil-ip

Erfahrenes Mitglied
hi, Ich hab hier schon ein Script, welches hintergrundmusik abspielt. Nur wie kann ich nun einen start bzw. stop button einbauen. Wenns geht bitte die buttons einfach als start.jpg und stop.jpg! pls help!

code:

<html>
<head>
<title>music.mp3</title>
<!-- Microsoft: -->
<bgsound src="music.mp3" loop="infinite">
</head>
<body>
<!-- Netscape: -->
<embed src="music.mp3" autostart="true" loop="true" hidden="true" height="0" width="0">
<h1>Inhalt</h1>
</body>
</html>
 
hab gearde selbst was gefunden!

<html>
<head>
<script>
function play() {
document.getElementById("musik").play();
}
function stop() {
document.getElementById("musik").stop();
}
</script>
</head>
<body>
<EMBED SRC="music.mp3" HIDDEN="TRUE" AUTOSTART="true" MASTERSOUND id="musik">
<A HREF="#"
onClick="play()">
play
</A>
<A HREF="#"
onClick="stop()">
stop
</A>
</body>



--------------------------------------------------- kann geschlossen werden -------------------------------------
 
Status
Nicht offen für weitere Antworten.
Zurück