nbchansons = 6; // Nombre de chansons utilisées chansons = new Array(nbchansons); framePlayer = "player"; // Indiquer le nom de la frame contenant le script PLAYINGSONG htmlPlayer = "frame_gauche.html"; // Indiquer le nom de la page html contenant le script PLAYINGSONG currentSong = -1; wait = 10; // Délai (entre chaque morceau) en secondes // Nécessaire pour pallier au temps de chargement function LesChansons(titre,fichier,temps) { this.titre = titre; this.fichier = fichier; this.temps = temps; } chansons[0] = new LesChansons("XFiles","660theme.mid",425); chansons[1] = new LesChansons("Indiana Jones","604theme.mid",208); chansons[2] = new LesChansons("Imagine (John Lennon)","songs/imagine.mid",194); chansons[3] = new LesChansons("Musique de la BO du Titanic","heart1.mid",427); chansons[4] = new LesChansons("James Bond","jamesb1.mid",123); chansons[5] = new LesChansons("Mission Impossible","mission.mid",313); function LaChanson() { document.write('
'); } function Platine(Fonction) { this.delai = 0; this.fonction = Fonction + '.Lecture()'; this.Lecture = Lect; this.Lecture(); } function Lect() { currentSong++; if (currentSong == nbchansons) currentSong = 0; this.delai = ((chansons[currentSong].temps + wait) * 1000); document.CHANSONS.ChansonCourante.value = chansons[currentSong].titre; parent.frames[framePlayer].location.href = htmlPlayer; this.timeout = window.setTimeout(this.fonction,this.delai); }