Bonsoir à tous,
J'aimerais savoir s'il serait possible d'insérer un petit affichage indiquant à quelle numéro d'image on se situe et le nombre total d'image défilant ?
En image ce que je souhaiterais faire :
http://img694.imageshack.us/img694/9193/sanstitreofz.png
J'ai,réutilisé un code déjà existant pour effectuer mon défilement d'image.
Voici le code qui faudrait pouvoir adapter dans la mesure du possible :
Merci d'avance pour votre aide.
<script language="JavaScript">
<!--
var bauto = 0;
var dossier= "";
var numero = 1;
var num = 1;
function objet() {
this.length = objet.arguments.length
for (var i = 0; i < this.length; i++)
this[i+1] = objet.arguments[i]
}
var nom = new objet ("01.jpg", "02.jpg", "03.jpg" , "04.jpg" , "05.jpg");
function suivante() {
numero += 1;
if (numero == nom.length + 1) numero = 1;
document.image.src = dossier+nom[numero];
}
function precedente() {
numero -= 1;
if (numero == 0) numero = nom.length;
document.image.src = dossier+nom[numero];
}
function changer() {
numero += 1;
if (numero == nom.length + 1) numero = 1;
document.image.src = dossier+nom[numero];
roll=setTimeout("changer()", 4500);
}
function initial() {
window.clearTimeout(roll);
document.image.src = dossier+nom[numero];
}
function auto() {
if (bauto == 0)
{
bauto =1; changer();
document.automat.src = "stop.png";
document.automat.title = "Stop";
}
else
{
bauto =0; initial();
document.automat.src = "doublefleche.png";
document.automat.title = "Auto";
}
}
//-->
</script>