Bonjour,
j'ai fais un ptit player, ca marche mais je voudrais que mon son boucle et qu'il demarre au chargement complet du mp3.
je suis actuellement obligé de cliquer sur le bouton play pour demarrer la musique
//__________________________________________
bouton_play._visible=false;
bouton_stop._visible=false;
bouton_stop.enabled=false;
bouton_play.onPress = function() {
this.enabled=false;
bouton_stop.enabled=true;
bouton_play._visible=false;
bouton_stop._visible=true;
ton_son.start();}
bouton_stop.onPress = function() {
this.enabled=false;
bouton_play.enabled=true;
bouton_stop._visible=false;
bouton_play._visible=true;
ton_son.stop();}
onEnterFrame = function() {
this.pourcentage = Math.round((ton_son.getBytesLoaded()/ton_son.getBytesTotal())*100);
if(this.pourcentage)
txt.text = this.pourcentage+"%";}
ton_son = new Sound();
ton_son.onLoad = function() {
bouton_play._visible=true;
bouton_stop._visible=true;
text.text ="";};
aleatoire="boucle"+ (random(4)+ 1) +".mp3" ;
ton_son.loadSound(aleatoire, false);
ton_son.onSoundComplete = function(){
bouton_play.enabled=true;
bouton_stop.enabled=false;}
//__________________________________________
//
inspiré du tuto :
[ Lien ]
merci de votre aide