m@lcom Moi? Une tete familière?
Nombre de messages : 112 Age : 45 Localisation : ougree - liege Date d'inscription : 05/03/2007
Porte-Monnaie Crédits: 230
| Sujet: flash-mx lecteur mp3 gerer par liste xml Sam 20 Oct - 1:44 | |
| [align=center]enfin le voici mon gros tuto lecteur mp3 gerer par liste xml PREPARATION DE LA LISTE XML http://malcom.123.fr/MP3.rar LECTEUR MP3 SOUX FLASH - Code:
-
// // 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); } 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() - 1) { liste.setSelectedIndex(liste.getSelectedIndex() + 1); } }; 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; } } RENDU FINALE http://malcom.123.fr/fichier/mp3.swfVoilla tuto fini jais eux dur pour expliquer aux mieux le tuto et jespaire que celui ci vous plaira[/align] | |
|
Warriortidus [Fondateur IG]
Nombre de messages : 7381 Age : 36 Localisation : En Bretagne Logiciel Utilisé : Photoshop Elements 4.0, Photoshop CS2 et Imageready CS2 Loisirs : Me contacter par MP uniquement si c'est nécessaire... Date d'inscription : 08/06/2006
Porte-Monnaie Crédits: 790
| Sujet: Re: flash-mx lecteur mp3 gerer par liste xml Dim 4 Nov - 12:47 | |
| Après avoir recu les avis de personnes utilisant le flash (bon ca a mis un peu de temps j'en conviens), il y a un soucis qui ressort de ces avis. Certes le tuto permet de réaliser ce lecteur par liste xml...
Mais le souci c'est qu'on fait quelque chose qu'on ne comprend pas... Donc a toi de voir si tu peux résoudre ce souci ou pas ^^ | |
|
yamhan Moi? Une tete familière?
Nombre de messages : 104 Age : 31 Logiciel Utilisé : principaux cs3 Date d'inscription : 23/12/2006
Porte-Monnaie Crédits: 100
| Sujet: Re: flash-mx lecteur mp3 gerer par liste xml Dim 4 Nov - 14:26 | |
| Salut, le problème c'est que ce tuto est en AS 2 , et ça serait cool de le refaire en as3 | |
|
m@lcom Moi? Une tete familière?
Nombre de messages : 112 Age : 45 Localisation : ougree - liege Date d'inscription : 05/03/2007
Porte-Monnaie Crédits: 230
| Sujet: Re: flash-mx lecteur mp3 gerer par liste xml Mer 7 Nov - 1:25 | |
| mdr vire le moi jais passer du temp sur ce tuto
donc peux pas texpliqer pluss | |
|
Contenu sponsorisé
| Sujet: Re: flash-mx lecteur mp3 gerer par liste xml | |
| |
|