Bonjour,
je débute.
sur flash MX, je fais défiler 4 images dans un movie clip avec des boutons Suivant (next) et Précédent (back).
Je souhaitrai qu'a la dernière image, le bouton Suivant enchaine sur la première image.
Ci-après le code utilisé (fourni avec MX) :
square._alpha = 0;
whichPic = 1;
// initiate change to new image when buttons are clicked
next.onPress = function() {
if (whichPic<4 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic++;
input = whichPic;
}
};
back.onPress = function() {
if (whichPic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
whichpic--;
input = whichPic;
}
};
_root.onEnterFrame = function() {
if (square._alpha>10 && fadeOut) {
square._alpha -= 10;
}
if (square._alpha<10) {
loadMovie("562-"+whichPic+".jpg", "square");
fadeOut = false;
fadeIn = true;
}
if (square._alpha<100 && fadeIn && !fadeOut) {
square._alpha += 10;
} else {
fadeIn = false;
}
}
en vous remerciant de votre aide