Sabine: Script Hintergrundsmusik über Auswahlmenü auswählen

Beitrag lesen

Hallo... danke für deine Anwort :-)

<bgsound src=".../HP-Musik/ 01.wav" loop="-1">

... im Grunde haben sie das Format, was ich ihnen gebe, kann es ja umwaneln.
ich habe im netz schon scrips gesehen, wo es so aussah wie ich es gerne gehabt hätte... als ein Drop-Down-Menü mit 2-3 Titeln plus 1. Musikstop
Mit dem Titel: Bitt wählen Sie aus.
Das war wohl was mit Java und HTML verknüpftes... allerding bin ich daran gescheitert ...es auf meine Pfade zu aktuallisieren...
hab leider das script auch nicht mehr.
Außer das noch... und hier muss wohl bgsound rein statt embed.
Quellcode
 <html>
<head>
<title>Navigation links</title>

<script type="text/javascript">
<!--
function midi(sound)
{
var txt = ""
 if(sound==1) {
     var vamp="<EMBED SRC=Midi/NDW/1000_mal_beruehrt.mid width=69 height=40 panel=0 autostart=true loop=true>"; txt=("Klaus Lage - 1000 mal berührt")
    }

else if(sound==2) {
      var vamp="<EMBED SRC=Midi/NDW/Bluemchen-Nur_Getraeumt.mid width=69 height=40 panel=0 autostart=true loop=true>"; txt=("Blümchen - Nur Geträumt")
    }

else if(sound==3) {
      var vamp="<EMBED SRC=Midi/NDW/Eine_Insel_mit_2_Bergen.mid width=69 height=40 panel=0 autostart=true loop=true>"; txt=("Dolls United - Eine Insel mit 2 Bergen")
    }

document.close();
document.open();

document.writeln('<BODY vlink=#FFFFFF alink=#FFFFFF link=#FFFFFF bgcolor=#004671  scroll=auto leftMargin=0 topMargin=0 marginheight=0 marginwidth=0><table height=100% align=left width=140>');
document.writeln('<tr><td height="20">');

document.writeln('<table border="1" cellspacing="0" cellpadding="0" align=left width=130><tr>');

document.writeln('<tr valign="top"><td width="140" height="279" background="background_HP_neu_links2.jpg" align=center>');
document.writeln('<br><font color="#007AB5" size=+1 face="Verdana"><b>NDW</b></font><br><b>"<font face="VERDANA" color=#007AB5 size=-2>' + txt + '</font>"</b><br><br>');

document.writeln(vamp)

document.writeln('</td>');
document.writeln('</tr>');
document.writeln('</table>');
document.writeln('</body>');

}

//-->
</script>

</head>
<BODY bgcolor="#004671" text="#FFFFFF" vLink="#004671" aLink="#258DBF" link="#004671"
leftMargin=0 topMargin=0 scroll=auto marginheight="0" marginwidth="0">

<TABLE height="100%" align="left" width="140" cellSpacing=0 cellPadding=0 border=0>
  <tr valign="top">
<td  background="background_HP_neu_links1.jpg" width="140" height="320">

<div style="position:absolute; top:0.2cm; left:0.9cm;">
<div align="center"><font color="#007AB5" size=+1 face="Verdana"><b>NDW</b></font></div>
</div>

<div style="position:absolute; top:1.9cm; left:0.2cm;">
<div align="center"><font color="#000000" size="-2" face="Verdana"><a href="Nav_fun_Auswahl.html"><b>Neues Genre wählen</b></a></font></div>
</div>

<div style="position:absolute; top:2.6cm; left:0.15cm;">
<div align="center"><font color="#000000" size="-1" face="Verdana"><b>Wähle ein Lied!</b></font></div>
</div>
<div style="position:absolute; top:3cm">
<form name="Testform" action="">
<select name="Auswahl" size="4" onChange="midi(value)">
<option value="1">1000 mal berührt</option>
<option value="2">Nur Geträumt</option>
<option value="3">Eine Insel mit 2 ...</option>
</select>
</form>
</div>

</td>
<td>&nbsp</td>
  </tr>

</table>

</body>
</html>

... hmm aber hinbekommen habe ich das leider nicht.
aber das ist so wie ich es mir vorgestellt habe....

Hättest du hierzu vielleiht eine Idee?

Lieben Gruß
Sabine

************************************************************************

Wie bindest Du denn die bisherige Hintergrundmusik ein? Welches Format haben die Tracks?

Eine solche Einbindung geht normalerweise mittels embed. Die einfachste Variante bestünde darin, statt einem MP3 eine Playlist mit auf dem Server vorhandenen Stücken einzubinden (das .pls-Format wird von den meisten Systemen erkannt).

Etwas komplexer geht es natürlich auch mit JavaScript, wobei sich hier das Problem stellt, dass Du innerhalb des Scripts nicht erkennen kannst, an welcher Stelle des Lieds Du Dich befindest - auch Stoppen und Fortsetzen geht teilweise nicht.

Der "Königsweg" an dieser Stelle ist Flash, was aber mit hohem Aufwand und teurer Software verbunden ist.

Gruß, LX