Salut ,
J'ai fait un site, en bricolant
pour une asso avec un lecteur mp3 qui fonctionne avec
xml load...............tt marche bien avec internet explorer...........mais pas avec mozilla firefox..... pourtant les infos des mp3 sont affichés.........??
le site c'est www.ep-mind.org, un label de musik elektro........
Si qql peut nous aider..........
Voici le script actionscript:
//
// Gestion du XML
//
playlist_xml = new XML();
playlist_xml.ignoreWhite = true;
playlist_xml.onLoad = function(ok) {
if (ok = true) {
playliste = this.firstChild.childNodes;
premiere = this.firstChild.firstChild;
enCours = premiere;
for (i = 0; i < playliste.length; i++) {
liste.addItem(enCours.attributes.num + ": " + enCours.attributes.nom, enCours.attributes.fichier);
enCours = enCours.nextSibling;
}
}
};
playlist_xml.load("playlist.xml");
//
// Gestion du chargement des mp3s
//
chanson = new Sound();
chanson.onLoad = function(ok) {
if (ok = true) {
chanson.start();
_root.ecranTitre = "[0%]:" + liste.getSelectedItem().label;
} else {
_root.ecranTitre = "Problème au chargement.";
deselection();
}
};
chanson.onSoundComplete = function() {
_root.ecranTitre = "Chanson terminée.";
deselection();
};
//
// Gestion du clic dans la liste
//
liste.setSelectMultiple(false);
liste.setChangeHandler("userClic");
function userClic() {
fichierEnCours = liste.getSelectedItem().data;
chanson.loadSound(fichierEnCours, true);
chansonIntervale = setInterval(afficheTimer, 1000);
_root.ABspeakerCLIP._visible = true;
_root.ABspeakerCLIP_NO._visible = false;
}
function deselection() {
clearInterval(chansonIntervale);
_root.ecranTitre = "Musique stoppée.";
liste.setSelectedIndices(null);
}
//
// Gestion des boutons
//
boutonStop.setClickHandler("arreterTout");
function arreterTout() {
stopAllSounds();
deselection();
}
boutonPause.onRelease = function() {
chansonPosition = Math.round(chanson.position / 1000);
clearInterval(chansonIntervale);
_root.ecranTitre = "[pause]:" + liste.getSelectedItem().label;
chanson.stop();
};
boutonJouer.onRelease = function() {
chanson.start(chansonPosition, 1);
chansonIntervale = setInterval(afficheTimer, 1000);
};
boutonPrecedent.onRelease = function() {
if (liste.getSelectedIndex() > 0) {
liste.setSelectedIndex(liste.getSelectedIndex() - 1);
}
};
boutonSuivant.onRelease = function() {
if (liste.getSelectedIndex() < liste.getLength() - 0) {
liste.setSelectedIndex(liste.getSelectedIndex() + 0);
}
};
boutonRecule.onRelease = function() {
chansonPosition = Math.round(chanson.position / 1000) - 5;
if (chansonPosition > 0) {
chanson.start(chansonPosition, 1);
}
};
boutonAvance.onRelease = function() {
chansonPosition = Math.round(chanson.position / 1000) + 5;
if (chansonPosition < chanson.duration) {
chanson.start(chansonPosition, 1);
}
};
boutonRelance.onRelease = function() {
clearInterval(chansonIntervale);
_root.ecranTitre = "[0%]:" + liste.getSelectedItem().label;
chanson.start(0, 1);
chansonIntervale = setInterval(afficheTimer, 1000);
};
//
// affichage du timer
//
function afficheTimer() {
if (chanson.duration > 0) {
chansonPourcent = Math.round((chanson.position * 100) / chanson.duration);
_root.ecranTitre = "[" + chansonPourcent + "%]:" + liste.getSelectedItem().label;
}
}
et la playlist xml:
<?xml version="1.0" encoding="iso-8859-1"?>
<playlist>
<chanson num="01" nom="Le MARIONNETTISTE_Melodisillon.(EP0000)" fichier="
[ Lien ]_ marionnettiste.mp3" />
<chanson num="02" nom="FPYM_Tripop.(EP0000)" fichier="
[ Lien ] fpym.mp3" />
<chanson num="03" nom="CYCLONYC_Light to urserlf.(EP0000)" fichier="
[ Lien ] to urself_cyklonyc.mp3" />
<chanson num="04" nom="FPYM_Dur temps pour les ravers.(EP0000)" fichier="
[ Lien ] temps pour les ravers_fpym.mp3" />
<chanson num="05" nom="Grassmatt_dirty beat remix koolkeith" fichier="
[ Lien ] beat remix koolkeith.mp3" />
<chanson num="06" nom="Le MARIONNETTISTE_12 Nov" fichier="
[ Lien ]" />
<chanson num="07" nom="Le MARIONNETTISTE_Clef" fichier="
[ Lien ]" />
<chanson num="08" nom="Le MARIONNETTISTE_Circus" fichier="
[ Lien ]" />
<chanson num="09" nom="JOAN(LeMarionnettiste)_Scocco" fichier="
[ Lien ]" />
<chanson num="10" nom="FPYM_Chepadousavient(SFK)" fichier="
[ Lien ]" />
<chanson num="11" nom="FPYM_Teknival stailey(SFK)" fichier="
[ Lien ] STAILEY.mp3" />
<chanson num="12" nom="FPYM_Hardcore test(SFK)" fichier="
[ Lien ] TEST.mp3" />
<chanson num="13" nom="JOAN(LeMarionnettiste)_Ca gratte" fichier="
[ Lien ] gratte.mp3" />
<chanson num="14" nom="JOAN(LeMarionnettiste)_Carnaval" fichier="
[ Lien ]" />
</playlist>
Voila je sais pas si c'est bien clair............mais ya de l'espoir.........
f_cpu