ciao ragazzi ho scaricato uno script dalle dedeme dhtml http://www.html.it/dynamic/utility/utility01.htm ma nn funge ne aonline ne in locale, ho provato a cercare il problema ma nn sono il massimo nella programmazione.
Chi mi da una manina ?
<HTML>
<HEAD>
<!-- Codice scaricato gratuitamente da HTML.it, il sito italiano sul Web publishing
http://www.html.it -->
<TITLE>Demo Dynamic HTML: esempio pratico </TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
n = (document.layers) ? 1:0
ie = (document.all) ? 1:0
// also works for Netscape 3, I set the n value to 3 to tell the difference
// between Netscape 4 (n=1) and Netscape 3 (n=3)
if (navigator.appName == "Netscape" && parseInt(navigator.appVersion) == 3) {n=2;ie=0}
// initially set sound off
soundenabled = 0
function playAudio(song) {
// only play if sound is enabled
if (soundenabled) {
// must stop the song before playing another one (for IE)
stopAudio()
// play the desired song
if (n>=1) {
if (song==1) document.musica1.play(true) // loop the midi file
if (song==2) document.musica2.play(true)
}
if (ie) {
if (song==1) document.musica1.run()
if (song==2) document.musica2.run()
}
}
}
function stopAudio() {
// only stop if sound is enabled
if (soundenabled) {
// stop playing all the songs
document.musica1.stop()
document.musica2.stop()
}
}
//-->
</SCRIPT>
</HEAD>
<BODY bgcolor="white" >
<!--
Warning: you have to execute the functions using
HREF="#" onClick="functionName()" or it won't work in IE 4
-->
Un po' di Reggae...
... o un po' di pulp
stop
<!--
If you are using Netscape 4.0 to view this source you will not see the
JavaScript that writes out these EMBED tags
-->
<SCRIPT LANGUAGE="JavaScript">
<!--
// dynamically write the embed tag only if Netscape has a midi component, you
// can change that to audio/x-wav if you want to play wav files etc.
// IE4 has sound by default so you only need to check if they are using IE 4
if ((n>=1 && navigator.mimeTypes["audio/x-midi"]) || ie) {
soundenabled = 1
document.write("<EMBED NAME='musica1' SRC='musica1.mid' LOOP=TRUE AUTOSTART=FALSE HIDDEN=TRUE MASTERSOUND>")
document.write("\n<EMBED NAME='musica2' SRC='musica2.mid' LOOP=TRUE AUTOSTART=FALSE HIDDEN=TRUE MASTERSOUND>")
}
// if the browser doesn't have midi-capabilities go download the component for N4 or go to the Netscape download page
else {
soundenabled = 0
if (n==1) { // if Netscape 4
if (confirm("To listen to the music on this page you must download the\nmultimedia component to Netscape Communicator\n\nDo you want to install it now?")) {
alert("On the following page, download the multimedia component (mm.jar) for your operating system.\nWhen you are done, reload this page to hear the music")
location = "ftp://ftp.netscape.com/pub/communicator/smartupdate/index.html"
}
}
else { // if anything else
if (confirm("You do not have a midi compatible browser, do you want\n to download Netscape Communicator now?"))
location = "http://home.netscape.com/download/"
}
}
//-->
</SCRIPT>
</body>
</html>