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
| largeur = 300;
hauteur = 225;
espace = 25;
nbr = 5;
infos = new Array();
infos[0] = "test 1";
infos[1] = "test 2";
infos[2] = "test 3";
infos[3] = "test 4";
infos[4] = "test 5";
largeurTotale = nbr*(largeur + espace) + espace;
this.createEmptyMovieClip("diaporama", 0);
diaporama._y = 20;
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("photos/" + i + ".jpg");
mc.createEmptyMovieClip("cadre", 1);
mc.nombre = i;
mc._alpha = 50 ;
mc.onRollOver = function() {
commentaires.text = infos[this.nombre];
this._alpha = 100;
}
mc.onRollOut = function() {
commentaires.text = "";
this._width = largeur;
this._height = hauteur;
this._alpha = 50 ;
}
mc.onReleaseOutside = function () {
this._width = largeur;
this._height = hauteur;
}
mc.onPress = function () {
this._xscale = largeur*0.6;
this._yscale = hauteur*0.6;
}
mc.onRelease = function () {
this._width=largeur;
this._height=hauteur;
}
}
onMouseMove = function() {
diaporama._x = (600 - largeurTotale)/600*_xmouse;
} |
Partager