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.
Merci.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46 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(){ // //};
Partager