Freija
Bonjour tout le monde,
J'ai un petit problème, j'ai fais un diaporama géré par xml. Il se lance automatiquement et j'ai un bouton arret et un lecture.
Mon pb: lecture auto pas de soucis
arret pas de soucis
lecture ça va toujours
arret, ça ne marche plus, il continue la lect
Je ne peut arreter mon diapo q'une fois c genant!!!
pourriez-vous me donner un coup de main.
Voila mon code sur ma premiere image.
stop();
photos_xml=new XML();
photos_xml.ignoreWhite=true;
photos_xml.onLoad= function(ok){
if(ok){
noeuds=photos_xml.firstChild.childNodes;
nbrPhotos=noeuds.length;
premierePhoto=this.firstChild.firstChild;
dernierePhoto=this.firstChild.lastChild;
enCours=premierePhoto;
affichePhoto(enCours);
}
};
//charge fichier xml
photos_xml.load("photosg.xml");
function affichePhoto(photo){
//loader dans clip cont la photo
loadMovie(photo.attributes.fichier,this.cont);
//textes=photo.attributes.num+"/"+nbrPhotos+":"+photo.attributes.desc;
}
function diapo(){
//imgen cour = image en cours + 1
enCours=enCours.nextSibling;
//afficher img en cours
affichePhoto(enCours);
}
//lance le diapo
var intervalID:Number=setInterval(diapo,2570);
//lance son
mySound=new Sound();
mySound.attachSound("cd.mp3");
mySound.setVolume(100);
mySound.start(0,3);
arret.onRelease=function(){
clearInterval(intervalID);
stopAllSounds();
affichePhoto(premierePhoto);
};
//lect.onRelease=function(){
//
//};
Merci.