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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
| stop();
largeur = 100;
hauteur = 100;
espace = 5;
nbr = 13;
type = 'fileadmin/media/illustration';
infos = new Array();
infos[0] = "image1";
infos[1] = "image2";
infos[2] = "image3";
infos[3] = "image4";
infos[4] = "image5";
infos[5] = "image6";
infos[6] = "image7";
infos[7] = "image8";
infos[8] = "image9";
infos[9] = "image10";
infos[10] = "image11";
infos[11] = "image12";
infos[12] = "image13";
largeurTotale = nbr*(largeur+espace)+espace;
this.createEmptyMovieClip("diaporama", 0);
diaporama._y = 5;
for (var i = 0; i<nbr; i++) {
var mc = diaporama.createEmptyMovieClip("photo"+i, i);
mc._x = espace+(largeur+espace)*i;
mc.createEmptyMovieClip("conteneur", 0);
mc.conteneur.loadMovie(type+"/"+i+".jpg");
mc.createEmptyMovieClip("cadre", 1);
with (mc.cadre) {
lineStyle(1, "0x000000", 100);
moveTo(0, 0);
lineTo(largeur, 0);
lineTo(largeur, hauteur);
lineTo(0, hauteur);
lineTo(0, 0);
}
mc.nombre = i;
}
mc_trait.mc_1.onEnterFrame = function() {
pos_pastille = mc_trait.mc_1._x;
//trace(pos_pastille);
this.onRollOver = function() {
this.startDrag(true, 270, 0, 0, 0);
};
this.onPress = function() {
this.startDrag(true, 270, 0, 0, 0);
};
this.onRollOut = function() {
this.stopDrag(true, 270, 0, 0, 0);
};
this.onRelease = function() {
this.stopDrag(true, 270, 0, 0, 0);
};
diaporama._x = (740-largeurTotale)/270*pos_pastille;
} |
Partager