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
|
_root.createEmptyMovieClip("cadreChargementPhoto", 0);
cadreChargementPhoto._x = 100;
cadreChargementPhoto._y = 36;
//
var chargeLegendes = new XML();
chargeLegendes.load("legendesBA.xml");
chargeLegendes.ignoreWhite = true;
chargeLegendes.onLoad = function() {
racineLegendes = this.firstChild;
nbrSeries = Math.ceil((racineLegendes.childNodes.length-1)/6);
affNbrSeries = 1+"/"+nbrSeries;
};
//
for (i=1; i<=6; i++) {
_root.createEmptyMovieClip("image"+i, i);
_root["image"+i]._x = 9.7;
_root["image"+i]._y = (i*74)-37;
}
//
var premiereImageChargee = 0;
//
chargementSerie = function (imageAcharger) {
for (i=1; i<=6; i++) {
imageAcharger++;
_root["chargeur"+i] = new MovieClipLoader();
_root["chargeur"+i].sonNumero = i;
_root["chargeur"+i].saGrandePhoto = imageAcharger;
_root["chargeur"+i].onLoadComplete = function() {
_root["image"+this.sonNumero].saGrandePhoto = this.saGrandePhoto;
_root["image"+this.sonNumero].onPress = function() {
cadreChargementPhoto.loadMovie("images/n"+this.saGrandePhoto+".jpg");
vLegende = racineLegendes.childNodes[this.saGrandePhoto].attributes.legende;
};
};
_root["chargeur"+i].loadClip("vignettesImages/n"+imageAcharger+".jpg", _root["image"+i]);
}
affNbrSeries = Math.floor(imageAcharger/6)+"/"+nbrSeries;
};
chargementSerie(premiereImageChargee);
//
btSerieSuivante.onPress = function() {
if (premiereImageChargee<racineLegendes.childNodes.length-7) {
premiereImageChargee += 6;
}
chargementSerie(premiereImageChargee);
};
btSeriePrecedente.onPress = function() {
if (premiereImageChargee>=6) {
premiereImageChargee -= 6;
}
chargementSerie(premiereImageChargee);
};
//
//
btnAccueil.onRelease = function(){
delete _root.createEmptyMovieClip("cadreChargementPhoto", 0);
delete //là je ne sais pas quoi mettre ici pour delete les vignettes
gotoAndPlay(378);
} |