Réponse acceptée !
Encore un ptit soucis : Je n'arrive pas à charger (loadMovie) le clip correspondant aux vignettes dans mon occurrence "zoom".
A moins qu'il faille +tot faire autrement.
Ci-joint mon code :
nbr = 100;
infos = new Array();
infos[0] = "commentaire 0";
infos[1] = "commentaire 1";
infos[2] = "commentaire 2";
infos[3] = "commentaire 3";
infos[4] = "commentaire 4";
infos[5] = "commentaire 5";
infos[6] = "commentaire 6";
infos[7] = "commentaire 7";
infos[8] = "commentaire 8";
infos[9] = "commentaire 9";
infos[10] = "commentaire 10";
infos[11] = "commentaire 11";
infos[12] = "commentaire 12";
infos[13] = "commentaire 13";
infos[14] = "commentaire 14";
infos[15] = "commentaire 15";
infos[16] = "commentaire 16";
infos[17] = "commentaire 17";
infos[18] = "commentaire 18";
infos[19] = "commentaire 19";
infos[20] = "commentaire 20";
infos[21] = "commentaire 21";
infos[22] = "commentaire 22";
// etc...
this.createEmptyMovieClip("diaporama", 0);
placer = function (xstart, ystart, nbrl, nbrc, v1x, v1y, v2x, v2y) {
var depth = 0;
for (var i = 0; i<nbrl; i++) {
for (var j = 0; j<nbrc; j++) {
var mc = diaporama.attachMovie("img", "img"+depth, depth);
mc._x = xstart+v1x*j+v2x*i;
mc._y = ystart+v1y*j+v2y*i;
depth++;
var mc = mc.createEmptyMovieClip("photo"+depth, depth);
// mc._x = espace + (largeur + espace)*i;
mc.createEmptyMovieClip("conteneur", 0);
mc.conteneur.loadMovie("http://benmarie.free.fr/images/img_"+depth+".jpg");
// mc.createEmptyMovieClip("cadre", 1);
mc.nombre = depth;
mc.onRollOver = function() {
commentaires.text = "Photo n°" + this.nombre + " : " + infos[this.nombre];
};
mc.onRollOut = function() {
commentaires.text = "";
};
mc.onRelease = function() {
zoom.loadMovie("http://benmarie.free.fr/images/img_"+depth+".jpg");
zoom._xscale = 150;
zoom._yscale = 150;
};
}
}
};
placer(0, 0, 10, 10, 22, 0, 0, 22);
navig.onPress = function() {
this.startDrag(false);
this.onEnterFrame = function() {
this._parent.diaporama._x = -3000+this._x/98*980;
this._parent.diaporama._y = -3550+this._y/98*980;
};
};
navig.onRelease = function() {
this.stopDrag();
delete this.onEnterFrame;
};
Ou le fichier :
[ Lien ]
Je continue d'essayer de mon côté.
@+